stoop 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +142 -51
  3. package/dist/api/create-theme.d.ts +13 -0
  4. package/dist/api/css.d.ts +16 -0
  5. package/dist/api/global-css.d.ts +18 -0
  6. package/dist/api/keyframes.d.ts +16 -0
  7. package/dist/api/provider.d.ts +19 -0
  8. package/dist/api/styled.d.ts +41 -0
  9. package/dist/api/use-theme.d.ts +13 -0
  10. package/dist/constants.d.ts +21 -0
  11. package/dist/core/cache.d.ts +39 -0
  12. package/dist/core/compiler.d.ts +19 -0
  13. package/dist/core/theme-manager.d.ts +30 -0
  14. package/dist/core/variants.d.ts +15 -0
  15. package/dist/create-stoop.d.ts +12 -0
  16. package/dist/index.d.ts +6 -6
  17. package/dist/index.js +13 -156
  18. package/dist/inject/browser.d.ts +59 -0
  19. package/dist/inject/dedup.d.ts +29 -0
  20. package/dist/inject/index.d.ts +41 -0
  21. package/dist/inject/ssr.d.ts +28 -0
  22. package/dist/types/index.d.ts +141 -0
  23. package/dist/types/react-polymorphic-types.d.ts +17 -0
  24. package/dist/utils/string.d.ts +102 -0
  25. package/dist/utils/theme-map.d.ts +25 -0
  26. package/dist/utils/theme-validation.d.ts +13 -0
  27. package/dist/utils/theme.d.ts +43 -0
  28. package/dist/utils/type-guards.d.ts +26 -0
  29. package/dist/utils/utilities.d.ts +14 -0
  30. package/package.json +63 -39
  31. package/dist/components/Badge/index.d.ts +0 -13
  32. package/dist/components/Badge/styles.d.ts +0 -3
  33. package/dist/components/Badge/types.d.ts +0 -13
  34. package/dist/components/Button/index.d.ts +0 -14
  35. package/dist/components/Button/styles.d.ts +0 -6
  36. package/dist/components/Button/types.d.ts +0 -22
  37. package/dist/components/Card/index.d.ts +0 -14
  38. package/dist/components/Card/styles.d.ts +0 -16
  39. package/dist/components/Card/types.d.ts +0 -18
  40. package/dist/components/Input/index.d.ts +0 -13
  41. package/dist/components/Input/styles.d.ts +0 -3
  42. package/dist/components/Input/types.d.ts +0 -8
  43. package/dist/components/Menu/index.d.ts +0 -13
  44. package/dist/components/Menu/styles.d.ts +0 -9
  45. package/dist/components/Menu/types.d.ts +0 -26
  46. package/dist/components/Modal/index.d.ts +0 -14
  47. package/dist/components/Modal/styles.d.ts +0 -14
  48. package/dist/components/Modal/types.d.ts +0 -18
  49. package/dist/components/Popover/index.d.ts +0 -13
  50. package/dist/components/Popover/styles.d.ts +0 -4
  51. package/dist/components/Popover/types.d.ts +0 -16
  52. package/dist/components/Provider/GlobalStyles.d.ts +0 -10
  53. package/dist/components/Provider/StoopProvider.d.ts +0 -41
  54. package/dist/components/Provider/index.d.ts +0 -2
  55. package/dist/components/Section/index.d.ts +0 -15
  56. package/dist/components/Section/styles.d.ts +0 -5
  57. package/dist/components/Section/types.d.ts +0 -20
  58. package/dist/components/Select/index.d.ts +0 -13
  59. package/dist/components/Select/styles.d.ts +0 -7
  60. package/dist/components/Select/types.d.ts +0 -30
  61. package/dist/components/Stack/index.d.ts +0 -16
  62. package/dist/components/Stack/styles.d.ts +0 -10
  63. package/dist/components/Stack/types.d.ts +0 -42
  64. package/dist/components/Tabs/index.d.ts +0 -13
  65. package/dist/components/Tabs/styles.d.ts +0 -8
  66. package/dist/components/Tabs/types.d.ts +0 -20
  67. package/dist/components/Text/index.d.ts +0 -14
  68. package/dist/components/Text/styles.d.ts +0 -4
  69. package/dist/components/Text/types.d.ts +0 -21
  70. package/dist/components/Textarea/index.d.ts +0 -15
  71. package/dist/components/Textarea/styles.d.ts +0 -3
  72. package/dist/components/Textarea/types.d.ts +0 -10
  73. package/dist/components/index.d.ts +0 -27
  74. package/dist/hooks/index.d.ts +0 -5
  75. package/dist/hooks/useBreakpoints.d.ts +0 -14
  76. package/dist/hooks/useEventListener.d.ts +0 -6
  77. package/dist/hooks/useFloating.d.ts +0 -18
  78. package/dist/hooks/useOutsideClick.d.ts +0 -6
  79. package/dist/hooks/usePortal.d.ts +0 -9
  80. package/dist/styles/compiler.d.ts +0 -25
  81. package/dist/styles/index.d.ts +0 -2
  82. package/dist/styles/theme.d.ts +0 -495
  83. package/dist/styles/types.d.ts +0 -66
