@praxiis/ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +52556 -0
- package/dist/index.d.ts +52556 -0
- package/dist/index.js +8753 -0
- package/dist/index.mjs +8777 -0
- package/package.json +70 -0
- package/src/__test-utils__/index.tsx +39 -0
- package/src/components/CalendarStrip/CalendarStrip.helpers.ts +106 -0
- package/src/components/CalendarStrip/CalendarStrip.tsx +83 -0
- package/src/components/CalendarStrip/CalendarStrip.types.ts +133 -0
- package/src/components/CalendarStrip/DayCard/DayCard.helpers.ts +44 -0
- package/src/components/CalendarStrip/DayCard/DayCard.tsx +71 -0
- package/src/components/CalendarStrip/DayCard/DayCard.types.ts +134 -0
- package/src/components/CalendarStrip/DayCard/index.ts +2 -0
- package/src/components/CalendarStrip/DayCard/useDayCardLogic.ts +45 -0
- package/src/components/CalendarStrip/index.ts +9 -0
- package/src/components/CalendarStrip/useCalendarStripLogic.ts +53 -0
- package/src/components/EmptyState/EmptyState.helpers.ts +104 -0
- package/src/components/EmptyState/EmptyState.tsx +205 -0
- package/src/components/EmptyState/EmptyState.types.ts +213 -0
- package/src/components/EmptyState/index.ts +44 -0
- package/src/components/EmptyState/useEmptyStateLogic.ts +131 -0
- package/src/components/Header/Header.helpers.ts +93 -0
- package/src/components/Header/Header.tsx +185 -0
- package/src/components/Header/Header.types.ts +153 -0
- package/src/components/Header/index.ts +44 -0
- package/src/components/Header/useHeaderLogic.ts +146 -0
- package/src/components/ScheduleItem/ScheduleItem/ScheduleItem.helpers.ts +50 -0
- package/src/components/ScheduleItem/ScheduleItem/ScheduleItem.tsx +78 -0
- package/src/components/ScheduleItem/ScheduleItem/ScheduleItem.types.ts +99 -0
- package/src/components/ScheduleItem/ScheduleItem/index.ts +16 -0
- package/src/components/ScheduleItem/ScheduleItem/useScheduleItemLogic.ts +31 -0
- package/src/components/ScheduleItem/index.ts +15 -0
- package/src/components/index.ts +40 -0
- package/src/core/index.ts +34 -0
- package/src/core/restyle/RestyleThemeProviderWrapper.tsx +31 -0
- package/src/core/restyle/index.ts +38 -0
- package/src/core/restyle/restylePresetRegistry.ts +195 -0
- package/src/core/restyle/restyleTheme.ts +1352 -0
- package/src/core/restyle/restyleTypes.ts +8 -0
- package/src/core/restyle/useRestyleTheme.ts +10 -0
- package/src/hooks/animations/index.ts +3 -0
- package/src/hooks/animations/useAnimatedValue.ts +10 -0
- package/src/hooks/animations/useEntranceAnimation.ts +106 -0
- package/src/hooks/animations/usePulseAnimation.ts +63 -0
- package/src/hooks/index.ts +30 -0
- package/src/hooks/useReducedMotion.ts +60 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/labels/en.ts +120 -0
- package/src/i18n/labels/es.ts +120 -0
- package/src/i18n/labels/index.ts +6 -0
- package/src/i18n/labels/types.ts +165 -0
- package/src/index.tsx +215 -0
- package/src/primitives/actions/Button/Button.helpers.ts +243 -0
- package/src/primitives/actions/Button/Button.tsx +198 -0
- package/src/primitives/actions/Button/Button.types.ts +207 -0
- package/src/primitives/actions/Button/index.ts +41 -0
- package/src/primitives/actions/Button/useButtonLogic.ts +160 -0
- package/src/primitives/actions/IconButton/IconButton.helpers.ts +235 -0
- package/src/primitives/actions/IconButton/IconButton.tsx +177 -0
- package/src/primitives/actions/IconButton/IconButton.types.ts +273 -0
- package/src/primitives/actions/IconButton/index.ts +30 -0
- package/src/primitives/actions/IconButton/useIconButtonLogic.ts +172 -0
- package/src/primitives/actions/index.ts +20 -0
- package/src/primitives/content/Avatar/Avatar.helpers.ts +177 -0
- package/src/primitives/content/Avatar/Avatar.tsx +199 -0
- package/src/primitives/content/Avatar/Avatar.types.ts +222 -0
- package/src/primitives/content/Avatar/index.ts +46 -0
- package/src/primitives/content/Avatar/useAvatarLogic.ts +149 -0
- package/src/primitives/content/Badge/Badge.helpers.ts +175 -0
- package/src/primitives/content/Badge/Badge.tsx +174 -0
- package/src/primitives/content/Badge/Badge.types.ts +223 -0
- package/src/primitives/content/Badge/index.ts +40 -0
- package/src/primitives/content/Badge/useBadgeLogic.ts +128 -0
- package/src/primitives/content/Card/Card.helpers.ts +27 -0
- package/src/primitives/content/Card/Card.tsx +123 -0
- package/src/primitives/content/Card/Card.types.ts +95 -0
- package/src/primitives/content/Card/index.ts +20 -0
- package/src/primitives/content/Card/useCardLogic.ts +48 -0
- package/src/primitives/content/Chip/Chip.helpers.ts +304 -0
- package/src/primitives/content/Chip/Chip.tsx +205 -0
- package/src/primitives/content/Chip/Chip.types.ts +234 -0
- package/src/primitives/content/Chip/index.ts +47 -0
- package/src/primitives/content/Chip/useChipLogic.ts +167 -0
- package/src/primitives/content/Icon/Icon.helpers.ts +54 -0
- package/src/primitives/content/Icon/Icon.tsx +110 -0
- package/src/primitives/content/Icon/Icon.types.ts +95 -0
- package/src/primitives/content/Icon/index.ts +20 -0
- package/src/primitives/content/Icon/useIconLogic.ts +73 -0
- package/src/primitives/content/index.ts +45 -0
- package/src/primitives/feedback/ProgressBar/ProgressBar.helpers.ts +122 -0
- package/src/primitives/feedback/ProgressBar/ProgressBar.tsx +154 -0
- package/src/primitives/feedback/ProgressBar/ProgressBar.types.ts +178 -0
- package/src/primitives/feedback/ProgressBar/index.ts +17 -0
- package/src/primitives/feedback/ProgressBar/useProgressBarLogic.ts +120 -0
- package/src/primitives/feedback/Skeleton/Skeleton.helpers.ts +145 -0
- package/src/primitives/feedback/Skeleton/Skeleton.tsx +155 -0
- package/src/primitives/feedback/Skeleton/Skeleton.types.ts +223 -0
- package/src/primitives/feedback/Skeleton/index.ts +44 -0
- package/src/primitives/feedback/Skeleton/useSkeletonLogic.ts +125 -0
- package/src/primitives/feedback/Spinner/Spinner.helpers.ts +40 -0
- package/src/primitives/feedback/Spinner/Spinner.tsx +105 -0
- package/src/primitives/feedback/Spinner/Spinner.types.ts +114 -0
- package/src/primitives/feedback/Spinner/index.ts +18 -0
- package/src/primitives/feedback/Spinner/useSpinnerLogic.ts +84 -0
- package/src/primitives/feedback/Toast/Toast.helpers.ts +163 -0
- package/src/primitives/feedback/Toast/Toast.tsx +190 -0
- package/src/primitives/feedback/Toast/Toast.types.ts +270 -0
- package/src/primitives/feedback/Toast/ToastContext.tsx +96 -0
- package/src/primitives/feedback/Toast/ToastProvider.tsx +241 -0
- package/src/primitives/feedback/Toast/index.ts +59 -0
- package/src/primitives/feedback/Toast/useToastLogic.ts +112 -0
- package/src/primitives/feedback/index.ts +45 -0
- package/src/primitives/index.ts +158 -0
- package/src/primitives/inputs/Checkbox/Checkbox.helpers.ts +132 -0
- package/src/primitives/inputs/Checkbox/Checkbox.tsx +150 -0
- package/src/primitives/inputs/Checkbox/Checkbox.types.ts +106 -0
- package/src/primitives/inputs/Checkbox/index.ts +30 -0
- package/src/primitives/inputs/Checkbox/useCheckboxLogic.ts +121 -0
- package/src/primitives/inputs/RadioButton/RadioButton.helpers.ts +123 -0
- package/src/primitives/inputs/RadioButton/RadioButton.tsx +159 -0
- package/src/primitives/inputs/RadioButton/RadioButton.types.ts +106 -0
- package/src/primitives/inputs/RadioButton/index.ts +25 -0
- package/src/primitives/inputs/RadioButton/useRadioButtonLogic.ts +117 -0
- package/src/primitives/inputs/SegmentedControl/SegmentedControl.helpers.ts +174 -0
- package/src/primitives/inputs/SegmentedControl/SegmentedControl.tsx +224 -0
- package/src/primitives/inputs/SegmentedControl/SegmentedControl.types.ts +187 -0
- package/src/primitives/inputs/SegmentedControl/index.ts +39 -0
- package/src/primitives/inputs/SegmentedControl/useSegmentedControlLogic.ts +151 -0
- package/src/primitives/inputs/SelectSheet/SelectSheet.helpers.ts +147 -0
- package/src/primitives/inputs/SelectSheet/SelectSheet.tsx +247 -0
- package/src/primitives/inputs/SelectSheet/SelectSheet.types.ts +196 -0
- package/src/primitives/inputs/SelectSheet/SelectSheetOption.tsx +177 -0
- package/src/primitives/inputs/SelectSheet/index.ts +48 -0
- package/src/primitives/inputs/SelectSheet/useSelectSheetLogic.ts +309 -0
- package/src/primitives/inputs/Switch/Switch.helpers.ts +109 -0
- package/src/primitives/inputs/Switch/Switch.tsx +191 -0
- package/src/primitives/inputs/Switch/Switch.types.ts +154 -0
- package/src/primitives/inputs/Switch/index.ts +40 -0
- package/src/primitives/inputs/Switch/useSwitchLogic.ts +192 -0
- package/src/primitives/inputs/TextInput/TextInput.helpers.ts +206 -0
- package/src/primitives/inputs/TextInput/TextInput.tsx +392 -0
- package/src/primitives/inputs/TextInput/TextInput.types.ts +216 -0
- package/src/primitives/inputs/TextInput/index.ts +37 -0
- package/src/primitives/inputs/TextInput/useTextInputLogic.ts +195 -0
- package/src/primitives/inputs/index.ts +52 -0
- package/src/primitives/layout/AnimatedBox.tsx +44 -0
- package/src/primitives/layout/Box.tsx +71 -0
- package/src/primitives/layout/Divider/Divider.helpers.ts +115 -0
- package/src/primitives/layout/Divider/Divider.tsx +139 -0
- package/src/primitives/layout/Divider/Divider.types.ts +178 -0
- package/src/primitives/layout/Divider/index.ts +24 -0
- package/src/primitives/layout/Divider/useDividerLogic.ts +109 -0
- package/src/primitives/layout/FlatList.tsx +66 -0
- package/src/primitives/layout/Pressable.tsx +74 -0
- package/src/primitives/layout/ScrollView.tsx +63 -0
- package/src/primitives/layout/Stack.tsx +69 -0
- package/src/primitives/layout/index.ts +40 -0
- package/src/primitives/navigation/index.ts +6 -0
- package/src/primitives/overlays/Modal/Modal.helpers.ts +31 -0
- package/src/primitives/overlays/Modal/Modal.tsx +264 -0
- package/src/primitives/overlays/Modal/Modal.types.ts +193 -0
- package/src/primitives/overlays/Modal/index.ts +43 -0
- package/src/primitives/overlays/Modal/useModalLogic.ts +103 -0
- package/src/primitives/overlays/index.ts +12 -0
- package/src/primitives/typography/Text.tsx +51 -0
- package/src/primitives/typography/index.ts +1 -0
- package/src/provider/DesignSystemContext.ts +22 -0
- package/src/provider/DesignSystemProvider.tsx +121 -0
- package/src/provider/index.ts +7 -0
- package/src/providers/ThemeProvider/createTheme.ts +304 -0
- package/src/providers/ThemeProvider/defaultTheme.ts +70 -0
- package/src/providers/ThemeProvider/index.ts +34 -0
- package/src/providers/ThemeProvider/types.ts +249 -0
- package/src/providers/index.ts +29 -0
- package/src/tokens/colors.ts +371 -0
- package/src/tokens/index.ts +145 -0
- package/src/tokens/motion.ts +176 -0
- package/src/tokens/radii.ts +82 -0
- package/src/tokens/scales.ts +588 -0
- package/src/tokens/shadows.ts +190 -0
- package/src/tokens/spacing.ts +140 -0
- package/src/tokens/tokens.json +207 -0
- package/src/tokens/typography.ts +251 -0
- package/src/types.ts +50 -0
- package/src/utils/accessibility.ts +169 -0
- package/src/utils/index.ts +25 -0
- package/src/utils/platform.ts +72 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* El Sendero Design System - Restyle Preset Registry
|
|
3
|
+
*
|
|
4
|
+
* Pre-built Restyle themes for each design-system preset.
|
|
5
|
+
* Ensures Restyle components visually match the active preset.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
lightSemanticColors,
|
|
10
|
+
darkSemanticColors,
|
|
11
|
+
} from "../../tokens";
|
|
12
|
+
import {
|
|
13
|
+
restyleLightTheme,
|
|
14
|
+
restyleDarkTheme,
|
|
15
|
+
buildRestyleThemeFromThemeColors,
|
|
16
|
+
} from "./restyleTheme";
|
|
17
|
+
import type { ThemeColors, DeepPartial } from "../../providers/ThemeProvider/types";
|
|
18
|
+
|
|
19
|
+
export type RestyleThemePair = {
|
|
20
|
+
light: typeof restyleLightTheme;
|
|
21
|
+
dark: typeof restyleDarkTheme;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Build light + dark Restyle themes from ThemeColors overrides.
|
|
26
|
+
* The most convenient way to create a custom theme pair — only specify
|
|
27
|
+
* what differs from the default semantic colors.
|
|
28
|
+
*/
|
|
29
|
+
export function buildPair(
|
|
30
|
+
lightOverrides: DeepPartial<ThemeColors>,
|
|
31
|
+
darkOverrides: DeepPartial<ThemeColors>,
|
|
32
|
+
): RestyleThemePair {
|
|
33
|
+
return {
|
|
34
|
+
light: buildRestyleThemeFromThemeColors(lightSemanticColors, lightOverrides),
|
|
35
|
+
dark: buildRestyleThemeFromThemeColors(darkSemanticColors, darkOverrides),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Horizon uses base colors — no overrides needed
|
|
40
|
+
const horizon: RestyleThemePair = {
|
|
41
|
+
light: restyleLightTheme,
|
|
42
|
+
dark: restyleDarkTheme,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Sage — green accents
|
|
46
|
+
const sage = buildPair(
|
|
47
|
+
{
|
|
48
|
+
accent: {
|
|
49
|
+
primary: "#6B8F6B",
|
|
50
|
+
primaryHover: "#557255",
|
|
51
|
+
primaryPressed: "#445944",
|
|
52
|
+
secondary: "#8FAF8F",
|
|
53
|
+
secondaryHover: "#6B8F6B",
|
|
54
|
+
secondaryPressed: "#557255",
|
|
55
|
+
},
|
|
56
|
+
text: { link: "#6B8F6B" },
|
|
57
|
+
border: { focus: "#6B8F6B" },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
accent: {
|
|
61
|
+
primary: "#8FAF8F",
|
|
62
|
+
primaryHover: "#B3C7B3",
|
|
63
|
+
primaryPressed: "#6B8F6B",
|
|
64
|
+
secondary: "#6B8F6B",
|
|
65
|
+
secondaryHover: "#8FAF8F",
|
|
66
|
+
secondaryPressed: "#557255",
|
|
67
|
+
},
|
|
68
|
+
text: { link: "#8FAF8F" },
|
|
69
|
+
border: { focus: "#8FAF8F" },
|
|
70
|
+
},
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
// Sunset — warm coral accents
|
|
74
|
+
const sunset = buildPair(
|
|
75
|
+
{
|
|
76
|
+
accent: {
|
|
77
|
+
primary: "#E8836B",
|
|
78
|
+
primaryHover: "#CC6B55",
|
|
79
|
+
primaryPressed: "#A85545",
|
|
80
|
+
secondary: "#FF9B85",
|
|
81
|
+
secondaryHover: "#E8836B",
|
|
82
|
+
secondaryPressed: "#CC6B55",
|
|
83
|
+
},
|
|
84
|
+
text: { link: "#E8836B" },
|
|
85
|
+
border: { focus: "#E8836B" },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
accent: {
|
|
89
|
+
primary: "#FF9B85",
|
|
90
|
+
primaryHover: "#FFBAA8",
|
|
91
|
+
primaryPressed: "#E8836B",
|
|
92
|
+
secondary: "#E8836B",
|
|
93
|
+
secondaryHover: "#FF9B85",
|
|
94
|
+
secondaryPressed: "#CC6B55",
|
|
95
|
+
},
|
|
96
|
+
text: { link: "#FF9B85" },
|
|
97
|
+
border: { focus: "#FF9B85" },
|
|
98
|
+
},
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
// Ocean — teal accents
|
|
102
|
+
const ocean = buildPair(
|
|
103
|
+
{
|
|
104
|
+
accent: {
|
|
105
|
+
primary: "#0E9AA5",
|
|
106
|
+
primaryHover: "#0B7E87",
|
|
107
|
+
primaryPressed: "#086269",
|
|
108
|
+
secondary: "#2DD4BF",
|
|
109
|
+
secondaryHover: "#0E9AA5",
|
|
110
|
+
secondaryPressed: "#0B7E87",
|
|
111
|
+
},
|
|
112
|
+
text: { link: "#0E9AA5" },
|
|
113
|
+
border: { focus: "#0E9AA5" },
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
accent: {
|
|
117
|
+
primary: "#2DD4BF",
|
|
118
|
+
primaryHover: "#5EEAD4",
|
|
119
|
+
primaryPressed: "#0E9AA5",
|
|
120
|
+
secondary: "#0E9AA5",
|
|
121
|
+
secondaryHover: "#2DD4BF",
|
|
122
|
+
secondaryPressed: "#0B7E87",
|
|
123
|
+
},
|
|
124
|
+
text: { link: "#2DD4BF" },
|
|
125
|
+
border: { focus: "#2DD4BF" },
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
// Lavender — purple accents
|
|
130
|
+
const lavender = buildPair(
|
|
131
|
+
{
|
|
132
|
+
accent: {
|
|
133
|
+
primary: "#8B5CF6",
|
|
134
|
+
primaryHover: "#7C3AED",
|
|
135
|
+
primaryPressed: "#6D28D9",
|
|
136
|
+
secondary: "#A78BFA",
|
|
137
|
+
secondaryHover: "#8B5CF6",
|
|
138
|
+
secondaryPressed: "#7C3AED",
|
|
139
|
+
},
|
|
140
|
+
text: { link: "#8B5CF6" },
|
|
141
|
+
border: { focus: "#8B5CF6" },
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
accent: {
|
|
145
|
+
primary: "#A78BFA",
|
|
146
|
+
primaryHover: "#C4B5FD",
|
|
147
|
+
primaryPressed: "#8B5CF6",
|
|
148
|
+
secondary: "#8B5CF6",
|
|
149
|
+
secondaryHover: "#A78BFA",
|
|
150
|
+
secondaryPressed: "#7C3AED",
|
|
151
|
+
},
|
|
152
|
+
text: { link: "#A78BFA" },
|
|
153
|
+
border: { focus: "#A78BFA" },
|
|
154
|
+
},
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
// Rose — pink accents
|
|
158
|
+
const rose = buildPair(
|
|
159
|
+
{
|
|
160
|
+
accent: {
|
|
161
|
+
primary: "#E11D6C",
|
|
162
|
+
primaryHover: "#BE185D",
|
|
163
|
+
primaryPressed: "#9D174D",
|
|
164
|
+
secondary: "#F472B6",
|
|
165
|
+
secondaryHover: "#E11D6C",
|
|
166
|
+
secondaryPressed: "#BE185D",
|
|
167
|
+
},
|
|
168
|
+
text: { link: "#E11D6C" },
|
|
169
|
+
border: { focus: "#E11D6C" },
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
accent: {
|
|
173
|
+
primary: "#F472B6",
|
|
174
|
+
primaryHover: "#F9A8D4",
|
|
175
|
+
primaryPressed: "#E11D6C",
|
|
176
|
+
secondary: "#E11D6C",
|
|
177
|
+
secondaryHover: "#F472B6",
|
|
178
|
+
secondaryPressed: "#BE185D",
|
|
179
|
+
},
|
|
180
|
+
text: { link: "#F472B6" },
|
|
181
|
+
border: { focus: "#F472B6" },
|
|
182
|
+
},
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Map of all preset Restyle themes, keyed by preset name.
|
|
187
|
+
*/
|
|
188
|
+
export const restylePresetThemes: Record<string, RestyleThemePair> = {
|
|
189
|
+
horizon,
|
|
190
|
+
sage,
|
|
191
|
+
sunset,
|
|
192
|
+
ocean,
|
|
193
|
+
lavender,
|
|
194
|
+
rose,
|
|
195
|
+
};
|