@app-studio/web 0.8.71 → 0.8.73

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 (43) hide show
  1. package/dist/components/Form/Password/Password/Password.state.d.ts +1 -1
  2. package/dist/components/HoverCard/HoverCard/HoverCard.props.d.ts +65 -0
  3. package/dist/components/HoverCard/HoverCard/HoverCard.state.d.ts +5 -0
  4. package/dist/components/HoverCard/HoverCard/HoverCard.style.d.ts +3 -0
  5. package/dist/components/HoverCard/HoverCard/HoverCard.type.d.ts +6 -0
  6. package/dist/components/HoverCard/HoverCard/HoverCard.view.d.ts +10 -0
  7. package/dist/components/HoverCard/HoverCard.d.ts +2 -0
  8. package/dist/components/HoverCard/examples/default.d.ts +2 -0
  9. package/dist/components/HoverCard/examples/index.d.ts +1 -0
  10. package/dist/components/Slider/Slider/Slider.props.d.ts +112 -0
  11. package/dist/components/Slider/Slider/Slider.state.d.ts +14 -0
  12. package/dist/components/Slider/Slider/Slider.style.d.ts +11 -0
  13. package/dist/components/Slider/Slider/Slider.type.d.ts +18 -0
  14. package/dist/components/Slider/Slider/Slider.view.d.ts +3 -0
  15. package/dist/components/Slider/Slider.d.ts +6 -0
  16. package/dist/components/Slider/SliderDemo.d.ts +3 -0
  17. package/dist/components/Slider/examples/controlled.d.ts +2 -0
  18. package/dist/components/Slider/examples/custom.d.ts +2 -0
  19. package/dist/components/Slider/examples/default.d.ts +2 -0
  20. package/dist/components/Slider/examples/disabled.d.ts +2 -0
  21. package/dist/components/Slider/examples/range.d.ts +2 -0
  22. package/dist/components/Slider/examples/shapes.d.ts +2 -0
  23. package/dist/components/Slider/examples/sizes.d.ts +2 -0
  24. package/dist/components/Slider/examples/stepValues.d.ts +3 -0
  25. package/dist/components/Slider/examples/tooltip.d.ts +2 -0
  26. package/dist/components/Slider/examples/variants.d.ts +2 -0
  27. package/dist/components/Slider/examples/vertical.d.ts +2 -0
  28. package/dist/components/Slider/index.d.ts +1 -0
  29. package/dist/components/Table/Table.d.ts +8 -8
  30. package/dist/components/index.d.ts +3 -0
  31. package/dist/pages/hoverCard.page.d.ts +3 -0
  32. package/dist/pages/slider.page.d.ts +3 -0
  33. package/dist/web.cjs.development.js +714 -13
  34. package/dist/web.cjs.development.js.map +1 -1
  35. package/dist/web.cjs.production.min.js +1 -1
  36. package/dist/web.cjs.production.min.js.map +1 -1
  37. package/dist/web.esm.js +713 -14
  38. package/dist/web.esm.js.map +1 -1
  39. package/dist/web.umd.development.js +717 -17
  40. package/dist/web.umd.development.js.map +1 -1
  41. package/dist/web.umd.production.min.js +1 -1
  42. package/dist/web.umd.production.min.js.map +1 -1
  43. package/package.json +1 -1
