@korsolutions/ui 0.0.86 → 0.0.88
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/module/components/alert/variants/default.js +2 -1
- package/dist/module/components/alert/variants/default.js.map +1 -1
- package/dist/module/components/alert/variants/destructive.js +2 -1
- package/dist/module/components/alert/variants/destructive.js.map +1 -1
- package/dist/module/components/alert-dialog/variants/default.js +4 -1
- package/dist/module/components/alert-dialog/variants/default.js.map +1 -1
- package/dist/module/components/avatar/variants/default.js +1 -0
- package/dist/module/components/avatar/variants/default.js.map +1 -1
- package/dist/module/components/badge/variants/default.js +1 -0
- package/dist/module/components/badge/variants/default.js.map +1 -1
- package/dist/module/components/badge/variants/secondary.js +1 -0
- package/dist/module/components/badge/variants/secondary.js.map +1 -1
- package/dist/module/components/button/button.js +3 -2
- package/dist/module/components/button/button.js.map +1 -1
- package/dist/module/components/button/variants/default.js +1 -0
- package/dist/module/components/button/variants/default.js.map +1 -1
- package/dist/module/components/button/variants/ghost.js +1 -0
- package/dist/module/components/button/variants/ghost.js.map +1 -1
- package/dist/module/components/button/variants/secondary.js +1 -0
- package/dist/module/components/button/variants/secondary.js.map +1 -1
- package/dist/module/components/calendar/calendar/variants/default.js +3 -0
- package/dist/module/components/calendar/calendar/variants/default.js.map +1 -1
- package/dist/module/components/calendar/timeline/variants/default.js +1 -0
- package/dist/module/components/calendar/timeline/variants/default.js.map +1 -1
- package/dist/module/components/calendar/week-calendar/variants/default.js +3 -0
- package/dist/module/components/calendar/week-calendar/variants/default.js.map +1 -1
- package/dist/module/components/card/variants/default.js +1 -0
- package/dist/module/components/card/variants/default.js.map +1 -1
- package/dist/module/components/checkbox/variants/default.js +2 -0
- package/dist/module/components/checkbox/variants/default.js.map +1 -1
- package/dist/module/components/checkbox/variants/outlined.js +2 -0
- package/dist/module/components/checkbox/variants/outlined.js.map +1 -1
- package/dist/module/components/combobox/variants/default.js +3 -0
- package/dist/module/components/combobox/variants/default.js.map +1 -1
- package/dist/module/components/empty/variants/default.js +2 -0
- package/dist/module/components/empty/variants/default.js.map +1 -1
- package/dist/module/components/field/variants/default.js +3 -0
- package/dist/module/components/field/variants/default.js.map +1 -1
- package/dist/module/components/index.js +1 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/input/variants/default.js +1 -0
- package/dist/module/components/input/variants/default.js.map +1 -1
- package/dist/module/components/input/variants/secondary.js +1 -0
- package/dist/module/components/input/variants/secondary.js.map +1 -1
- package/dist/module/components/link/variants/default.js +1 -0
- package/dist/module/components/link/variants/default.js.map +1 -1
- package/dist/module/components/menu/variants/default.js +3 -0
- package/dist/module/components/menu/variants/default.js.map +1 -1
- package/dist/module/components/phone-input/variants/default.js +4 -0
- package/dist/module/components/phone-input/variants/default.js.map +1 -1
- package/dist/module/components/portal/portal.web.js +15 -0
- package/dist/module/components/portal/portal.web.js.map +1 -1
- package/dist/module/components/radio-group/variants/default.js +2 -0
- package/dist/module/components/radio-group/variants/default.js.map +1 -1
- package/dist/module/components/radio-group/variants/outlined.js +2 -0
- package/dist/module/components/radio-group/variants/outlined.js.map +1 -1
- package/dist/module/components/select/variants/default.js +3 -0
- package/dist/module/components/select/variants/default.js.map +1 -1
- package/dist/module/components/sidebar/components/sidebar-content.js +19 -0
- package/dist/module/components/sidebar/components/sidebar-content.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-footer.js +18 -0
- package/dist/module/components/sidebar/components/sidebar-footer.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-group-label.js +18 -0
- package/dist/module/components/sidebar/components/sidebar-group-label.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-group.js +18 -0
- package/dist/module/components/sidebar/components/sidebar-group.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-header.js +18 -0
- package/dist/module/components/sidebar/components/sidebar-header.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-menu-item.js +36 -0
- package/dist/module/components/sidebar/components/sidebar-menu-item.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-menu-sub.js +22 -0
- package/dist/module/components/sidebar/components/sidebar-menu-sub.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-menu.js +18 -0
- package/dist/module/components/sidebar/components/sidebar-menu.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-provider.js +47 -0
- package/dist/module/components/sidebar/components/sidebar-provider.js.map +1 -0
- package/dist/module/components/sidebar/components/sidebar-root.js +27 -0
- package/dist/module/components/sidebar/components/sidebar-root.js.map +1 -0
- package/dist/module/components/sidebar/context.js +12 -0
- package/dist/module/components/sidebar/context.js.map +1 -0
- package/dist/module/components/sidebar/index.js +26 -0
- package/dist/module/components/sidebar/index.js.map +1 -0
- package/dist/module/components/sidebar/types.js +4 -0
- package/dist/module/components/sidebar/types.js.map +1 -0
- package/dist/module/components/sidebar/variants/default.js +102 -0
- package/dist/module/components/sidebar/variants/default.js.map +1 -0
- package/dist/module/components/sidebar/variants/index.js +7 -0
- package/dist/module/components/sidebar/variants/index.js.map +1 -0
- package/dist/module/components/tabs/variants/default.js +1 -0
- package/dist/module/components/tabs/variants/default.js.map +1 -1
- package/dist/module/components/tabs/variants/line.js +1 -0
- package/dist/module/components/tabs/variants/line.js.map +1 -1
- package/dist/module/components/textarea/variants/default.js +1 -0
- package/dist/module/components/textarea/variants/default.js.map +1 -1
- package/dist/module/components/toast/variants/danger.js +2 -0
- package/dist/module/components/toast/variants/danger.js.map +1 -1
- package/dist/module/components/toast/variants/default.js +2 -0
- package/dist/module/components/toast/variants/default.js.map +1 -1
- package/dist/module/components/toast/variants/success.js +2 -0
- package/dist/module/components/toast/variants/success.js.map +1 -1
- package/dist/module/components/typography/typography.js +7 -2
- package/dist/module/components/typography/typography.js.map +1 -1
- package/dist/module/components/typography/variants/body.js +28 -0
- package/dist/module/components/typography/variants/body.js.map +1 -0
- package/dist/module/components/typography/variants/heading.js +29 -0
- package/dist/module/components/typography/variants/heading.js.map +1 -0
- package/dist/module/components/typography/variants/index.js +4 -12
- package/dist/module/components/typography/variants/index.js.map +1 -1
- package/dist/module/utils/size-scale.js +3 -1
- package/dist/module/utils/size-scale.js.map +1 -1
- package/dist/typescript/src/components/alert/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/variants/destructive.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/avatar/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/button/button.d.ts.map +1 -1
- package/dist/typescript/src/components/button/types.d.ts +3 -2
- package/dist/typescript/src/components/button/types.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/ghost.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/calendar/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/timeline/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/week-calendar/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/card/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/checkbox/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/checkbox/variants/outlined.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/empty/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/field/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/index.d.ts +1 -0
- package/dist/typescript/src/components/index.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/link/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/portal/portal.web.d.ts.map +1 -1
- package/dist/typescript/src/components/radio-group/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/radio-group/variants/outlined.d.ts.map +1 -1
- package/dist/typescript/src/components/select/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/sidebar/components/sidebar-content.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-content.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-footer.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-footer.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-group-label.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-group-label.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-group.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-group.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-header.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-header.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-menu-item.d.ts +12 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-menu-item.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-menu-sub.d.ts +10 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-menu-sub.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-menu.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-menu.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-provider.d.ts +17 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-provider.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-root.d.ts +8 -0
- package/dist/typescript/src/components/sidebar/components/sidebar-root.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/context.d.ts +12 -0
- package/dist/typescript/src/components/sidebar/context.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/index.d.ts +35 -0
- package/dist/typescript/src/components/sidebar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/types.d.ts +29 -0
- package/dist/typescript/src/components/sidebar/types.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/sidebar/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/sidebar/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/sidebar/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/tabs/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/variants/line.d.ts.map +1 -1
- package/dist/typescript/src/components/textarea/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/danger.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/success.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/typography.d.ts +2 -0
- package/dist/typescript/src/components/typography/typography.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/body.d.ts +4 -0
- package/dist/typescript/src/components/typography/variants/body.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/heading.d.ts +4 -0
- package/dist/typescript/src/components/typography/variants/heading.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/index.d.ts +4 -12
- package/dist/typescript/src/components/typography/variants/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/types.d.ts +4 -0
- package/dist/typescript/src/themes/types.d.ts.map +1 -1
- package/dist/typescript/src/utils/size-scale.d.ts +3 -1
- package/dist/typescript/src/utils/size-scale.d.ts.map +1 -1
- package/package.json +4 -5
- package/src/components/alert/variants/default.tsx +2 -1
- package/src/components/alert/variants/destructive.tsx +2 -1
- package/src/components/alert-dialog/variants/default.tsx +4 -1
- package/src/components/avatar/variants/default.tsx +1 -0
- package/src/components/badge/variants/default.tsx +1 -0
- package/src/components/badge/variants/secondary.tsx +1 -0
- package/src/components/button/button.tsx +2 -2
- package/src/components/button/types.ts +3 -2
- package/src/components/button/variants/default.tsx +1 -0
- package/src/components/button/variants/ghost.tsx +1 -0
- package/src/components/button/variants/secondary.tsx +1 -0
- package/src/components/calendar/calendar/variants/default.tsx +3 -0
- package/src/components/calendar/timeline/variants/default.tsx +1 -0
- package/src/components/calendar/week-calendar/variants/default.tsx +3 -0
- package/src/components/card/variants/default.tsx +1 -0
- package/src/components/checkbox/variants/default.tsx +2 -0
- package/src/components/checkbox/variants/outlined.tsx +2 -0
- package/src/components/combobox/variants/default.tsx +3 -0
- package/src/components/empty/variants/default.tsx +2 -0
- package/src/components/field/variants/default.tsx +3 -0
- package/src/components/index.ts +1 -0
- package/src/components/input/variants/default.tsx +1 -0
- package/src/components/input/variants/secondary.tsx +1 -0
- package/src/components/link/variants/default.tsx +1 -0
- package/src/components/menu/variants/default.tsx +3 -0
- package/src/components/phone-input/variants/default.tsx +4 -0
- package/src/components/portal/portal.web.tsx +15 -0
- package/src/components/radio-group/variants/default.tsx +2 -0
- package/src/components/radio-group/variants/outlined.tsx +2 -0
- package/src/components/select/variants/default.tsx +3 -0
- package/src/components/sidebar/components/sidebar-content.tsx +19 -0
- package/src/components/sidebar/components/sidebar-footer.tsx +15 -0
- package/src/components/sidebar/components/sidebar-group-label.tsx +15 -0
- package/src/components/sidebar/components/sidebar-group.tsx +15 -0
- package/src/components/sidebar/components/sidebar-header.tsx +15 -0
- package/src/components/sidebar/components/sidebar-menu-item.tsx +61 -0
- package/src/components/sidebar/components/sidebar-menu-sub.tsx +23 -0
- package/src/components/sidebar/components/sidebar-menu.tsx +15 -0
- package/src/components/sidebar/components/sidebar-provider.tsx +73 -0
- package/src/components/sidebar/components/sidebar-root.tsx +19 -0
- package/src/components/sidebar/context.ts +21 -0
- package/src/components/sidebar/index.ts +37 -0
- package/src/components/sidebar/types.ts +31 -0
- package/src/components/sidebar/variants/default.tsx +97 -0
- package/src/components/sidebar/variants/index.ts +5 -0
- package/src/components/tabs/variants/default.tsx +1 -0
- package/src/components/tabs/variants/line.tsx +1 -0
- package/src/components/textarea/variants/default.tsx +1 -0
- package/src/components/toast/variants/danger.tsx +2 -0
- package/src/components/toast/variants/default.tsx +2 -0
- package/src/components/toast/variants/success.tsx +2 -0
- package/src/components/typography/typography.tsx +5 -2
- package/src/components/typography/variants/body.tsx +26 -0
- package/src/components/typography/variants/heading.tsx +27 -0
- package/src/components/typography/variants/index.ts +4 -12
- package/src/themes/types.ts +4 -0
- package/src/utils/size-scale.ts +6 -2
- package/README.md +0 -4
- package/dist/module/components/typography/variants/body-lg.js +0 -18
- package/dist/module/components/typography/variants/body-lg.js.map +0 -1
- package/dist/module/components/typography/variants/body-md.js +0 -18
- package/dist/module/components/typography/variants/body-md.js.map +0 -1
- package/dist/module/components/typography/variants/body-sm.js +0 -18
- package/dist/module/components/typography/variants/body-sm.js.map +0 -1
- package/dist/module/components/typography/variants/heading-lg.js +0 -19
- package/dist/module/components/typography/variants/heading-lg.js.map +0 -1
- package/dist/module/components/typography/variants/heading-md.js +0 -19
- package/dist/module/components/typography/variants/heading-md.js.map +0 -1
- package/dist/module/components/typography/variants/heading-sm.js +0 -19
- package/dist/module/components/typography/variants/heading-sm.js.map +0 -1
- package/dist/typescript/src/components/typography/variants/body-lg.d.ts +0 -3
- package/dist/typescript/src/components/typography/variants/body-lg.d.ts.map +0 -1
- package/dist/typescript/src/components/typography/variants/body-md.d.ts +0 -3
- package/dist/typescript/src/components/typography/variants/body-md.d.ts.map +0 -1
- package/dist/typescript/src/components/typography/variants/body-sm.d.ts +0 -3
- package/dist/typescript/src/components/typography/variants/body-sm.d.ts.map +0 -1
- package/dist/typescript/src/components/typography/variants/heading-lg.d.ts +0 -3
- package/dist/typescript/src/components/typography/variants/heading-lg.d.ts.map +0 -1
- package/dist/typescript/src/components/typography/variants/heading-md.d.ts +0 -3
- package/dist/typescript/src/components/typography/variants/heading-md.d.ts.map +0 -1
- package/dist/typescript/src/components/typography/variants/heading-sm.d.ts +0 -3
- package/dist/typescript/src/components/typography/variants/heading-sm.d.ts.map +0 -1
- package/src/components/typography/variants/body-lg.tsx +0 -14
- package/src/components/typography/variants/body-md.tsx +0 -14
- package/src/components/typography/variants/body-sm.tsx +0 -14
- package/src/components/typography/variants/heading-lg.tsx +0 -15
- package/src/components/typography/variants/heading-md.tsx +0 -15
- package/src/components/typography/variants/heading-sm.tsx +0 -15
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
2
|
+
import { useComponentConfig } from "../../../themes/provider";
|
|
3
|
+
import { mergeStyles } from "../../../utils/calculate-styles";
|
|
4
|
+
import { SidebarContext, type SidebarContextValue } from "../context";
|
|
5
|
+
import { SidebarVariants } from "../variants";
|
|
6
|
+
|
|
7
|
+
export interface SidebarProviderProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
|
|
10
|
+
/** Variant key for sidebar theming */
|
|
11
|
+
variant?: keyof typeof SidebarVariants;
|
|
12
|
+
|
|
13
|
+
/** Width of the sidebar in pixels (default: 256) */
|
|
14
|
+
width?: number;
|
|
15
|
+
|
|
16
|
+
/** Default open state (uncontrolled) */
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
|
|
19
|
+
/** Open state (controlled) */
|
|
20
|
+
open?: boolean;
|
|
21
|
+
|
|
22
|
+
/** Callback when open state changes (controlled) */
|
|
23
|
+
onOpenChange?: (open: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function SidebarProvider(props: SidebarProviderProps) {
|
|
27
|
+
const {
|
|
28
|
+
children,
|
|
29
|
+
variant = "default",
|
|
30
|
+
width,
|
|
31
|
+
defaultOpen = true,
|
|
32
|
+
open: controlledOpen,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
const [_open, _setOpen] = useState(defaultOpen);
|
|
37
|
+
|
|
38
|
+
const open = controlledOpen ?? _open;
|
|
39
|
+
const setOpen = useCallback(
|
|
40
|
+
(value: boolean) => {
|
|
41
|
+
if (onOpenChange) {
|
|
42
|
+
onOpenChange(value);
|
|
43
|
+
} else {
|
|
44
|
+
_setOpen(value);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
[onOpenChange],
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const toggleSidebar = useCallback(() => {
|
|
51
|
+
setOpen(!open);
|
|
52
|
+
}, [open, setOpen]);
|
|
53
|
+
|
|
54
|
+
const variantStyles = SidebarVariants[variant]();
|
|
55
|
+
const componentConfig = useComponentConfig("sidebar");
|
|
56
|
+
const mergedStyles = mergeStyles(variantStyles, componentConfig?.styles);
|
|
57
|
+
|
|
58
|
+
const state = open ? "expanded" : "collapsed";
|
|
59
|
+
|
|
60
|
+
const contextValue = useMemo<SidebarContextValue>(
|
|
61
|
+
() => ({
|
|
62
|
+
state,
|
|
63
|
+
open,
|
|
64
|
+
setOpen,
|
|
65
|
+
toggleSidebar,
|
|
66
|
+
width,
|
|
67
|
+
styles: mergedStyles,
|
|
68
|
+
}),
|
|
69
|
+
[state, open, setOpen, toggleSidebar, width, mergedStyles],
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
return <SidebarContext.Provider value={contextValue}>{children}</SidebarContext.Provider>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
3
|
+
import { useSidebar } from "../context";
|
|
4
|
+
|
|
5
|
+
export interface SidebarRootProps {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function SidebarRoot(props: SidebarRootProps) {
|
|
11
|
+
const { children, style } = props;
|
|
12
|
+
const { open, width = 256, styles } = useSidebar();
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<View style={[styles?.root, { width }, !open && { width: 0, overflow: "hidden" }, style]}>
|
|
16
|
+
{children}
|
|
17
|
+
</View>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import type { SidebarState, SidebarStyles } from "./types";
|
|
3
|
+
|
|
4
|
+
export interface SidebarContextValue {
|
|
5
|
+
state: SidebarState;
|
|
6
|
+
open: boolean;
|
|
7
|
+
setOpen: (open: boolean) => void;
|
|
8
|
+
toggleSidebar: () => void;
|
|
9
|
+
width?: number;
|
|
10
|
+
styles?: SidebarStyles;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const SidebarContext = createContext<SidebarContextValue | undefined>(undefined);
|
|
14
|
+
|
|
15
|
+
export const useSidebar = () => {
|
|
16
|
+
const context = useContext(SidebarContext);
|
|
17
|
+
if (!context) {
|
|
18
|
+
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
19
|
+
}
|
|
20
|
+
return context;
|
|
21
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SidebarContent } from "./components/sidebar-content";
|
|
2
|
+
import { SidebarFooter } from "./components/sidebar-footer";
|
|
3
|
+
import { SidebarGroup } from "./components/sidebar-group";
|
|
4
|
+
import { SidebarGroupLabel } from "./components/sidebar-group-label";
|
|
5
|
+
import { SidebarHeader } from "./components/sidebar-header";
|
|
6
|
+
import { SidebarMenuItem } from "./components/sidebar-menu-item";
|
|
7
|
+
import { SidebarMenuSub } from "./components/sidebar-menu-sub";
|
|
8
|
+
import { SidebarMenu } from "./components/sidebar-menu";
|
|
9
|
+
import { SidebarProvider } from "./components/sidebar-provider";
|
|
10
|
+
import { SidebarRoot } from "./components/sidebar-root";
|
|
11
|
+
|
|
12
|
+
export const Sidebar = {
|
|
13
|
+
Provider: SidebarProvider,
|
|
14
|
+
Root: SidebarRoot,
|
|
15
|
+
Header: SidebarHeader,
|
|
16
|
+
Footer: SidebarFooter,
|
|
17
|
+
Content: SidebarContent,
|
|
18
|
+
Group: SidebarGroup,
|
|
19
|
+
GroupLabel: SidebarGroupLabel,
|
|
20
|
+
Menu: SidebarMenu,
|
|
21
|
+
MenuItem: SidebarMenuItem,
|
|
22
|
+
MenuSub: SidebarMenuSub,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { useSidebar } from "./context";
|
|
26
|
+
|
|
27
|
+
export type { SidebarProviderProps } from "./components/sidebar-provider";
|
|
28
|
+
export type { SidebarRootProps } from "./components/sidebar-root";
|
|
29
|
+
export type { SidebarHeaderProps } from "./components/sidebar-header";
|
|
30
|
+
export type { SidebarFooterProps } from "./components/sidebar-footer";
|
|
31
|
+
export type { SidebarContentProps } from "./components/sidebar-content";
|
|
32
|
+
export type { SidebarGroupProps } from "./components/sidebar-group";
|
|
33
|
+
export type { SidebarGroupLabelProps } from "./components/sidebar-group-label";
|
|
34
|
+
export type { SidebarMenuProps } from "./components/sidebar-menu";
|
|
35
|
+
export type { SidebarMenuItemProps } from "./components/sidebar-menu-item";
|
|
36
|
+
export type { SidebarMenuSubProps } from "./components/sidebar-menu-sub";
|
|
37
|
+
export type { SidebarStyles, SidebarState } from "./types";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import type { IconProps } from "../icon";
|
|
3
|
+
|
|
4
|
+
export type SidebarState = "expanded" | "collapsed";
|
|
5
|
+
|
|
6
|
+
export type SidebarMenuButtonState = "default" | "active" | "hovered";
|
|
7
|
+
|
|
8
|
+
export interface SidebarStyles {
|
|
9
|
+
/** The sidebar container */
|
|
10
|
+
root?: StyleProp<ViewStyle>;
|
|
11
|
+
/** Header (sticky top) */
|
|
12
|
+
header?: StyleProp<ViewStyle>;
|
|
13
|
+
/** Footer (sticky bottom) */
|
|
14
|
+
footer?: StyleProp<ViewStyle>;
|
|
15
|
+
/** Scrollable content area */
|
|
16
|
+
content?: StyleProp<ViewStyle>;
|
|
17
|
+
/** Group container */
|
|
18
|
+
group?: StyleProp<ViewStyle>;
|
|
19
|
+
/** Group label text */
|
|
20
|
+
groupLabel?: StyleProp<TextStyle>;
|
|
21
|
+
/** Menu list container */
|
|
22
|
+
menu?: StyleProp<ViewStyle>;
|
|
23
|
+
/** Menu item */
|
|
24
|
+
menuItem?: Partial<Record<SidebarMenuButtonState, StyleProp<ViewStyle>>>;
|
|
25
|
+
/** Menu item text */
|
|
26
|
+
menuItemText?: Partial<Record<SidebarMenuButtonState, StyleProp<TextStyle>>>;
|
|
27
|
+
/** Menu item icon */
|
|
28
|
+
menuItemIcon?: Partial<Record<SidebarMenuButtonState, IconProps>>;
|
|
29
|
+
/** Submenu container */
|
|
30
|
+
menuSub?: StyleProp<ViewStyle>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
2
|
+
import type { SidebarStyles } from "../types";
|
|
3
|
+
|
|
4
|
+
export function useSidebarVariantDefault(): SidebarStyles {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
({ colors, radius, fontFamily, fontSize, spacing }): SidebarStyles => ({
|
|
7
|
+
root: {
|
|
8
|
+
height: "100%",
|
|
9
|
+
flexShrink: 0,
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
backgroundColor: colors.surface,
|
|
12
|
+
borderColor: colors.border,
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
},
|
|
15
|
+
header: {
|
|
16
|
+
paddingHorizontal: spacing * 2,
|
|
17
|
+
paddingTop: spacing * 2,
|
|
18
|
+
paddingBottom: spacing,
|
|
19
|
+
},
|
|
20
|
+
footer: {
|
|
21
|
+
paddingHorizontal: spacing * 2,
|
|
22
|
+
paddingTop: spacing,
|
|
23
|
+
paddingBottom: spacing * 2,
|
|
24
|
+
},
|
|
25
|
+
content: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
paddingHorizontal: spacing * 2,
|
|
28
|
+
},
|
|
29
|
+
group: {
|
|
30
|
+
paddingVertical: spacing,
|
|
31
|
+
gap: spacing * 0.5,
|
|
32
|
+
},
|
|
33
|
+
groupLabel: {
|
|
34
|
+
fontFamily,
|
|
35
|
+
fontSize: fontSize * 0.75,
|
|
36
|
+
lineHeight: Math.round(fontSize * 0.75 * 1.25),
|
|
37
|
+
fontWeight: "500",
|
|
38
|
+
color: colors.mutedForeground,
|
|
39
|
+
paddingHorizontal: spacing,
|
|
40
|
+
paddingVertical: spacing * 0.5,
|
|
41
|
+
letterSpacing: 0.5,
|
|
42
|
+
textTransform: "uppercase",
|
|
43
|
+
},
|
|
44
|
+
menu: {
|
|
45
|
+
gap: 1,
|
|
46
|
+
},
|
|
47
|
+
menuItem: {
|
|
48
|
+
default: {
|
|
49
|
+
flexDirection: "row",
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
gap: spacing,
|
|
52
|
+
paddingVertical: spacing,
|
|
53
|
+
paddingHorizontal: spacing * 1.5,
|
|
54
|
+
borderRadius: radius,
|
|
55
|
+
minHeight: 36,
|
|
56
|
+
},
|
|
57
|
+
active: {
|
|
58
|
+
backgroundColor: colors.muted,
|
|
59
|
+
},
|
|
60
|
+
hovered: {
|
|
61
|
+
backgroundColor: colors.muted,
|
|
62
|
+
opacity: 0.8,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
menuItemText: {
|
|
66
|
+
default: {
|
|
67
|
+
fontFamily,
|
|
68
|
+
fontSize: fontSize * 0.875,
|
|
69
|
+
fontWeight: "500",
|
|
70
|
+
color: colors.foreground,
|
|
71
|
+
lineHeight: fontSize * 1.25,
|
|
72
|
+
flex: 1,
|
|
73
|
+
},
|
|
74
|
+
active: {
|
|
75
|
+
color: colors.primary,
|
|
76
|
+
},
|
|
77
|
+
hovered: {},
|
|
78
|
+
},
|
|
79
|
+
menuItemIcon: {
|
|
80
|
+
default: {
|
|
81
|
+
color: colors.foreground,
|
|
82
|
+
size: fontSize * 1.25,
|
|
83
|
+
},
|
|
84
|
+
active: {
|
|
85
|
+
color: colors.primary,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
menuSub: {
|
|
89
|
+
paddingLeft: spacing * 3,
|
|
90
|
+
gap: 1,
|
|
91
|
+
borderLeftWidth: 1,
|
|
92
|
+
borderLeftColor: colors.border,
|
|
93
|
+
marginLeft: spacing * 2,
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
@@ -29,12 +29,14 @@ export const useToastVariantDanger = (): ToastStyles => {
|
|
|
29
29
|
title: {
|
|
30
30
|
color: colors.foreground,
|
|
31
31
|
fontSize: fontSize,
|
|
32
|
+
lineHeight: Math.round(fontSize * 1.25),
|
|
32
33
|
fontWeight: "600",
|
|
33
34
|
fontFamily,
|
|
34
35
|
},
|
|
35
36
|
description: {
|
|
36
37
|
color: colors.foreground,
|
|
37
38
|
fontSize: fontSize * 0.875,
|
|
39
|
+
lineHeight: Math.round(fontSize * 0.875 * 1.25),
|
|
38
40
|
fontFamily,
|
|
39
41
|
opacity: 0.9,
|
|
40
42
|
},
|
|
@@ -29,12 +29,14 @@ export const useToastVariantDefault = (): ToastStyles => {
|
|
|
29
29
|
title: {
|
|
30
30
|
color: colors.foreground,
|
|
31
31
|
fontSize: fontSize,
|
|
32
|
+
lineHeight: Math.round(fontSize * 1.25),
|
|
32
33
|
fontWeight: "600",
|
|
33
34
|
fontFamily,
|
|
34
35
|
},
|
|
35
36
|
description: {
|
|
36
37
|
color: colors.mutedForeground,
|
|
37
38
|
fontSize: fontSize * 0.875,
|
|
39
|
+
lineHeight: Math.round(fontSize * 0.875 * 1.25),
|
|
38
40
|
fontFamily,
|
|
39
41
|
},
|
|
40
42
|
}),
|
|
@@ -29,12 +29,14 @@ export const useToastVariantSuccess = (): ToastStyles => {
|
|
|
29
29
|
title: {
|
|
30
30
|
color: colors.foreground,
|
|
31
31
|
fontSize: fontSize,
|
|
32
|
+
lineHeight: Math.round(fontSize * 1.25),
|
|
32
33
|
fontWeight: "600",
|
|
33
34
|
fontFamily,
|
|
34
35
|
},
|
|
35
36
|
description: {
|
|
36
37
|
color: colors.foreground,
|
|
37
38
|
fontSize: fontSize * 0.875,
|
|
39
|
+
lineHeight: Math.round(fontSize * 0.875 * 1.25),
|
|
38
40
|
fontFamily,
|
|
39
41
|
opacity: 0.9,
|
|
40
42
|
},
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Text as RnText, StyleSheet, type TextProps as RnTextProps } from "react-native";
|
|
3
|
+
import type { Size } from "../../utils/size-scale";
|
|
3
4
|
import { TypographyVariants } from "./variants";
|
|
4
5
|
|
|
5
6
|
export interface TypographyProps extends RnTextProps {
|
|
6
7
|
variant?: keyof typeof TypographyVariants;
|
|
8
|
+
size?: Size;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export function Typography(props: TypographyProps) {
|
|
10
|
-
const
|
|
12
|
+
const { variant = "body", size = "md", ...rest } = props;
|
|
13
|
+
const variantStyles = TypographyVariants[variant](size);
|
|
11
14
|
|
|
12
15
|
const combinedStyles = StyleSheet.flatten([variantStyles, props.style]);
|
|
13
16
|
|
|
14
|
-
return <RnText {...
|
|
17
|
+
return <RnText {...rest} style={combinedStyles} />;
|
|
15
18
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type TextStyle } from "react-native";
|
|
2
|
+
import type { Size } from "../../../utils/size-scale";
|
|
3
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
4
|
+
|
|
5
|
+
const bodyScale: Record<Size, number> = {
|
|
6
|
+
sm: 0.875,
|
|
7
|
+
md: 1,
|
|
8
|
+
lg: 1.25,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function useTextVariantBody(size: Size): TextStyle {
|
|
12
|
+
return useThemedStyles(
|
|
13
|
+
({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => {
|
|
14
|
+
const scale = bodyScale[size];
|
|
15
|
+
const scaledFontSize = fontSize * scale;
|
|
16
|
+
const lineHeight = Math.round(scaledFontSize * 1.25);
|
|
17
|
+
return {
|
|
18
|
+
color: colors.foreground,
|
|
19
|
+
fontSize: scaledFontSize,
|
|
20
|
+
lineHeight,
|
|
21
|
+
fontFamily,
|
|
22
|
+
letterSpacing,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type TextStyle } from "react-native";
|
|
2
|
+
import type { Size } from "../../../utils/size-scale";
|
|
3
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
4
|
+
|
|
5
|
+
const headingScale: Record<Size, number> = {
|
|
6
|
+
sm: 1,
|
|
7
|
+
md: 1.25,
|
|
8
|
+
lg: 1.5,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function useTextVariantHeading(size: Size): TextStyle {
|
|
12
|
+
return useThemedStyles(
|
|
13
|
+
({ colors, fontFamily, letterSpacing, fontSize }): TextStyle => {
|
|
14
|
+
const scale = headingScale[size];
|
|
15
|
+
const scaledFontSize = fontSize * scale;
|
|
16
|
+
const lineHeight = Math.round(scaledFontSize * 1.25);
|
|
17
|
+
return {
|
|
18
|
+
color: colors.foreground,
|
|
19
|
+
fontSize: scaledFontSize,
|
|
20
|
+
lineHeight,
|
|
21
|
+
fontFamily,
|
|
22
|
+
letterSpacing,
|
|
23
|
+
fontWeight: "600",
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useTextVariantBodySm } from "./body-sm";
|
|
4
|
-
import { useTextVariantHeadingLg } from "./heading-lg";
|
|
5
|
-
import { useTextVariantHeadingMd } from "./heading-md";
|
|
6
|
-
import { useTextVariantHeadingSm } from "./heading-sm";
|
|
1
|
+
import { useTextVariantBody } from "./body";
|
|
2
|
+
import { useTextVariantHeading } from "./heading";
|
|
7
3
|
|
|
8
4
|
export const TypographyVariants = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
["body-lg"]: useTextVariantBodyLg,
|
|
12
|
-
["heading-sm"]: useTextVariantHeadingSm,
|
|
13
|
-
["heading-md"]: useTextVariantHeadingMd,
|
|
14
|
-
["heading-lg"]: useTextVariantHeadingLg,
|
|
5
|
+
body: useTextVariantBody,
|
|
6
|
+
heading: useTextVariantHeading,
|
|
15
7
|
};
|
package/src/themes/types.ts
CHANGED
|
@@ -60,6 +60,7 @@ import type { ProgressStyles } from "../components/progress/types";
|
|
|
60
60
|
import type { RadioGroupStyles } from "../components/radio-group/types";
|
|
61
61
|
import type { SelectStyles } from "../components/select/types";
|
|
62
62
|
import type { SeparatorStyles } from "../components/separator/types";
|
|
63
|
+
import type { SidebarStyles } from "../components/sidebar/types";
|
|
63
64
|
import type { SpinnerStyles } from "../components/spinner/types";
|
|
64
65
|
import type { TableStyles } from "../components/table/types";
|
|
65
66
|
import type { TabsStyles } from "../components/tabs/types";
|
|
@@ -136,6 +137,9 @@ export interface ComponentsConfig {
|
|
|
136
137
|
separator?: {
|
|
137
138
|
styles?: SeparatorStyles;
|
|
138
139
|
};
|
|
140
|
+
sidebar?: {
|
|
141
|
+
styles?: SidebarStyles;
|
|
142
|
+
};
|
|
139
143
|
spinner?: {
|
|
140
144
|
styles?: SpinnerStyles;
|
|
141
145
|
};
|
package/src/utils/size-scale.ts
CHANGED
|
@@ -9,7 +9,9 @@ interface SizeScaleValues {
|
|
|
9
9
|
gap: number;
|
|
10
10
|
/** fontSize * 0.875 | 1 | 1.125 */
|
|
11
11
|
fontSize: number;
|
|
12
|
-
/** fontSize *
|
|
12
|
+
/** fontSize * 1.25 (line height for text) */
|
|
13
|
+
lineHeight: number;
|
|
14
|
+
/** Equal to lineHeight (icons match text line height) */
|
|
13
15
|
iconSize: number;
|
|
14
16
|
/** 1.75 | 2 | 2.25 */
|
|
15
17
|
strokeWidth: number;
|
|
@@ -33,12 +35,14 @@ export function getSizeScale(
|
|
|
33
35
|
): SizeScaleValues {
|
|
34
36
|
const s = scales[size] ?? scales.md;
|
|
35
37
|
const scaledFontSize = fontSize * s.fontScale;
|
|
38
|
+
const lineHeight = Math.round(scaledFontSize * 1.25);
|
|
36
39
|
return {
|
|
37
40
|
paddingVertical: spacing * s.pv,
|
|
38
41
|
paddingHorizontal: spacing * s.ph,
|
|
39
42
|
gap: spacing * s.gap,
|
|
40
43
|
fontSize: scaledFontSize,
|
|
41
|
-
|
|
44
|
+
lineHeight,
|
|
45
|
+
iconSize: lineHeight,
|
|
42
46
|
strokeWidth: s.sw,
|
|
43
47
|
height: spacing * s.h,
|
|
44
48
|
};
|
package/README.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
-
export function useTextVariantBodyLg() {
|
|
5
|
-
return useThemedStyles(({
|
|
6
|
-
colors,
|
|
7
|
-
fontFamily,
|
|
8
|
-
letterSpacing,
|
|
9
|
-
fontSize
|
|
10
|
-
}) => ({
|
|
11
|
-
color: colors.foreground,
|
|
12
|
-
fontSize: fontSize * 1.25,
|
|
13
|
-
fontFamily,
|
|
14
|
-
letterSpacing,
|
|
15
|
-
lineHeight: fontSize * 1.5
|
|
16
|
-
}));
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=body-lg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantBodyLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-lg.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,IAAI;IACzBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
-
export function useTextVariantBodyMd() {
|
|
5
|
-
return useThemedStyles(({
|
|
6
|
-
colors,
|
|
7
|
-
fontFamily,
|
|
8
|
-
letterSpacing,
|
|
9
|
-
fontSize
|
|
10
|
-
}) => ({
|
|
11
|
-
color: colors.foreground,
|
|
12
|
-
fontSize,
|
|
13
|
-
fontFamily,
|
|
14
|
-
letterSpacing,
|
|
15
|
-
lineHeight: fontSize * 1.5
|
|
16
|
-
}));
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=body-md.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantBodyMd","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-md.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ;IACRF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
-
export function useTextVariantBodySm() {
|
|
5
|
-
return useThemedStyles(({
|
|
6
|
-
colors,
|
|
7
|
-
fontFamily,
|
|
8
|
-
letterSpacing,
|
|
9
|
-
fontSize
|
|
10
|
-
}) => ({
|
|
11
|
-
color: colors.foreground,
|
|
12
|
-
fontSize: fontSize * 0.875,
|
|
13
|
-
fontFamily,
|
|
14
|
-
letterSpacing,
|
|
15
|
-
lineHeight: fontSize * 1.5
|
|
16
|
-
}));
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=body-sm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantBodySm","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-sm.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,KAAK;IAC1BF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
-
export function useTextVariantHeadingLg() {
|
|
5
|
-
return useThemedStyles(({
|
|
6
|
-
colors,
|
|
7
|
-
fontFamily,
|
|
8
|
-
letterSpacing,
|
|
9
|
-
fontSize
|
|
10
|
-
}) => ({
|
|
11
|
-
color: colors.foreground,
|
|
12
|
-
fontSize: fontSize * 1.5,
|
|
13
|
-
fontFamily,
|
|
14
|
-
letterSpacing,
|
|
15
|
-
fontWeight: "600",
|
|
16
|
-
lineHeight: fontSize * 1.75
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=heading-lg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantHeadingLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-lg.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,GAAG;IACxBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEJ,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
-
export function useTextVariantHeadingMd() {
|
|
5
|
-
return useThemedStyles(({
|
|
6
|
-
colors,
|
|
7
|
-
fontFamily,
|
|
8
|
-
letterSpacing,
|
|
9
|
-
fontSize
|
|
10
|
-
}) => ({
|
|
11
|
-
color: colors.foreground,
|
|
12
|
-
fontSize: fontSize * 1.25,
|
|
13
|
-
fontFamily,
|
|
14
|
-
letterSpacing,
|
|
15
|
-
fontWeight: "600",
|
|
16
|
-
lineHeight: fontSize * 1.5
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=heading-md.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantHeadingMd","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-md.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,IAAI;IACzBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEJ,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
|
-
export function useTextVariantHeadingSm() {
|
|
5
|
-
return useThemedStyles(({
|
|
6
|
-
colors,
|
|
7
|
-
fontFamily,
|
|
8
|
-
letterSpacing,
|
|
9
|
-
fontSize
|
|
10
|
-
}) => ({
|
|
11
|
-
color: colors.foreground,
|
|
12
|
-
fontSize,
|
|
13
|
-
fontFamily,
|
|
14
|
-
letterSpacing,
|
|
15
|
-
fontWeight: "600",
|
|
16
|
-
lineHeight: fontSize * 1.2
|
|
17
|
-
}));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=heading-sm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantHeadingSm","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-sm.tsx"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ;IACRF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEJ,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|