@s-works/s-works-ui 0.0.1 → 0.0.2

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 (53) hide show
  1. package/README.md +3 -3
  2. package/cjs/standard/index.cjs +2633 -6
  3. package/esm/standard/index.mjs +2633 -6
  4. package/package.json +3 -5
  5. package/tailwind.css +1598 -2
  6. package/tailwind.layer.css +1598 -2
  7. package/types/standard/components/Alert/Alert.d.ts +397 -0
  8. package/types/standard/components/Alert/icons.d.ts +58 -0
  9. package/types/standard/components/AppShell/AppShell.d.ts +31 -0
  10. package/types/standard/components/AppShell/AppShellTaskItem.d.ts +26 -0
  11. package/types/standard/components/AppShell/useAppShellSidebar.d.ts +19 -0
  12. package/types/standard/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  13. package/types/standard/components/Breadcrumbs/useBreadcrumbItems.d.ts +7 -0
  14. package/types/standard/components/Checkbox/Checkbox.d.ts +440 -0
  15. package/types/standard/components/Checkbox/icons.d.ts +4 -0
  16. package/types/standard/components/CloseButton/CloseButton.d.ts +18 -0
  17. package/types/standard/components/CloseButton/icons.d.ts +4 -0
  18. package/types/standard/components/DateInput/DateInput.d.ts +61 -0
  19. package/types/standard/components/DateInput/icons.d.ts +7 -0
  20. package/types/standard/components/DatePicker/DatePicker.d.ts +39 -0
  21. package/types/standard/components/DatePicker/icons.d.ts +3 -0
  22. package/types/standard/components/DateRangeShortcuts.d.ts +12 -0
  23. package/types/standard/components/InputBase/InputBase.d.ts +148 -0
  24. package/types/standard/components/InputBase/icons.d.ts +3 -0
  25. package/types/standard/components/Layout/Layout.d.ts +18 -0
  26. package/types/standard/components/Layout/use-layout-state.d.ts +18 -0
  27. package/types/standard/components/Loader/Loader.d.ts +25 -0
  28. package/types/standard/components/Loader/icons.d.ts +3 -0
  29. package/types/standard/components/Modal/Modal.d.ts +22 -0
  30. package/types/standard/components/Modal/icons.d.ts +9 -0
  31. package/types/standard/components/Pagination/Pagination.d.ts +34 -0
  32. package/types/standard/components/Radio/Radio.d.ts +432 -0
  33. package/types/standard/components/Select/Select.d.ts +43 -0
  34. package/types/standard/components/Select/icons.d.ts +5 -0
  35. package/types/standard/components/Skeleton/Skeleton.d.ts +6 -0
  36. package/types/standard/components/Space/Space.d.ts +1 -0
  37. package/types/standard/components/Switch/Switch.d.ts +434 -0
  38. package/types/standard/components/Table/Table.d.ts +39 -0
  39. package/types/standard/components/Tabs/Tabs.d.ts +33 -0
  40. package/types/standard/components/Tag/Tag.d.ts +115 -0
  41. package/types/standard/components/Tag/icons.d.ts +8 -0
  42. package/types/standard/components/TagsInput/TagsInput.d.ts +422 -0
  43. package/types/standard/components/TagsInput/controller.d.ts +713 -0
  44. package/types/standard/components/TagsInput/icons.d.ts +13 -0
  45. package/types/standard/components/TagsInput/types.d.ts +7 -0
  46. package/types/standard/components/ThreeColumnLayout/ThreeColumnLayout.d.ts +45 -0
  47. package/types/standard/components/ThreeColumnLayout/use-resizable-panel.d.ts +30 -0
  48. package/types/standard/components/TimePicker/TimePicker.d.ts +28 -0
  49. package/types/standard/components/Title/Title.d.ts +20 -0
  50. package/types/standard/components/Toast/Toast.d.ts +16 -0
  51. package/types/standard/components/Tooltip/Tooltip.d.ts +20 -0
  52. package/types/standard/index.d.mts +27 -0
  53. package/types/standard/index.d.ts +27 -0