@@ -29,7 +29,7 @@ export declare const usePasswordState: (props: PasswordProps) => {
29
29
  onClick?: (() => void) | undefined;
30
30
  onFocus?: (() => void) | undefined;
31
31
  size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
32
- shadow?: import("react").CSSProperties | import("app-studio").Shadow | import("../../../../utils/elevation").Elevation | undefined;
32
+ shadow?: import("app-studio").Shadow | import("../../../../utils/elevation").Elevation | import("app-studio").ViewProps | undefined;
33
33
  shape?: "default" | "sharp" | "rounded" | "pillShaped" | undefined;
34
34
  views?: import("../../TextField/TextField/TextField.type").TextFieldStyles | undefined;
35
35
  variant?: "outline" | "default" | "none" | undefined;
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import { ViewProps } from 'app-studio';
3
+ export interface HoverCardProps {
4
+ /**
5
+ * The content of the HoverCard
6
+ */
7
+ children?: React.ReactNode;
8
+ /**
9
+ * Custom styles for different parts of the HoverCard
10
+ */
11
+ views?: {
12
+ container?: ViewProps;
13
+ content?: ViewProps;
14
+ };
15
+ }
16
+ export interface HoverCardTriggerProps {
17
+ /**
18
+ * The element that triggers the hover card
19
+ */
20
+ children: React.ReactNode;
21
+ /**
22
+ * Custom styles for the trigger element
23
+ */
24
+ views?: {
25
+ container?: ViewProps;
26
+ };
27
+ /**
28
+ * Additional props to be spread to the trigger element
29
+ */
30
+ [key: string]: any;
31
+ }
32
+ export interface HoverCardContentProps {
33
+ /**
34
+ * The content to be displayed in the hover card
35
+ */
36
+ children: React.ReactNode;
37
+ /**
38
+ * Custom styles for the content container
39
+ */
40
+ views?: {
41
+ container?: ViewProps;
42
+ };
43
+ /**
44
+ * The side of the trigger to render the content
45
+ */
46
+ side?: 'top' | 'right' | 'bottom' | 'left';
47
+ /**
48
+ * The alignment of the content relative to the trigger
49
+ */
50
+ align?: 'start' | 'center' | 'end';
51
+ /**
52
+ * Additional props to be spread to the content element
53
+ */
54
+ [key: string]: any;
55
+ }
56
+ export interface HoverCardType extends React.FC<HoverCardProps> {
57
+ /**
58
+ * The trigger element that will show the hover card on hover
59
+ */
60
+ Trigger: React.FC<HoverCardTriggerProps>;
61
+ /**
62
+ * The content that will be displayed when hovering over the trigger
63
+ */
64
+ Content: React.FC<HoverCardContentProps>;
65
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const useHoverCardState: () => {
3
+ isOpen: boolean;
4
+ setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { ViewProps } from 'app-studio';
2
+ import { Alignment, Side } from './HoverCard.type';
3
+ export declare const ContentPositions: Record<Side, (align: Alignment) => ViewProps>;
@@ -0,0 +1,6 @@
1
+ export declare type Side = 'top' | 'right' | 'bottom' | 'left';
2
+ export declare type Alignment = 'start' | 'center' | 'end';
3
+ export interface HoverCardContextType {
4
+ isOpen: boolean;
5
+ setIsOpen: (isOpen: boolean) => void;
6
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { HoverCardContextType } from './HoverCard.type';
3
+ import { HoverCardContentProps, HoverCardTriggerProps } from './HoverCard.props';
4
+ export declare const HoverCardProvider: React.FC<{
5
+ children: React.ReactNode;
6
+ value: HoverCardContextType;
7
+ }>;
8
+ export declare const useHoverCardContext: () => HoverCardContextType;
9
+ export declare const HoverCardTrigger: React.FC<HoverCardTriggerProps>;
10
+ export declare const HoverCardContent: React.FC<HoverCardContentProps>;
@@ -0,0 +1,2 @@
1
+ import { HoverCardType } from './HoverCard/HoverCard.props';
2
+ export declare const HoverCard: HoverCardType;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DefaultHoverCard: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './default';
@@ -0,0 +1,112 @@
1
+ /// <reference types="react" />
2
+ import { InputProps, ViewProps } from 'app-studio';
3
+ import { Orientation, Shape, Size, SliderStyles, Variant } from './Slider.type';
4
+ export interface SliderProps extends Omit<InputProps, 'size' | 'onChange'> {
5
+ /**
6
+ * The minimum value of the slider
7
+ */
8
+ min?: number;
9
+ /**
10
+ * The maximum value of the slider
11
+ */
12
+ max?: number;
13
+ /**
14
+ * The current value of the slider
15
+ */
16
+ value?: number;
17
+ /**
18
+ * The default value of the slider (uncontrolled)
19
+ */
20
+ defaultValue?: number;
21
+ /**
22
+ * The step value for the slider
23
+ */
24
+ step?: number;
25
+ /**
26
+ * Array of specific values to use as steps
27
+ * When provided, the slider will only allow these values
28
+ */
29
+ stepValues?: number[];
30
+ /**
31
+ * The shape of the slider
32
+ */
33
+ shape?: Shape;
34
+ /**
35
+ * The size of the slider
36
+ */
37
+ size?: Size;
38
+ /**
39
+ * The variant of the slider
40
+ */
41
+ variant?: Variant;
42
+ /**
43
+ * The orientation of the slider
44
+ */
45
+ orientation?: Orientation;
46
+ /**
47
+ * Whether the slider is disabled
48
+ */
49
+ isDisabled?: boolean;
50
+ /**
51
+ * Whether to show the current value label
52
+ */
53
+ showValue?: boolean;
54
+ /**
55
+ * If true, a tooltip showing the current value will appear on hover/drag
56
+ */
57
+ showTooltip?: boolean;
58
+ /**
59
+ * Custom label for the slider
60
+ */
61
+ label?: React.ReactNode;
62
+ /**
63
+ * Helper text to display below the slider
64
+ */
65
+ helperText?: string;
66
+ /**
67
+ * Callback function when the value changes
68
+ */
69
+ onChange?: (value: number) => void;
70
+ /**
71
+ * Callback function when the slider is being dragged
72
+ */
73
+ onDrag?: (value: number) => void;
74
+ /**
75
+ * Optional color scheme to apply (e.g., 'theme.primary')
76
+ */
77
+ colorScheme?: string;
78
+ /**
79
+ * Custom styles for the slider components
80
+ */
81
+ views?: SliderStyles;
82
+ /**
83
+ * Shadow effect for the slider
84
+ */
85
+ shadow?: ViewProps;
86
+ /**
87
+ * Aria-label for accessibility
88
+ */
89
+ ariaLabel?: string;
90
+ }
91
+ export interface SliderViewProps extends SliderProps {
92
+ /** The current internal value being displayed/manipulated. */
93
+ currentValue?: number;
94
+ /** Flag indicating if the thumb is being dragged. */
95
+ isDragging: boolean;
96
+ /** Flag indicating if the component is hovered. */
97
+ isHovered: boolean;
98
+ /** Reference to the track element. */
99
+ trackRef: React.RefObject<HTMLDivElement>;
100
+ /** Reference to the thumb element. */
101
+ thumbRef: React.RefObject<HTMLDivElement>;
102
+ /** Handler for mouse down / touch start on the thumb. */
103
+ handleThumbMouseDown: (event: React.MouseEvent | React.TouchEvent) => void;
104
+ /** Handler for mouse down / touch start on the track. */
105
+ handleTrackMouseDown: (event: React.MouseEvent | React.TouchEvent) => void;
106
+ /** Handler for keyboard interaction on the thumb. */
107
+ handleKeyDown: (event: React.KeyboardEvent) => void;
108
+ /** The calculated position percentage for the thumb. */
109
+ thumbPositionPercent: number;
110
+ /** Callback to set hover state */
111
+ setIsHovered: (hovered: boolean) => void;
112
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { SliderProps } from './Slider.props';
3
+ export declare const useSliderState: ({ min, max, step, value: controlledValue, defaultValue, onChange, onDrag, orientation, isDisabled, stepValues, }: SliderProps) => {
4
+ currentValue: number;
5
+ isDragging: boolean;
6
+ isHovered: boolean;
7
+ setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
8
+ trackRef: React.RefObject<HTMLDivElement>;
9
+ thumbRef: React.RefObject<HTMLDivElement>;
10
+ handleThumbMouseDown: (event: React.MouseEvent | React.TouchEvent) => void;
11
+ handleTrackMouseDown: (event: React.MouseEvent | React.TouchEvent) => void;
12
+ handleKeyDown: (event: React.KeyboardEvent) => void;
13
+ thumbPositionPercent: number;
14
+ };
@@ -0,0 +1,11 @@
1
+ import { ViewProps } from 'app-studio';
2
+ import { Orientation, Shape, Size, Variant } from './Slider.type';
3
+ export declare const SliderSizes: Record<Size, ViewProps>;
4
+ export declare const ThumbSizes: Record<Size, ViewProps>;
5
+ export declare const SliderShapes: Record<Shape, number | string>;
6
+ export declare const SliderVariants: Record<Variant, ViewProps>;
7
+ export declare const EnhancedSliderSizes: Record<Size, {
8
+ trackCrossAxisSize: number;
9
+ thumbSize: number;
10
+ }>;
11
+ export declare const OrientationStyles: Record<Orientation, ViewProps>;
@@ -0,0 +1,18 @@
1
+ import { ViewProps, TextProps } from 'app-studio';
2
+ export declare type Shape = 'sharp' | 'rounded' | 'pillShaped';
3
+ export declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ export declare type Variant = 'default' | 'outline';
5
+ export declare type Orientation = 'horizontal' | 'vertical';
6
+ export interface SliderStyles {
7
+ container?: ViewProps;
8
+ track?: ViewProps;
9
+ progress?: ViewProps;
10
+ filledTrack?: ViewProps;
11
+ thumb?: ViewProps;
12
+ label?: ViewProps;
13
+ valueLabel?: ViewProps;
14
+ stepMarks?: ViewProps;
15
+ tooltip?: ViewProps & {
16
+ text?: TextProps;
17
+ };
18
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SliderViewProps } from './Slider.props';
3
+ export declare const SliderView: React.FC<SliderViewProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SliderProps } from './Slider/Slider.props';
3
+ /**
4
+ * Slider allows users to select a value from a range by moving a handle.
5
+ */
6
+ export declare const Slider: React.FC<SliderProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SliderDemo: () => React.JSX.Element;
3
+ export default SliderDemo;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ControlledDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CustomDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DefaultDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DisabledDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const RangeDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ShapesDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SizesDemo: () => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const StepValuesDemo: () => React.JSX.Element;
3
+ export declare const PricingTiersDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TooltipDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const VariantsDemo: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const VerticalDemo: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Slider';
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import { TableLayoutProps } from './Table/Table.props';
3
3
  export declare const Table: {
4
4
  ({ children, views, onClick }: TableLayoutProps): React.JSX.Element;
5
- Head: React.FC<any>;
6
- HeadCell: React.FC<any>;
7
- Body: React.FC<any>;
8
- Row: React.FC<any>;
9
- Cell: React.FC<any>;
10
- Footer: React.FC<any>;
11
- Caption: React.FC<any>;
12
- Container: React.FC<any>;
5
+ Head: React.FC<import("app-studio").ViewProps>;
6
+ HeadCell: React.FC<import("app-studio").ViewProps>;
7
+ Body: React.FC<import("app-studio").ViewProps>;
8
+ Row: React.FC<import("app-studio").ViewProps>;
9
+ Cell: React.FC<import("app-studio").ViewProps>;
10
+ Footer: React.FC<import("app-studio").ViewProps>;
11
+ Caption: React.FC<import("app-studio").ViewProps>;
12
+ Container: React.FC<import("app-studio").ViewProps>;
13
13
  Template: React.FC<import("./Table/Table.props").TableViewProps>;
14
14
  };
@@ -15,6 +15,7 @@ export * from './Form/DatePicker/DatePicker';
15
15
  export * from './Form/Password/Password';
16
16
  export * from './Form/ComboBox/ComboBox';
17
17
  export * from './Formik';
18
+ export * from './Slider';
18
19
  export * from './Layout/Center/Center';
19
20
  export * from './Layout/Horizontal/Horizontal';
20
21
  export * from './Layout/Vertical/Vertical';
@@ -32,6 +33,7 @@ export * as Icon from './Icon/Icon';
32
33
  export * from './Toggle/Toggle';
33
34
  export * from './ToggleGroup/ToggleGroup';
34
35
  export * from './DragAndDrop/DragAndDrop';
36
+ export * from './HoverCard/HoverCard';
35
37
  export * from './Alert/Alert/Alert.props';
36
38
  export * from './AspectRatio/AspectRatio/AspectRatio.props';
37
39
  export * from './Avatar/Avatar/Avatar.props';
@@ -60,3 +62,4 @@ export * from './Tabs/Tabs/Tabs.props';
60
62
  export * from './Text/Text/Text.props';
61
63
  export * from './Toggle/Toggle/Toggle.props';
62
64
  export * from './ToggleGroup/ToggleGroup/ToggleGroup.props';
65
+ export * from './HoverCard/HoverCard/HoverCard.props';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const HoverCardPage: () => React.JSX.Element;
3
+ export default HoverCardPage;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const LinkPage: () => React.JSX.Element;
3
+ export default LinkPage;