@ankhorage/surface 2.0.2 → 2.0.3
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 +6 -0
- package/README.md +692 -47
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/theme/colorEngine.d.ts.map +1 -1
- package/dist/theme/colorEngine.js +4 -1
- package/dist/theme/colorEngine.js.map +1 -1
- package/dist/theme/types.d.ts +1 -0
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.js.map +1 -1
- package/package.json +5 -2
- package/src/components/tooltip/Tooltip.tsx +1 -1
- package/src/theme/colorEngine.test.ts +3 -2
- package/src/theme/colorEngine.ts +4 -2
- package/src/theme/inverseSemantics.test.ts +48 -0
- package/src/theme/types.ts +1 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,57 +1,702 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- markdownlint-disable MD013 MD033 -->
|
|
2
|
+
<!-- This file is generated by Paradox. Do not edit manually. -->
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# @ankhorage/surface
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
        
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
-
- Theme-driven styling
|
|
9
|
-
- Cross-platform consistency
|
|
8
|
+
Cross-platform UI foundation for React Native and React Native Web. Provides theming, layout primitives, and core building blocks for modern apps.
|
|
10
9
|
|
|
11
|
-
##
|
|
10
|
+
## Generated documentation
|
|
12
11
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
12
|
+
- [Interactive documentation app](././paradox/index.html)
|
|
13
|
+
- [Public API reference](././paradox/exports.md)
|
|
14
|
+
- [Component registry](././paradox/components.md)
|
|
15
|
+
- [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
|
|
16
|
+
- [Module relationships](././paradox/diagrams/module-relationships.mmd)
|
|
17
|
+
- [Export graph](././paradox/diagrams/export-graph.mmd)
|
|
18
|
+
- [ActionSheet sequence](././paradox/diagrams/sequences/action-sheet.mmd)
|
|
19
|
+
- [AppBar sequence](././paradox/diagrams/sequences/app-bar.mmd)
|
|
20
|
+
- [Badge sequence](././paradox/diagrams/sequences/badge.mmd)
|
|
21
|
+
- [Button sequence](././paradox/diagrams/sequences/button.mmd)
|
|
22
|
+
- [Card sequence](././paradox/diagrams/sequences/card.mmd)
|
|
23
|
+
- [Checkbox sequence](././paradox/diagrams/sequences/checkbox.mmd)
|
|
24
|
+
- [Container sequence](././paradox/diagrams/sequences/container.mmd)
|
|
25
|
+
- [Drawer sequence](././paradox/diagrams/sequences/drawer.mmd)
|
|
26
|
+
- [Field sequence](././paradox/diagrams/sequences/field.mmd)
|
|
27
|
+
- [FontProvider sequence](././paradox/diagrams/sequences/font-provider.mmd)
|
|
28
|
+
- [generatePalette sequence](././paradox/diagrams/sequences/generate-palette.mmd)
|
|
29
|
+
- [Grid sequence](././paradox/diagrams/sequences/grid.mmd)
|
|
30
|
+
- [Icon sequence](././paradox/diagrams/sequences/icon.mmd)
|
|
31
|
+
- [IconButton sequence](././paradox/diagrams/sequences/icon-button.mmd)
|
|
32
|
+
- [isDeepEqual sequence](././paradox/diagrams/sequences/is-deep-equal.mmd)
|
|
33
|
+
- [ListItem sequence](././paradox/diagrams/sequences/list-item.mmd)
|
|
34
|
+
- [Menu sequence](././paradox/diagrams/sequences/menu.mmd)
|
|
35
|
+
- [Modal sequence](././paradox/diagrams/sequences/modal.mmd)
|
|
36
|
+
- [NavigationItem sequence](././paradox/diagrams/sequences/navigation-item.mmd)
|
|
37
|
+
- [Radio sequence](././paradox/diagrams/sequences/radio.mmd)
|
|
38
|
+
- [resolveResponsive sequence](././paradox/diagrams/sequences/resolve-responsive.mmd)
|
|
39
|
+
- [ResponsiveProvider sequence](././paradox/diagrams/sequences/responsive-provider.mmd)
|
|
40
|
+
- [Show sequence](././paradox/diagrams/sequences/show.mmd)
|
|
41
|
+
- [Stack sequence](././paradox/diagrams/sequences/stack.mmd)
|
|
42
|
+
- [Surface sequence](././paradox/diagrams/sequences/surface.mmd)
|
|
43
|
+
- [Switch sequence](././paradox/diagrams/sequences/switch.mmd)
|
|
44
|
+
- [TabBar sequence](././paradox/diagrams/sequences/tab-bar.mmd)
|
|
45
|
+
- [TabBarItem sequence](././paradox/diagrams/sequences/tab-bar-item.mmd)
|
|
46
|
+
- [TabList sequence](././paradox/diagrams/sequences/tab-list.mmd)
|
|
47
|
+
- [TabPanel sequence](././paradox/diagrams/sequences/tab-panel.mmd)
|
|
48
|
+
- [Tabs sequence](././paradox/diagrams/sequences/tabs.mmd)
|
|
49
|
+
- [Template sequence](././paradox/diagrams/sequences/template.mmd)
|
|
50
|
+
- [ThemeProvider sequence](././paradox/diagrams/sequences/theme-provider.mmd)
|
|
51
|
+
- [Toast sequence](././paradox/diagrams/sequences/toast.mmd)
|
|
52
|
+
- [ToastProvider sequence](././paradox/diagrams/sequences/toast-provider.mmd)
|
|
53
|
+
- [Tooltip sequence](././paradox/diagrams/sequences/tooltip.mmd)
|
|
54
|
+
- [TranslationProvider sequence](././paradox/diagrams/sequences/translation-provider.mmd)
|
|
55
|
+
- [useBreakpoint sequence](././paradox/diagrams/sequences/use-breakpoint.mmd)
|
|
56
|
+
- [useFontContext sequence](././paradox/diagrams/sequences/use-font-context.mmd)
|
|
57
|
+
- [useResponsiveRuntime sequence](././paradox/diagrams/sequences/use-responsive-runtime.mmd)
|
|
58
|
+
- [useTheme sequence](././paradox/diagrams/sequences/use-theme.mmd)
|
|
59
|
+
- [useThemeConfig sequence](././paradox/diagrams/sequences/use-theme-config.mmd)
|
|
60
|
+
- [useThemeMode sequence](././paradox/diagrams/sequences/use-theme-mode.mmd)
|
|
61
|
+
- [useTranslationContext sequence](././paradox/diagrams/sequences/use-translation-context.mmd)
|
|
16
62
|
|
|
17
|
-
##
|
|
63
|
+
## Architecture preview
|
|
18
64
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Architecture overview</summary>
|
|
22
67
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
68
|
+
```mermaid
|
|
69
|
+
graph TD
|
|
70
|
+
package__ankhorage_surface["@ankhorage/surface"]
|
|
71
|
+
entrypoint_src_index_ts["src/index.ts"]
|
|
72
|
+
package__ankhorage_surface --> entrypoint_src_index_ts
|
|
73
|
+
module_src_components_action_sheet_ActionSheet_tsx["src/components/action-sheet/ActionSheet.tsx"]
|
|
74
|
+
package__ankhorage_surface -.-> module_src_components_action_sheet_ActionSheet_tsx
|
|
75
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_components_action_sheet_ActionSheetItem_tsx
|
|
76
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_components_action_sheet_types_ts
|
|
77
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_internal_focus_FocusScope_tsx
|
|
78
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_internal_overlay_Portal_tsx
|
|
79
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_internal_resolvers_index_ts
|
|
80
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_layout_index_ts
|
|
81
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_primitives_text_index_ts
|
|
82
|
+
module_src_components_action_sheet_ActionSheet_tsx --> module_src_theme_ThemeContext_tsx
|
|
83
|
+
module_src_components_action_sheet_ActionSheetItem_tsx["src/components/action-sheet/ActionSheetItem.tsx"]
|
|
84
|
+
package__ankhorage_surface -.-> module_src_components_action_sheet_ActionSheetItem_tsx
|
|
85
|
+
module_src_components_action_sheet_ActionSheetItem_tsx --> module_src_components_action_sheet_types_ts
|
|
86
|
+
module_src_components_action_sheet_ActionSheetItem_tsx --> module_src_layout_index_ts
|
|
87
|
+
module_src_components_action_sheet_ActionSheetItem_tsx --> module_src_primitives_button_base_index_ts
|
|
88
|
+
module_src_components_action_sheet_ActionSheetItem_tsx --> module_src_primitives_text_index_ts
|
|
89
|
+
module_src_components_action_sheet_index_ts["src/components/action-sheet/index.ts"]
|
|
90
|
+
package__ankhorage_surface -.-> module_src_components_action_sheet_index_ts
|
|
91
|
+
module_src_components_action_sheet_types_ts["src/components/action-sheet/types.ts"]
|
|
92
|
+
package__ankhorage_surface -.-> module_src_components_action_sheet_types_ts
|
|
93
|
+
module_src_components_action_sheet_types_ts --> module_src_surfaceColor_ts
|
|
94
|
+
module_src_components_badge_Badge_tsx["src/components/badge/Badge.tsx"]
|
|
95
|
+
package__ankhorage_surface -.-> module_src_components_badge_Badge_tsx
|
|
96
|
+
module_src_components_badge_Badge_tsx --> module_src_components_badge_types_ts
|
|
97
|
+
module_src_components_badge_Badge_tsx --> module_src_internal_resolvers_index_ts
|
|
98
|
+
module_src_components_badge_Badge_tsx --> module_src_layout_index_ts
|
|
99
|
+
module_src_components_badge_Badge_tsx --> module_src_primitives_text_index_ts
|
|
100
|
+
module_src_components_badge_Badge_tsx --> module_src_theme_ThemeContext_tsx
|
|
101
|
+
module_src_components_badge_index_ts["src/components/badge/index.ts"]
|
|
102
|
+
package__ankhorage_surface -.-> module_src_components_badge_index_ts
|
|
103
|
+
module_src_components_badge_types_ts["src/components/badge/types.ts"]
|
|
104
|
+
package__ankhorage_surface -.-> module_src_components_badge_types_ts
|
|
105
|
+
module_src_components_badge_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
106
|
+
module_src_components_badge_types_ts --> module_src_internal_resolvers_resolveInteractiveColors_ts
|
|
107
|
+
module_src_components_badge_types_ts --> module_src_surfaceColor_ts
|
|
108
|
+
module_src_components_button_Button_tsx["src/components/button/Button.tsx"]
|
|
109
|
+
package__ankhorage_surface -.-> module_src_components_button_Button_tsx
|
|
110
|
+
module_src_components_button_Button_tsx --> module_src_components_button_types_ts
|
|
111
|
+
module_src_components_button_Button_tsx --> module_src_internal_resolvers_index_ts
|
|
112
|
+
module_src_components_button_Button_tsx --> module_src_layout_index_ts
|
|
113
|
+
module_src_components_button_Button_tsx --> module_src_primitives_button_base_index_ts
|
|
114
|
+
module_src_components_button_Button_tsx --> module_src_primitives_icon_index_ts
|
|
115
|
+
module_src_components_button_Button_tsx --> module_src_primitives_text_index_ts
|
|
116
|
+
module_src_components_button_Button_tsx --> module_src_theme_ThemeContext_tsx
|
|
117
|
+
module_src_components_button_index_ts["src/components/button/index.ts"]
|
|
118
|
+
package__ankhorage_surface -.-> module_src_components_button_index_ts
|
|
119
|
+
module_src_components_button_types_ts["src/components/button/types.ts"]
|
|
120
|
+
package__ankhorage_surface -.-> module_src_components_button_types_ts
|
|
121
|
+
module_src_components_button_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
122
|
+
module_src_components_button_types_ts --> module_src_internal_resolvers_resolveInteractiveColors_ts
|
|
123
|
+
module_src_components_button_types_ts --> module_src_primitives_button_base_index_ts
|
|
124
|
+
module_src_components_button_types_ts --> module_src_primitives_icon_index_ts
|
|
125
|
+
module_src_components_button_types_ts --> module_src_surfaceColor_ts
|
|
126
|
+
module_src_components_card_Card_tsx["src/components/card/Card.tsx"]
|
|
127
|
+
package__ankhorage_surface -.-> module_src_components_card_Card_tsx
|
|
128
|
+
module_src_components_card_Card_tsx --> module_src_components_card_types_ts
|
|
129
|
+
module_src_components_card_Card_tsx --> module_src_layout_index_ts
|
|
130
|
+
module_src_components_card_Card_tsx --> module_src_primitives_button_base_index_ts
|
|
131
|
+
module_src_components_card_Card_tsx --> module_src_theme_ThemeContext_tsx
|
|
132
|
+
module_src_components_card_index_ts["src/components/card/index.ts"]
|
|
133
|
+
package__ankhorage_surface -.-> module_src_components_card_index_ts
|
|
134
|
+
module_src_components_card_types_ts["src/components/card/types.ts"]
|
|
135
|
+
package__ankhorage_surface -.-> module_src_components_card_types_ts
|
|
136
|
+
module_src_components_card_types_ts --> module_src_layout_index_ts
|
|
137
|
+
module_src_components_checkbox_Checkbox_tsx["src/components/checkbox/Checkbox.tsx"]
|
|
138
|
+
package__ankhorage_surface -.-> module_src_components_checkbox_Checkbox_tsx
|
|
139
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_components_checkbox_types_ts
|
|
140
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_internal_resolvers_index_ts
|
|
141
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_internal_useControllableState_ts
|
|
142
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_layout_index_ts
|
|
143
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_primitives_button_base_index_ts
|
|
144
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_primitives_text_index_ts
|
|
145
|
+
module_src_components_checkbox_Checkbox_tsx --> module_src_theme_ThemeContext_tsx
|
|
146
|
+
module_src_components_checkbox_index_ts["src/components/checkbox/index.ts"]
|
|
147
|
+
package__ankhorage_surface -.-> module_src_components_checkbox_index_ts
|
|
148
|
+
module_src_components_checkbox_types_ts["src/components/checkbox/types.ts"]
|
|
149
|
+
package__ankhorage_surface -.-> module_src_components_checkbox_types_ts
|
|
150
|
+
module_src_components_checkbox_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
151
|
+
module_src_components_checkbox_types_ts --> module_src_primitives_button_base_index_ts
|
|
152
|
+
module_src_components_checkbox_types_ts --> module_src_surfaceColor_ts
|
|
153
|
+
module_src_components_drawer_Drawer_tsx["src/components/drawer/Drawer.tsx"]
|
|
154
|
+
package__ankhorage_surface -.-> module_src_components_drawer_Drawer_tsx
|
|
155
|
+
module_src_components_drawer_Drawer_tsx --> module_src_components_drawer_types_ts
|
|
156
|
+
module_src_components_drawer_Drawer_tsx --> module_src_internal_focus_FocusScope_tsx
|
|
157
|
+
module_src_components_drawer_Drawer_tsx --> module_src_internal_overlay_Portal_tsx
|
|
158
|
+
module_src_components_drawer_Drawer_tsx --> module_src_internal_resolvers_index_ts
|
|
159
|
+
module_src_components_drawer_Drawer_tsx --> module_src_layout_index_ts
|
|
160
|
+
module_src_components_drawer_Drawer_tsx --> module_src_theme_ThemeContext_tsx
|
|
161
|
+
module_src_components_drawer_index_ts["src/components/drawer/index.ts"]
|
|
162
|
+
package__ankhorage_surface -.-> module_src_components_drawer_index_ts
|
|
163
|
+
module_src_components_drawer_types_ts["src/components/drawer/types.ts"]
|
|
164
|
+
package__ankhorage_surface -.-> module_src_components_drawer_types_ts
|
|
165
|
+
module_src_components_field_Field_tsx["src/components/field/Field.tsx"]
|
|
166
|
+
package__ankhorage_surface -.-> module_src_components_field_Field_tsx
|
|
167
|
+
module_src_components_field_Field_tsx --> module_src_components_field_types_ts
|
|
168
|
+
module_src_components_field_Field_tsx --> module_src_components_helper_text_index_ts
|
|
169
|
+
module_src_components_field_Field_tsx --> module_src_components_label_index_ts
|
|
170
|
+
module_src_components_field_Field_tsx --> module_src_internal_resolvers_index_ts
|
|
171
|
+
module_src_components_field_Field_tsx --> module_src_layout_index_ts
|
|
172
|
+
module_src_components_field_index_ts["src/components/field/index.ts"]
|
|
173
|
+
package__ankhorage_surface -.-> module_src_components_field_index_ts
|
|
174
|
+
module_src_components_field_types_ts["src/components/field/types.ts"]
|
|
175
|
+
package__ankhorage_surface -.-> module_src_components_field_types_ts
|
|
176
|
+
module_src_components_helper_text_HelperText_tsx["src/components/helper-text/HelperText.tsx"]
|
|
177
|
+
package__ankhorage_surface -.-> module_src_components_helper_text_HelperText_tsx
|
|
178
|
+
module_src_components_helper_text_HelperText_tsx --> module_src_components_helper_text_types_ts
|
|
179
|
+
module_src_components_helper_text_HelperText_tsx --> module_src_primitives_text_index_ts
|
|
180
|
+
module_src_components_helper_text_index_ts["src/components/helper-text/index.ts"]
|
|
181
|
+
package__ankhorage_surface -.-> module_src_components_helper_text_index_ts
|
|
182
|
+
module_src_components_helper_text_types_ts["src/components/helper-text/types.ts"]
|
|
183
|
+
package__ankhorage_surface -.-> module_src_components_helper_text_types_ts
|
|
184
|
+
module_src_components_helper_text_types_ts --> module_src_surfaceColor_ts
|
|
185
|
+
module_src_components_icon_button_IconButton_tsx["src/components/icon-button/IconButton.tsx"]
|
|
186
|
+
package__ankhorage_surface -.-> module_src_components_icon_button_IconButton_tsx
|
|
187
|
+
module_src_components_icon_button_IconButton_tsx --> module_src_components_icon_button_types_ts
|
|
188
|
+
module_src_components_icon_button_IconButton_tsx --> module_src_internal_resolvers_index_ts
|
|
189
|
+
module_src_components_icon_button_IconButton_tsx --> module_src_layout_index_ts
|
|
190
|
+
module_src_components_icon_button_IconButton_tsx --> module_src_primitives_button_base_index_ts
|
|
191
|
+
module_src_components_icon_button_IconButton_tsx --> module_src_primitives_icon_index_ts
|
|
192
|
+
module_src_components_icon_button_IconButton_tsx --> module_src_theme_ThemeContext_tsx
|
|
193
|
+
module_src_components_icon_button_index_ts["src/components/icon-button/index.ts"]
|
|
194
|
+
package__ankhorage_surface -.-> module_src_components_icon_button_index_ts
|
|
195
|
+
module_src_components_icon_button_types_ts["src/components/icon-button/types.ts"]
|
|
196
|
+
package__ankhorage_surface -.-> module_src_components_icon_button_types_ts
|
|
197
|
+
module_src_components_icon_button_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
198
|
+
module_src_components_icon_button_types_ts --> module_src_internal_resolvers_resolveInteractiveColors_ts
|
|
199
|
+
module_src_components_icon_button_types_ts --> module_src_primitives_button_base_index_ts
|
|
200
|
+
module_src_components_icon_button_types_ts --> module_src_primitives_icon_index_ts
|
|
201
|
+
module_src_components_icon_button_types_ts --> module_src_surfaceColor_ts
|
|
202
|
+
module_src_components_label_index_ts["src/components/label/index.ts"]
|
|
203
|
+
package__ankhorage_surface -.-> module_src_components_label_index_ts
|
|
204
|
+
module_src_components_label_Label_tsx["src/components/label/Label.tsx"]
|
|
205
|
+
package__ankhorage_surface -.-> module_src_components_label_Label_tsx
|
|
206
|
+
module_src_components_label_Label_tsx --> module_src_components_label_types_ts
|
|
207
|
+
module_src_components_label_Label_tsx --> module_src_primitives_text_index_ts
|
|
208
|
+
module_src_components_label_types_ts["src/components/label/types.ts"]
|
|
209
|
+
package__ankhorage_surface -.-> module_src_components_label_types_ts
|
|
210
|
+
module_src_components_label_types_ts --> module_src_surfaceColor_ts
|
|
211
|
+
module_src_components_list_item_index_ts["src/components/list-item/index.ts"]
|
|
212
|
+
package__ankhorage_surface -.-> module_src_components_list_item_index_ts
|
|
213
|
+
module_src_components_list_item_ListItem_tsx["src/components/list-item/ListItem.tsx"]
|
|
214
|
+
package__ankhorage_surface -.-> module_src_components_list_item_ListItem_tsx
|
|
215
|
+
module_src_components_list_item_ListItem_tsx --> module_src_components_list_item_types_ts
|
|
216
|
+
module_src_components_list_item_ListItem_tsx --> module_src_layout_index_ts
|
|
217
|
+
module_src_components_list_item_ListItem_tsx --> module_src_primitives_button_base_index_ts
|
|
218
|
+
module_src_components_list_item_ListItem_tsx --> module_src_primitives_text_index_ts
|
|
219
|
+
module_src_components_list_item_ListItem_tsx --> module_src_theme_ThemeContext_tsx
|
|
220
|
+
module_src_components_list_item_types_ts["src/components/list-item/types.ts"]
|
|
221
|
+
package__ankhorage_surface -.-> module_src_components_list_item_types_ts
|
|
222
|
+
module_src_components_menu_index_ts["src/components/menu/index.ts"]
|
|
223
|
+
package__ankhorage_surface -.-> module_src_components_menu_index_ts
|
|
224
|
+
module_src_components_menu_Menu_tsx["src/components/menu/Menu.tsx"]
|
|
225
|
+
package__ankhorage_surface -.-> module_src_components_menu_Menu_tsx
|
|
226
|
+
module_src_components_menu_Menu_tsx --> module_src_components_menu_navigation_ts
|
|
227
|
+
module_src_components_menu_Menu_tsx --> module_src_components_menu_types_ts
|
|
228
|
+
module_src_components_menu_Menu_tsx --> module_src_internal_focus_FocusScope_tsx
|
|
229
|
+
module_src_components_menu_Menu_tsx --> module_src_internal_focus_useFocusManager_ts
|
|
230
|
+
module_src_components_menu_Menu_tsx --> module_src_internal_overlay_Portal_tsx
|
|
231
|
+
module_src_components_menu_Menu_tsx --> module_src_internal_resolvers_index_ts
|
|
232
|
+
module_src_components_menu_Menu_tsx --> module_src_layout_index_ts
|
|
233
|
+
module_src_components_menu_Menu_tsx --> module_src_primitives_button_base_index_ts
|
|
234
|
+
module_src_components_menu_Menu_tsx --> module_src_primitives_text_index_ts
|
|
235
|
+
module_src_components_menu_Menu_tsx --> module_src_theme_ThemeContext_tsx
|
|
236
|
+
module_src_components_menu_navigation_ts["src/components/menu/navigation.ts"]
|
|
237
|
+
package__ankhorage_surface -.-> module_src_components_menu_navigation_ts
|
|
238
|
+
module_src_components_menu_types_ts["src/components/menu/types.ts"]
|
|
239
|
+
package__ankhorage_surface -.-> module_src_components_menu_types_ts
|
|
240
|
+
module_src_components_modal_index_ts["src/components/modal/index.ts"]
|
|
241
|
+
package__ankhorage_surface -.-> module_src_components_modal_index_ts
|
|
242
|
+
module_src_components_modal_Modal_tsx["src/components/modal/Modal.tsx"]
|
|
243
|
+
package__ankhorage_surface -.-> module_src_components_modal_Modal_tsx
|
|
244
|
+
module_src_components_modal_Modal_tsx --> module_src_components_modal_types_ts
|
|
245
|
+
module_src_components_modal_Modal_tsx --> module_src_internal_focus_FocusScope_tsx
|
|
246
|
+
module_src_components_modal_Modal_tsx --> module_src_internal_overlay_Portal_tsx
|
|
247
|
+
module_src_components_modal_Modal_tsx --> module_src_internal_resolvers_index_ts
|
|
248
|
+
module_src_components_modal_Modal_tsx --> module_src_layout_index_ts
|
|
249
|
+
module_src_components_modal_Modal_tsx --> module_src_theme_ThemeContext_tsx
|
|
250
|
+
module_src_components_modal_types_ts["src/components/modal/types.ts"]
|
|
251
|
+
package__ankhorage_surface -.-> module_src_components_modal_types_ts
|
|
252
|
+
module_src_components_navigation_DrawerNavigation_tsx["src/components/navigation/DrawerNavigation.tsx"]
|
|
253
|
+
package__ankhorage_surface -.-> module_src_components_navigation_DrawerNavigation_tsx
|
|
254
|
+
module_src_components_navigation_DrawerNavigation_tsx --> module_src_components_navigation_DrawerNavigationItem_tsx
|
|
255
|
+
module_src_components_navigation_DrawerNavigation_tsx --> module_src_components_navigation_types_ts
|
|
256
|
+
module_src_components_navigation_DrawerNavigation_tsx --> module_src_layout_index_ts
|
|
257
|
+
module_src_components_navigation_DrawerNavigationItem_tsx["src/components/navigation/DrawerNavigationItem.tsx"]
|
|
258
|
+
package__ankhorage_surface -.-> module_src_components_navigation_DrawerNavigationItem_tsx
|
|
259
|
+
module_src_components_navigation_DrawerNavigationItem_tsx --> module_src_components_navigation_NavigationItem_tsx
|
|
260
|
+
module_src_components_navigation_DrawerNavigationItem_tsx --> module_src_components_navigation_types_ts
|
|
261
|
+
module_src_components_navigation_helpers_ts["src/components/navigation/helpers.ts"]
|
|
262
|
+
package__ankhorage_surface -.-> module_src_components_navigation_helpers_ts
|
|
263
|
+
module_src_components_navigation_helpers_ts --> module_src_internal_resolvers_resolveInteractiveState_ts
|
|
264
|
+
module_src_components_navigation_helpers_ts --> module_src_theme_types_ts
|
|
265
|
+
module_src_components_navigation_index_ts["src/components/navigation/index.ts"]
|
|
266
|
+
package__ankhorage_surface -.-> module_src_components_navigation_index_ts
|
|
267
|
+
module_src_components_navigation_NavigationItem_tsx["src/components/navigation/NavigationItem.tsx"]
|
|
268
|
+
package__ankhorage_surface -.-> module_src_components_navigation_NavigationItem_tsx
|
|
269
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_components_navigation_helpers_ts
|
|
270
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_components_navigation_types_ts
|
|
271
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_layout_index_ts
|
|
272
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_primitives_button_base_index_ts
|
|
273
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_primitives_icon_index_ts
|
|
274
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_primitives_text_index_ts
|
|
275
|
+
module_src_components_navigation_NavigationItem_tsx --> module_src_theme_ThemeContext_tsx
|
|
276
|
+
module_src_components_navigation_NavigationList_tsx["src/components/navigation/NavigationList.tsx"]
|
|
277
|
+
package__ankhorage_surface -.-> module_src_components_navigation_NavigationList_tsx
|
|
278
|
+
module_src_components_navigation_NavigationList_tsx --> module_src_components_navigation_NavigationItem_tsx
|
|
279
|
+
module_src_components_navigation_NavigationList_tsx --> module_src_components_navigation_types_ts
|
|
280
|
+
module_src_components_navigation_NavigationList_tsx --> module_src_layout_index_ts
|
|
281
|
+
module_src_components_navigation_TabBar_tsx["src/components/navigation/TabBar.tsx"]
|
|
282
|
+
package__ankhorage_surface -.-> module_src_components_navigation_TabBar_tsx
|
|
283
|
+
module_src_components_navigation_TabBar_tsx --> module_src_components_navigation_TabBarItem_tsx
|
|
284
|
+
module_src_components_navigation_TabBar_tsx --> module_src_components_navigation_types_ts
|
|
285
|
+
module_src_components_navigation_TabBar_tsx --> module_src_layout_index_ts
|
|
286
|
+
module_src_components_navigation_TabBar_tsx --> module_src_theme_ThemeContext_tsx
|
|
287
|
+
module_src_components_navigation_TabBarItem_tsx["src/components/navigation/TabBarItem.tsx"]
|
|
288
|
+
package__ankhorage_surface -.-> module_src_components_navigation_TabBarItem_tsx
|
|
289
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_components_navigation_helpers_ts
|
|
290
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_components_navigation_types_ts
|
|
291
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_layout_index_ts
|
|
292
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_primitives_button_base_index_ts
|
|
293
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_primitives_icon_index_ts
|
|
294
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_primitives_text_index_ts
|
|
295
|
+
module_src_components_navigation_TabBarItem_tsx --> module_src_theme_ThemeContext_tsx
|
|
296
|
+
module_src_components_navigation_types_ts["src/components/navigation/types.ts"]
|
|
297
|
+
package__ankhorage_surface -.-> module_src_components_navigation_types_ts
|
|
298
|
+
module_src_components_navigation_types_ts --> module_src_primitives_icon_index_ts
|
|
299
|
+
module_src_components_radio_index_ts["src/components/radio/index.ts"]
|
|
300
|
+
package__ankhorage_surface -.-> module_src_components_radio_index_ts
|
|
301
|
+
module_src_components_radio_Radio_tsx["src/components/radio/Radio.tsx"]
|
|
302
|
+
package__ankhorage_surface -.-> module_src_components_radio_Radio_tsx
|
|
303
|
+
module_src_components_radio_Radio_tsx --> module_src_components_radio_types_ts
|
|
304
|
+
module_src_components_radio_Radio_tsx --> module_src_internal_resolvers_index_ts
|
|
305
|
+
module_src_components_radio_Radio_tsx --> module_src_internal_useControllableState_ts
|
|
306
|
+
module_src_components_radio_Radio_tsx --> module_src_layout_index_ts
|
|
307
|
+
module_src_components_radio_Radio_tsx --> module_src_primitives_button_base_index_ts
|
|
308
|
+
module_src_components_radio_Radio_tsx --> module_src_primitives_text_index_ts
|
|
309
|
+
module_src_components_radio_Radio_tsx --> module_src_theme_ThemeContext_tsx
|
|
310
|
+
module_src_components_radio_types_ts["src/components/radio/types.ts"]
|
|
311
|
+
package__ankhorage_surface -.-> module_src_components_radio_types_ts
|
|
312
|
+
module_src_components_radio_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
313
|
+
module_src_components_radio_types_ts --> module_src_primitives_button_base_index_ts
|
|
314
|
+
module_src_components_radio_types_ts --> module_src_surfaceColor_ts
|
|
315
|
+
module_src_components_switch_index_ts["src/components/switch/index.ts"]
|
|
316
|
+
package__ankhorage_surface -.-> module_src_components_switch_index_ts
|
|
317
|
+
module_src_components_switch_Switch_tsx["src/components/switch/Switch.tsx"]
|
|
318
|
+
package__ankhorage_surface -.-> module_src_components_switch_Switch_tsx
|
|
319
|
+
module_src_components_switch_Switch_tsx --> module_src_components_switch_types_ts
|
|
320
|
+
module_src_components_switch_Switch_tsx --> module_src_internal_resolvers_index_ts
|
|
321
|
+
module_src_components_switch_Switch_tsx --> module_src_internal_useControllableState_ts
|
|
322
|
+
module_src_components_switch_Switch_tsx --> module_src_layout_index_ts
|
|
323
|
+
module_src_components_switch_Switch_tsx --> module_src_primitives_button_base_index_ts
|
|
324
|
+
module_src_components_switch_Switch_tsx --> module_src_primitives_text_index_ts
|
|
325
|
+
module_src_components_switch_Switch_tsx --> module_src_theme_ThemeContext_tsx
|
|
326
|
+
module_src_components_switch_types_ts["src/components/switch/types.ts"]
|
|
327
|
+
package__ankhorage_surface -.-> module_src_components_switch_types_ts
|
|
328
|
+
module_src_components_switch_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
329
|
+
module_src_components_switch_types_ts --> module_src_primitives_button_base_index_ts
|
|
330
|
+
module_src_components_switch_types_ts --> module_src_surfaceColor_ts
|
|
331
|
+
module_src_components_tabs_a11y_ts["src/components/tabs/a11y.ts"]
|
|
332
|
+
package__ankhorage_surface -.-> module_src_components_tabs_a11y_ts
|
|
333
|
+
module_src_components_tabs_context_tsx["src/components/tabs/context.tsx"]
|
|
334
|
+
package__ankhorage_surface -.-> module_src_components_tabs_context_tsx
|
|
335
|
+
module_src_components_tabs_index_ts["src/components/tabs/index.ts"]
|
|
336
|
+
package__ankhorage_surface -.-> module_src_components_tabs_index_ts
|
|
337
|
+
module_src_components_tabs_navigation_ts["src/components/tabs/navigation.ts"]
|
|
338
|
+
package__ankhorage_surface -.-> module_src_components_tabs_navigation_ts
|
|
339
|
+
module_src_components_tabs_navigation_ts --> module_src_components_tabs_context_tsx
|
|
340
|
+
module_src_components_tabs_Tab_tsx["src/components/tabs/Tab.tsx"]
|
|
341
|
+
package__ankhorage_surface -.-> module_src_components_tabs_Tab_tsx
|
|
342
|
+
module_src_components_tabs_Tab_tsx --> module_src_components_tabs_context_tsx
|
|
343
|
+
module_src_components_tabs_Tab_tsx --> module_src_components_tabs_types_ts
|
|
344
|
+
module_src_components_tabs_Tab_tsx --> module_src_layout_index_ts
|
|
345
|
+
module_src_components_tabs_Tab_tsx --> module_src_primitives_text_index_ts
|
|
346
|
+
module_src_components_tabs_Tab_tsx --> module_src_theme_ThemeContext_tsx
|
|
347
|
+
module_src_components_tabs_TabList_tsx["src/components/tabs/TabList.tsx"]
|
|
348
|
+
package__ankhorage_surface -.-> module_src_components_tabs_TabList_tsx
|
|
349
|
+
module_src_components_tabs_TabList_tsx --> module_src_components_tabs_context_tsx
|
|
350
|
+
module_src_components_tabs_TabList_tsx --> module_src_components_tabs_navigation_ts
|
|
351
|
+
module_src_components_tabs_TabList_tsx --> module_src_components_tabs_types_ts
|
|
352
|
+
module_src_components_tabs_TabList_tsx --> module_src_internal_focus_useFocusManager_ts
|
|
353
|
+
module_src_components_tabs_TabList_tsx --> module_src_layout_index_ts
|
|
354
|
+
module_src_components_tabs_TabPanel_tsx["src/components/tabs/TabPanel.tsx"]
|
|
355
|
+
package__ankhorage_surface -.-> module_src_components_tabs_TabPanel_tsx
|
|
356
|
+
module_src_components_tabs_TabPanel_tsx --> module_src_components_tabs_context_tsx
|
|
357
|
+
module_src_components_tabs_TabPanel_tsx --> module_src_components_tabs_types_ts
|
|
358
|
+
module_src_components_tabs_Tabs_tsx["src/components/tabs/Tabs.tsx"]
|
|
359
|
+
package__ankhorage_surface -.-> module_src_components_tabs_Tabs_tsx
|
|
360
|
+
module_src_components_tabs_Tabs_tsx --> module_src_components_tabs_a11y_ts
|
|
361
|
+
module_src_components_tabs_Tabs_tsx --> module_src_components_tabs_context_tsx
|
|
362
|
+
module_src_components_tabs_Tabs_tsx --> module_src_components_tabs_types_ts
|
|
363
|
+
module_src_components_tabs_Tabs_tsx --> module_src_internal_useControllableState_ts
|
|
364
|
+
module_src_components_tabs_Tabs_tsx --> module_src_layout_index_ts
|
|
365
|
+
module_src_components_tabs_types_ts["src/components/tabs/types.ts"]
|
|
366
|
+
package__ankhorage_surface -.-> module_src_components_tabs_types_ts
|
|
367
|
+
module_src_components_text_input_index_ts["src/components/text-input/index.ts"]
|
|
368
|
+
package__ankhorage_surface -.-> module_src_components_text_input_index_ts
|
|
369
|
+
module_src_components_text_input_TextInput_tsx["src/components/text-input/TextInput.tsx"]
|
|
370
|
+
package__ankhorage_surface -.-> module_src_components_text_input_TextInput_tsx
|
|
371
|
+
module_src_components_text_input_TextInput_tsx --> module_src_components_text_input_types_ts
|
|
372
|
+
module_src_components_text_input_TextInput_tsx --> module_src_internal_resolvers_index_ts
|
|
373
|
+
module_src_components_text_input_TextInput_tsx --> module_src_theme_ThemeContext_tsx
|
|
374
|
+
module_src_components_text_input_types_ts["src/components/text-input/types.ts"]
|
|
375
|
+
package__ankhorage_surface -.-> module_src_components_text_input_types_ts
|
|
376
|
+
module_src_components_text_input_types_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
377
|
+
module_src_components_textarea_index_ts["src/components/textarea/index.ts"]
|
|
378
|
+
package__ankhorage_surface -.-> module_src_components_textarea_index_ts
|
|
379
|
+
module_src_components_textarea_Textarea_tsx["src/components/textarea/Textarea.tsx"]
|
|
380
|
+
package__ankhorage_surface -.-> module_src_components_textarea_Textarea_tsx
|
|
381
|
+
module_src_components_textarea_Textarea_tsx --> module_src_components_text_input_index_ts
|
|
382
|
+
module_src_components_textarea_Textarea_tsx --> module_src_components_textarea_types_ts
|
|
383
|
+
module_src_components_textarea_types_ts["src/components/textarea/types.ts"]
|
|
384
|
+
package__ankhorage_surface -.-> module_src_components_textarea_types_ts
|
|
385
|
+
module_src_components_textarea_types_ts --> module_src_components_text_input_index_ts
|
|
386
|
+
module_src_components_toast_index_ts["src/components/toast/index.ts"]
|
|
387
|
+
package__ankhorage_surface -.-> module_src_components_toast_index_ts
|
|
388
|
+
module_src_components_toast_Toast_tsx["src/components/toast/Toast.tsx"]
|
|
389
|
+
package__ankhorage_surface -.-> module_src_components_toast_Toast_tsx
|
|
390
|
+
module_src_components_toast_Toast_tsx --> module_src_components_toast_types_ts
|
|
391
|
+
module_src_components_toast_Toast_tsx --> module_src_layout_index_ts
|
|
392
|
+
module_src_components_toast_Toast_tsx --> module_src_primitives_text_index_ts
|
|
393
|
+
module_src_components_toast_Toast_tsx --> module_src_surfaceColor_ts
|
|
394
|
+
module_src_components_toast_Toast_tsx --> module_src_theme_ThemeContext_tsx
|
|
395
|
+
module_src_components_toast_Toast_tsx --> module_src_theme_types_ts
|
|
396
|
+
module_src_components_toast_ToastProvider_tsx["src/components/toast/ToastProvider.tsx"]
|
|
397
|
+
package__ankhorage_surface -.-> module_src_components_toast_ToastProvider_tsx
|
|
398
|
+
module_src_components_toast_ToastProvider_tsx --> module_src_components_toast_Toast_tsx
|
|
399
|
+
module_src_components_toast_ToastProvider_tsx --> module_src_components_toast_types_ts
|
|
400
|
+
module_src_components_toast_ToastProvider_tsx --> module_src_internal_overlay_Portal_tsx
|
|
401
|
+
module_src_components_toast_ToastProvider_tsx --> module_src_internal_resolvers_index_ts
|
|
402
|
+
module_src_components_toast_ToastProvider_tsx --> module_src_layout_index_ts
|
|
403
|
+
module_src_components_toast_types_ts["src/components/toast/types.ts"]
|
|
404
|
+
package__ankhorage_surface -.-> module_src_components_toast_types_ts
|
|
405
|
+
module_src_components_toast_types_ts --> module_src_surfaceColor_ts
|
|
406
|
+
module_src_components_tooltip_index_ts["src/components/tooltip/index.ts"]
|
|
407
|
+
package__ankhorage_surface -.-> module_src_components_tooltip_index_ts
|
|
408
|
+
module_src_components_tooltip_Tooltip_tsx["src/components/tooltip/Tooltip.tsx"]
|
|
409
|
+
package__ankhorage_surface -.-> module_src_components_tooltip_Tooltip_tsx
|
|
410
|
+
module_src_components_tooltip_Tooltip_tsx --> module_src_components_tooltip_types_ts
|
|
411
|
+
module_src_components_tooltip_Tooltip_tsx --> module_src_internal_overlay_Portal_tsx
|
|
412
|
+
module_src_components_tooltip_Tooltip_tsx --> module_src_internal_resolvers_index_ts
|
|
413
|
+
module_src_components_tooltip_Tooltip_tsx --> module_src_layout_index_ts
|
|
414
|
+
module_src_components_tooltip_Tooltip_tsx --> module_src_primitives_text_index_ts
|
|
415
|
+
module_src_components_tooltip_Tooltip_tsx --> module_src_theme_ThemeContext_tsx
|
|
416
|
+
module_src_components_tooltip_types_ts["src/components/tooltip/types.ts"]
|
|
417
|
+
package__ankhorage_surface -.-> module_src_components_tooltip_types_ts
|
|
418
|
+
module_src_context_FontContext_tsx["src/context/FontContext.tsx"]
|
|
419
|
+
package__ankhorage_surface -.-> module_src_context_FontContext_tsx
|
|
420
|
+
module_src_context_TranslationContext_tsx["src/context/TranslationContext.tsx"]
|
|
421
|
+
package__ankhorage_surface -.-> module_src_context_TranslationContext_tsx
|
|
422
|
+
module_src_core_responsive_breakpoints_ts["src/core/responsive/breakpoints.ts"]
|
|
423
|
+
package__ankhorage_surface -.-> module_src_core_responsive_breakpoints_ts
|
|
424
|
+
module_src_core_responsive_getBreakpointFromWidth_ts["src/core/responsive/getBreakpointFromWidth.ts"]
|
|
425
|
+
package__ankhorage_surface -.-> module_src_core_responsive_getBreakpointFromWidth_ts
|
|
426
|
+
module_src_core_responsive_getBreakpointFromWidth_ts --> module_src_core_responsive_breakpoints_ts
|
|
427
|
+
module_src_core_responsive_getBreakpointFromWidth_ts --> module_src_core_responsive_types_ts
|
|
428
|
+
module_src_core_responsive_index_ts["src/core/responsive/index.ts"]
|
|
429
|
+
package__ankhorage_surface -.-> module_src_core_responsive_index_ts
|
|
430
|
+
module_src_core_responsive_resolve_ts["src/core/responsive/resolve.ts"]
|
|
431
|
+
package__ankhorage_surface -.-> module_src_core_responsive_resolve_ts
|
|
432
|
+
module_src_core_responsive_resolve_ts --> module_src_core_responsive_breakpoints_ts
|
|
433
|
+
module_src_core_responsive_resolve_ts --> module_src_core_responsive_types_ts
|
|
434
|
+
module_src_core_responsive_ResponsiveProvider_tsx["src/core/responsive/ResponsiveProvider.tsx"]
|
|
435
|
+
package__ankhorage_surface -.-> module_src_core_responsive_ResponsiveProvider_tsx
|
|
436
|
+
module_src_core_responsive_ResponsiveProvider_tsx --> module_src_core_responsive_getBreakpointFromWidth_ts
|
|
437
|
+
module_src_core_responsive_ResponsiveProvider_tsx --> module_src_core_responsive_types_ts
|
|
438
|
+
module_src_core_responsive_types_ts["src/core/responsive/types.ts"]
|
|
439
|
+
package__ankhorage_surface -.-> module_src_core_responsive_types_ts
|
|
440
|
+
module_src_core_responsive_types_ts --> module_src_core_responsive_breakpoints_ts
|
|
441
|
+
module_src_core_responsive_useBreakpoint_ts["src/core/responsive/useBreakpoint.ts"]
|
|
442
|
+
package__ankhorage_surface -.-> module_src_core_responsive_useBreakpoint_ts
|
|
443
|
+
module_src_core_responsive_useBreakpoint_ts --> module_src_core_responsive_getBreakpointFromWidth_ts
|
|
444
|
+
module_src_core_responsive_useBreakpoint_ts --> module_src_core_responsive_types_ts
|
|
445
|
+
module_src_examples_DocsExamples_tsx["src/examples/DocsExamples.tsx"]
|
|
446
|
+
package__ankhorage_surface -.-> module_src_examples_DocsExamples_tsx
|
|
447
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_button_index_ts
|
|
448
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_card_index_ts
|
|
449
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_checkbox_index_ts
|
|
450
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_drawer_index_ts
|
|
451
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_field_index_ts
|
|
452
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_helper_text_index_ts
|
|
453
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_menu_index_ts
|
|
454
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_modal_index_ts
|
|
455
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_tabs_index_ts
|
|
456
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_text_input_index_ts
|
|
457
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_toast_index_ts
|
|
458
|
+
module_src_examples_DocsExamples_tsx --> module_src_components_tooltip_index_ts
|
|
459
|
+
module_src_examples_DocsExamples_tsx --> module_src_layout_index_ts
|
|
460
|
+
module_src_examples_DocsExamples_tsx --> module_src_primitives_text_index_ts
|
|
461
|
+
module_src_examples_DocsExamples_tsx --> module_src_theme_index_ts
|
|
462
|
+
module_src_examples_DocsExamples_tsx --> module_src_theme_types_ts
|
|
463
|
+
module_src_index_ts["src/index.ts"]
|
|
464
|
+
module_src_internal_focus_FocusScope_tsx["src/internal/focus/FocusScope.tsx"]
|
|
465
|
+
package__ankhorage_surface -.-> module_src_internal_focus_FocusScope_tsx
|
|
466
|
+
module_src_internal_focus_FocusScope_tsx --> module_src_internal_focus_useFocusManager_ts
|
|
467
|
+
module_src_internal_focus_useFocusManager_ts["src/internal/focus/useFocusManager.ts"]
|
|
468
|
+
package__ankhorage_surface -.-> module_src_internal_focus_useFocusManager_ts
|
|
469
|
+
module_src_internal_overlay_OverlayProvider_tsx["src/internal/overlay/OverlayProvider.tsx"]
|
|
470
|
+
package__ankhorage_surface -.-> module_src_internal_overlay_OverlayProvider_tsx
|
|
471
|
+
module_src_internal_overlay_OverlayProvider_tsx --> module_src_internal_overlay_useOverlayStack_ts
|
|
472
|
+
module_src_internal_overlay_Portal_tsx["src/internal/overlay/Portal.tsx"]
|
|
473
|
+
package__ankhorage_surface -.-> module_src_internal_overlay_Portal_tsx
|
|
474
|
+
module_src_internal_overlay_Portal_tsx --> module_src_internal_overlay_useOverlayStack_ts
|
|
475
|
+
module_src_internal_overlay_Portal_tsx --> module_src_internal_resolvers_resolveOverlayZIndex_ts
|
|
476
|
+
module_src_internal_overlay_useOverlayStack_ts["src/internal/overlay/useOverlayStack.ts"]
|
|
477
|
+
package__ankhorage_surface -.-> module_src_internal_overlay_useOverlayStack_ts
|
|
478
|
+
module_src_internal_overlay_useOverlayStack_ts --> module_src_internal_resolvers_resolveOverlayZIndex_ts
|
|
479
|
+
module_src_internal_resolvers_index_ts["src/internal/resolvers/index.ts"]
|
|
480
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_index_ts
|
|
481
|
+
module_src_internal_resolvers_resolveControlSize_ts["src/internal/resolvers/resolveControlSize.ts"]
|
|
482
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveControlSize_ts
|
|
483
|
+
module_src_internal_resolvers_resolveControlSize_ts --> module_src_theme_types_ts
|
|
484
|
+
module_src_internal_resolvers_resolveFieldPresentation_ts["src/internal/resolvers/resolveFieldPresentation.ts"]
|
|
485
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveFieldPresentation_ts
|
|
486
|
+
module_src_internal_resolvers_resolveFieldPresentation_ts --> module_src_internal_resolvers_resolveFieldState_ts
|
|
487
|
+
module_src_internal_resolvers_resolveFieldPresentation_ts --> module_src_surfaceColor_ts
|
|
488
|
+
module_src_internal_resolvers_resolveFieldState_ts["src/internal/resolvers/resolveFieldState.ts"]
|
|
489
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveFieldState_ts
|
|
490
|
+
module_src_internal_resolvers_resolveFocusRingStyles_ts["src/internal/resolvers/resolveFocusRingStyles.ts"]
|
|
491
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveFocusRingStyles_ts
|
|
492
|
+
module_src_internal_resolvers_resolveIconSize_ts["src/internal/resolvers/resolveIconSize.ts"]
|
|
493
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveIconSize_ts
|
|
494
|
+
module_src_internal_resolvers_resolveIconSize_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
495
|
+
module_src_internal_resolvers_resolveIconSize_ts --> module_src_theme_types_ts
|
|
496
|
+
module_src_internal_resolvers_resolveIndicatorSize_ts["src/internal/resolvers/resolveIndicatorSize.ts"]
|
|
497
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveIndicatorSize_ts
|
|
498
|
+
module_src_internal_resolvers_resolveIndicatorSize_ts --> module_src_internal_resolvers_resolveControlSize_ts
|
|
499
|
+
module_src_internal_resolvers_resolveInteractiveColors_ts["src/internal/resolvers/resolveInteractiveColors.ts"]
|
|
500
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveInteractiveColors_ts
|
|
501
|
+
module_src_internal_resolvers_resolveInteractiveColors_ts --> module_src_internal_resolvers_resolveFieldState_ts
|
|
502
|
+
module_src_internal_resolvers_resolveInteractiveColors_ts --> module_src_internal_resolvers_resolveInteractiveState_ts
|
|
503
|
+
module_src_internal_resolvers_resolveInteractiveColors_ts --> module_src_internal_resolvers_resolveSurfaceColor_ts
|
|
504
|
+
module_src_internal_resolvers_resolveInteractiveColors_ts --> module_src_surfaceColor_ts
|
|
505
|
+
module_src_internal_resolvers_resolveInteractiveColors_ts --> module_src_theme_types_ts
|
|
506
|
+
module_src_internal_resolvers_resolveInteractiveState_ts["src/internal/resolvers/resolveInteractiveState.ts"]
|
|
507
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveInteractiveState_ts
|
|
508
|
+
module_src_internal_resolvers_resolveOverlayAnimation_ts["src/internal/resolvers/resolveOverlayAnimation.ts"]
|
|
509
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveOverlayAnimation_ts
|
|
510
|
+
module_src_internal_resolvers_resolveOverlayAnimation_ts --> module_src_internal_resolvers_resolveOverlayZIndex_ts
|
|
511
|
+
module_src_internal_resolvers_resolveOverlayZIndex_ts["src/internal/resolvers/resolveOverlayZIndex.ts"]
|
|
512
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveOverlayZIndex_ts
|
|
513
|
+
module_src_internal_resolvers_resolveSelectionControlBehavior_ts["src/internal/resolvers/resolveSelectionControlBehavior.ts"]
|
|
514
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveSelectionControlBehavior_ts
|
|
515
|
+
module_src_internal_resolvers_resolveSelectionControlColors_ts["src/internal/resolvers/resolveSelectionControlColors.ts"]
|
|
516
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveSelectionControlColors_ts
|
|
517
|
+
module_src_internal_resolvers_resolveSelectionControlColors_ts --> module_src_internal_resolvers_resolveFieldState_ts
|
|
518
|
+
module_src_internal_resolvers_resolveSelectionControlColors_ts --> module_src_internal_resolvers_resolveSurfaceColor_ts
|
|
519
|
+
module_src_internal_resolvers_resolveSelectionControlColors_ts --> module_src_surfaceColor_ts
|
|
520
|
+
module_src_internal_resolvers_resolveSelectionControlColors_ts --> module_src_theme_types_ts
|
|
521
|
+
module_src_internal_resolvers_resolveSurfaceColor_ts["src/internal/resolvers/resolveSurfaceColor.ts"]
|
|
522
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveSurfaceColor_ts
|
|
523
|
+
module_src_internal_resolvers_resolveSurfaceColor_ts --> module_src_surfaceColor_ts
|
|
524
|
+
module_src_internal_resolvers_resolveSurfaceColor_ts --> module_src_theme_types_ts
|
|
525
|
+
module_src_internal_resolvers_resolveTextColor_ts["src/internal/resolvers/resolveTextColor.ts"]
|
|
526
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveTextColor_ts
|
|
527
|
+
module_src_internal_resolvers_resolveTextColor_ts --> module_src_internal_resolvers_resolveSurfaceColor_ts
|
|
528
|
+
module_src_internal_resolvers_resolveTextColor_ts --> module_src_surfaceColor_ts
|
|
529
|
+
module_src_internal_resolvers_resolveTextColor_ts --> module_src_theme_types_ts
|
|
530
|
+
module_src_internal_resolvers_resolveTextStyles_ts["src/internal/resolvers/resolveTextStyles.ts"]
|
|
531
|
+
package__ankhorage_surface -.-> module_src_internal_resolvers_resolveTextStyles_ts
|
|
532
|
+
module_src_internal_resolvers_resolveTextStyles_ts --> module_src_theme_types_ts
|
|
533
|
+
module_src_internal_useControllableState_ts["src/internal/useControllableState.ts"]
|
|
534
|
+
package__ankhorage_surface -.-> module_src_internal_useControllableState_ts
|
|
535
|
+
module_src_layout_AppBar_tsx["src/layout/AppBar.tsx"]
|
|
536
|
+
package__ankhorage_surface -.-> module_src_layout_AppBar_tsx
|
|
537
|
+
module_src_layout_AppBar_tsx --> module_src_layout_Box_tsx
|
|
538
|
+
module_src_layout_AppBar_tsx --> module_src_layout_Divider_tsx
|
|
539
|
+
module_src_layout_AppBar_tsx --> module_src_theme_ThemeContext_tsx
|
|
540
|
+
module_src_layout_Box_tsx["src/layout/Box.tsx"]
|
|
541
|
+
package__ankhorage_surface -.-> module_src_layout_Box_tsx
|
|
542
|
+
module_src_layout_Box_tsx --> module_src_core_responsive_index_ts
|
|
543
|
+
module_src_layout_Box_tsx --> module_src_layout_helpers_ts
|
|
544
|
+
module_src_layout_Box_tsx --> module_src_theme_ThemeContext_tsx
|
|
545
|
+
module_src_layout_Center_tsx["src/layout/Center.tsx"]
|
|
546
|
+
package__ankhorage_surface -.-> module_src_layout_Center_tsx
|
|
547
|
+
module_src_layout_Center_tsx --> module_src_layout_Box_tsx
|
|
548
|
+
module_src_layout_Container_tsx["src/layout/Container.tsx"]
|
|
549
|
+
package__ankhorage_surface -.-> module_src_layout_Container_tsx
|
|
550
|
+
module_src_layout_Container_tsx --> module_src_core_responsive_index_ts
|
|
551
|
+
module_src_layout_Container_tsx --> module_src_layout_Box_tsx
|
|
552
|
+
module_src_layout_Container_tsx --> module_src_layout_helpers_ts
|
|
553
|
+
module_src_layout_Container_tsx --> module_src_theme_ThemeContext_tsx
|
|
554
|
+
module_src_layout_Container_tsx --> module_src_theme_types_ts
|
|
555
|
+
module_src_layout_Divider_tsx["src/layout/Divider.tsx"]
|
|
556
|
+
package__ankhorage_surface -.-> module_src_layout_Divider_tsx
|
|
557
|
+
module_src_layout_Divider_tsx --> module_src_layout_Box_tsx
|
|
558
|
+
module_src_layout_Divider_tsx --> module_src_layout_helpers_ts
|
|
559
|
+
module_src_layout_Grid_tsx["src/layout/Grid.tsx"]
|
|
560
|
+
package__ankhorage_surface -.-> module_src_layout_Grid_tsx
|
|
561
|
+
module_src_layout_Grid_tsx --> module_src_core_responsive_index_ts
|
|
562
|
+
module_src_layout_Grid_tsx --> module_src_layout_Box_tsx
|
|
563
|
+
module_src_layout_Grid_tsx --> module_src_layout_helpers_ts
|
|
564
|
+
module_src_layout_Grid_tsx --> module_src_theme_ThemeContext_tsx
|
|
565
|
+
module_src_layout_helpers_ts["src/layout/helpers.ts"]
|
|
566
|
+
package__ankhorage_surface -.-> module_src_layout_helpers_ts
|
|
567
|
+
module_src_layout_helpers_ts --> module_src_core_responsive_resolve_ts
|
|
568
|
+
module_src_layout_helpers_ts --> module_src_core_responsive_types_ts
|
|
569
|
+
module_src_layout_helpers_ts --> module_src_theme_resolveToken_ts
|
|
570
|
+
module_src_layout_helpers_ts --> module_src_theme_types_ts
|
|
571
|
+
module_src_layout_index_ts["src/layout/index.ts"]
|
|
572
|
+
package__ankhorage_surface -.-> module_src_layout_index_ts
|
|
573
|
+
module_src_layout_Inline_tsx["src/layout/Inline.tsx"]
|
|
574
|
+
package__ankhorage_surface -.-> module_src_layout_Inline_tsx
|
|
575
|
+
module_src_layout_Inline_tsx --> module_src_layout_Stack_tsx
|
|
576
|
+
module_src_layout_ScrollArea_tsx["src/layout/ScrollArea.tsx"]
|
|
577
|
+
package__ankhorage_surface -.-> module_src_layout_ScrollArea_tsx
|
|
578
|
+
module_src_layout_ScrollArea_tsx --> module_src_core_responsive_index_ts
|
|
579
|
+
module_src_layout_ScrollArea_tsx --> module_src_layout_helpers_ts
|
|
580
|
+
module_src_layout_ScrollArea_tsx --> module_src_theme_ThemeContext_tsx
|
|
581
|
+
module_src_layout_Show_tsx["src/layout/Show.tsx"]
|
|
582
|
+
package__ankhorage_surface -.-> module_src_layout_Show_tsx
|
|
583
|
+
module_src_layout_Show_tsx --> module_src_core_responsive_index_ts
|
|
584
|
+
module_src_layout_Spacer_tsx["src/layout/Spacer.tsx"]
|
|
585
|
+
package__ankhorage_surface -.-> module_src_layout_Spacer_tsx
|
|
586
|
+
module_src_layout_Spacer_tsx --> module_src_layout_Box_tsx
|
|
587
|
+
module_src_layout_Spacer_tsx --> module_src_layout_helpers_ts
|
|
588
|
+
module_src_layout_Stack_tsx["src/layout/Stack.tsx"]
|
|
589
|
+
package__ankhorage_surface -.-> module_src_layout_Stack_tsx
|
|
590
|
+
module_src_layout_Stack_tsx --> module_src_core_responsive_index_ts
|
|
591
|
+
module_src_layout_Stack_tsx --> module_src_layout_Box_tsx
|
|
592
|
+
module_src_layout_Stack_tsx --> module_src_layout_helpers_ts
|
|
593
|
+
module_src_layout_Stack_tsx --> module_src_theme_ThemeContext_tsx
|
|
594
|
+
module_src_layout_Surface_tsx["src/layout/Surface.tsx"]
|
|
595
|
+
package__ankhorage_surface -.-> module_src_layout_Surface_tsx
|
|
596
|
+
module_src_layout_Surface_tsx --> module_src_layout_Box_tsx
|
|
597
|
+
module_src_layout_Surface_tsx --> module_src_theme_ThemeContext_tsx
|
|
598
|
+
module_src_layout_Template_tsx["src/layout/Template.tsx"]
|
|
599
|
+
package__ankhorage_surface -.-> module_src_layout_Template_tsx
|
|
600
|
+
module_src_layout_Template_tsx --> module_src_core_responsive_index_ts
|
|
601
|
+
module_src_layout_Template_tsx --> module_src_layout_Box_tsx
|
|
602
|
+
module_src_layout_Template_tsx --> module_src_layout_helpers_ts
|
|
603
|
+
module_src_layout_Template_tsx --> module_src_theme_ThemeContext_tsx
|
|
604
|
+
module_src_primitives_button_base_ButtonBase_tsx["src/primitives/button-base/ButtonBase.tsx"]
|
|
605
|
+
package__ankhorage_surface -.-> module_src_primitives_button_base_ButtonBase_tsx
|
|
606
|
+
module_src_primitives_button_base_ButtonBase_tsx --> module_src_core_responsive_index_ts
|
|
607
|
+
module_src_primitives_button_base_ButtonBase_tsx --> module_src_internal_resolvers_index_ts
|
|
608
|
+
module_src_primitives_button_base_ButtonBase_tsx --> module_src_layout_helpers_ts
|
|
609
|
+
module_src_primitives_button_base_ButtonBase_tsx --> module_src_primitives_button_base_types_ts
|
|
610
|
+
module_src_primitives_button_base_ButtonBase_tsx --> module_src_theme_ThemeContext_tsx
|
|
611
|
+
module_src_primitives_button_base_index_ts["src/primitives/button-base/index.ts"]
|
|
612
|
+
package__ankhorage_surface -.-> module_src_primitives_button_base_index_ts
|
|
613
|
+
module_src_primitives_button_base_types_ts["src/primitives/button-base/types.ts"]
|
|
614
|
+
package__ankhorage_surface -.-> module_src_primitives_button_base_types_ts
|
|
615
|
+
module_src_primitives_button_base_types_ts --> module_src_internal_resolvers_resolveInteractiveState_ts
|
|
616
|
+
module_src_primitives_button_base_types_ts --> module_src_layout_index_ts
|
|
617
|
+
module_src_primitives_heading_Heading_tsx["src/primitives/heading/Heading.tsx"]
|
|
618
|
+
package__ankhorage_surface -.-> module_src_primitives_heading_Heading_tsx
|
|
619
|
+
module_src_primitives_heading_Heading_tsx --> module_src_context_TranslationContext_tsx
|
|
620
|
+
module_src_primitives_heading_Heading_tsx --> module_src_primitives_heading_resolveHeadingStyle_ts
|
|
621
|
+
module_src_primitives_heading_Heading_tsx --> module_src_primitives_heading_types_ts
|
|
622
|
+
module_src_primitives_heading_Heading_tsx --> module_src_theme_ThemeContext_tsx
|
|
623
|
+
module_src_primitives_heading_index_ts["src/primitives/heading/index.ts"]
|
|
624
|
+
package__ankhorage_surface -.-> module_src_primitives_heading_index_ts
|
|
625
|
+
module_src_primitives_heading_resolveHeadingStyle_ts["src/primitives/heading/resolveHeadingStyle.ts"]
|
|
626
|
+
package__ankhorage_surface -.-> module_src_primitives_heading_resolveHeadingStyle_ts
|
|
627
|
+
module_src_primitives_heading_resolveHeadingStyle_ts --> module_src_internal_resolvers_resolveTextColor_ts
|
|
628
|
+
module_src_primitives_heading_resolveHeadingStyle_ts --> module_src_internal_resolvers_resolveTextStyles_ts
|
|
629
|
+
module_src_primitives_heading_resolveHeadingStyle_ts --> module_src_primitives_heading_types_ts
|
|
630
|
+
module_src_primitives_heading_resolveHeadingStyle_ts --> module_src_surfaceColor_ts
|
|
631
|
+
module_src_primitives_heading_resolveHeadingStyle_ts --> module_src_theme_types_ts
|
|
632
|
+
module_src_primitives_heading_types_ts["src/primitives/heading/types.ts"]
|
|
633
|
+
package__ankhorage_surface -.-> module_src_primitives_heading_types_ts
|
|
634
|
+
module_src_primitives_heading_types_ts --> module_src_surfaceColor_ts
|
|
635
|
+
module_src_primitives_icon_Icon_tsx["src/primitives/icon/Icon.tsx"]
|
|
636
|
+
package__ankhorage_surface -.-> module_src_primitives_icon_Icon_tsx
|
|
637
|
+
module_src_primitives_icon_Icon_tsx --> module_src_primitives_icon_resolveExpoIconComponent_ts
|
|
638
|
+
module_src_primitives_icon_Icon_tsx --> module_src_theme_resolveToken_ts
|
|
639
|
+
module_src_primitives_icon_Icon_tsx --> module_src_theme_ThemeContext_tsx
|
|
640
|
+
module_src_primitives_icon_Icon_tsx --> module_src_theme_types_ts
|
|
641
|
+
module_src_primitives_icon_index_ts["src/primitives/icon/index.ts"]
|
|
642
|
+
package__ankhorage_surface -.-> module_src_primitives_icon_index_ts
|
|
643
|
+
module_src_primitives_icon_resolveExpoIconComponent_ts["src/primitives/icon/resolveExpoIconComponent.ts"]
|
|
644
|
+
package__ankhorage_surface -.-> module_src_primitives_icon_resolveExpoIconComponent_ts
|
|
645
|
+
module_src_primitives_image_Image_tsx["src/primitives/image/Image.tsx"]
|
|
646
|
+
package__ankhorage_surface -.-> module_src_primitives_image_Image_tsx
|
|
647
|
+
module_src_primitives_image_Image_tsx --> module_src_primitives_image_resolveImageProps_ts
|
|
648
|
+
module_src_primitives_image_Image_tsx --> module_src_primitives_image_types_ts
|
|
649
|
+
module_src_primitives_image_Image_tsx --> module_src_theme_ThemeContext_tsx
|
|
650
|
+
module_src_primitives_image_index_ts["src/primitives/image/index.ts"]
|
|
651
|
+
package__ankhorage_surface -.-> module_src_primitives_image_index_ts
|
|
652
|
+
module_src_primitives_image_resolveImageProps_ts["src/primitives/image/resolveImageProps.ts"]
|
|
653
|
+
package__ankhorage_surface -.-> module_src_primitives_image_resolveImageProps_ts
|
|
654
|
+
module_src_primitives_image_resolveImageProps_ts --> module_src_primitives_image_types_ts
|
|
655
|
+
module_src_primitives_image_resolveImageProps_ts --> module_src_theme_resolveToken_ts
|
|
656
|
+
module_src_primitives_image_resolveImageProps_ts --> module_src_theme_types_ts
|
|
657
|
+
module_src_primitives_image_types_ts["src/primitives/image/types.ts"]
|
|
658
|
+
package__ankhorage_surface -.-> module_src_primitives_image_types_ts
|
|
659
|
+
module_src_primitives_image_types_ts --> module_src_theme_types_ts
|
|
660
|
+
module_src_primitives_text_index_ts["src/primitives/text/index.ts"]
|
|
661
|
+
package__ankhorage_surface -.-> module_src_primitives_text_index_ts
|
|
662
|
+
module_src_primitives_text_Text_tsx["src/primitives/text/Text.tsx"]
|
|
663
|
+
package__ankhorage_surface -.-> module_src_primitives_text_Text_tsx
|
|
664
|
+
module_src_primitives_text_Text_tsx --> module_src_context_TranslationContext_tsx
|
|
665
|
+
module_src_primitives_text_Text_tsx --> module_src_internal_resolvers_index_ts
|
|
666
|
+
module_src_primitives_text_Text_tsx --> module_src_primitives_text_types_ts
|
|
667
|
+
module_src_primitives_text_Text_tsx --> module_src_theme_ThemeContext_tsx
|
|
668
|
+
module_src_primitives_text_types_ts["src/primitives/text/types.ts"]
|
|
669
|
+
package__ankhorage_surface -.-> module_src_primitives_text_types_ts
|
|
670
|
+
module_src_primitives_text_types_ts --> module_src_internal_resolvers_resolveTextStyles_ts
|
|
671
|
+
module_src_primitives_text_types_ts --> module_src_surfaceColor_ts
|
|
672
|
+
module_src_surfaceColor_ts["src/surfaceColor.ts"]
|
|
673
|
+
package__ankhorage_surface -.-> module_src_surfaceColor_ts
|
|
674
|
+
module_src_theme_colorEngine_ts["src/theme/colorEngine.ts"]
|
|
675
|
+
package__ankhorage_surface -.-> module_src_theme_colorEngine_ts
|
|
676
|
+
module_src_theme_colorEngine_ts --> module_src_theme_types_ts
|
|
677
|
+
module_src_theme_createTheme_ts["src/theme/createTheme.ts"]
|
|
678
|
+
package__ankhorage_surface -.-> module_src_theme_createTheme_ts
|
|
679
|
+
module_src_theme_createTheme_ts --> module_src_theme_colorEngine_ts
|
|
680
|
+
module_src_theme_createTheme_ts --> module_src_theme_types_ts
|
|
681
|
+
module_src_theme_index_ts["src/theme/index.ts"]
|
|
682
|
+
package__ankhorage_surface -.-> module_src_theme_index_ts
|
|
683
|
+
module_src_theme_resolveToken_ts["src/theme/resolveToken.ts"]
|
|
684
|
+
package__ankhorage_surface -.-> module_src_theme_resolveToken_ts
|
|
685
|
+
module_src_theme_ThemeContext_tsx["src/theme/ThemeContext.tsx"]
|
|
686
|
+
package__ankhorage_surface -.-> module_src_theme_ThemeContext_tsx
|
|
687
|
+
module_src_theme_ThemeContext_tsx --> module_src_context_FontContext_tsx
|
|
688
|
+
module_src_theme_ThemeContext_tsx --> module_src_core_responsive_ResponsiveProvider_tsx
|
|
689
|
+
module_src_theme_ThemeContext_tsx --> module_src_internal_overlay_OverlayProvider_tsx
|
|
690
|
+
module_src_theme_ThemeContext_tsx --> module_src_theme_createTheme_ts
|
|
691
|
+
module_src_theme_ThemeContext_tsx --> module_src_theme_types_ts
|
|
692
|
+
module_src_theme_ThemeContext_tsx --> module_src_utils_deepEqual_ts
|
|
693
|
+
module_src_theme_ThemeContext_tsx --> module_src_utils_deepMerge_ts
|
|
694
|
+
module_src_theme_types_ts["src/theme/types.ts"]
|
|
695
|
+
package__ankhorage_surface -.-> module_src_theme_types_ts
|
|
696
|
+
module_src_utils_deepEqual_ts["src/utils/deepEqual.ts"]
|
|
697
|
+
package__ankhorage_surface -.-> module_src_utils_deepEqual_ts
|
|
698
|
+
module_src_utils_deepMerge_ts["src/utils/deepMerge.ts"]
|
|
699
|
+
package__ankhorage_surface -.-> module_src_utils_deepMerge_ts
|
|
41
700
|
```
|
|
42
701
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- Design system foundations
|
|
46
|
-
- Cross-platform layout abstraction
|
|
47
|
-
|
|
48
|
-
## 🧠 Why this exists
|
|
49
|
-
|
|
50
|
-
Bridges the gap between raw primitives and full UI frameworks.
|
|
51
|
-
|
|
52
|
-
## 🧭 Navigation chrome primitives
|
|
53
|
-
|
|
54
|
-
Surface includes **router-agnostic navigation chrome** building blocks (tab bars, drawer lists, route items).
|
|
55
|
-
|
|
56
|
-
- These components **do not** implement routing, route state, deep linking, or screen switching.
|
|
57
|
-
- Use **Expo Router / React Navigation** for navigation mechanics, and render UI with Surface by passing `active`, `disabled`, and `onPress`.
|
|
702
|
+
</details>
|
|
@@ -56,7 +56,7 @@ export function Tooltip({ children, content, delay = 150, placement = 'top', tes
|
|
|
56
56
|
top: tooltipTop,
|
|
57
57
|
}}>
|
|
58
58
|
<Surface p="s" style={{
|
|
59
|
-
backgroundColor: theme.semantics.
|
|
59
|
+
backgroundColor: theme.semantics.surface.inverse,
|
|
60
60
|
}} testID={testID} variant="raised">
|
|
61
61
|
<Text emphasis="inverse" variant="caption">
|
|
62
62
|
{content}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAwB,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AASpD,SAAS,WAAW,CAAC,IAAa,EAAE,QAA2C;IAC7E,MAAM,cAAc,GAAG,IAA6B,CAAC;IACrD,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxD,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,EACtB,QAAQ,EACR,OAAO,EAC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M,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,QAAQ,CAEhB;YAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CACxC;cAAA,CAAC,OAAO,CACV;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,OAAO,CACX;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { type LayoutRectangle, Platform, Pressable, View } from 'react-native';\n\nimport { Portal } from '../../internal/overlay/Portal';\nimport { resolveOverlayAnimation } from '../../internal/resolvers';\nimport { Surface } from '../../layout';\nimport { Text } from '../../primitives/text';\nimport { useTheme } from '../../theme/ThemeContext';\nimport type { TooltipProps } from './types';\n\ninterface MeasurableNode {\n measureInWindow?: (\n callback: (x: number, y: number, width: number, height: number) => void,\n ) => void;\n}\n\nfunction measureNode(node: unknown, callback: (layout: LayoutRectangle) => void) {\n const measurableNode = node as MeasurableNode | null;\n measurableNode?.measureInWindow?.((x, y, width, height) => {\n callback({ height, width, x, y });\n });\n}\n\nexport function Tooltip({\n children,\n content,\n delay = 150,\n placement = 'top',\n testID,\n}: TooltipProps) {\n const { theme } = useTheme();\n const animation = resolveOverlayAnimation('tooltip');\n const anchorRef = React.useRef<View | null>(null);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const [visible, setVisible] = React.useState(false);\n const [layout, setLayout] = React.useState<LayoutRectangle | null>(null);\n\n const show = React.useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n timeoutRef.current = setTimeout(() => {\n measureNode(anchorRef.current, setLayout);\n setVisible(true);\n }, delay);\n }, [delay]);\n\n const hide = React.useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n setVisible(false);\n }, []);\n\n React.useEffect(\n () => () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n },\n [],\n );\n\n const tooltipLeft = layout ? layout.x : 0;\n const tooltipTop =\n layout && placement === 'top'\n ? layout.y - animation.offset\n : layout\n ? layout.y + layout.height + animation.offset\n : 0;\n\n return (\n <View collapsable={false} ref={anchorRef} testID={testID ? `${testID}-anchor` : undefined}>\n <Pressable\n onBlur={hide}\n onFocus={show}\n onHoverIn={Platform.OS === 'web' ? show : undefined}\n onHoverOut={Platform.OS === 'web' ? hide : undefined}\n >\n {children}\n </Pressable>\n <Portal layer=\"tooltip\" visible={visible && Boolean(layout)}>\n <View\n pointerEvents=\"none\"\n style={{\n left: tooltipLeft,\n position: 'absolute',\n top: tooltipTop,\n }}\n >\n <Surface\n p=\"s\"\n style={{\n backgroundColor: theme.semantics.surface.inverse,\n }}\n testID={testID}\n variant=\"raised\"\n >\n <Text emphasis=\"inverse\" variant=\"caption\">\n {content}\n </Text>\n </Surface>\n </View>\n </Portal>\n </View>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorEngine.d.ts","sourceRoot":"","sources":["../../src/theme/colorEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,sBAAsB,EACtB,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAOV,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAEzE,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,wBAAwB,EACnC,UAAU,EAAE,yBAAyB,GACpC,qBAAqB,CAUvB;AA8DD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,EACnB,IAAI,GAAE,OAAO,GAAG,MAAgB,GAC/B;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,SAAS,EAAE,cAAc,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"colorEngine.d.ts","sourceRoot":"","sources":["../../src/theme/colorEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,sBAAsB,EACtB,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAOV,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAEzE,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,wBAAwB,EACnC,UAAU,EAAE,yBAAyB,GACpC,qBAAqB,CAUvB;AA8DD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,EACnB,IAAI,GAAE,OAAO,GAAG,MAAgB,GAC/B;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,SAAS,EAAE,cAAc,CAAC;CAC3B,CA8FA"}
|
|
@@ -85,16 +85,19 @@ export function generatePalette(config, mode = 'light') {
|
|
|
85
85
|
// Keep destructive action and feedback error aligned until a dedicated error status swatch is introduced.
|
|
86
86
|
const error = danger;
|
|
87
87
|
const info = buildRoleSemantics(secondarySwatch, isDark);
|
|
88
|
+
const inverseSurface = isDark ? neutralSwatch[50] : neutralSwatch[900];
|
|
89
|
+
const inverseOnSurface = isDark ? neutralSwatch[900] : neutralSwatch[50];
|
|
88
90
|
const surfaceSemantics = {
|
|
89
91
|
default: neutral.surface,
|
|
90
92
|
subtle: neutral.bgSubtle,
|
|
91
93
|
raised: neutral.surface,
|
|
94
|
+
inverse: inverseSurface,
|
|
92
95
|
};
|
|
93
96
|
const content = {
|
|
94
97
|
default: neutral.text,
|
|
95
98
|
muted: neutral.textMuted,
|
|
96
99
|
subtle: neutral.textSubtle,
|
|
97
|
-
inverse:
|
|
100
|
+
inverse: inverseOnSurface,
|
|
98
101
|
};
|
|
99
102
|
const border = {
|
|
100
103
|
default: neutral.border,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorEngine.js","sourceRoot":"","sources":["../../src/theme/colorEngine.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,mCAAmC,EACnC,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAmBjC,MAAM,UAAU,qBAAqB,CACnC,SAAmC,EACnC,UAAqC;IAErC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE;QAC9C,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,CAAC,IAAI,cAAc,KAAK,IAAI,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CACsB,CAAC;AAC7B,CAAC;AAED,SAAS,qBAAqB,CAAC,aAA0B,EAAE,MAAe;IACxE,IAAI,MAAM,EAAE,CAAC;QACX,OAAO;YACL,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC;YACtB,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC;YAC5B,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC;YAC3B,YAAY,EAAE,aAAa,CAAC,GA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AAC,GAAG,CAAC;QAC3B,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAAC;QAChC,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;QAC7B,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC;QACjC,UAAU,EAAE,OAAO,CAAC,EAAE;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,aAAa,EAAE,OAAO,CAAC,SAAS;QAChC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;IAEF,OAAO;QACL,MAAM;QACN,QAAQ;QACR,SAAS,EAAE;YACT,OAAO;YACP,KAAK;YACL,SAAS,EAAE,kBAAkB,CAAC,eAAe,EAAE,MAAM,CAAC;YACtD,MAAM,EAAE,kBAAkB,CAAC,cAAc,EAAE,MAAM,CAAC;YAClD,SAAS,EAAE,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,CAAC;YACvD,MAAM;YACN,OAAO;YACP,OAAO;YACP,KAAK;YACL,IAAI;YACJ,OAAO,EAAE,gBAAgB;YACzB,OAAO;YACP,MAAM;YACN,MAAM;SACP;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n ColorSwatch,\n GeneratedThemeModeColors,\n GeneratedThemeSwatches,\n HexColor,\n SemanticColorReferenceMap,\n SemanticColorToken,\n} from '@ankhorage/color-theory';\nimport {\n createDefaultSemanticStatusSwatches,\n generateThemeModeColors,\n getReadableForeground,\n parseHexColorOrThrow,\n} from '@ankhorage/color-theory';\nimport type { ThemeConfig } from '@ankhorage/contracts';\n\nimport type {\n ActionSemantics,\n BorderSemantics,\n ContentSemantics,\n NeutralSemantics,\n RoleSemantics,\n SurfaceSemantics,\n ThemeSemantics,\n} from './types';\n\n/**\n * Surface semantic resolver: maps color-theory SemanticColorToken references\n * to hex values from the generated swatches.\n */\nexport type SurfaceSemanticColors = Record<SemanticColorToken, HexColor>;\n\nexport function resolveSemanticColors(\n generated: GeneratedThemeModeColors,\n references: SemanticColorReferenceMap,\n): SurfaceSemanticColors {\n return Object.fromEntries(\n Object.entries(references).map(([token, ref]) => {\n const swatch = generated.swatches[ref.role];\n if (!swatch) {\n throw new Error(`Missing swatch for role '${ref.role}' (token: '${token}')`);\n }\n return [token, swatch[ref.step]];\n }),\n ) as SurfaceSemanticColors;\n}\n\nfunction buildNeutralSemantics(neutralSwatch: ColorSwatch, isDark: boolean): NeutralSemantics {\n if (isDark) {\n return {\n bg: neutralSwatch[950],\n bgSubtle: neutralSwatch[900],\n surface: neutralSwatch[900],\n surfaceHover: neutralSwatch[800],\n surfaceActive: neutralSwatch[700],\n border: neutralSwatch[800],\n borderStrong: neutralSwatch[600],\n divider: neutralSwatch[800],\n text: neutralSwatch[50],\n textMuted: neutralSwatch[200],\n textSubtle: neutralSwatch[300],\n };\n }\n return {\n bg: neutralSwatch[50],\n bgSubtle: neutralSwatch[100],\n surface: neutralSwatch[100],\n surfaceHover: neutralSwatch[200],\n surfaceActive: neutralSwatch[300],\n border: neutralSwatch[200],\n borderStrong: neutralSwatch[300],\n divider: neutralSwatch[200],\n text: neutralSwatch[900],\n textMuted: neutralSwatch[700],\n textSubtle: neutralSwatch[600],\n };\n}\n\nfunction buildRoleSemantics(swatch: ColorSwatch, isDark: boolean): RoleSemantics {\n const base = swatch[500];\n const { foreground: onSolidText } = getReadableForeground(base);\n\n if (isDark) {\n return {\n base,\n hover: swatch[400],\n strong: swatch[300],\n softBg: swatch[900],\n softHover: swatch[800],\n softActive: swatch[700],\n outline: swatch[500],\n onSolidText,\n };\n }\n\n return {\n base,\n hover: swatch[600],\n strong: swatch[700],\n softBg: swatch[100],\n softHover: swatch[200],\n softActive: swatch[300],\n outline: swatch[400],\n onSolidText,\n };\n}\n\nexport function generatePalette(\n config: ThemeConfig,\n mode: 'light' | 'dark' = 'light',\n): {\n colors: Record<string, string>;\n swatches: GeneratedThemeSwatches;\n semantics: ThemeSemantics;\n} {\n const modeConfig = mode === 'dark' ? config.dark : config.light;\n const isDark = mode === 'dark';\n\n // Throws deterministically on invalid primary color\n parseHexColorOrThrow(modeConfig.primaryColor);\n\n const generated = generateThemeModeColors(modeConfig);\n\n const { swatches } = generated;\n const neutralSwatch = swatches.neutral;\n\n const neutral = buildNeutralSemantics(neutralSwatch, isDark);\n const brand = buildRoleSemantics(swatches.primary, isDark);\n\n // Fallback to primary swatch for missing ordinal roles\n const secondarySwatch = swatches.secondary ?? swatches.primary;\n const tertiarySwatch = swatches.tertiary ?? swatches.primary;\n const quaternarySwatch = swatches.quaternary ?? swatches.primary;\n\n const semanticStatusSwatches = createDefaultSemanticStatusSwatches().swatches;\n\n const danger = buildRoleSemantics(semanticStatusSwatches.danger, isDark);\n const success = buildRoleSemantics(semanticStatusSwatches.success, isDark);\n const warning = buildRoleSemantics(semanticStatusSwatches.warning, isDark);\n // Keep destructive action and feedback error aligned until a dedicated error status swatch is introduced.\n const error = danger;\n const info = buildRoleSemantics(secondarySwatch, isDark);\n\n const surfaceSemantics: SurfaceSemantics = {\n default: neutral.surface,\n subtle: neutral.bgSubtle,\n raised: neutral.surface,\n };\n\n const content: ContentSemantics = {\n default: neutral.text,\n muted: neutral.textMuted,\n subtle: neutral.textSubtle,\n inverse: brand.onSolidText,\n };\n\n const border: BorderSemantics = {\n default: neutral.border,\n strong: neutral.borderStrong,\n focus: brand.outline,\n };\n\n const action: ActionSemantics = {\n primary: brand,\n neutral: buildRoleSemantics(neutralSwatch, isDark),\n danger,\n };\n\n const colors: Record<string, string> = {\n primary: brand.base,\n secondary: secondarySwatch[500],\n accent: tertiarySwatch[500],\n highlight: quaternarySwatch[500],\n tertiary: tertiarySwatch[500],\n quaternary: quaternarySwatch[500],\n background: neutral.bg,\n surface: neutral.surface,\n text: neutral.text,\n textSecondary: neutral.textMuted,\n border: neutral.border,\n error: error.base,\n success: success.base,\n warning: warning.base,\n info: info.base,\n };\n\n return {\n colors,\n swatches,\n semantics: {\n neutral,\n brand,\n secondary: buildRoleSemantics(secondarySwatch, isDark),\n accent: buildRoleSemantics(tertiarySwatch, isDark),\n highlight: buildRoleSemantics(quaternarySwatch, isDark),\n danger,\n success,\n warning,\n error,\n info,\n surface: surfaceSemantics,\n content,\n border,\n action,\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"colorEngine.js","sourceRoot":"","sources":["../../src/theme/colorEngine.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,mCAAmC,EACnC,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAmBjC,MAAM,UAAU,qBAAqB,CACnC,SAAmC,EACnC,UAAqC;IAErC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE;QAC9C,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,CAAC,IAAI,cAAc,KAAK,IAAI,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CACsB,CAAC;AAC7B,CAAC;AAED,SAAS,qBAAqB,CAAC,aAA0B,EAAE,MAAe;IACxE,IAAI,MAAM,EAAE,CAAC;QACX,OAAO;YACL,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC;YACtB,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC;YAC5B,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC;YAC3B,YAAY,EAAE,aA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\n SemanticColorToken,\n} from '@ankhorage/color-theory';\nimport {\n createDefaultSemanticStatusSwatches,\n generateThemeModeColors,\n getReadableForeground,\n parseHexColorOrThrow,\n} from '@ankhorage/color-theory';\nimport type { ThemeConfig } from '@ankhorage/contracts';\n\nimport type {\n ActionSemantics,\n BorderSemantics,\n ContentSemantics,\n NeutralSemantics,\n RoleSemantics,\n SurfaceSemantics,\n ThemeSemantics,\n} from './types';\n\n/**\n * Surface semantic resolver: maps color-theory SemanticColorToken references\n * to hex values from the generated swatches.\n */\nexport type SurfaceSemanticColors = Record<SemanticColorToken, HexColor>;\n\nexport function resolveSemanticColors(\n generated: GeneratedThemeModeColors,\n references: SemanticColorReferenceMap,\n): SurfaceSemanticColors {\n return Object.fromEntries(\n Object.entries(references).map(([token, ref]) => {\n const swatch = generated.swatches[ref.role];\n if (!swatch) {\n throw new Error(`Missing swatch for role '${ref.role}' (token: '${token}')`);\n }\n return [token, swatch[ref.step]];\n }),\n ) as SurfaceSemanticColors;\n}\n\nfunction buildNeutralSemantics(neutralSwatch: ColorSwatch, isDark: boolean): NeutralSemantics {\n if (isDark) {\n return {\n bg: neutralSwatch[950],\n bgSubtle: neutralSwatch[900],\n surface: neutralSwatch[900],\n surfaceHover: neutralSwatch[800],\n surfaceActive: neutralSwatch[700],\n border: neutralSwatch[800],\n borderStrong: neutralSwatch[600],\n divider: neutralSwatch[800],\n text: neutralSwatch[50],\n textMuted: neutralSwatch[200],\n textSubtle: neutralSwatch[300],\n };\n }\n return {\n bg: neutralSwatch[50],\n bgSubtle: neutralSwatch[100],\n surface: neutralSwatch[100],\n surfaceHover: neutralSwatch[200],\n surfaceActive: neutralSwatch[300],\n border: neutralSwatch[200],\n borderStrong: neutralSwatch[300],\n divider: neutralSwatch[200],\n text: neutralSwatch[900],\n textMuted: neutralSwatch[700],\n textSubtle: neutralSwatch[600],\n };\n}\n\nfunction buildRoleSemantics(swatch: ColorSwatch, isDark: boolean): RoleSemantics {\n const base = swatch[500];\n const { foreground: onSolidText } = getReadableForeground(base);\n\n if (isDark) {\n return {\n base,\n hover: swatch[400],\n strong: swatch[300],\n softBg: swatch[900],\n softHover: swatch[800],\n softActive: swatch[700],\n outline: swatch[500],\n onSolidText,\n };\n }\n\n return {\n base,\n hover: swatch[600],\n strong: swatch[700],\n softBg: swatch[100],\n softHover: swatch[200],\n softActive: swatch[300],\n outline: swatch[400],\n onSolidText,\n };\n}\n\nexport function generatePalette(\n config: ThemeConfig,\n mode: 'light' | 'dark' = 'light',\n): {\n colors: Record<string, string>;\n swatches: GeneratedThemeSwatches;\n semantics: ThemeSemantics;\n} {\n const modeConfig = mode === 'dark' ? config.dark : config.light;\n const isDark = mode === 'dark';\n\n // Throws deterministically on invalid primary color\n parseHexColorOrThrow(modeConfig.primaryColor);\n\n const generated = generateThemeModeColors(modeConfig);\n const { swatches } = generated;\n const neutralSwatch = swatches.neutral;\n\n const neutral = buildNeutralSemantics(neutralSwatch, isDark);\n const brand = buildRoleSemantics(swatches.primary, isDark);\n\n // Fallback to primary swatch for missing ordinal roles\n const secondarySwatch = swatches.secondary ?? swatches.primary;\n const tertiarySwatch = swatches.tertiary ?? swatches.primary;\n const quaternarySwatch = swatches.quaternary ?? swatches.primary;\n\n const semanticStatusSwatches = createDefaultSemanticStatusSwatches().swatches;\n\n const danger = buildRoleSemantics(semanticStatusSwatches.danger, isDark);\n const success = buildRoleSemantics(semanticStatusSwatches.success, isDark);\n const warning = buildRoleSemantics(semanticStatusSwatches.warning, isDark);\n // Keep destructive action and feedback error aligned until a dedicated error status swatch is introduced.\n const error = danger;\n const info = buildRoleSemantics(secondarySwatch, isDark);\n const inverseSurface = isDark ? neutralSwatch[50] : neutralSwatch[900];\n const inverseOnSurface = isDark ? neutralSwatch[900] : neutralSwatch[50];\n\n const surfaceSemantics: SurfaceSemantics = {\n default: neutral.surface,\n subtle: neutral.bgSubtle,\n raised: neutral.surface,\n inverse: inverseSurface,\n };\n\n const content: ContentSemantics = {\n default: neutral.text,\n muted: neutral.textMuted,\n subtle: neutral.textSubtle,\n inverse: inverseOnSurface,\n };\n\n const border: BorderSemantics = {\n default: neutral.border,\n strong: neutral.borderStrong,\n focus: brand.outline,\n };\n\n const action: ActionSemantics = {\n primary: brand,\n neutral: buildRoleSemantics(neutralSwatch, isDark),\n danger,\n };\n\n const colors: Record<string, string> = {\n primary: brand.base,\n secondary: secondarySwatch[500],\n accent: tertiarySwatch[500],\n highlight: quaternarySwatch[500],\n tertiary: tertiarySwatch[500],\n quaternary: quaternarySwatch[500],\n background: neutral.bg,\n surface: neutral.surface,\n text: neutral.text,\n textSecondary: neutral.textMuted,\n border: neutral.border,\n error: error.base,\n success: success.base,\n warning: warning.base,\n info: info.base,\n };\n\n return {\n colors,\n swatches,\n semantics: {\n neutral,\n brand,\n secondary: buildRoleSemantics(secondarySwatch, isDark),\n accent: buildRoleSemantics(tertiarySwatch, isDark),\n highlight: buildRoleSemantics(quaternarySwatch, isDark),\n danger,\n success,\n warning,\n error,\n info,\n surface: surfaceSemantics,\n content,\n border,\n action,\n },\n };\n}\n"]}
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,YAAY,EACV,YAAY,EACZ,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,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QACF,KAAK,EAAE;YACL,wDAAwD;YACxD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;YAC/C,wDAAwD;YACxD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;SAChD,CAAC;KACH,CAAC;IACF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,MAAM,EAAE,oBAAoB,CAAC;CAC9B"}
|
package/dist/theme/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedThemeSwatches } from '@ankhorage/color-theory';\nimport type { ThemeConfig as ContractsThemeConfig } from '@ankhorage/contracts';\n\nexport type {\n ColorHarmony,\n ColorSwatch,\n ColorSwatchStep,\n GeneratedColorRole,\n GeneratedThemeModeColors,\n GeneratedThemeSwatches,\n HexColor,\n SemanticColorReferenceMap,\n SemanticColorToken,\n} from '@ankhorage/color-theory';\nexport type { ThemeConfig, ThemeModeConfig } from '@ankhorage/contracts';\n\nexport interface NeutralSemantics {\n bg: string;\n bgSubtle: string;\n surface: string;\n surfaceHover: string;\n surfaceActive: string;\n border: string;\n borderStrong: string;\n divider: string;\n text: string;\n textMuted: string;\n textSubtle: string;\n}\n\nexport interface RoleSemantics {\n base: string;\n hover: string;\n strong: string;\n softBg: string;\n softHover: string;\n softActive: string;\n outline: string;\n onSolidText: string;\n}\n\nexport interface SurfaceSemantics {\n default: string;\n subtle: string;\n raised: string;\n}\n\nexport interface ContentSemantics {\n default: string;\n muted: string;\n subtle: string;\n inverse: string;\n}\n\nexport interface BorderSemantics {\n default: string;\n strong: string;\n focus: string;\n}\n\nexport interface ActionSemantics {\n primary: RoleSemantics;\n neutral: RoleSemantics;\n danger: RoleSemantics;\n}\n\nexport interface ThemeSemantics {\n neutral: NeutralSemantics;\n brand: RoleSemantics;\n secondary: RoleSemantics;\n accent: RoleSemantics;\n highlight: RoleSemantics;\n danger: RoleSemantics;\n success: RoleSemantics;\n warning: RoleSemantics;\n error: RoleSemantics;\n info: RoleSemantics;\n surface: SurfaceSemantics;\n content: ContentSemantics;\n border: BorderSemantics;\n action: ActionSemantics;\n}\n\nexport type FontWeight =\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'bold'\n | 'normal';\n\nexport interface ThemeTokens {\n colors: {\n primary: string;\n secondary: string;\n accent: string;\n highlight: string;\n tertiary: string;\n quaternary: string;\n background: string;\n surface: string;\n text: string;\n textSecondary: string;\n border: string;\n error: string;\n success: string;\n warning: string;\n info: string;\n [key: string]: string;\n };\n swatches: GeneratedThemeSwatches;\n semantics: ThemeSemantics;\n spacing: {\n none: 0;\n xs: number;\n s: number;\n m: number;\n l: number;\n xl: number;\n xxl: number;\n [key: string]: number;\n };\n radii: {\n none: 0;\n s: number;\n m: number;\n l: number;\n full: number;\n };\n typography: {\n headings: Record<\n 1 | 2 | 3 | 4 | 5 | 6,\n {\n size: number;\n lineHeight: number;\n weight: 'regular' | 'medium' | 'semiBold' | 'bold';\n }\n >;\n sizes: {\n xs: number;\n s: number;\n m: number;\n l: number;\n xl: number;\n xxl: number;\n '3xl': number;\n h1: number;\n h2: number;\n h3: number;\n h4: number;\n h5: number;\n h6: number;\n [key: string]: number;\n };\n weights: {\n thin: FontWeight;\n extraLight: FontWeight;\n light: FontWeight;\n regular: FontWeight;\n medium: FontWeight;\n semiBold: FontWeight;\n bold: FontWeight;\n extraBold: FontWeight;\n black: FontWeight;\n };\n fonts: {\n /** Map of weight -> fontFamily name for normal style */\n normal: Record<FontWeight, string | undefined>;\n /** Map of weight -> fontFamily name for italic style */\n italic: Record<FontWeight, string | undefined>;\n };\n };\n shadows: {\n soft: number;\n medium: number;\n hard: number;\n [key: string]: number;\n };\n}\n\nexport interface SurfaceTheme extends ThemeTokens {\n config: ContractsThemeConfig;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedThemeSwatches } from '@ankhorage/color-theory';\nimport type { ThemeConfig as ContractsThemeConfig } from '@ankhorage/contracts';\n\nexport type {\n ColorHarmony,\n ColorSwatch,\n ColorSwatchStep,\n GeneratedColorRole,\n GeneratedThemeModeColors,\n GeneratedThemeSwatches,\n HexColor,\n SemanticColorReferenceMap,\n SemanticColorToken,\n} from '@ankhorage/color-theory';\nexport type { ThemeConfig, ThemeModeConfig } from '@ankhorage/contracts';\n\nexport interface NeutralSemantics {\n bg: string;\n bgSubtle: string;\n surface: string;\n surfaceHover: string;\n surfaceActive: string;\n border: string;\n borderStrong: string;\n divider: string;\n text: string;\n textMuted: string;\n textSubtle: string;\n}\n\nexport interface RoleSemantics {\n base: string;\n hover: string;\n strong: string;\n softBg: string;\n softHover: string;\n softActive: string;\n outline: string;\n onSolidText: string;\n}\n\nexport interface SurfaceSemantics {\n default: string;\n subtle: string;\n raised: string;\n inverse: string;\n}\n\nexport interface ContentSemantics {\n default: string;\n muted: string;\n subtle: string;\n inverse: string;\n}\n\nexport interface BorderSemantics {\n default: string;\n strong: string;\n focus: string;\n}\n\nexport interface ActionSemantics {\n primary: RoleSemantics;\n neutral: RoleSemantics;\n danger: RoleSemantics;\n}\n\nexport interface ThemeSemantics {\n neutral: NeutralSemantics;\n brand: RoleSemantics;\n secondary: RoleSemantics;\n accent: RoleSemantics;\n highlight: RoleSemantics;\n danger: RoleSemantics;\n success: RoleSemantics;\n warning: RoleSemantics;\n error: RoleSemantics;\n info: RoleSemantics;\n surface: SurfaceSemantics;\n content: ContentSemantics;\n border: BorderSemantics;\n action: ActionSemantics;\n}\n\nexport type FontWeight =\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'bold'\n | 'normal';\n\nexport interface ThemeTokens {\n colors: {\n primary: string;\n secondary: string;\n accent: string;\n highlight: string;\n tertiary: string;\n quaternary: string;\n background: string;\n surface: string;\n text: string;\n textSecondary: string;\n border: string;\n error: string;\n success: string;\n warning: string;\n info: string;\n [key: string]: string;\n };\n swatches: GeneratedThemeSwatches;\n semantics: ThemeSemantics;\n spacing: {\n none: 0;\n xs: number;\n s: number;\n m: number;\n l: number;\n xl: number;\n xxl: number;\n [key: string]: number;\n };\n radii: {\n none: 0;\n s: number;\n m: number;\n l: number;\n full: number;\n };\n typography: {\n headings: Record<\n 1 | 2 | 3 | 4 | 5 | 6,\n {\n size: number;\n lineHeight: number;\n weight: 'regular' | 'medium' | 'semiBold' | 'bold';\n }\n >;\n sizes: {\n xs: number;\n s: number;\n m: number;\n l: number;\n xl: number;\n xxl: number;\n '3xl': number;\n h1: number;\n h2: number;\n h3: number;\n h4: number;\n h5: number;\n h6: number;\n [key: string]: number;\n };\n weights: {\n thin: FontWeight;\n extraLight: FontWeight;\n light: FontWeight;\n regular: FontWeight;\n medium: FontWeight;\n semiBold: FontWeight;\n bold: FontWeight;\n extraBold: FontWeight;\n black: FontWeight;\n };\n fonts: {\n /** Map of weight -> fontFamily name for normal style */\n normal: Record<FontWeight, string | undefined>;\n /** Map of weight -> fontFamily name for italic style */\n italic: Record<FontWeight, string | undefined>;\n };\n };\n shadows: {\n soft: number;\n medium: number;\n hard: number;\n [key: string]: number;\n };\n}\n\nexport interface SurfaceTheme extends ThemeTokens {\n config: ContractsThemeConfig;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/surface",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "Stable UI foundation for React Native and React Native Web.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/surface#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ankhorage/color-theory": "^0.0.7",
|
|
46
|
-
"@ankhorage/contracts": "^1.
|
|
46
|
+
"@ankhorage/contracts": "^2.1.0"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"dist",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"build": "rm -rf dist tsconfig.tsbuildinfo && bun x tsc -p tsconfig.json",
|
|
70
70
|
"changeset": "changeset",
|
|
71
71
|
"changeset:status": "changeset status --since=origin/main",
|
|
72
|
+
"docs": "paradox",
|
|
72
73
|
"knip": "ankhorage-knip",
|
|
73
74
|
"lint": "ankhorage-eslint . --max-warnings=0",
|
|
74
75
|
"lint:fix": "ankhorage-eslint . --fix --max-warnings=0",
|
|
@@ -76,10 +77,12 @@
|
|
|
76
77
|
"format:check": "ankhorage-prettier --check .",
|
|
77
78
|
"prepack": "bun run build",
|
|
78
79
|
"test": "bun test src",
|
|
80
|
+
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
79
81
|
"version-packages": "changeset version"
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
84
|
"@ankhorage/devtools": "^1.0.6",
|
|
85
|
+
"@ankhorage/paradox": "^0.1.7",
|
|
83
86
|
"@changesets/cli": "^2.31.0",
|
|
84
87
|
"@expo/vector-icons": "^15.1.1",
|
|
85
88
|
"@types/bun": "^1.3.13",
|
|
@@ -67,10 +67,11 @@ describe('colorEngine', () => {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
it('generates a valid palette for dark mode', () => {
|
|
70
|
-
const { colors, semantics } = generatePalette(mockConfig, 'dark');
|
|
70
|
+
const { colors, swatches, semantics } = generatePalette(mockConfig, 'dark');
|
|
71
71
|
|
|
72
72
|
expect(colors.background).toBe(semantics.neutral.bg);
|
|
73
|
-
expect(semantics.
|
|
73
|
+
expect(semantics.surface.inverse).toBe(swatches.neutral[50]);
|
|
74
|
+
expect(semantics.content.inverse).toBe(swatches.neutral[900]);
|
|
74
75
|
});
|
|
75
76
|
|
|
76
77
|
it('uses the color-theory default semantic status seeds', () => {
|
package/src/theme/colorEngine.ts
CHANGED
|
@@ -120,7 +120,6 @@ export function generatePalette(
|
|
|
120
120
|
parseHexColorOrThrow(modeConfig.primaryColor);
|
|
121
121
|
|
|
122
122
|
const generated = generateThemeModeColors(modeConfig);
|
|
123
|
-
|
|
124
123
|
const { swatches } = generated;
|
|
125
124
|
const neutralSwatch = swatches.neutral;
|
|
126
125
|
|
|
@@ -140,18 +139,21 @@ export function generatePalette(
|
|
|
140
139
|
// Keep destructive action and feedback error aligned until a dedicated error status swatch is introduced.
|
|
141
140
|
const error = danger;
|
|
142
141
|
const info = buildRoleSemantics(secondarySwatch, isDark);
|
|
142
|
+
const inverseSurface = isDark ? neutralSwatch[50] : neutralSwatch[900];
|
|
143
|
+
const inverseOnSurface = isDark ? neutralSwatch[900] : neutralSwatch[50];
|
|
143
144
|
|
|
144
145
|
const surfaceSemantics: SurfaceSemantics = {
|
|
145
146
|
default: neutral.surface,
|
|
146
147
|
subtle: neutral.bgSubtle,
|
|
147
148
|
raised: neutral.surface,
|
|
149
|
+
inverse: inverseSurface,
|
|
148
150
|
};
|
|
149
151
|
|
|
150
152
|
const content: ContentSemantics = {
|
|
151
153
|
default: neutral.text,
|
|
152
154
|
muted: neutral.textMuted,
|
|
153
155
|
subtle: neutral.textSubtle,
|
|
154
|
-
inverse:
|
|
156
|
+
inverse: inverseOnSurface,
|
|
155
157
|
};
|
|
156
158
|
|
|
157
159
|
const border: BorderSemantics = {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ThemeConfig } from '@ankhorage/contracts';
|
|
2
|
+
import { describe, expect, it } from 'bun:test';
|
|
3
|
+
|
|
4
|
+
import { generatePalette } from './colorEngine';
|
|
5
|
+
|
|
6
|
+
const config: ThemeConfig = {
|
|
7
|
+
id: 'inverse-semantics-test',
|
|
8
|
+
name: 'Inverse semantics test',
|
|
9
|
+
light: {
|
|
10
|
+
primaryColor: '#3B82F6',
|
|
11
|
+
harmony: 'monochromatic',
|
|
12
|
+
},
|
|
13
|
+
dark: {
|
|
14
|
+
primaryColor: '#3B82F6',
|
|
15
|
+
harmony: 'monochromatic',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
describe('inverse semantics', () => {
|
|
20
|
+
it('provides a paired inverse surface and content color in light mode', () => {
|
|
21
|
+
const { semantics, swatches } = generatePalette(config, 'light');
|
|
22
|
+
|
|
23
|
+
expect(semantics.surface.inverse).toBe(swatches.neutral[900]);
|
|
24
|
+
expect(semantics.content.inverse).toBe(swatches.neutral[50]);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('provides a paired inverse surface and content color in dark mode', () => {
|
|
28
|
+
const { semantics, swatches } = generatePalette(config, 'dark');
|
|
29
|
+
|
|
30
|
+
expect(semantics.surface.inverse).toBe(swatches.neutral[50]);
|
|
31
|
+
expect(semantics.content.inverse).toBe(swatches.neutral[900]);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('resolves global inverse content from neutral semantics instead of brand foreground', () => {
|
|
35
|
+
const brightBrandConfig: ThemeConfig = {
|
|
36
|
+
...config,
|
|
37
|
+
light: {
|
|
38
|
+
...config.light,
|
|
39
|
+
primaryColor: '#FDE047',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const { semantics, swatches } = generatePalette(brightBrandConfig, 'light');
|
|
43
|
+
|
|
44
|
+
expect(semantics.surface.inverse).toBe(swatches.neutral[900]);
|
|
45
|
+
expect(semantics.content.inverse).toBe(swatches.neutral[50]);
|
|
46
|
+
expect(semantics.content.inverse).not.toBe(semantics.brand.onSolidText);
|
|
47
|
+
});
|
|
48
|
+
});
|