@caspeco/casper-ui-library 4.1.0 → 5.0.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.
- package/dist/components/box/box.d.ts +3 -3
- package/dist/components/box/box.d.ts.map +1 -1
- package/dist/components/button/button.d.ts +3 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts +1 -1
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/date-picker/date-range-picker.d.ts +1 -1
- package/dist/components/date-picker/date-week-picker.d.ts +1 -1
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/form-control/form-control.d.ts +1 -1
- package/dist/components/form-control/form-error-message.d.ts +1 -1
- package/dist/components/form-control/form-helper-text.d.ts +1 -1
- package/dist/components/form-control/form-label.d.ts +1 -1
- package/dist/components/grid/grid-item.d.ts +1 -1
- package/dist/components/grid/grid.d.ts +1 -1
- package/dist/components/heading/heading.d.ts +1 -1
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/image/image.d.ts +1 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/list/list.d.ts +1 -1
- package/dist/components/message/message.d.ts +1 -1
- package/dist/components/modal/modal-body.d.ts +1 -1
- package/dist/components/modal/modal-close-button.d.ts +1 -1
- package/dist/components/modal/modal-footer.d.ts +1 -1
- package/dist/components/modal/modal-header.d.ts +1 -1
- package/dist/components/navigation-list/navigation-list-item.d.ts +2 -2
- package/dist/components/navigation-list/navigation-list.d.ts +1 -1
- package/dist/components/paginator/paginator.composition.d.ts.map +1 -1
- package/dist/components/paginator/paginator.d.ts +14 -21
- package/dist/components/paginator/paginator.d.ts.map +1 -1
- package/dist/components/paginator/paginator.js +34 -45
- package/dist/components/paginator/translations.d.ts +8 -33
- package/dist/components/paginator/translations.d.ts.map +1 -1
- package/dist/components/paginator/translations.js +7 -11
- package/dist/components/radio/radio-addon.d.ts +1 -1
- package/dist/components/radio/radio-card.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio-group/radio-group.d.ts +1 -1
- package/dist/components/segmented-control/segmented-control.d.ts +1 -1
- package/dist/components/skeleton/skeleton-text.d.ts +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/stack/stack.d.ts +3 -3
- package/dist/components/stack/stack.d.ts.map +1 -1
- package/dist/components/stepper/stepper.d.ts +1 -1
- package/dist/components/table/table-context.d.ts.map +1 -1
- package/dist/components/table/table-context.js +46 -42
- package/dist/components/tabs/tab-list.d.ts +1 -1
- package/dist/components/tabs/tab-panel.d.ts +1 -1
- package/dist/components/tabs/tab-panels.d.ts +1 -1
- package/dist/components/tabs/tab.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/text/text.d.ts +1 -1
- package/dist/components/toast/toast.d.ts +1 -1
- package/dist/components/toggle-button/toggle-button.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/theme/theme-provider.d.ts +1 -1
- package/dist/theme/theme-style-props.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/table/use-controllable-state.d.ts +0 -28
- package/dist/components/table/use-controllable-state.d.ts.map +0 -1
- package/dist/components/table/use-controllable-state.js +0 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ThemeStyleProps } from '../../theme/index.js';
|
|
2
|
-
import { BoxProps as ChakraBoxProps } from '@chakra-ui/react';
|
|
2
|
+
import { BoxProps as ChakraBoxProps, ComponentWithAs } from '@chakra-ui/react';
|
|
3
3
|
export type BoxProps = ThemeStyleProps & Pick<ChakraBoxProps, "children" | "as">;
|
|
4
4
|
/**
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/box
|
|
6
6
|
*/
|
|
7
|
-
export declare const Box:
|
|
7
|
+
export declare const Box: ComponentWithAs<"div", BoxProps>;
|
|
8
8
|
//# sourceMappingURL=box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../lib/components/box/box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../lib/components/box/box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAEN,KAAK,QAAQ,IAAI,cAAc,EAC/B,KAAK,eAAe,EAEpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,QAAQ,GAAG,eAAe,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,IAAI,CAAC,CAAC;AAEjF;;GAEG;AAGH,eAAO,MAAM,GAAG,EAMV,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ComponentWithAs } from '@chakra-ui/react';
|
|
1
2
|
import { ButtonProps } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Button component is used to trigger an action or event,
|
|
4
5
|
* such as submitting a form, opening a Dialog, canceling an action, or performing a delete operation.
|
|
5
6
|
*
|
|
6
|
-
* @see Docs https://
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/button
|
|
7
8
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/button
|
|
8
9
|
*/
|
|
9
|
-
export declare const Button:
|
|
10
|
+
export declare const Button: ComponentWithAs<"button", ButtonProps>;
|
|
10
11
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../lib/components/button/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsC,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;GAMG;AAGH,eAAO,MAAM,MAAM,EAqCb,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { CheckboxProps } from './types.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Used in forms when a user needs to select multiple values from several options.
|
|
5
5
|
*
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/checkbox
|
|
7
7
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/
|
|
8
8
|
*/
|
|
9
9
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,7 +3,7 @@ import { CheckboxGroupProps } from './types.js';
|
|
|
3
3
|
* Used for multiple checkboxes which are bound in one group,
|
|
4
4
|
* and it indicates whether one or more options are selected.
|
|
5
5
|
*
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/checkbox-group
|
|
7
7
|
*/
|
|
8
8
|
export declare function CheckboxGroup({ children, ...props }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { ComboboxProps } from './types.js';
|
|
|
4
4
|
* are many and can benefit from having a search filter. Can be used as both single select
|
|
5
5
|
* and multiselect.
|
|
6
6
|
*
|
|
7
|
-
* @see Docs https://
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/combobox
|
|
8
8
|
*/
|
|
9
9
|
export declare function Combobox({ id, label, isSingleSelect, selectedItems, locale, size, variant, asPlainText, onSearch, items, maxVisibleItems, onChange, onBlur, isDisabled, isReadOnly, isRequired, placeholder, isInvalid, footerContent, popoverWidth, popoverPlacement, collapsed, ...props }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { DatePickerProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* A datepicker that selects a single date
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/date-picker
|
|
6
6
|
*/
|
|
7
7
|
export declare const DatePicker: ({ localeString, canSelectPastDates, dots, isExpanded, markSundayRed, onMonthChange, weekNumbers, showDaysOutsideMonth, selectedMonth, onDateChange, selectedDate, shouldDisableDate, strikeThroughDates, isDisabled, redDays, disablePastMonths, disableBackwardNavigation, disableForwardNavigation, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { DateRangePickerProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* A datepicker that selects a range of dates
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/date-picker#daterangepicker
|
|
6
6
|
*/
|
|
7
7
|
export declare const DateRangePicker: ({ localeString, canSelectPastDates, dateRange, dots, isExpanded, markSundayRed, onMonthChange, onRangeChange, weekNumbers, showDaysOutsideMonth, selectedMonth, isDisabled, redDays, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=date-range-picker.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { DateWeekPickerProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* A datepicker that selects a week
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/date-picker#dateweekpicker
|
|
6
6
|
*/
|
|
7
7
|
export declare const DateWeekPicker: ({ localeString, canSelectPastDates, dots, isExpanded, markSundayRed, onMonthChange, selectedMonth, onDateChange, selectedDate, isDisabled, redDays, }: DateWeekPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=date-week-picker.d.ts.map
|
|
@@ -5,7 +5,7 @@ export type DividerProps = Pick<ChakraDividerProps, "orientation"> & ThemeStyleP
|
|
|
5
5
|
* Layout component used to visually separate content in a list or group.
|
|
6
6
|
* It displays a thin horizontal or vertical line, and renders a hr tag.
|
|
7
7
|
*
|
|
8
|
-
* @see Docs https://
|
|
8
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/divider
|
|
9
9
|
*/
|
|
10
10
|
export declare function Divider({ borderColor, orientation, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=divider.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { DrawerProps } from './types.js';
|
|
|
4
4
|
* It can be useful when you need users to complete a task
|
|
5
5
|
* or view some details without leaving the current page.
|
|
6
6
|
*
|
|
7
|
-
* @see Docs https://
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/drawer
|
|
8
8
|
* @see Inspiration https://v2.chakra-ui.com/community/recipes/horizontal-collapse
|
|
9
9
|
*/
|
|
10
10
|
export declare function Drawer({ children, isOpen, onClose, isInline, closeOnEsc, closeOnOverlayClick, autoFocus, placement, size, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,7 @@ export type FormControlProps = ChakraFormControlProperties & ThemeStyleProps;
|
|
|
6
6
|
* FormControl provides context such as isInvalid, isDisabled, and isRequired to form elements.
|
|
7
7
|
* Commonly used in form elements such as input, select, textarea, etc.
|
|
8
8
|
*
|
|
9
|
-
* @see Docs https://
|
|
9
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/form-control
|
|
10
10
|
*/
|
|
11
11
|
export declare function FormControl({ children, ...props }: FormControlProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=form-control.d.ts.map
|
|
@@ -5,7 +5,7 @@ export type FormErrorMessageProps = ChakraFormLabelProperties & ThemeStyleProps;
|
|
|
5
5
|
/**
|
|
6
6
|
* Used to provide feedback about an invalid input, and suggest clear instructions on how to fix it.
|
|
7
7
|
*
|
|
8
|
-
* @see Docs https://
|
|
8
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/form-control
|
|
9
9
|
*/
|
|
10
10
|
export declare function FormErrorMessage({ children, ...props }: FormErrorMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -6,7 +6,7 @@ export type FormHelperTextProperties = ChakraFormHelpTextProperties & ThemeStyle
|
|
|
6
6
|
* Assistive component that conveys additional guidance about the field,
|
|
7
7
|
* such as how it will be used and what types in values should be provided.
|
|
8
8
|
*
|
|
9
|
-
* @see Docs https://
|
|
9
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/form-control
|
|
10
10
|
*/
|
|
11
11
|
export declare function FormHelperText({ children, ...props }: FormHelperTextProperties): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -12,7 +12,7 @@ export type FormLabelProps = ChakraFormLabelProperties & ThemeStyleProps & Custo
|
|
|
12
12
|
* It is used to inform users as to what information is requested for a form field.
|
|
13
13
|
* Every form field should have a form label.
|
|
14
14
|
*
|
|
15
|
-
* @see Docs https://
|
|
15
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/form-control
|
|
16
16
|
*/
|
|
17
17
|
export declare function FormLabel({ children, icon, ...props }: FormLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -2,7 +2,7 @@ import { ThemeStyleProps } from '../../theme/index.js';
|
|
|
2
2
|
import { GridItemProps as ChakraGridItemProps } from '@chakra-ui/react';
|
|
3
3
|
export type GridItemProps = Pick<ChakraGridItemProps, "children" | "area" | "rowSpan" | "rowStart" | "rowEnd" | "colSpan" | "colStart" | "colEnd" | "placeContent"> & ThemeStyleProps;
|
|
4
4
|
/**
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/grid
|
|
6
6
|
*/
|
|
7
7
|
export declare function GridItem({ children, ...props }: GridItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=grid-item.d.ts.map
|
|
@@ -5,7 +5,7 @@ export type GridProps = Pick<ChakraGridProps, "children" | "autoColumns" | "auto
|
|
|
5
5
|
* Used to create grid layouts.
|
|
6
6
|
* It renders a div with display: grid and comes with helpful style shorthand.
|
|
7
7
|
*
|
|
8
|
-
* @see Docs https://
|
|
8
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/grid
|
|
9
9
|
*/
|
|
10
10
|
export declare function Grid({ children, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -9,7 +9,7 @@ export type HeadingProps = ThemeStyleProps & ChakraHeadingProperties & CustomPro
|
|
|
9
9
|
/**
|
|
10
10
|
* Heading is used to render semantic HTML heading elements.
|
|
11
11
|
*
|
|
12
|
-
* @see Docs https://
|
|
12
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/heading
|
|
13
13
|
*/
|
|
14
14
|
export declare function Heading({ color, fontSize, fontWeight, children, fontFamily, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Button component with only an icon visible, used to trigger an action or event,
|
|
3
3
|
* such as submitting a form, opening a Dialog, canceling an action, or performing a delete operation.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/icon-button
|
|
6
6
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/button
|
|
7
7
|
*/
|
|
8
8
|
export declare const IconButton: import('react').ForwardRefExoticComponent<{
|
|
@@ -4,7 +4,7 @@ export type ImageProps = Pick<ChakraImageProps, "alt" | "src" | "srcSet" | "fit"
|
|
|
4
4
|
/**
|
|
5
5
|
* Renders an image with support for fallbacks.
|
|
6
6
|
*
|
|
7
|
-
* @see Docs https://
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/image
|
|
8
8
|
*/
|
|
9
9
|
export declare function Image({ ...props }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Element that allows users enter single valued data.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/input
|
|
6
6
|
*/
|
|
7
7
|
export declare const Input: React.ForwardRefExoticComponent<import('./types.js').CustomProperties & {
|
|
8
8
|
value?: string | number | readonly string[] | undefined;
|
|
@@ -6,7 +6,7 @@ export type LinkProps = ThemeStyleProps & Pick<ChakraLinkProps, "children" | "hr
|
|
|
6
6
|
* Can be integrated with other routing libraries like React Router and Reach Router
|
|
7
7
|
* using the 'as' property. See docs for examples.
|
|
8
8
|
*
|
|
9
|
-
* @see Docs https://
|
|
9
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/link
|
|
10
10
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/link/
|
|
11
11
|
*/
|
|
12
12
|
export declare function Link({ children, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,7 +9,7 @@ export type ListProps = CustomListProps & ChakraListProperties & ThemeStyleProps
|
|
|
9
9
|
/**
|
|
10
10
|
* List is used to display list items.
|
|
11
11
|
*
|
|
12
|
-
* @see Docs https://
|
|
12
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/list
|
|
13
13
|
*/
|
|
14
14
|
export declare function List({ fontFamily, children, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -20,7 +20,7 @@ export type MessageProps = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Shows a container appearing as a message "chat bubble" with text content.
|
|
22
22
|
*
|
|
23
|
-
* @see Docs https://
|
|
23
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/message
|
|
24
24
|
*/
|
|
25
25
|
export declare function Message({ children, time, from, author, autoFloat, errorState, errorMessage, ...props }: MessageProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -4,7 +4,7 @@ export type ModalBodyProps = Pick<ChakraModalBodyProps, "children"> & ThemeStyle
|
|
|
4
4
|
/**
|
|
5
5
|
* React component that houses the main content of the modal.
|
|
6
6
|
*
|
|
7
|
-
* @see Docs https://
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/modal
|
|
8
8
|
*/
|
|
9
9
|
export declare function ModalBody({ children, ...props }: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=modal-body.d.ts.map
|
|
@@ -7,7 +7,7 @@ export type ModalCloseButtonProps = {
|
|
|
7
7
|
* ModalCloseButton is used closes the modal.
|
|
8
8
|
* You don't need to pass the onClick to it, it reads the onClose action from the modal context.
|
|
9
9
|
*
|
|
10
|
-
* @see Docs https://
|
|
10
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/modal
|
|
11
11
|
*/
|
|
12
12
|
export declare function ModalCloseButton({ isAbsolutePositioned }: ModalCloseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
//# sourceMappingURL=modal-close-button.d.ts.map
|
|
@@ -6,7 +6,7 @@ export type ModalFooterProps = Pick<ChakraModalFooterProps, "children"> & ThemeS
|
|
|
6
6
|
* When sibling element ModalBody is overflowing the ModalFooter will be
|
|
7
7
|
* displayed with a box shadow indicating the overflow of the ModalBody.
|
|
8
8
|
*
|
|
9
|
-
* @see Docs https://
|
|
9
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/modal
|
|
10
10
|
*/
|
|
11
11
|
export declare function ModalFooter({ children, ...props }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=modal-footer.d.ts.map
|
|
@@ -9,7 +9,7 @@ export type ModalHeaderProps = Pick<ChakraModalHeaderProps, "children"> & Custom
|
|
|
9
9
|
/**
|
|
10
10
|
* React component that houses the title of the modal.
|
|
11
11
|
*
|
|
12
|
-
* @see Docs https://
|
|
12
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/modal
|
|
13
13
|
*/
|
|
14
14
|
export declare function ModalHeader({ children, sticky, ...props }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -2,13 +2,13 @@ import { NavigationButtonProps, NavigationLinkProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Link element to be used within NavigationList.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/navigation-list
|
|
6
6
|
*/
|
|
7
7
|
export declare function NavigationListLink({ children, display, w, minW, minH, to, href, isDisabled, ...props }: NavigationLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
/**
|
|
9
9
|
* Button element to be used within NavigationList.
|
|
10
10
|
*
|
|
11
|
-
* @see Docs https://
|
|
11
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/navigation-list
|
|
12
12
|
*/
|
|
13
13
|
export declare function NavigationListButton({ children, display, w, minW, minH, ...props }: NavigationButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=navigation-list-item.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { NavigationLinkProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Navigation element used for listing links or navigation-related actions.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/navigation-list
|
|
6
6
|
*/
|
|
7
7
|
export declare function NavigationList({ children, ...props }: NavigationLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=navigation-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginator.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/paginator/paginator.composition.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,+
|
|
1
|
+
{"version":3,"file":"paginator.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/paginator/paginator.composition.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,+CAgB1B,CAAC"}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
canPreviousPage: boolean;
|
|
15
|
-
/** Boolean to disable button to go to the next page */
|
|
16
|
-
canNextPage: boolean;
|
|
17
|
-
/** Function to update the page size of the table */
|
|
18
|
-
setPageSize: (pageSize: number) => void;
|
|
19
|
-
/** Function to update the page index of the table */
|
|
20
|
-
setPageIndex: (pageIndex: number) => void;
|
|
1
|
+
import { ThemeStyleProps } from '../../theme/index.js';
|
|
2
|
+
import { Locale } from './translations.js';
|
|
3
|
+
export type PaginatorProps = ThemeStyleProps & {
|
|
4
|
+
/** Which locale to use for translations */
|
|
5
|
+
locale: Locale;
|
|
6
|
+
/** The size of each page */
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
/** The total number of items */
|
|
9
|
+
itemCount: number;
|
|
10
|
+
/** The current page index (turns component controlled) */
|
|
11
|
+
pageIndex?: number;
|
|
12
|
+
/** Invoked when the page index changes */
|
|
13
|
+
onPageChange?: (newPageIndex: number) => void;
|
|
21
14
|
};
|
|
22
|
-
export declare function Paginator({
|
|
15
|
+
export declare function Paginator({ locale, pageSize, itemCount, pageIndex: _pageIndex, onPageChange, ...rest }: PaginatorProps): import("react/jsx-runtime").JSX.Element;
|
|
23
16
|
//# sourceMappingURL=paginator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginator.d.ts","sourceRoot":"","sources":["../../../lib/components/paginator/paginator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paginator.d.ts","sourceRoot":"","sources":["../../../lib/components/paginator/paginator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG;IAC9C,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IAEf,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAElB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACzB,MAAM,EACN,QAAa,EACb,SAAS,EACT,SAAS,EAAE,UAAU,EACrB,YAAY,EACZ,GAAG,IAAI,EACP,EAAE,cAAc,2CA6ChB"}
|
|
@@ -1,58 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useStyleConfig as b, Box as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useControllableState as C, useStyleConfig as b, Box as s } from "@chakra-ui/react";
|
|
3
3
|
import { translations as k } from "./translations.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
canPreviousPage: d,
|
|
14
|
-
canNextPage: f,
|
|
15
|
-
setPageSize: g,
|
|
16
|
-
setPageIndex: a
|
|
4
|
+
import { IconButton as c } from "../icon-button/icon-button.js";
|
|
5
|
+
import { Icons as l } from "../icon/types.js";
|
|
6
|
+
function N({
|
|
7
|
+
locale: g,
|
|
8
|
+
pageSize: n = 10,
|
|
9
|
+
itemCount: o,
|
|
10
|
+
pageIndex: m,
|
|
11
|
+
onPageChange: d,
|
|
12
|
+
...P
|
|
17
13
|
}) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const [a, r] = C({
|
|
15
|
+
value: m,
|
|
16
|
+
defaultValue: 0,
|
|
17
|
+
onChange: d
|
|
18
|
+
}), x = b("Paginator"), t = k[g], u = a > 0, f = n > 0 && a < Math.ceil(o / n) - 1, h = a * n + 1, p = Math.max(Math.min(n * (a + 1), o), 1), I = () => {
|
|
19
|
+
r(a - 1);
|
|
20
|
+
}, v = () => {
|
|
21
|
+
r(a + 1);
|
|
22
22
|
};
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
value: u,
|
|
29
|
-
onChange: (r) => {
|
|
30
|
-
g(Number(r.target.value));
|
|
31
|
-
},
|
|
32
|
-
children: m.map((r) => /* @__PURE__ */ o("option", { value: r, children: r }, r))
|
|
33
|
-
}
|
|
34
|
-
) }),
|
|
35
|
-
/* @__PURE__ */ o(i, { children: n.currentPage(t, h) }),
|
|
36
|
-
/* @__PURE__ */ e(i, { children: [
|
|
37
|
-
/* @__PURE__ */ o(
|
|
38
|
-
l,
|
|
23
|
+
return /* @__PURE__ */ i(s, { __css: x, ...P, children: [
|
|
24
|
+
/* @__PURE__ */ e(s, { children: t.currentPage(h, p, o) }),
|
|
25
|
+
/* @__PURE__ */ i(s, { children: [
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
c,
|
|
39
28
|
{
|
|
40
|
-
icon:
|
|
29
|
+
icon: l.Back,
|
|
41
30
|
size: "md",
|
|
42
31
|
variant: "ghost",
|
|
43
|
-
"aria-label":
|
|
44
|
-
onClick:
|
|
45
|
-
isDisabled: !
|
|
32
|
+
"aria-label": t.previousPage,
|
|
33
|
+
onClick: I,
|
|
34
|
+
isDisabled: !u
|
|
46
35
|
}
|
|
47
36
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
c,
|
|
50
39
|
{
|
|
51
|
-
icon:
|
|
40
|
+
icon: l.Forward,
|
|
52
41
|
size: "md",
|
|
53
42
|
variant: "ghost",
|
|
54
|
-
"aria-label":
|
|
55
|
-
onClick:
|
|
43
|
+
"aria-label": t.nextPage,
|
|
44
|
+
onClick: v,
|
|
56
45
|
isDisabled: !f
|
|
57
46
|
}
|
|
58
47
|
)
|
|
@@ -60,5 +49,5 @@ function _({
|
|
|
60
49
|
] });
|
|
61
50
|
}
|
|
62
51
|
export {
|
|
63
|
-
|
|
52
|
+
N as Paginator
|
|
64
53
|
};
|
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"en-US": {
|
|
10
|
-
pageSize: string;
|
|
11
|
-
currentPage: (pageIndex: number, pageCount: number) => string;
|
|
12
|
-
previousPage: string;
|
|
13
|
-
nextPage: string;
|
|
14
|
-
};
|
|
15
|
-
"en-GB": {
|
|
16
|
-
pageSize: string;
|
|
17
|
-
currentPage: (pageIndex: number, pageCount: number) => string;
|
|
18
|
-
previousPage: string;
|
|
19
|
-
nextPage: string;
|
|
20
|
-
};
|
|
21
|
-
"nb-NO": {
|
|
22
|
-
pageSize: string;
|
|
23
|
-
currentPage: (pageIndex: number, pageCount: number) => string;
|
|
24
|
-
previousPage: string;
|
|
25
|
-
nextPage: string;
|
|
26
|
-
};
|
|
27
|
-
"da-DK": {
|
|
28
|
-
pageSize: string;
|
|
29
|
-
currentPage: (pageIndex: number, pageCount: number) => string;
|
|
30
|
-
previousPage: string;
|
|
31
|
-
nextPage: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
1
|
+
export type Locale = "en-US" | "nb-NO" | "da-DK" | "sv-SE" | "en-GB";
|
|
2
|
+
interface TranslationObject {
|
|
3
|
+
currentPage: (start: number, end: number, itemCount: number) => string;
|
|
4
|
+
previousPage: string;
|
|
5
|
+
nextPage: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const translations: Record<Locale, TranslationObject>;
|
|
8
|
+
export {};
|
|
34
9
|
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../lib/components/paginator/translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../lib/components/paginator/translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAErE,UAAU,iBAAiB;IAC1B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACvE,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAQD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAkB1D,CAAC"}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
currentPage: (e, a) => `Page ${e + 1} of ${a}`,
|
|
1
|
+
const s = {
|
|
2
|
+
currentPage: (e, a, r) => `${e}-${a} of ${r}`,
|
|
4
3
|
previousPage: "Previous page",
|
|
5
4
|
nextPage: "Next page"
|
|
6
5
|
}, g = {
|
|
7
6
|
"sv-SE": {
|
|
8
|
-
|
|
9
|
-
currentPage: (e, a) => `Sida ${e + 1} av ${a}`,
|
|
7
|
+
currentPage: (e, a, r) => `${e}-${a} av ${r}`,
|
|
10
8
|
previousPage: "Föregående sida",
|
|
11
9
|
nextPage: "Nästa sida"
|
|
12
10
|
},
|
|
13
|
-
"en-US":
|
|
14
|
-
"en-GB":
|
|
11
|
+
"en-US": s,
|
|
12
|
+
"en-GB": s,
|
|
15
13
|
"nb-NO": {
|
|
16
|
-
|
|
17
|
-
currentPage: (e, a) => `Side ${e + 1} av ${a}`,
|
|
14
|
+
currentPage: (e, a, r) => `${e}-${a} av ${r}`,
|
|
18
15
|
previousPage: "Forrige side",
|
|
19
16
|
nextPage: "Neste side"
|
|
20
17
|
},
|
|
21
18
|
"da-DK": {
|
|
22
|
-
|
|
23
|
-
currentPage: (e, a) => `Side ${e + 1} af ${a}`,
|
|
19
|
+
currentPage: (e, a, r) => `${e}-${a} af ${r}`,
|
|
24
20
|
previousPage: "Forrige side",
|
|
25
21
|
nextPage: "Næste side"
|
|
26
22
|
}
|
|
@@ -8,7 +8,7 @@ export type RadioAddonProps = CustomProperties & UseRadioProps & ThemeStyleProps
|
|
|
8
8
|
* Internally uses Chakras useRadio-hook to provide the elements within with the
|
|
9
9
|
* props required for it to work as a real radio, compatible with FormControl etc.
|
|
10
10
|
*
|
|
11
|
-
* @see Docs https://
|
|
11
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/radio
|
|
12
12
|
*/
|
|
13
13
|
export declare const RadioAddon: React.ForwardRefExoticComponent<CustomProperties & UseRadioProps & ThemeStyleProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
14
|
export {};
|
|
@@ -8,7 +8,7 @@ export type RadioCardProps = CustomProperties & UseRadioProps & CustomChakraBoxP
|
|
|
8
8
|
* Internally uses Chakras useRadio-hook to provide the elements within with the
|
|
9
9
|
* props required for it to work as a real radio, compatible with FormControl etc.
|
|
10
10
|
*
|
|
11
|
-
* @see Docs https://
|
|
11
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/radio#custom-radios
|
|
12
12
|
*/
|
|
13
13
|
export declare const RadioCard: React.ForwardRefExoticComponent<CustomProperties & UseRadioProps & CustomChakraBoxProps & LayoutProps & MarginProps & PaddingProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
14
|
export {};
|
|
@@ -5,7 +5,7 @@ export type RadioProps = Pick<ChakraRadioProps, "defaultChecked" | "isChecked" |
|
|
|
5
5
|
/**
|
|
6
6
|
* Radio component is used in forms when a user needs to select a single value from several options.
|
|
7
7
|
*
|
|
8
|
-
* @see Docs https://
|
|
8
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/radio
|
|
9
9
|
*/
|
|
10
10
|
export declare const Radio: React.ForwardRefExoticComponent<Pick<ChakraRadioProps, "children" | "value" | "defaultChecked" | "onChange" | "isDisabled" | "isChecked" | "isInvalid"> & ThemeStyleProps & React.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -5,7 +5,7 @@ export type RadioGroupProps = ChakraRadioGroupProperties & ThemeStyleProps;
|
|
|
5
5
|
/**
|
|
6
6
|
* Used for multiple radios which are bound in one group, and it indicates which option is selected.
|
|
7
7
|
*
|
|
8
|
-
* @see Docs https://
|
|
8
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/radio-group
|
|
9
9
|
*/
|
|
10
10
|
export declare function RadioGroup({ children, name, isDisabled, defaultValue, value, onChange, display, flexDirection, gap, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -3,7 +3,7 @@ import { SegmentedControlProps } from './types.js';
|
|
|
3
3
|
* Used for switching between a set of equal options,
|
|
4
4
|
* with one choice always being the active one.
|
|
5
5
|
*
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/segmented-control
|
|
7
7
|
*/
|
|
8
8
|
export declare function SegmentedControl({ items, activeItemId, onChange, isDisabled, size, ...props }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=segmented-control.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { SkeletonTextProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Used to display the loading state of some component.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/skeleton
|
|
6
6
|
*/
|
|
7
7
|
export declare function SkeletonText({ startColor, endColor, ...props }: SkeletonTextProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=skeleton-text.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { SkeletonProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Used to display the loading state of some component.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/skeleton
|
|
6
6
|
*/
|
|
7
7
|
export declare function Skeleton({ startColor, endColor, children, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeSpaceVariable, ThemeStyleProps } from '../../theme/index.js';
|
|
2
|
-
import { StackProps as ChakraStackProps, ResponsiveValue } from '@chakra-ui/react';
|
|
2
|
+
import { StackProps as ChakraStackProps, ComponentWithAs, ResponsiveValue } from '@chakra-ui/react';
|
|
3
3
|
type CustomStackProps = {
|
|
4
4
|
spacing?: ResponsiveValue<ThemeSpaceVariable | (string & {})> | undefined;
|
|
5
5
|
};
|
|
@@ -9,8 +9,8 @@ export type StackProps = Pick<ChakraStackProps, "direction" | "children" | "divi
|
|
|
9
9
|
* You can stack elements in the horizontal or vertical direction, and apply a space or/and divider between each element.
|
|
10
10
|
* It uses display: flex internally and renders a div.
|
|
11
11
|
*
|
|
12
|
-
* @see Docs https://
|
|
12
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/stack
|
|
13
13
|
*/
|
|
14
|
-
export declare const Stack:
|
|
14
|
+
export declare const Stack: ComponentWithAs<"div", StackProps>;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../lib/components/stack/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAEN,KAAK,UAAU,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../lib/components/stack/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAEN,KAAK,UAAU,IAAI,gBAAgB,EACnC,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,MAAM,kBAAkB,CAAC;AAE1B,KAAK,gBAAgB,GAAG;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC;CAC1E,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC,GACpF,gBAAgB,GAChB,eAAe,CAAC;AAEjB;;;;;;GAMG;AAGH,eAAO,MAAM,KAAK,EAMZ,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { StepperProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* A representation of a progress through a series of steps.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/stepper
|
|
6
6
|
*/
|
|
7
7
|
export declare function Stepper({ activeStep, orientation, steps, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-context.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-context.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-context.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
import { jsx as z } from "react/jsx-runtime";
|
|
2
|
+
import { useControllableState as u } from "@chakra-ui/react";
|
|
2
3
|
import { useReactTable as A } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
3
4
|
import { useState as i, useEffect as B, useCallback as w, createContext as D } from "react";
|
|
4
|
-
import { useControllableState as S } from "./use-controllable-state.js";
|
|
5
5
|
import { getFilteredRowModel as G, getSortedRowModel as H, getExpandedRowModel as J, getCoreRowModel as K } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
6
6
|
const L = D(null), Y = ({
|
|
7
7
|
data: s,
|
|
8
8
|
columns: C,
|
|
9
|
-
children:
|
|
10
|
-
expandedState:
|
|
11
|
-
localeString:
|
|
12
|
-
initialExpandedState:
|
|
13
|
-
initialBreakingContentState:
|
|
9
|
+
children: S,
|
|
10
|
+
expandedState: R,
|
|
11
|
+
localeString: m,
|
|
12
|
+
initialExpandedState: a = {},
|
|
13
|
+
initialBreakingContentState: r = {},
|
|
14
14
|
initialColumnVisibilityState: p = {},
|
|
15
15
|
columnVisibilityState: x,
|
|
16
16
|
onColumnVisibilityChange: M,
|
|
17
|
-
onExpandedChange:
|
|
18
|
-
onBreakingContentChange:
|
|
19
|
-
onFilterColumn:
|
|
20
|
-
id:
|
|
21
|
-
customRowIndication:
|
|
17
|
+
onExpandedChange: d,
|
|
18
|
+
onBreakingContentChange: h,
|
|
19
|
+
onFilterColumn: y,
|
|
20
|
+
id: v,
|
|
21
|
+
customRowIndication: n
|
|
22
22
|
}) => {
|
|
23
|
-
const [t,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
), [
|
|
28
|
-
|
|
23
|
+
const [t, c] = u({
|
|
24
|
+
value: R,
|
|
25
|
+
onChange: d,
|
|
26
|
+
defaultValue: a
|
|
27
|
+
}), [l, E] = u({
|
|
28
|
+
value: x,
|
|
29
|
+
onChange: M,
|
|
30
|
+
defaultValue: p
|
|
31
|
+
}), [b, V] = i([]), [T, k] = i(
|
|
32
|
+
r || {}
|
|
29
33
|
), [f, g] = i({});
|
|
30
34
|
B(() => {
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
const
|
|
35
|
+
n && g(n);
|
|
36
|
+
}, [n]);
|
|
37
|
+
const F = w(
|
|
34
38
|
(e) => {
|
|
35
39
|
let o;
|
|
36
|
-
typeof e == "function" ? o = e(
|
|
40
|
+
typeof e == "function" ? o = e(l) : o = e, E(o);
|
|
37
41
|
},
|
|
38
|
-
[
|
|
39
|
-
),
|
|
42
|
+
[l]
|
|
43
|
+
), P = w(
|
|
40
44
|
(e) => {
|
|
41
45
|
let o;
|
|
42
|
-
typeof e == "function" ? o = e(t) : o = e,
|
|
46
|
+
typeof e == "function" ? o = e(t) : o = e, c(o);
|
|
43
47
|
},
|
|
44
48
|
[t]
|
|
45
49
|
), j = A({
|
|
@@ -49,39 +53,39 @@ const L = D(null), Y = ({
|
|
|
49
53
|
getExpandedRowModel: J(),
|
|
50
54
|
getSortedRowModel: H(),
|
|
51
55
|
getFilteredRowModel: G(),
|
|
52
|
-
onColumnVisibilityChange:
|
|
53
|
-
onExpandedChange:
|
|
56
|
+
onColumnVisibilityChange: F,
|
|
57
|
+
onExpandedChange: P,
|
|
54
58
|
getSubRows: (e) => e.subRows,
|
|
55
59
|
enableSubRowSelection: !0,
|
|
56
60
|
enableMultiRowSelection: !1,
|
|
57
61
|
enableRowSelection: !0,
|
|
58
62
|
state: {
|
|
59
|
-
sorting:
|
|
60
|
-
columnVisibility:
|
|
63
|
+
sorting: b,
|
|
64
|
+
columnVisibility: l,
|
|
61
65
|
expanded: t,
|
|
62
66
|
rowSelection: f
|
|
63
67
|
}
|
|
64
68
|
}), q = {
|
|
65
69
|
data: s,
|
|
66
70
|
table: j,
|
|
67
|
-
initialExpandedState:
|
|
68
|
-
initialBreakingContentState:
|
|
69
|
-
localeString:
|
|
70
|
-
onExpandedChange:
|
|
71
|
+
initialExpandedState: a,
|
|
72
|
+
initialBreakingContentState: r,
|
|
73
|
+
localeString: m,
|
|
74
|
+
onExpandedChange: d,
|
|
71
75
|
expanded: t,
|
|
72
|
-
sorting:
|
|
73
|
-
setSorting:
|
|
74
|
-
setExpanded:
|
|
75
|
-
breakingContentState:
|
|
76
|
-
setBreakingContentState:
|
|
77
|
-
onBreakingContentChange:
|
|
78
|
-
onFilterColumn:
|
|
79
|
-
id:
|
|
76
|
+
sorting: b,
|
|
77
|
+
setSorting: V,
|
|
78
|
+
setExpanded: c,
|
|
79
|
+
breakingContentState: T,
|
|
80
|
+
setBreakingContentState: k,
|
|
81
|
+
onBreakingContentChange: h,
|
|
82
|
+
onFilterColumn: y,
|
|
83
|
+
id: v,
|
|
80
84
|
setRowSelection: g,
|
|
81
85
|
rowSelection: f,
|
|
82
|
-
columnVisibility:
|
|
86
|
+
columnVisibility: l
|
|
83
87
|
};
|
|
84
|
-
return /* @__PURE__ */ z(L.Provider, { value: q, children:
|
|
88
|
+
return /* @__PURE__ */ z(L.Provider, { value: q, children: S });
|
|
85
89
|
};
|
|
86
90
|
export {
|
|
87
91
|
L as TableContext,
|
|
@@ -3,7 +3,7 @@ import { TabListProps } from './types.js';
|
|
|
3
3
|
* TabList is used to manage a list of tab buttons.
|
|
4
4
|
* It renders a div by default, and is responsible the keyboard interaction between tabs.
|
|
5
5
|
*
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/tabs
|
|
7
7
|
*/
|
|
8
8
|
export declare function TabList({ alignItems, children, ...props }: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=tab-list.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { TabPanelProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* TabPanel Used to render the content for a specific tab.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/tabs
|
|
6
6
|
*/
|
|
7
7
|
export declare function TabPanel({ children, ...props }: TabPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=tab-panel.d.ts.map
|
|
@@ -3,7 +3,7 @@ import { TabPanelsProps } from './types.js';
|
|
|
3
3
|
* Used to manage the rendering of multiple tab panels. It uses cloneElement to hide/show tab panels.
|
|
4
4
|
* It renders a div by default.
|
|
5
5
|
*
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/tabs
|
|
7
7
|
*/
|
|
8
8
|
export declare function TabPanels({ children, ...props }: TabPanelsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=tab-panels.d.ts.map
|
|
@@ -3,7 +3,7 @@ import { TabProps } from './types.js';
|
|
|
3
3
|
* Tab button used to activate a specific tab panel.
|
|
4
4
|
* It renders a button, and is responsible for automatic and manual selection modes.
|
|
5
5
|
*
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/tabs
|
|
7
7
|
*/
|
|
8
8
|
export declare function Tab({ imgSrc, imgAlt, imgFallbackColor, children, ...props }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { TabsProps } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Provides context and logic for all tabs components.
|
|
4
4
|
*
|
|
5
|
-
* @see Docs https://
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/tabs
|
|
6
6
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
|
|
7
7
|
*/
|
|
8
8
|
export declare function Tabs({ children, variant, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,7 +9,7 @@ export type TextProps = ThemeStyleProps & ChakraTextProperties & CustomPropertie
|
|
|
9
9
|
/**
|
|
10
10
|
* Used to render texts or paragraphs.
|
|
11
11
|
*
|
|
12
|
-
* @see Docs https://
|
|
12
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/text
|
|
13
13
|
*/
|
|
14
14
|
export declare function Text({ as, fontFamily, fontSize, fontWeight, color, children, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -18,7 +18,7 @@ export type ShowToastOptions = {
|
|
|
18
18
|
/**
|
|
19
19
|
* React hook used to create a function that can be used to show toasts in an application.
|
|
20
20
|
*
|
|
21
|
-
* @see Docs https://
|
|
21
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/toast
|
|
22
22
|
*/
|
|
23
23
|
export declare function useToast(): {
|
|
24
24
|
showToast: ({ type, duration, description, title, distanceToBottom, }: ShowToastOptions) => void;
|
|
@@ -3,7 +3,7 @@ import { ToggleButtonProps } from './types.js';
|
|
|
3
3
|
* A button with a pressed/not pressed state.
|
|
4
4
|
*
|
|
5
5
|
* @see Toggle button role on MDN: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role#toggle_buttons
|
|
6
|
-
* @see Docs https://
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/toggle-button
|
|
7
7
|
*/
|
|
8
8
|
export declare function ToggleButton({ isPressed, children, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=toggle-button.d.ts.map
|
|
@@ -4,7 +4,7 @@ export type TooltipProps = Pick<ChakraTooltipProps, "children" | "placement" | "
|
|
|
4
4
|
/**
|
|
5
5
|
* Tooltips display informative text when users hover, focus on, or tap an element.
|
|
6
6
|
*
|
|
7
|
-
* @see Docs https://
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/tooltip
|
|
8
8
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/
|
|
9
9
|
*/
|
|
10
10
|
export declare function Tooltip({ children, label, placement, p, fontSize, fontFamily, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -31,7 +31,7 @@ export declare function ThemeProvider({ colors, fonts, fontStyleSheet, globalSty
|
|
|
31
31
|
* Custom Casper UI wrapper for Chakra ColorModeScript to handle color mode throughout the app,
|
|
32
32
|
* currently always set to light as initial color mode.
|
|
33
33
|
*
|
|
34
|
-
* @see https://
|
|
34
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/getting-started/theme/
|
|
35
35
|
*/
|
|
36
36
|
export declare function ThemeColorModeScript(): import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export {};
|
|
@@ -239,7 +239,7 @@ export type CustomChakraBoxProps = Pick<BoxProps, "flex" | "alignItems" | "align
|
|
|
239
239
|
| "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "aria-busy" | "aria-current" | "aria-autocomplete" | "aria-activedescendant" | "aria-atomic" | "aria-checked" | "aria-controls" | "aria-disabled" | "aria-haspopup" | "aria-expanded" | "aria-hidden" | "aria-orientation" | "aria-selected" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-errormessage" | "aria-flowto" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-roledescription" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext">;
|
|
240
240
|
/**
|
|
241
241
|
* A custom set of the Chakra Style Props with support for Casper UI Theme variables.
|
|
242
|
-
* @see Docs reference: {@link https://
|
|
242
|
+
* @see Docs reference: {@link https://caspeco.github.io/casper-ui-library/reference/interfaces/themestyleprops | Casper UI Theme Style Props}
|
|
243
243
|
*/
|
|
244
244
|
export interface ThemeStyleProps extends CustomChakraBoxProps, ColorProps, MarginProps, PaddingProps, GridProps, TypographyProps, LayoutProps, ShadowProps, BorderProps {
|
|
245
245
|
}
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A custom React hook for managing state that can be either controlled by a parent component or managed internally.
|
|
3
|
-
*
|
|
4
|
-
* @param value - The controlled value provided by the parent component. If `undefined`, the hook operates in uncontrolled mode and manages the state internally.
|
|
5
|
-
* @param changeHandler - Optional callback invoked when the state changes. Useful for notifying the parent component of state changes in controlled mode.
|
|
6
|
-
* @param initialValue - The initial state value when operating in uncontrolled mode.
|
|
7
|
-
*
|
|
8
|
-
* @returns A tuple containing:
|
|
9
|
-
* - The current state value (`T`).
|
|
10
|
-
* - A function to update the state (`setValue`).
|
|
11
|
-
* In controlled mode, calling `setValue` invokes `changeHandler` without updating internal state.
|
|
12
|
-
* In uncontrolled mode, `setValue` updates the internal state.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* // Uncontrolled component usage:
|
|
16
|
-
* const [value, setValue] = useControllableState(undefined, props.onChange, 'default');
|
|
17
|
-
* setValue('new value');
|
|
18
|
-
* // props.onChange('new value') is called
|
|
19
|
-
* console.log(value) // 'new value'
|
|
20
|
-
*
|
|
21
|
-
* // Controlled component usage:
|
|
22
|
-
* const [value, setValue] = useControllableState(props.value, props.onChange, 'default');
|
|
23
|
-
* setValue('new value');
|
|
24
|
-
* // props.onChange('new value') is called
|
|
25
|
-
* console.log(value) // 'default'
|
|
26
|
-
*/
|
|
27
|
-
export declare function useControllableState<T>(value: T extends Function ? never : T | undefined, changeHandler: ((newValue: T) => void) | undefined, initialValue: T): [T, React.Dispatch<React.SetStateAction<T>>];
|
|
28
|
-
//# sourceMappingURL=use-controllable-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-controllable-state.d.ts","sourceRoot":"","sources":["../../../lib/components/table/use-controllable-state.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAErC,KAAK,EAAE,CAAC,SAAS,QAAQ,GAAG,KAAK,GAAG,CAAC,GAAG,SAAS,EACjD,aAAa,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,EAClD,YAAY,EAAE,CAAC,GACb,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAgB9C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useState as s } from "react";
|
|
2
|
-
function a(o, e, n) {
|
|
3
|
-
const [r, l] = s(n);
|
|
4
|
-
return [o !== void 0 ? o : r, (t) => {
|
|
5
|
-
if (typeof t == "function")
|
|
6
|
-
throw new Error("Function as argument is not supported.");
|
|
7
|
-
l(t), e?.(t);
|
|
8
|
-
}];
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
a as useControllableState
|
|
12
|
-
};
|