@@ -0,0 +1,13 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare function ChevronLarge(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ChevronMedium(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
+ export declare function ChevronSmall(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function UserLarge(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function UserMedium(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function UserSmall(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function CloseVector(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function CloseSmall(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function TagsUserIcon({ size }: {
11
+ size?: 'lg' | 'md' | 'sm';
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export declare function CloseSmallTwelve(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { MantineTheme, TagsInputProps as MantineTagsInputProps, TagsInputStylesNames } from "@s-works/s-works-ui/core";
2
+ export type TagsInputSize = 'lg' | 'md' | 'sm';
3
+ export type TagsInputSlot = TagsInputStylesNames | 'pillLabel' | 'pillRemove';
4
+ export interface TagsInputProps extends Omit<MantineTagsInputProps, 'classNames'> {
5
+ size?: TagsInputSize;
6
+ classNames?: Partial<Record<TagsInputSlot, string>> | ((theme: MantineTheme, props: TagsInputProps, context: undefined) => Partial<Record<TagsInputSlot, string>>);
7
+ }
@@ -0,0 +1,45 @@
1
+ import { type ReactNode } from "react";
2
+ import { type FlexProps } from "@s-works/s-works-ui/core";
3
+ export interface ThreeColumnLayoutControls {
4
+ menuId: string;
5
+ menuOpened: boolean;
6
+ menuCollapsed: boolean;
7
+ agentOpened: boolean;
8
+ toggleMenu: () => void;
9
+ toggleCollapsed: () => void;
10
+ toggleAgent: () => void;
11
+ closeAgent: () => void;
12
+ menuToggleRef: React.RefObject<HTMLButtonElement | null>;
13
+ agentToggleRef: React.RefObject<HTMLButtonElement | null>;
14
+ }
15
+ export interface ThreeColumnLayoutProps extends Omit<FlexProps, "children" | "title" | "direction" | "gap" | "wrap"> {
16
+ appearance?: "diagram" | "workspace";
17
+ children?: ReactNode;
18
+ renderContent?: (controls: ThreeColumnLayoutControls) => ReactNode;
19
+ header?: (controls: ThreeColumnLayoutControls) => ReactNode;
20
+ menuHeader?: (controls: ThreeColumnLayoutControls) => ReactNode;
21
+ agentHeader?: (controls: ThreeColumnLayoutControls) => ReactNode;
22
+ menu?: ReactNode | ((collapsed: boolean) => ReactNode);
23
+ agent?: ReactNode;
24
+ title?: ReactNode;
25
+ menuTitle?: ReactNode;
26
+ agentTitle?: string;
27
+ menuOpened?: boolean;
28
+ defaultMenuOpened?: boolean;
29
+ onMenuOpenedChange?: (opened: boolean) => void;
30
+ agentOpened?: boolean;
31
+ defaultAgentOpened?: boolean;
32
+ onAgentOpenedChange?: (opened: boolean) => void;
33
+ menuCollapsed?: boolean;
34
+ defaultMenuCollapsed?: boolean;
35
+ onMenuCollapsedChange?: (collapsed: boolean) => void;
36
+ menuWidth?: number;
37
+ defaultMenuWidth?: number;
38
+ onMenuWidthChange?: (width: number) => void;
39
+ agentWidth?: number;
40
+ defaultAgentWidth?: number;
41
+ onAgentWidthChange?: (width: number) => void;
42
+ resizable?: boolean;
43
+ menuStorageKey?: string;
44
+ }
45
+ export declare const ThreeColumnLayout: import("react").ForwardRefExoticComponent<ThreeColumnLayoutProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,30 @@
1
+ import { type KeyboardEvent, type PointerEvent } from "react";
2
+ interface PanelOptions {
3
+ side: "left" | "right";
4
+ width?: number;
5
+ defaultWidth: number;
6
+ onWidthChange?: (width: number) => void;
7
+ opened?: boolean;
8
+ defaultOpened: boolean;
9
+ onOpenedChange?: (opened: boolean) => void;
10
+ collapsed?: boolean;
11
+ defaultCollapsed?: boolean;
12
+ onCollapsedChange?: (collapsed: boolean) => void;
13
+ storageKey?: string;
14
+ min: number;
15
+ max: number;
16
+ }
17
+ export declare function useResizablePanel(options: PanelOptions): {
18
+ opened: boolean;
19
+ collapsed: boolean;
20
+ width: number;
21
+ setWidth: (value: number) => void;
22
+ setOpened: (value: boolean) => void;
23
+ setCollapsed: (value: boolean) => void;
24
+ resizeHandleRef: (node: HTMLDivElement | null) => void;
25
+ onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
26
+ onPointerMove: (event: PointerEvent<HTMLDivElement>) => void;
27
+ onPointerEnd: (event: PointerEvent<HTMLDivElement>) => void;
28
+ onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
29
+ };
30
+ export {};
@@ -0,0 +1,28 @@
1
+ import { type TimePickerProps as MantineTimePickerProps, type TimePickerStylesNames } from "@s-works/s-works-ui/dates";
2
+ export interface TimePickerProps extends MantineTimePickerProps {
3
+ size?: 'sm' | 'md';
4
+ appearance?: 'filled' | 'outlined';
5
+ }
6
+ export declare function resolveTimePickerClassNames(size: NonNullable<TimePickerProps['size']>, appearance: NonNullable<TimePickerProps['appearance']>, overrides?: Partial<Record<TimePickerStylesNames, string>>): {
7
+ root: string;
8
+ input: string;
9
+ fieldsGroup: string;
10
+ field: string;
11
+ section: string;
12
+ dropdown: string;
13
+ control: string;
14
+ presetControl: string;
15
+ label?: string | undefined;
16
+ required?: string | undefined;
17
+ description?: string | undefined;
18
+ error?: string | undefined;
19
+ wrapper?: string | undefined;
20
+ fieldsRoot?: string | undefined;
21
+ controlsList?: string | undefined;
22
+ controlsListGroup?: string | undefined;
23
+ presetsRoot?: string | undefined;
24
+ presetsGroup?: string | undefined;
25
+ presetsGroupLabel?: string | undefined;
26
+ scrollarea?: string | undefined;
27
+ };
28
+ export declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { type TitleProps as MantineTitleProps } from "@s-works/s-works-ui/core";
2
+ export type TitlePreset = 'h1-medium' | 'h2-medium' | 'h3-medium' | 'h3-regular' | 'h4-medium' | 'h5-regular' | 'h5-medium' | 'h5-semibold';
3
+ export interface TitleProps extends Omit<MantineTitleProps, 'size'> {
4
+ /** Figma typography style. Heading semantics can be overridden with order. */
5
+ preset?: TitlePreset;
6
+ }
7
+ export declare const titleBaseClassNames: {
8
+ root: string;
9
+ };
10
+ export declare const titlePresetClassNames: {
11
+ 'h1-medium': string;
12
+ 'h2-medium': string;
13
+ 'h3-medium': string;
14
+ 'h3-regular': string;
15
+ 'h4-medium': string;
16
+ 'h5-regular': string;
17
+ 'h5-medium': string;
18
+ 'h5-semibold': string;
19
+ };
20
+ export declare const Title: import("react").ForwardRefExoticComponent<TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,16 @@
1
+ import type { AlertProps as MantineAlertProps, AlertStylesNames } from "@s-works/s-works-ui/core";
2
+ export interface ToastProps extends MantineAlertProps {
3
+ status?: 'success' | 'warning' | 'error';
4
+ autoClose?: number | false;
5
+ }
6
+ export declare function resolveToastClassNames(overrides?: Partial<Record<AlertStylesNames, string>>): {
7
+ root: string;
8
+ message: string;
9
+ label?: string | undefined;
10
+ body?: string | undefined;
11
+ title?: string | undefined;
12
+ icon?: string | undefined;
13
+ wrapper?: string | undefined;
14
+ closeButton?: string | undefined;
15
+ };
16
+ export declare const Toast: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { type TooltipProps as MantineTooltipProps } from "@s-works/s-works-ui/core";
2
+ export interface TooltipProps extends MantineTooltipProps {
3
+ }
4
+ export declare const tooltipClassNames: {
5
+ tooltip: string;
6
+ };
7
+ export declare function resolveTooltipProps({ radius, color, events, ...props }: TooltipProps): TooltipProps;
8
+ export declare function resolveTooltipClassNames(overrides?: Partial<Record<import("@s-works/s-works-ui/core").TooltipStylesNames, string>>): {
9
+ tooltip: string;
10
+ arrow: string | undefined;
11
+ };
12
+ export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>> & {
13
+ Group: typeof import("@s-works/s-works-ui/core").TooltipGroup;
14
+ Floating: import("@s-works/s-works-ui/core").MantineComponent<{
15
+ props: import("@s-works/s-works-ui/core").TooltipFloatingProps;
16
+ ref: HTMLDivElement;
17
+ stylesNames: import("@s-works/s-works-ui/core").TooltipStylesNames;
18
+ vars: import("@s-works/s-works-ui/core").TooltipCssVariables;
19
+ }>;
20
+ };
@@ -1 +1,28 @@
1
1
  export { Button, type ButtonProps } from './components/Button/Button.js';
2
+ export { Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsItem } from './components/Breadcrumbs/Breadcrumbs.js';
3
+ export { Title, type TitleProps, type TitlePreset } from './components/Title/Title.js';
4
+ export { Tooltip, type TooltipProps } from './components/Tooltip/Tooltip.js';
5
+ export { AppShell, type AppShellProps, type AppShellSidebarState } from './components/AppShell/AppShell.js';
6
+ export { type AppShellTaskItemProps } from './components/AppShell/AppShellTaskItem.js';
7
+ export { Table, type TableProps } from './components/Table/Table.js';
8
+ export { Pagination, type PaginationProps } from './components/Pagination/Pagination.js';
9
+ export { Radio, type RadioProps } from './components/Radio/Radio.js';
10
+ export { Checkbox, type CheckboxProps } from './components/Checkbox/Checkbox.js';
11
+ export { Switch, type SwitchProps } from './components/Switch/Switch.js';
12
+ export { Alert, type AlertProps, type AlertStatus } from './components/Alert/Alert.js';
13
+ export { Toast, type ToastProps } from './components/Toast/Toast.js';
14
+ export { Modal, type ModalProps } from './components/Modal/Modal.js';
15
+ export { DateInput, type DateInputProps, type DateInputRangeProps, type DateInputSize, type DateInputAppearance } from './components/DateInput/DateInput.js';
16
+ export { DatePicker, type DatePickerProps } from './components/DatePicker/DatePicker.js';
17
+ export { TimePicker, type TimePickerProps } from './components/TimePicker/TimePicker.js';
18
+ export { Tabs, type TabsProps, type TabsVariant } from './components/Tabs/Tabs.js';
19
+ export { Select, type SelectProps, type SelectSize, type SelectAppearance, type SelectMenuTone } from './components/Select/Select.js';
20
+ export { TagsInput, type TagsInputProps, type TagsInputSize, type TagsInputSlot } from './components/TagsInput/TagsInput.js';
21
+ export { InputBase, type InputBaseProps, type InputBaseSize, type InputBaseAppearance } from './components/InputBase/InputBase.js';
22
+ export { Tag, type TagProps, type TagSize, type TagTone, type TagVariant, type TagShape } from './components/Tag/Tag.js';
23
+ export { CloseButton, type CloseButtonProps } from './components/CloseButton/CloseButton.js';
24
+ export { Loader, type LoaderProps } from './components/Loader/Loader.js';
25
+ export { Layout, type LayoutProps } from './components/Layout/Layout.js';
26
+ export { ThreeColumnLayout, type ThreeColumnLayoutProps, type ThreeColumnLayoutControls } from './components/ThreeColumnLayout/ThreeColumnLayout.js';
27
+ export { Space, type SpaceProps } from './components/Space/Space.js';
28
+ export { Skeleton, type SkeletonProps } from './components/Skeleton/Skeleton.js';
@@ -1 +1,28 @@
1
1
  export { Button, type ButtonProps } from './components/Button/Button.js';
2
+ export { Breadcrumbs, type BreadcrumbsProps, type BreadcrumbsItem } from './components/Breadcrumbs/Breadcrumbs.js';
3
+ export { Title, type TitleProps, type TitlePreset } from './components/Title/Title.js';
4
+ export { Tooltip, type TooltipProps } from './components/Tooltip/Tooltip.js';
5
+ export { AppShell, type AppShellProps, type AppShellSidebarState } from './components/AppShell/AppShell.js';
6
+ export { type AppShellTaskItemProps } from './components/AppShell/AppShellTaskItem.js';
7
+ export { Table, type TableProps } from './components/Table/Table.js';
8
+ export { Pagination, type PaginationProps } from './components/Pagination/Pagination.js';
9
+ export { Radio, type RadioProps } from './components/Radio/Radio.js';
10
+ export { Checkbox, type CheckboxProps } from './components/Checkbox/Checkbox.js';
11
+ export { Switch, type SwitchProps } from './components/Switch/Switch.js';
12
+ export { Alert, type AlertProps, type AlertStatus } from './components/Alert/Alert.js';
13
+ export { Toast, type ToastProps } from './components/Toast/Toast.js';
14
+ export { Modal, type ModalProps } from './components/Modal/Modal.js';
15
+ export { DateInput, type DateInputProps, type DateInputRangeProps, type DateInputSize, type DateInputAppearance } from './components/DateInput/DateInput.js';
16
+ export { DatePicker, type DatePickerProps } from './components/DatePicker/DatePicker.js';
17
+ export { TimePicker, type TimePickerProps } from './components/TimePicker/TimePicker.js';
18
+ export { Tabs, type TabsProps, type TabsVariant } from './components/Tabs/Tabs.js';
19
+ export { Select, type SelectProps, type SelectSize, type SelectAppearance, type SelectMenuTone } from './components/Select/Select.js';
20
+ export { TagsInput, type TagsInputProps, type TagsInputSize, type TagsInputSlot } from './components/TagsInput/TagsInput.js';
21
+ export { InputBase, type InputBaseProps, type InputBaseSize, type InputBaseAppearance } from './components/InputBase/InputBase.js';
22
+ export { Tag, type TagProps, type TagSize, type TagTone, type TagVariant, type TagShape } from './components/Tag/Tag.js';
23
+ export { CloseButton, type CloseButtonProps } from './components/CloseButton/CloseButton.js';
24
+ export { Loader, type LoaderProps } from './components/Loader/Loader.js';
25
+ export { Layout, type LayoutProps } from './components/Layout/Layout.js';
26
+ export { ThreeColumnLayout, type ThreeColumnLayoutProps, type ThreeColumnLayoutControls } from './components/ThreeColumnLayout/ThreeColumnLayout.js';
27
+ export { Space, type SpaceProps } from './components/Space/Space.js';
28
+ export { Skeleton, type SkeletonProps } from './components/Skeleton/Skeleton.js';