@star-insure/sdk 3.0.2 → 3.1.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.
@@ -9,6 +9,7 @@ interface Props {
9
9
  children: React.ReactNode;
10
10
  disabled?: boolean;
11
11
  as?: 'link' | 'button' | 'a';
12
+ small?: boolean;
12
13
  }
13
- export default function Button({ className, href, target, onClick, type, children, status, disabled, as, }: Props): JSX.Element;
14
+ export default function Button({ className, href, target, onClick, type, children, status, disabled, as, small, }: Props): JSX.Element;
14
15
  export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TPageHeaderAction } from "../../types";
3
+ export default function Action({ title, href, as, target, type, onClick }: TPageHeaderAction): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare function BackButton({ back }: {
3
+ back?: string | boolean;
4
+ }): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ declare type Props = {
3
+ children: React.ReactNode;
4
+ onClose: Function;
5
+ active: boolean;
6
+ };
7
+ declare function Dropdown({ children, onClose, active }: Props): JSX.Element;
8
+ declare namespace Dropdown {
9
+ var Title: "button";
10
+ var Content: "form";
11
+ }
12
+ export default Dropdown;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FilterOption } from "../../types";
3
+ export declare function FilterItem({ filter }: {
4
+ filter: FilterOption;
5
+ path?: string;
6
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { FilterOption } from "../../types";
3
+ export declare function FilterOptions({ filterOptions }: {
4
+ filterOptions: FilterOption[];
5
+ }): JSX.Element;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FilterOption, TPageHeaderAction } from '../../types';
3
+ interface Props {
4
+ title: string;
5
+ search?: string;
6
+ className?: string;
7
+ innerClassName?: string;
8
+ back?: boolean | string;
9
+ actions?: TPageHeaderAction[];
10
+ backText?: string;
11
+ filterOptions?: FilterOption[];
12
+ }
13
+ export default function PageHeader({ title, search, className, innerClassName, back, actions, filterOptions, }: Props): JSX.Element;
14
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export default function SearchBar({ search, active, onActive, placeholder }: {
3
+ search?: string;
4
+ active: boolean;
5
+ onActive: Function;
6
+ placeholder?: string;
7
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export { default as PageHeader } from './PageHeader';
@@ -0,0 +1,19 @@
1
+ import { Page, PageProps } from '@inertiajs/core';
2
+ import { AuthContext, Breadcrumb, Environment } from '../types';
3
+ /**
4
+ * Add custom props here, that are defined in `app/Http/Middleware/HandleInertiaRequests.php`
5
+ */
6
+ declare type CustomPageProps = {
7
+ env: Environment;
8
+ breadcrumbs: Breadcrumb[];
9
+ links: Record<string, string>;
10
+ access_token?: string;
11
+ impersonate_id?: number;
12
+ csrf_token?: string;
13
+ auth: AuthContext;
14
+ } & PageProps;
15
+ /**
16
+ * A wrapper around Inertia's usePage function that gives better type-safety
17
+ */
18
+ export declare function usePage<T>(): Page<CustomPageProps & T>;
19
+ export {};
@@ -1132,8 +1132,10 @@ function Button(_ref) {
1132
1132
  status = _ref$status === void 0 ? 'default' : _ref$status,
1133
1133
  _ref$disabled = _ref.disabled,
1134
1134
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
1135
- as = _ref.as;
1136
- var baseClasses = 'font-black inline-flex items-center gap-3 justify-center text-white text-center px-5 py-2 rounded-md min-w-[120px] transition-all hover:opacity-75';
1135
+ as = _ref.as,
1136
+ _ref$small = _ref.small,
1137
+ small = _ref$small === void 0 ? false : _ref$small;
1138
+ var baseClasses = small ? 'font-bold text-sm inline-flex items-center gap-3 justify-center text-white text-center px-3 py-1 rounded min-w-[80px] transition-all hover:opacity-75' : 'font-black inline-flex items-center gap-3 justify-center text-white text-center px-5 py-2 rounded-md min-w-[120px] transition-all hover:opacity-75';
1137
1139
  var statusClass = status === 'primary' && 'bg-teal' || status === 'danger' && 'bg-red-500' || status === 'warning' && 'bg-yellow-400' || status === 'info' && 'bg-blue-400' || 'bg-gray-600';
1138
1140
  var classes = (className != null ? className : '') + " " + baseClasses + " " + statusClass;
1139
1141