@@ -1,3 +0,0 @@
1
- export declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
2
- variant?: boolean | "error" | "default";
3
- } & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,8 +0,0 @@
1
- import type { ComponentPropsWithoutRef } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface InputProps extends ComponentPropsWithoutRef<"input"> {
4
- /** Input state */
5
- state?: "default" | "error";
6
- /** Custom CSS styles */
7
- css?: CSSObject;
8
- }
@@ -1,13 +0,0 @@
1
- import { type JSX } from "react";
2
- import type { MenuProps } from "./types";
3
- /**
4
- * Menu - Dropdown menu component with trigger and options
5
- *
6
- * Sharp edges design with customizable triggers and option handling
7
- * Supports keyboard navigation and outside click to close
8
- *
9
- * Examples:
10
- * <Menu trigger={<Button>Open Menu</Button>} options={menuOptions} />
11
- * <Menu trigger="Click me" options={options} onSelection={handleSelect} />
12
- */
13
- export declare function Menu({ children, css, initial, logo, onSelection, options, trigger, triggerCss, ...props }: MenuProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- export declare const MenuTriggerStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
2
- export declare const MenuOverlayStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
3
- export declare const MenuStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
4
- variant?: boolean | "default" | "elevated";
5
- } & import("react").RefAttributes<HTMLDivElement>>;
6
- export declare const MenuItemStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
7
- variant?: boolean | "default" | "danger";
8
- } & import("react").RefAttributes<HTMLDivElement>>;
9
- export declare const MenuDividerStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,26 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface MenuOption {
4
- value: string;
5
- label: string;
6
- icon?: ReactNode;
7
- iconPosition?: "left" | "right";
8
- }
9
- export interface MenuProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
10
- /** Trigger element that opens the menu */
11
- trigger: ReactNode;
12
- /** Array of menu options */
13
- options: MenuOption[];
14
- /** Initially selected option value */
15
- initial?: string;
16
- /** Logo or header content */
17
- logo?: ReactNode;
18
- /** Custom content (can be function that receives close callback) */
19
- children?: ReactNode | ((close: () => void) => ReactNode);
20
- /** Called when menu option is selected */
21
- onSelection?: (value: string, label: string) => void;
22
- /** Custom CSS for trigger */
23
- triggerCss?: CSSObject;
24
- /** Custom CSS for menu content */
25
- css?: CSSObject;
26
- }
@@ -1,14 +0,0 @@
1
- import { type JSX } from "react";
2
- import type { ModalProps } from "./types";
3
- /**
4
- * Modal - Overlay modal component with trigger interaction
5
- *
6
- * Provides a trigger element that opens a modal when clicked.
7
- * Uses portal rendering and manages focus/escape behavior automatically.
8
- * Includes built-in header with title and close button.
9
- *
10
- * Examples:
11
- * <Modal trigger={<Button>Open Modal</Button>} title="My Modal">Modal content</Modal>
12
- * <Modal trigger="Custom trigger" title="Settings" small>Small modal form</Modal>
13
- */
14
- export declare function Modal({ children, css, disabled, small, title, trigger, triggerCss, ...props }: ModalProps): JSX.Element;
@@ -1,14 +0,0 @@
1
- export declare const ModalTriggerStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
2
- disabled?: boolean | "true";
3
- } & import("react").RefAttributes<HTMLDivElement>>;
4
- export declare const ModalBackdropStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
5
- export declare const ModalStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
6
- small?: boolean | "true";
7
- variant?: boolean | "default" | "bordered";
8
- isOpen?: boolean | "true";
9
- } & import("react").RefAttributes<HTMLDivElement>>;
10
- export declare const ModalHeaderStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
11
- export declare const ModalTitleStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLHeadingElement>>;
12
- export declare const ModalCloseButtonStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLButtonElement>>;
13
- export declare const ModalContentStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
14
- export declare const ModalFooterStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,18 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface ModalProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
4
- /** Trigger element that opens the modal */
5
- trigger: ReactNode;
6
- /** Modal title displayed in header */
7
- title: string;
8
- /** Content to display in modal (can be function that receives close callback) */
9
- children: ReactNode | ((close: () => void) => ReactNode);
10
- /** Whether to use small modal size (280px vs 600px max-width) */
11
- small?: boolean;
12
- /** Whether the modal is disabled */
13
- disabled?: boolean;
14
- /** Custom CSS styles for the modal content */
15
- css?: CSSObject;
16
- /** Custom CSS styles for the trigger */
17
- triggerCss?: CSSObject;
18
- }
@@ -1,13 +0,0 @@
1
- import { type JSX } from "react";
2
- import type { PopoverProps } from "./types";
3
- /**
4
- * Popover - Floating content overlay with trigger interaction
5
- *
6
- * Provides a trigger element that opens floating content when clicked.
7
- * Uses portal rendering and manages focus/escape behavior automatically.
8
- *
9
- * Examples:
10
- * <Popover trigger={<Button>Click me</Button>}>Popover content</Popover>
11
- * <Popover trigger="Custom trigger" variant="minimal">Content</Popover>
12
- */
13
- export declare function Popover({ children, css, disabled, trigger, triggerCss, variant, ...props }: PopoverProps): JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare const PopoverTriggerStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
2
- export declare const PopoverStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
3
- variant?: boolean | "default" | "minimal";
4
- } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,16 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface PopoverProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
4
- /** Trigger element that opens the popover */
5
- trigger: ReactNode;
6
- /** Content to display in popover (can be function that receives close callback) */
7
- children: ReactNode | ((close: () => void) => ReactNode);
8
- /** Popover variant - default has padding, minimal has no padding */
9
- variant?: "default" | "minimal";
10
- /** Whether popover is disabled */
11
- disabled?: boolean;
12
- /** Custom CSS for trigger */
13
- triggerCss?: CSSObject;
14
- /** Custom CSS for popover content */
15
- css?: CSSObject;
16
- }
@@ -1,10 +0,0 @@
1
- import type { Theme } from "../../styles/types";
2
- /**
3
- * Generate global CSS styles based on current theme
4
- */
5
- export declare function createGlobalStyles(theme?: Theme): string;
6
- /**
7
- * Inject global styles into the document head with theme support
8
- * Automatically removes previous styles when theme changes
9
- */
10
- export declare function injectGlobalStyles(theme?: Theme): void;
@@ -1,41 +0,0 @@
1
- import { type JSX, type ReactNode } from "react";
2
- import type { ThemeName, Theme } from "../../styles/types";
3
- export interface StoopProviderConfig {
4
- /** Whether to inject global styles and CSS reset */
5
- injectGlobalStyles?: boolean;
6
- /** Custom CSS to inject */
7
- customCSS?: string;
8
- /** Initial theme (defaults to 'light') */
9
- theme?: ThemeName;
10
- }
11
- interface StoopContextValue extends StoopProviderConfig {
12
- currentTheme: Theme;
13
- themeName: ThemeName;
14
- toggleTheme: () => void;
15
- setTheme: (theme: ThemeName) => void;
16
- }
17
- declare const StoopContext: import("react").Context<StoopContextValue>;
18
- export interface StoopProviderProps {
19
- children: ReactNode;
20
- config?: StoopProviderConfig;
21
- }
22
- /**
23
- * Stoop UI Provider - Sets up global styles, configuration, and theming
24
- * Wrap your app with this component to enable Stoop UI components
25
- * Theme choice persists across browser sessions
26
- */
27
- export declare function StoopProvider({ children, config, }: StoopProviderProps): JSX.Element;
28
- /**
29
- * Hook to access Stoop UI configuration
30
- */
31
- export declare function useStoopConfig(): StoopContextValue;
32
- /**
33
- * Hook to access current theme and theme controls
34
- */
35
- export declare function useTheme(): {
36
- theme: Theme;
37
- themeName: ThemeName;
38
- toggleTheme: () => void;
39
- setTheme: (theme: ThemeName) => void;
40
- };
41
- export { StoopContext };
@@ -1,2 +0,0 @@
1
- export { StoopProvider, useStoopConfig, useTheme, StoopContext, type StoopProviderProps, type StoopProviderConfig, } from "./StoopProvider";
2
- export { createGlobalStyles, injectGlobalStyles } from "./GlobalStyles";
@@ -1,15 +0,0 @@
1
- import type { JSX } from "react";
2
- import type { SectionProps } from "./types";
3
- /**
4
- * Section - Page layout wrapper component
5
- *
6
- * Creates a standardized page section with optional max-width container
7
- * Similar to the old View component but simplified for our design system
8
- *
9
- * Examples:
10
- * <Section>Content with standard container</Section>
11
- * <Section container={false}>Full-width content</Section>
12
- * <Section wide>Wider container for app layouts</Section>
13
- * <Section as="main" top="large" bottom="huge">Semantic HTML with spacing</Section>
14
- */
15
- export declare function Section({ as, bottom, children, container, css, top, wide, ...props }: SectionProps): JSX.Element;
@@ -1,5 +0,0 @@
1
- export declare const SectionStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLElement>>;
2
- export declare const ContainerStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
3
- container?: boolean | "false" | "true";
4
- wide?: boolean | "false" | "true";
5
- } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,20 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ElementType } from "react";
2
- import type { SpacingToken } from "../../styles/theme";
3
- import type { CSSObject } from "../../styles/types";
4
- /**
5
- * Section component props - page layout wrapper
6
- */
7
- export interface SectionProps extends ComponentPropsWithoutRef<"section"> {
8
- /** Override the HTML element */
9
- as?: ElementType;
10
- /** Apply standard max-width container (default: true) */
11
- container?: boolean;
12
- /** Wide container for app-level layouts */
13
- wide?: boolean;
14
- /** Top padding using spacing tokens */
15
- top?: SpacingToken;
16
- /** Bottom padding using spacing tokens */
17
- bottom?: SpacingToken;
18
- /** Custom CSS */
19
- css?: CSSObject;
20
- }
@@ -1,13 +0,0 @@
1
- import { type JSX } from "react";
2
- import type { SelectProps } from "./types";
3
- /**
4
- * Select - Dropdown selection component with filtering and search
5
- *
6
- * Provides a searchable dropdown with keyboard navigation and portal rendering.
7
- * Supports custom options with icons and loading states.
8
- *
9
- * Examples:
10
- * <Select options={options} onSelection={handleSelect} />
11
- * <Select options={options} filter label="Choose option" />
12
- */
13
- export declare function Select({ css, disabled, filter, initial, label, loading, onSelection, options, trigger, triggerCss, ...props }: SelectProps): JSX.Element;
@@ -1,7 +0,0 @@
1
- export declare const SelectTriggerStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
2
- export declare const SelectDropdownStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
3
- export declare const SelectLabelStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
4
- export declare const SelectFilterStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
5
- export declare const SelectItemStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLButtonElement>>;
6
- export declare const SelectEmptyStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
7
- export declare const SelectLoadingStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,30 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface SelectOption {
4
- value: string;
5
- label: string;
6
- icon?: ReactNode;
7
- iconPosition?: "left" | "right";
8
- }
9
- export interface SelectProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
10
- /** Trigger element that opens the select */
11
- trigger: ReactNode;
12
- /** Array of select options */
13
- options: SelectOption[];
14
- /** Initially selected option value */
15
- initial?: string;
16
- /** Optional label for the dropdown */
17
- label?: string;
18
- /** Whether to show filter/search */
19
- filter?: boolean;
20
- /** Whether the select is loading */
21
- loading?: boolean;
22
- /** Whether the select is disabled */
23
- disabled?: boolean;
24
- /** Called when option is selected */
25
- onSelection?: (value: string, label: string) => void;
26
- /** Custom CSS for trigger */
27
- triggerCss?: CSSObject;
28
- /** Custom CSS for dropdown content */
29
- css?: CSSObject;
30
- }
@@ -1,16 +0,0 @@
1
- import { JSX } from "react";
2
- import type { StackProps } from "./types";
3
- /**
4
- * Stack - Comprehensive layout component
5
- *
6
- * Handles all flexbox layouts - replaces the need for separate Flex component
7
- * Supports both container properties (direction, gap, align) and item properties (grow, shrink, basis)
8
- * Can be used as any HTML element via 'as' prop
9
- *
10
- * Examples:
11
- * <Stack direction="row" gap="large" justify="between"> // Horizontal layout
12
- * <Stack align="center" textAlign="center"> // Vertical centered
13
- * <Stack as="section" direction="row" minimal> // Semantic HTML
14
- * <Stack grow={1} shrink={0} basis="200px"> // As flex item
15
- */
16
- export declare function Stack({ align, alignContent, as, basis, bottom, children, css, direction, gap, grow, inline, justify, minimal, shrink, textAlign, top, wrap, ...props }: StackProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- export declare const StackStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
2
- inline?: boolean | "false" | "true";
3
- alignContent?: boolean | "center" | "end" | "start" | "stretch" | "between" | "around";
4
- direction?: boolean | "column" | "column-reverse" | "row" | "row-reverse";
5
- textAlign?: boolean | "center" | "left" | "right" | "justify";
6
- wrap?: boolean | "reverse" | "false" | "true";
7
- justify?: boolean | "center" | "end" | "start" | "between" | "around" | "evenly";
8
- align?: boolean | "center" | "end" | "start" | "stretch" | "baseline";
9
- minimal?: boolean | "false" | "true";
10
- } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,42 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ElementType } from "react";
2
- import type { SpacingToken } from "../../styles/theme";
3
- import type { CSSObject } from "../../styles/types";
4
- /**
5
- * Stack component props - comprehensive layout component
6
- */
7
- export interface StackProps extends ComponentPropsWithoutRef<"div"> {
8
- /** Override the HTML element */
9
- as?: ElementType;
10
- /** Direction of the stack */
11
- direction?: "row" | "column" | "row-reverse" | "column-reverse";
12
- /** Render as inline-flex instead of flex */
13
- inline?: boolean;
14
- /** Gap between items */
15
- gap?: SpacingToken;
16
- /** Remove default padding (useful for row direction) */
17
- minimal?: boolean;
18
- /** Alignment of items along cross-axis */
19
- align?: "start" | "center" | "end" | "stretch" | "baseline";
20
- /** Justification along main axis */
21
- justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
22
- /** Whether items should wrap */
23
- wrap?: boolean | "reverse";
24
- /** Align multiple lines (when wrapped) */
25
- alignContent?: "start" | "center" | "end" | "between" | "around" | "stretch";
26
- /** Flex grow factor */
27
- grow?: number;
28
- /** Flex shrink factor */
29
- shrink?: number;
30
- /** Flex basis */
31
- basis?: string;
32
- /** Order in flex container */
33
- order?: number;
34
- /** Text alignment */
35
- textAlign?: "left" | "center" | "right" | "justify";
36
- /** Add padding-top and remove margin-top */
37
- top?: SpacingToken;
38
- /** Add padding-bottom and remove margin-bottom */
39
- bottom?: SpacingToken;
40
- /** Custom CSS */
41
- css?: CSSObject;
42
- }
@@ -1,13 +0,0 @@
1
- import { type JSX } from "react";
2
- import type { TabsProps } from "./types";
3
- /**
4
- * Tabs - Tab navigation component
5
- *
6
- * Sharp edges design with clean tab switching
7
- * Supports keyboard navigation and custom content
8
- *
9
- * Examples:
10
- * <Tabs items={[{label: 'Tab 1', content: <div>Content 1</div>}]} />
11
- * <Tabs items={tabs} defaultActive={1} variant="minimal" />
12
- */
13
- export declare function Tabs({ css, defaultActive, items, onTabChange, variant, ...props }: TabsProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- export declare const TabsStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
2
- export declare const TabListStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
3
- variant?: boolean | "default" | "minimal";
4
- } & import("react").RefAttributes<HTMLDivElement>>;
5
- export declare const TabButtonStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
6
- active?: boolean | "false" | "true";
7
- } & import("react").RefAttributes<HTMLButtonElement>>;
8
- export declare const TabPanelStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("../../styles/types").StyledBaseProps & {} & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,20 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface TabItem {
4
- id?: string;
5
- label: string;
6
- content: ReactNode;
7
- disabled?: boolean;
8
- }
9
- export interface TabsProps extends ComponentPropsWithoutRef<"div"> {
10
- /** Array of tab items */
11
- items: TabItem[];
12
- /** Initially active tab index */
13
- defaultActive?: number;
14
- /** Tab variant */
15
- variant?: "default" | "minimal";
16
- /** Called when tab selection changes */
17
- onTabChange?: (index: number) => void;
18
- /** Custom CSS styles */
19
- css?: CSSObject;
20
- }
@@ -1,14 +0,0 @@
1
- import type { JSX } from "react";
2
- import type { TextProps } from "./types";
3
- /**
4
- * Text - Typography component
5
- *
6
- * Provides consistent typography with semantic HTML elements
7
- * Supports size override, muted styling, and spacing props
8
- *
9
- * Examples:
10
- * <Text as="h1">Page Title</Text>
11
- * <Text as="p" size="small" muted>Subtitle</Text>
12
- * <Text as="span" size="h3">Custom sized span</Text>
13
- */
14
- export declare function Text({ as, bottom, children, css, muted, size, top, ...props }: TextProps): JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare const TextStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
2
- size?: boolean | "small" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "p" | "span" | "strong";
3
- muted?: boolean | "false" | "true";
4
- } & import("react").RefAttributes<HTMLParagraphElement>>;
@@ -1,21 +0,0 @@
1
- import type { ComponentPropsWithoutRef, ElementType } from "react";
2
- import type { SpacingToken } from "../../styles/theme";
3
- import type { CSSObject } from "../../styles/types";
4
- export type TextElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "strong" | "small" | "label";
5
- /**
6
- * Text component props
7
- */
8
- export interface TextProps extends ComponentPropsWithoutRef<"div"> {
9
- /** HTML element to render as (also determines default size) */
10
- as?: TextElement | ElementType;
11
- /** Override the default size from 'as' prop */
12
- size?: TextElement;
13
- /** Apply muted styling (reduced opacity) */
14
- muted?: boolean;
15
- /** Add padding-top and remove margin-top */
16
- top?: SpacingToken;
17
- /** Add padding-bottom and remove margin-bottom */
18
- bottom?: SpacingToken;
19
- /** Custom CSS styles */
20
- css?: CSSObject;
21
- }
@@ -1,15 +0,0 @@
1
- import type { JSX } from "react";
2
- import type { TextareaProps } from "./types";
3
- /**
4
- * Textarea - Multi-line text input component
5
- *
6
- * Sharp edges design with consistent styling
7
- * Supports various states and accessibility features
8
- * Use cols/rows attributes for sizing
9
- *
10
- * Examples:
11
- * <Textarea placeholder="Enter your message..." />
12
- * <Textarea variant="minimal" />
13
- * <Textarea disabled rows={5} cols={50} />
14
- */
15
- export declare function Textarea({ css, variant, ...props }: TextareaProps): JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare const TextareaStyled: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & import("../../styles/types").StyledBaseProps & {
2
- variant?: boolean | "default" | "minimal";
3
- } & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,10 +0,0 @@
1
- import type { ComponentPropsWithoutRef } from "react";
2
- import type { CSSObject } from "../../styles/types";
3
- export interface TextareaProps extends ComponentPropsWithoutRef<"textarea"> {
4
- /** Textarea variant */
5
- variant?: "default" | "minimal";
6
- /** Whether to allow manual resizing */
7
- resize?: "none" | "vertical" | "horizontal" | "both";
8
- /** Custom CSS styles */
9
- css?: CSSObject;
10
- }
@@ -1,27 +0,0 @@
1
- export { Stack } from "./Stack";
2
- export type { StackProps } from "./Stack/types";
3
- export { Section } from "./Section";
4
- export type { SectionProps } from "./Section/types";
5
- export { Text } from "./Text";
6
- export type { TextProps, TextElement } from "./Text/types";
7
- export { Button } from "./Button";
8
- export type { ButtonProps } from "./Button/types";
9
- export { Badge } from "./Badge";
10
- export type { BadgeProps } from "./Badge/types";
11
- export { Card } from "./Card";
12
- export type { CardProps } from "./Card/types";
13
- export { Input } from "./Input";
14
- export type { InputProps } from "./Input/types";
15
- export { Textarea } from "./Textarea";
16
- export type { TextareaProps } from "./Textarea/types";
17
- export { Tabs } from "./Tabs";
18
- export type { TabsProps, TabItem } from "./Tabs/types";
19
- export { Menu } from "./Menu";
20
- export type { MenuProps, MenuOption } from "./Menu/types";
21
- export { Select } from "./Select";
22
- export type { SelectProps, SelectOption } from "./Select/types";
23
- export { Popover } from "./Popover";
24
- export type { PopoverProps } from "./Popover/types";
25
- export { Modal } from "./Modal";
26
- export type { ModalProps } from "./Modal/types";
27
- export { StoopProvider } from "./Provider";
@@ -1,5 +0,0 @@
1
- export { useBreakpoints, type BreakpointSize } from "./useBreakpoints";
2
- export { usePortal } from "./usePortal";
3
- export { useEventListener } from "./useEventListener";
4
- export { useOutsideClick } from "./useOutsideClick";
5
- export { useFloating, type UseFloatingReturn } from "./useFloating";
@@ -1,14 +0,0 @@
1
- export type BreakpointSize = "small" | "medium" | "large";
2
- /**
3
- * Single hook to handle all breakpoint functionality
4
- * Returns: current state + helper methods for all breakpoint checks
5
- */
6
- export declare function useBreakpoints(): {
7
- current: BreakpointSize;
8
- down: (size: BreakpointSize) => boolean;
9
- is: (size: BreakpointSize) => boolean;
10
- isLarge: boolean;
11
- isMedium: boolean;
12
- isSmall: boolean;
13
- up: (size: BreakpointSize) => boolean;
14
- };
@@ -1,6 +0,0 @@
1
- import { RefObject } from "react";
2
- /**
3
- * Hook for efficiently adding event listeners to elements or window
4
- * Automatically handles cleanup and re-binding when dependencies change
5
- */
6
- export declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void, element?: RefObject<HTMLElement | Window | null> | HTMLElement | Window | null, options?: boolean | AddEventListenerOptions): void;
@@ -1,18 +0,0 @@
1
- import { RefObject } from "react";
2
- export interface UseFloatingReturn {
3
- /** Ref for the trigger element */
4
- triggerRef: RefObject<HTMLDivElement | null>;
5
- /** Ref for the floating element */
6
- contentRef: RefObject<HTMLDivElement | null>;
7
- /** Whether floating element is open */
8
- isOpen: boolean;
9
- /** Whether floating element is mounted */
10
- isMounted: boolean;
11
- /** Open the floating element */
12
- handleOpen: () => void;
13
- /** Close the floating element */
14
- handleClose: () => void;
15
- /** Toggle the floating element */
16
- handleClick: () => void;
17
- }
18
- export declare function useFloating(): UseFloatingReturn;
@@ -1,6 +0,0 @@
1
- import { RefObject } from "react";
2
- /**
3
- * Hook for detecting clicks outside of a specific element
4
- * Useful for closing dropdowns, modals, or other overlay components
5
- */
6
- export declare function useOutsideClick<T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler: (event: MouseEvent | TouchEvent) => void, eventType?: "mousedown" | "mouseup" | "click" | "touchstart"): void;
@@ -1,9 +0,0 @@
1
- import { type ReactNode, type ReactPortal } from "react";
2
- /**
3
- * Hook for rendering content in a portal (outside the normal DOM tree)
4
- * Useful for modals, tooltips, dropdowns that need to escape parent containers
5
- */
6
- export declare function usePortal(container?: HTMLElement | string): {
7
- renderPortal: (children: ReactNode) => ReactPortal | null;
8
- portalElement: HTMLDivElement | null;
9
- };