@vygruppen/spor-react 12.0.2 → 12.0.4
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/.turbo/turbo-build.log +11 -10
- package/.turbo/turbo-typegen.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/index.d.mts +576 -576
- package/dist/index.d.ts +576 -576
- package/dist/index.js +8641 -8613
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8842 -8814
- package/dist/index.mjs.map +1 -1
- package/eslint.config.mjs +9 -0
- package/package.json +10 -7
- package/src/accordion/Accordion.tsx +5 -4
- package/src/accordion/Expandable.tsx +2 -1
- package/src/accordion/types.ts +3 -2
- package/src/alert/Alert.tsx +5 -3
- package/src/alert/AlertIcon.tsx +2 -1
- package/src/alert/ExpandableAlert.tsx +6 -4
- package/src/alert/ServiceAlert.tsx +5 -4
- package/src/alert/index.ts +1 -1
- package/src/breadcrumb/Breadcrumb.tsx +3 -3
- package/src/button/Button.tsx +4 -3
- package/src/button/ButtonGroup.tsx +3 -2
- package/src/button/Clipboard.tsx +5 -3
- package/src/button/CloseButton.tsx +1 -0
- package/src/button/FloatingActionButton.tsx +1 -0
- package/src/button/IconButton.tsx +1 -0
- package/src/button/index.tsx +1 -1
- package/src/color-mode/color-mode.tsx +1 -1
- package/src/datepicker/Calendar.tsx +5 -3
- package/src/datepicker/CalendarCell.tsx +2 -1
- package/src/datepicker/CalendarGrid.tsx +4 -3
- package/src/datepicker/CalendarHeader.tsx +1 -0
- package/src/datepicker/CalendarNavigationButton.tsx +1 -0
- package/src/datepicker/CalendarTriggerButton.tsx +1 -0
- package/src/datepicker/DateField.tsx +5 -4
- package/src/datepicker/DatePicker.tsx +4 -2
- package/src/datepicker/DateRangePicker.tsx +7 -7
- package/src/datepicker/DateTimeSegment.tsx +3 -2
- package/src/datepicker/RangeCalendar.tsx +5 -3
- package/src/datepicker/StyledField.tsx +2 -1
- package/src/datepicker/TimeField.tsx +2 -1
- package/src/datepicker/TimePicker.tsx +4 -2
- package/src/datepicker/index.tsx +1 -1
- package/src/datepicker/utils.ts +1 -0
- package/src/dialog/Dialog.tsx +1 -0
- package/src/dialog/Drawer.tsx +2 -1
- package/src/dialog/index.ts +1 -1
- package/src/dialog/types.ts +3 -2
- package/src/image/index.tsx +1 -1
- package/src/index.tsx +5 -5
- package/src/input/AttachedInputs.tsx +3 -1
- package/src/input/CardSelect.tsx +3 -2
- package/src/input/Checkbox.tsx +2 -1
- package/src/input/ChoiceChip.tsx +2 -1
- package/src/input/Combobox.tsx +1 -0
- package/src/input/CountryCodeSelect.tsx +2 -1
- package/src/input/Field.tsx +1 -0
- package/src/input/Input.tsx +5 -3
- package/src/input/InputGroup.tsx +2 -1
- package/src/input/ListBox.tsx +5 -4
- package/src/input/NativeSelect.tsx +2 -1
- package/src/input/NumericStepper.tsx +1 -0
- package/src/input/PasswordInput.tsx +1 -0
- package/src/input/PhoneNumberInput.tsx +2 -1
- package/src/input/Radio.tsx +3 -2
- package/src/input/SearchInput.tsx +1 -0
- package/src/input/Select.tsx +5 -4
- package/src/input/Switch.tsx +2 -1
- package/src/input/Textarea.tsx +3 -2
- package/src/input/index.ts +1 -1
- package/src/layout/PressableCard.tsx +2 -1
- package/src/layout/RadioCard.tsx +1 -0
- package/src/layout/Separator.tsx +2 -1
- package/src/layout/StaticCard.tsx +2 -1
- package/src/layout/index.tsx +16 -16
- package/src/linjetag/InfoTag.tsx +2 -1
- package/src/linjetag/LineIcon.tsx +1 -0
- package/src/linjetag/TravelTag.tsx +2 -1
- package/src/linjetag/icons.tsx +1 -0
- package/src/link/TextLink.tsx +1 -0
- package/src/loader/ClientOnly.tsx +1 -0
- package/src/loader/ColorInlineLoader.tsx +1 -0
- package/src/loader/ColorSpinner.tsx +1 -0
- package/src/loader/ContentLoader.tsx +1 -0
- package/src/loader/DarkFullScreenLoader.tsx +1 -0
- package/src/loader/DarkInlineLoader.tsx +1 -0
- package/src/loader/DarkSpinner.tsx +1 -0
- package/src/loader/LightFullScreenLoader.tsx +1 -0
- package/src/loader/LightInlineLoader.tsx +1 -0
- package/src/loader/LightSpinner.tsx +1 -0
- package/src/loader/Lottie.tsx +1 -2
- package/src/loader/ProgressBar.tsx +2 -1
- package/src/loader/ProgressLoader.tsx +3 -2
- package/src/loader/Skeleton.tsx +4 -3
- package/src/loader/useHydrated.tsx +1 -1
- package/src/logo/VyLogo.tsx +1 -0
- package/src/logo/VyLogoPride.tsx +1 -0
- package/src/logo/index.tsx +1 -1
- package/src/media-controller/JumpButton.tsx +3 -2
- package/src/media-controller/PlayPauseButton.tsx +3 -2
- package/src/media-controller/SkipButton.tsx +3 -2
- package/src/nudge/Nudge.tsx +14 -14
- package/src/pagination/Pagination.tsx +4 -3
- package/src/pagination/types.ts +2 -1
- package/src/popover/index.tsx +4 -3
- package/src/progress-indicator/ProgressDot.tsx +2 -1
- package/src/progress-indicator/ProgressIndicator.tsx +2 -1
- package/src/provider/SporProvider.tsx +4 -5
- package/src/stepper/Stepper.tsx +2 -1
- package/src/stepper/StepperStep.tsx +1 -0
- package/src/tab/Tabs.tsx +2 -1
- package/src/table/Table.tsx +2 -1
- package/src/table/index.tsx +14 -14
- package/src/theme/index.ts +7 -6
- package/src/theme/recipes/close-button.ts +1 -0
- package/src/theme/recipes/code.ts +1 -0
- package/src/theme/recipes/link.ts +1 -0
- package/src/theme/recipes/pressable-card.ts +2 -1
- package/src/theme/recipes/textarea.ts +1 -0
- package/src/theme/semantic-tokens/colors.ts +1 -1
- package/src/theme/semantic-tokens/index.ts +1 -1
- package/src/theme/slot-recipes/accordion.ts +2 -1
- package/src/theme/slot-recipes/alert-expandable.ts +2 -1
- package/src/theme/slot-recipes/alert-service.ts +1 -0
- package/src/theme/slot-recipes/alert.ts +1 -0
- package/src/theme/slot-recipes/breadcrumb.ts +2 -1
- package/src/theme/slot-recipes/checkbox.ts +1 -0
- package/src/theme/slot-recipes/datepicker.ts +1 -0
- package/src/theme/slot-recipes/dialog.ts +1 -0
- package/src/theme/slot-recipes/drawer.ts +1 -0
- package/src/theme/slot-recipes/field.ts +1 -0
- package/src/theme/slot-recipes/floating-action-button.ts +1 -0
- package/src/theme/slot-recipes/index.ts +2 -2
- package/src/theme/slot-recipes/info-tag.ts +3 -2
- package/src/theme/slot-recipes/line-icon.ts +1 -0
- package/src/theme/slot-recipes/list.ts +1 -0
- package/src/theme/slot-recipes/listbox.ts +1 -0
- package/src/theme/slot-recipes/media-controller-button.ts +1 -0
- package/src/theme/slot-recipes/native-select.ts +3 -2
- package/src/theme/slot-recipes/numeric-stepper.ts +1 -0
- package/src/theme/slot-recipes/pagination.ts +1 -0
- package/src/theme/slot-recipes/popover.ts +2 -1
- package/src/theme/slot-recipes/progress-bar.ts +1 -0
- package/src/theme/slot-recipes/radio-card.ts +2 -1
- package/src/theme/slot-recipes/radio.ts +1 -0
- package/src/theme/slot-recipes/select.ts +1 -0
- package/src/theme/slot-recipes/stepper.ts +1 -0
- package/src/theme/slot-recipes/switch.ts +2 -1
- package/src/theme/slot-recipes/table.ts +1 -0
- package/src/theme/slot-recipes/tabs.ts +1 -0
- package/src/theme/slot-recipes/toast.ts +1 -0
- package/src/theme/slot-recipes/travel-tag.ts +1 -0
- package/src/theme/tokens/colors.ts +1 -1
- package/src/theme/tokens/index.ts +4 -4
- package/src/theme/tokens/sizes.ts +1 -0
- package/src/theme/utils/input-utils.ts +1 -1
- package/src/toast/toast.tsx +6 -6
- package/src/transition/index.ts +1 -1
- package/src/typography/Badge.tsx +1 -2
- package/src/typography/Code.tsx +2 -1
- package/src/typography/Heading.tsx +2 -1
- package/src/typography/index.ts +1 -1
- package/src/util/externals.tsx +11 -11
package/dist/index.d.mts
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
import * as sporDesignTokens from '@vygruppen/spor-design-tokens';
|
2
|
-
export { sporDesignTokens as tokens };
|
3
1
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
4
|
-
import { Accordion as Accordion$1,
|
2
|
+
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Dialog, Drawer as Drawer$1, InputElementProps, PopoverRootProps, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, Fieldset as Fieldset$1, Field, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
5
3
|
export { Box, BoxProps, Center, CenterProps, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createListCollection, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
|
6
4
|
import * as React$1 from 'react';
|
7
5
|
import React__default, { PropsWithChildren, ReactNode, ChangeEvent } from 'react';
|
8
6
|
import { IconComponent } from '@vygruppen/spor-icon-react';
|
9
7
|
import { ThemeProviderProps } from 'next-themes';
|
8
|
+
import { AriaDatePickerProps, DateValue, AriaDateRangePickerProps, AriaComboBoxProps, AriaListBoxProps } from 'react-aria';
|
10
9
|
import { DateValue as DateValue$1 } from '@internationalized/date';
|
11
10
|
export { Time } from '@internationalized/date';
|
12
|
-
import { AriaDatePickerProps, DateValue, AriaDateRangePickerProps, AriaComboBoxProps, AriaListBoxProps } from 'react-aria';
|
13
11
|
import { TimeValue } from '@react-types/datepicker';
|
14
12
|
import { SelectState, ListState } from 'react-stately';
|
15
13
|
export { Item, Section } from 'react-stately';
|
16
14
|
export { useIsClient, useMap, useOnClickOutside } from 'usehooks-ts';
|
15
|
+
import * as sporDesignTokens from '@vygruppen/spor-design-tokens';
|
16
|
+
export { sporDesignTokens as tokens };
|
17
17
|
|
18
18
|
type HeadingLevel = {
|
19
19
|
/** Heading level of the trigger button */
|
@@ -87,6 +87,45 @@ declare const Expandable: React__default.ForwardRefExoticComponent<_chakra_ui_re
|
|
87
87
|
*/
|
88
88
|
declare const ExpandableItem: (props: ExpandableItemProps) => React__default.JSX.Element;
|
89
89
|
|
90
|
+
type AlertProps = Omit<Alert$1.RootProps, "colorPalette"> & {
|
91
|
+
/** Whether or not to show the alert icon */
|
92
|
+
showIndicator?: boolean;
|
93
|
+
/** Whether or not the alert is closable */
|
94
|
+
icon?: IconComponent;
|
95
|
+
closable?: boolean;
|
96
|
+
/** Callback for when the alert is closed */
|
97
|
+
onAlertClose?: () => void;
|
98
|
+
};
|
99
|
+
/**
|
100
|
+
*
|
101
|
+
* Alerts are used to communicate important information to the user.
|
102
|
+
* They can be used to inform about success, errors, warnings, or other important information.
|
103
|
+
*
|
104
|
+
* ```tsx
|
105
|
+
* <Alert variant="info" title="Information">
|
106
|
+
* This is an information alert
|
107
|
+
* </Alert>
|
108
|
+
* ```
|
109
|
+
*
|
110
|
+
* You may also use the closable prop to allow the user to dismiss the alert.
|
111
|
+
*
|
112
|
+
* ```tsx
|
113
|
+
* <Alert variant="info" title="Information" closable>
|
114
|
+
* This is an closable alert
|
115
|
+
* </Alert>
|
116
|
+
*
|
117
|
+
* @see Docs https://spor.vy.no/alert
|
118
|
+
*/
|
119
|
+
declare const Alert: React__default.ForwardRefExoticComponent<Omit<Alert$1.RootProps, "colorPalette"> & {
|
120
|
+
/** Whether or not to show the alert icon */
|
121
|
+
showIndicator?: boolean;
|
122
|
+
/** Whether or not the alert is closable */
|
123
|
+
icon?: IconComponent;
|
124
|
+
closable?: boolean;
|
125
|
+
/** Callback for when the alert is closed */
|
126
|
+
onAlertClose?: () => void;
|
127
|
+
} & React__default.RefAttributes<HTMLDivElement>>;
|
128
|
+
|
90
129
|
/**
|
91
130
|
* An expandable alert component.
|
92
131
|
*
|
@@ -127,45 +166,6 @@ declare const ExpandableAlert: React__default.ForwardRefExoticComponent<{
|
|
127
166
|
variant?: ConditionalValue<"important" | "success" | "alt" | "info" | "error" | undefined>;
|
128
167
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
129
168
|
|
130
|
-
type AlertProps = Omit<Alert$1.RootProps, "colorPalette"> & {
|
131
|
-
/** Whether or not to show the alert icon */
|
132
|
-
showIndicator?: boolean;
|
133
|
-
/** Whether or not the alert is closable */
|
134
|
-
icon?: IconComponent;
|
135
|
-
closable?: boolean;
|
136
|
-
/** Callback for when the alert is closed */
|
137
|
-
onAlertClose?: () => void;
|
138
|
-
};
|
139
|
-
/**
|
140
|
-
*
|
141
|
-
* Alerts are used to communicate important information to the user.
|
142
|
-
* They can be used to inform about success, errors, warnings, or other important information.
|
143
|
-
*
|
144
|
-
* ```tsx
|
145
|
-
* <Alert variant="info" title="Information">
|
146
|
-
* This is an information alert
|
147
|
-
* </Alert>
|
148
|
-
* ```
|
149
|
-
*
|
150
|
-
* You may also use the closable prop to allow the user to dismiss the alert.
|
151
|
-
*
|
152
|
-
* ```tsx
|
153
|
-
* <Alert variant="info" title="Information" closable>
|
154
|
-
* This is an closable alert
|
155
|
-
* </Alert>
|
156
|
-
*
|
157
|
-
* @see Docs https://spor.vy.no/alert
|
158
|
-
*/
|
159
|
-
declare const Alert: React__default.ForwardRefExoticComponent<Omit<Alert$1.RootProps, "colorPalette"> & {
|
160
|
-
/** Whether or not to show the alert icon */
|
161
|
-
showIndicator?: boolean;
|
162
|
-
/** Whether or not the alert is closable */
|
163
|
-
icon?: IconComponent;
|
164
|
-
closable?: boolean;
|
165
|
-
/** Callback for when the alert is closed */
|
166
|
-
onAlertClose?: () => void;
|
167
|
-
} & React__default.RefAttributes<HTMLDivElement>>;
|
168
|
-
|
169
169
|
/**
|
170
170
|
* A service alert component.
|
171
171
|
*
|
@@ -385,6 +385,23 @@ declare const ButtonGroup: React__default.ForwardRefExoticComponent<GroupProps &
|
|
385
385
|
children?: React__default.ReactNode | undefined;
|
386
386
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
387
387
|
|
388
|
+
declare const ClipboardButton: React$1.ForwardRefExoticComponent<_chakra_ui_react.ButtonProps & {
|
389
|
+
variant?: _chakra_ui_react.ConditionalValue<"floating" | "secondary" | "tertiary" | "ghost" | "primary" | undefined>;
|
390
|
+
size?: _chakra_ui_react.ConditionalValue<"sm" | "md" | "lg" | "xs" | undefined>;
|
391
|
+
} & {
|
392
|
+
children?: React$1.ReactNode | undefined;
|
393
|
+
} & {
|
394
|
+
loading?: boolean;
|
395
|
+
loadingText?: React$1.ReactNode;
|
396
|
+
leftIcon?: React$1.ReactNode;
|
397
|
+
rightIcon?: React$1.ReactNode;
|
398
|
+
variant: "primary" | "secondary" | "tertiary" | "ghost" | "floating";
|
399
|
+
size?: "lg" | "md" | "sm" | "xs";
|
400
|
+
download?: string;
|
401
|
+
href?: string;
|
402
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
403
|
+
declare const Clipboard: React$1.ForwardRefExoticComponent<Clipboard$1.RootProps & React$1.RefAttributes<HTMLDivElement>>;
|
404
|
+
|
388
405
|
type IconButtonProps = Exclude<IconButtonProps$1, "variant" | "spinner" | "icon"> & PropsWithChildren<ButtonVariantProps> & {
|
389
406
|
/** The button variant.
|
390
407
|
*
|
@@ -490,23 +507,6 @@ declare const FloatingActionButton: React__default.ForwardRefExoticComponent<Box
|
|
490
507
|
isTextVisible?: boolean;
|
491
508
|
} & React__default.RefAttributes<HTMLButtonElement>>;
|
492
509
|
|
493
|
-
declare const ClipboardButton: React$1.ForwardRefExoticComponent<_chakra_ui_react.ButtonProps & {
|
494
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "secondary" | "tertiary" | "ghost" | "primary" | undefined>;
|
495
|
-
size?: _chakra_ui_react.ConditionalValue<"sm" | "md" | "lg" | "xs" | undefined>;
|
496
|
-
} & {
|
497
|
-
children?: React$1.ReactNode | undefined;
|
498
|
-
} & {
|
499
|
-
loading?: boolean;
|
500
|
-
loadingText?: React$1.ReactNode;
|
501
|
-
leftIcon?: React$1.ReactNode;
|
502
|
-
rightIcon?: React$1.ReactNode;
|
503
|
-
variant: "primary" | "secondary" | "tertiary" | "ghost" | "floating";
|
504
|
-
size?: "lg" | "md" | "sm" | "xs";
|
505
|
-
download?: string;
|
506
|
-
href?: string;
|
507
|
-
} & React$1.RefAttributes<HTMLButtonElement>>;
|
508
|
-
declare const Clipboard: React$1.ForwardRefExoticComponent<Clipboard$1.RootProps & React$1.RefAttributes<HTMLDivElement>>;
|
509
|
-
|
510
510
|
interface ColorModeProviderProps extends ThemeProviderProps {
|
511
511
|
}
|
512
512
|
declare function ColorModeProvider(props: ColorModeProviderProps): React$1.JSX.Element;
|
@@ -686,126 +686,279 @@ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
|
|
686
686
|
*/
|
687
687
|
declare const TimePicker: ({ label: externalLabel, value, defaultValue, onChange, minuteInterval, disabled: isDisabledExternally, name, ...boxProps }: TimePickerProps) => React__default.JSX.Element;
|
688
688
|
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
VyUtvikling = "VyUtvikling",
|
695
|
-
CargoNet = "CargoNet"
|
696
|
-
}
|
697
|
-
|
698
|
-
declare const themes: {
|
699
|
-
VyDigital: _chakra_ui_react.SystemContext;
|
700
|
-
CargoNet: _chakra_ui_react.SystemContext;
|
701
|
-
VyUtvikling: _chakra_ui_react.SystemContext;
|
702
|
-
};
|
703
|
-
declare const system: _chakra_ui_react.SystemContext;
|
704
|
-
|
705
|
-
declare enum Language {
|
706
|
-
NorwegianBokmal = "nb",
|
707
|
-
NorwegianNynorsk = "nn",
|
708
|
-
Swedish = "sv",
|
709
|
-
English = "en"
|
689
|
+
interface DialogContentProps extends Dialog.ContentProps {
|
690
|
+
portalled?: boolean;
|
691
|
+
portalRef?: React$1.RefObject<HTMLElement>;
|
692
|
+
backdrop?: boolean;
|
693
|
+
children?: React$1.ReactNode;
|
710
694
|
}
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
};
|
723
|
-
/**
|
724
|
-
* A language provider component.
|
725
|
-
*
|
726
|
-
* This component should wrap your entire application. It will provide the language to all components that use it.
|
727
|
-
*
|
728
|
-
* This is done by the SporProvider component, so most likely, you won't need to use it directly, unless you want to use a specific language for a specific part of your application.
|
729
|
-
*
|
730
|
-
* ```tsx
|
731
|
-
* import { LanguageProvider, Language } from "@vygruppen/spor-react";
|
732
|
-
*
|
733
|
-
* const App = () => {
|
734
|
-
* return (
|
735
|
-
* <LanguageProvider language={Language.NorwegianBokmal}>
|
736
|
-
* <Routes />
|
737
|
-
* </LanguageProvider>
|
738
|
-
* );
|
739
|
-
* }
|
740
|
-
* ```
|
741
|
-
*
|
742
|
-
*/
|
743
|
-
declare function LanguageProvider({ language, children, }: LanguageProviderProps): React__default.JSX.Element;
|
744
|
-
/**
|
745
|
-
* A hook that returns translation utilities. Typically used to translate text.
|
746
|
-
*
|
747
|
-
* ```tsx
|
748
|
-
* const Example = () => {
|
749
|
-
* const { t } = useTranslation();
|
750
|
-
* return <p>{t(texts.greeting)}</p>;
|
751
|
-
* }
|
752
|
-
* const texts = {
|
753
|
-
* greeting: {
|
754
|
-
* nb: "Hei",
|
755
|
-
* nn: "Hei",
|
756
|
-
* sv: "Hej",
|
757
|
-
* en: "Hello",
|
758
|
-
* }
|
759
|
-
* }
|
760
|
-
* ```
|
761
|
-
*
|
762
|
-
* You can also use it to fetch the current language:
|
763
|
-
*
|
764
|
-
* ```tsx
|
765
|
-
* const Example = () => {
|
766
|
-
* const { language } = useTranslation();
|
767
|
-
* return <p>{language}</p>;
|
768
|
-
* };
|
769
|
-
* ```
|
770
|
-
*/
|
771
|
-
declare function useTranslation(): {
|
772
|
-
readonly t: (text: TranslationObject) => string;
|
773
|
-
readonly language: Language;
|
774
|
-
};
|
775
|
-
/** Utility function that creates type safe text objects with useTranslation
|
776
|
-
*
|
777
|
-
* ```tsx
|
778
|
-
* const texts = createTexts({
|
779
|
-
* example: {
|
780
|
-
* nb: "Eksempel",
|
781
|
-
* nn: "Døme",
|
782
|
-
* sv: "Exempel",
|
783
|
-
* en: "Example",
|
784
|
-
* },
|
785
|
-
* another: {
|
786
|
-
* example: {
|
787
|
-
* nb: <strong>Eksempel</strong>,
|
788
|
-
* nn: <strong>Døme</strong>,
|
789
|
-
* sv: <strong>Exempel</strong>,
|
790
|
-
* en: <strong>Example</strong>,
|
791
|
-
* }
|
792
|
-
* }
|
793
|
-
* })
|
794
|
-
* ```
|
795
|
-
*/
|
796
|
-
declare function createTexts<T extends Translations>(texts: T): T;
|
695
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
696
|
+
declare const DialogCloseTrigger: React$1.ForwardRefExoticComponent<Dialog.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
697
|
+
declare const DialogRoot: React$1.FC<Dialog.RootProps>;
|
698
|
+
declare const DialogFooter: React$1.ForwardRefExoticComponent<Dialog.FooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
699
|
+
declare const DialogHeader: React$1.ForwardRefExoticComponent<Dialog.HeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
700
|
+
declare const DialogBody: React$1.ForwardRefExoticComponent<Dialog.BodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
701
|
+
declare const DialogBackdrop: React$1.ForwardRefExoticComponent<Dialog.BackdropProps & React$1.RefAttributes<HTMLDivElement>>;
|
702
|
+
declare const DialogTitle: React$1.ForwardRefExoticComponent<Dialog.TitleProps & React$1.RefAttributes<HTMLDivElement>>;
|
703
|
+
declare const DialogDescription: React$1.ForwardRefExoticComponent<Dialog.DescriptionProps & React$1.RefAttributes<HTMLDivElement>>;
|
704
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<Dialog.TriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
705
|
+
declare const DialogActionTrigger: React$1.ForwardRefExoticComponent<Dialog.ActionTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
797
706
|
|
798
|
-
declare const
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
borderEndRadius: number;
|
804
|
-
};
|
805
|
-
"& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
|
806
|
-
borderRadius: number;
|
707
|
+
declare const drawerSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"title" | "content" | "description" | "body" | "footer" | "header" | "backdrop" | "positioner" | "closeTrigger", {
|
708
|
+
size: {
|
709
|
+
xs: {
|
710
|
+
content: {
|
711
|
+
width: "15rem";
|
807
712
|
};
|
808
|
-
|
713
|
+
};
|
714
|
+
sm: {
|
715
|
+
content: {
|
716
|
+
width: "25rem";
|
717
|
+
};
|
718
|
+
};
|
719
|
+
md: {
|
720
|
+
content: {
|
721
|
+
width: "40rem";
|
722
|
+
};
|
723
|
+
};
|
724
|
+
lg: {
|
725
|
+
content: {
|
726
|
+
width: "56rem";
|
727
|
+
};
|
728
|
+
};
|
729
|
+
xl: {
|
730
|
+
content: {
|
731
|
+
width: "68rem";
|
732
|
+
};
|
733
|
+
};
|
734
|
+
full: {
|
735
|
+
content: {
|
736
|
+
width: "100vw";
|
737
|
+
height: "100vh";
|
738
|
+
borderRadius: "0 !important";
|
739
|
+
paddingBottom: "4";
|
740
|
+
};
|
741
|
+
closeTrigger: {
|
742
|
+
position: "relative";
|
743
|
+
};
|
744
|
+
title: {
|
745
|
+
textAlign: "center";
|
746
|
+
};
|
747
|
+
};
|
748
|
+
};
|
749
|
+
placement: {
|
750
|
+
start: {
|
751
|
+
positioner: {
|
752
|
+
justifyContent: "flex-start";
|
753
|
+
};
|
754
|
+
content: {
|
755
|
+
paddingTop: "4";
|
756
|
+
_open: {
|
757
|
+
animationName: {
|
758
|
+
base: "slide-from-left-full, fade-in";
|
759
|
+
_rtl: "slide-from-right-full, fade-in";
|
760
|
+
};
|
761
|
+
};
|
762
|
+
_closed: {
|
763
|
+
animationName: {
|
764
|
+
base: "slide-to-left-full, fade-out";
|
765
|
+
_rtl: "slide-to-right-full, fade-out";
|
766
|
+
};
|
767
|
+
};
|
768
|
+
};
|
769
|
+
};
|
770
|
+
end: {
|
771
|
+
positioner: {
|
772
|
+
justifyContent: "flex-end";
|
773
|
+
};
|
774
|
+
content: {
|
775
|
+
paddingTop: "4";
|
776
|
+
_open: {
|
777
|
+
animationName: {
|
778
|
+
base: "slide-from-right-full, fade-in";
|
779
|
+
_rtl: "slide-from-left-full, fade-in";
|
780
|
+
};
|
781
|
+
};
|
782
|
+
_closed: {
|
783
|
+
animationName: {
|
784
|
+
base: "slide-to-right-full, fade-out";
|
785
|
+
_rtl: "slide-to-right-full, fade-out";
|
786
|
+
};
|
787
|
+
};
|
788
|
+
};
|
789
|
+
};
|
790
|
+
top: {
|
791
|
+
positioner: {
|
792
|
+
alignItems: "flex-start";
|
793
|
+
};
|
794
|
+
content: {
|
795
|
+
maxW: "100%";
|
796
|
+
marginX: "auto";
|
797
|
+
paddingTop: "4";
|
798
|
+
borderBottomRadius: "lg";
|
799
|
+
_open: {
|
800
|
+
animationName: "slide-from-top-full, fade-in";
|
801
|
+
};
|
802
|
+
_closed: {
|
803
|
+
animationName: "slide-to-top-full, fade-out";
|
804
|
+
};
|
805
|
+
};
|
806
|
+
};
|
807
|
+
bottom: {
|
808
|
+
positioner: {
|
809
|
+
alignItems: "flex-end";
|
810
|
+
};
|
811
|
+
content: {
|
812
|
+
maxW: "100%";
|
813
|
+
marginX: "auto";
|
814
|
+
paddingBottom: "4";
|
815
|
+
borderTopRadius: "lg";
|
816
|
+
_open: {
|
817
|
+
animationName: "slide-from-bottom-full, fade-in";
|
818
|
+
};
|
819
|
+
_closed: {
|
820
|
+
animationName: "slide-to-bottom-full, fade-out";
|
821
|
+
};
|
822
|
+
};
|
823
|
+
};
|
824
|
+
};
|
825
|
+
}>;
|
826
|
+
|
827
|
+
type DrawerVariantProps = RecipeVariantProps<typeof drawerSlotRecipe>;
|
828
|
+
type DrawerProps = Omit<Drawer$1.RootProps, "colorPalette" | "contained" | "unstyled"> & Drawer$1.RootProps & PropsWithChildren<DrawerVariantProps> & {
|
829
|
+
children: React.ReactNode;
|
830
|
+
};
|
831
|
+
|
832
|
+
declare const DrawerContent: React__default.ForwardRefExoticComponent<Drawer$1.ContentProps & {
|
833
|
+
size?: _chakra_ui_react.ConditionalValue<"sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined>;
|
834
|
+
placement?: _chakra_ui_react.ConditionalValue<"bottom" | "top" | "end" | "start" | undefined>;
|
835
|
+
} & {
|
836
|
+
children?: React__default.ReactNode | undefined;
|
837
|
+
} & {
|
838
|
+
children: React__default.ReactNode;
|
839
|
+
portalled?: boolean;
|
840
|
+
portalRef?: React__default.RefObject<HTMLElement>;
|
841
|
+
} & React__default.RefAttributes<HTMLDivElement>>;
|
842
|
+
declare const CloseDrawerLine: React__default.ForwardRefExoticComponent<React__default.RefAttributes<HTMLButtonElement>>;
|
843
|
+
declare const DrawerCloseTrigger: React__default.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
844
|
+
declare const DrawerBackTrigger: React__default.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
845
|
+
declare const DrawerFullScreenHeader: React__default.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
|
846
|
+
backTrigger?: boolean;
|
847
|
+
title?: string;
|
848
|
+
} & React__default.RefAttributes<HTMLDivElement>>;
|
849
|
+
declare const Drawer: (props: DrawerProps) => React__default.JSX.Element;
|
850
|
+
declare const DrawerTrigger: React__default.ForwardRefExoticComponent<Drawer$1.TriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
851
|
+
declare const DrawerFooter: React__default.ForwardRefExoticComponent<Drawer$1.FooterProps & React__default.RefAttributes<HTMLDivElement>>;
|
852
|
+
declare const DrawerBody: React__default.ForwardRefExoticComponent<Drawer$1.BodyProps & React__default.RefAttributes<HTMLDivElement>>;
|
853
|
+
declare const DrawerBackdrop: React__default.ForwardRefExoticComponent<Drawer$1.BackdropProps & React__default.RefAttributes<HTMLDivElement>>;
|
854
|
+
declare const DrawerTitle: React__default.ForwardRefExoticComponent<Drawer$1.TitleProps & React__default.RefAttributes<HTMLDivElement>>;
|
855
|
+
declare const DrawerActionTrigger: React__default.ForwardRefExoticComponent<Drawer$1.ActionTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
856
|
+
declare const DrawerHeader: React__default.ForwardRefExoticComponent<Drawer$1.HeaderProps & React__default.RefAttributes<HTMLDivElement>>;
|
857
|
+
|
858
|
+
declare enum Language {
|
859
|
+
NorwegianBokmal = "nb",
|
860
|
+
NorwegianNynorsk = "nn",
|
861
|
+
Swedish = "sv",
|
862
|
+
English = "en"
|
863
|
+
}
|
864
|
+
type TranslationObject = {
|
865
|
+
[key in Language]: string | React__default.ReactElement;
|
866
|
+
};
|
867
|
+
type TranslationFunction = (...args: Array<string | number>) => TranslationObject;
|
868
|
+
type Translation = TranslationObject | TranslationFunction;
|
869
|
+
type Translations = {
|
870
|
+
[key: string]: Translation | Translations;
|
871
|
+
};
|
872
|
+
type LanguageProviderProps = {
|
873
|
+
language: Language;
|
874
|
+
children: React__default.ReactElement;
|
875
|
+
};
|
876
|
+
/**
|
877
|
+
* A language provider component.
|
878
|
+
*
|
879
|
+
* This component should wrap your entire application. It will provide the language to all components that use it.
|
880
|
+
*
|
881
|
+
* This is done by the SporProvider component, so most likely, you won't need to use it directly, unless you want to use a specific language for a specific part of your application.
|
882
|
+
*
|
883
|
+
* ```tsx
|
884
|
+
* import { LanguageProvider, Language } from "@vygruppen/spor-react";
|
885
|
+
*
|
886
|
+
* const App = () => {
|
887
|
+
* return (
|
888
|
+
* <LanguageProvider language={Language.NorwegianBokmal}>
|
889
|
+
* <Routes />
|
890
|
+
* </LanguageProvider>
|
891
|
+
* );
|
892
|
+
* }
|
893
|
+
* ```
|
894
|
+
*
|
895
|
+
*/
|
896
|
+
declare function LanguageProvider({ language, children, }: LanguageProviderProps): React__default.JSX.Element;
|
897
|
+
/**
|
898
|
+
* A hook that returns translation utilities. Typically used to translate text.
|
899
|
+
*
|
900
|
+
* ```tsx
|
901
|
+
* const Example = () => {
|
902
|
+
* const { t } = useTranslation();
|
903
|
+
* return <p>{t(texts.greeting)}</p>;
|
904
|
+
* }
|
905
|
+
* const texts = {
|
906
|
+
* greeting: {
|
907
|
+
* nb: "Hei",
|
908
|
+
* nn: "Hei",
|
909
|
+
* sv: "Hej",
|
910
|
+
* en: "Hello",
|
911
|
+
* }
|
912
|
+
* }
|
913
|
+
* ```
|
914
|
+
*
|
915
|
+
* You can also use it to fetch the current language:
|
916
|
+
*
|
917
|
+
* ```tsx
|
918
|
+
* const Example = () => {
|
919
|
+
* const { language } = useTranslation();
|
920
|
+
* return <p>{language}</p>;
|
921
|
+
* };
|
922
|
+
* ```
|
923
|
+
*/
|
924
|
+
declare function useTranslation(): {
|
925
|
+
readonly t: (text: TranslationObject) => string;
|
926
|
+
readonly language: Language;
|
927
|
+
};
|
928
|
+
/** Utility function that creates type safe text objects with useTranslation
|
929
|
+
*
|
930
|
+
* ```tsx
|
931
|
+
* const texts = createTexts({
|
932
|
+
* example: {
|
933
|
+
* nb: "Eksempel",
|
934
|
+
* nn: "Døme",
|
935
|
+
* sv: "Exempel",
|
936
|
+
* en: "Example",
|
937
|
+
* },
|
938
|
+
* another: {
|
939
|
+
* example: {
|
940
|
+
* nb: <strong>Eksempel</strong>,
|
941
|
+
* nn: <strong>Døme</strong>,
|
942
|
+
* sv: <strong>Exempel</strong>,
|
943
|
+
* en: <strong>Example</strong>,
|
944
|
+
* }
|
945
|
+
* }
|
946
|
+
* })
|
947
|
+
* ```
|
948
|
+
*/
|
949
|
+
declare function createTexts<T extends Translations>(texts: T): T;
|
950
|
+
|
951
|
+
declare const attachedInputsRecipe: _chakra_ui_react.RecipeDefinition<{
|
952
|
+
orientation: {
|
953
|
+
horizontal: {
|
954
|
+
flexDirection: "row";
|
955
|
+
"& > *:first-of-type:not(:last-of-type) [data-attachable]": {
|
956
|
+
borderEndRadius: number;
|
957
|
+
};
|
958
|
+
"& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
|
959
|
+
borderRadius: number;
|
960
|
+
};
|
961
|
+
"& > *:not(:first-of-type):last-of-type [data-attachable]": {
|
809
962
|
borderStartRadius: number;
|
810
963
|
};
|
811
964
|
};
|
@@ -1205,7 +1358,7 @@ declare function ItemDescription({ children }: {
|
|
1205
1358
|
children: React__default.ReactNode;
|
1206
1359
|
}): React__default.JSX.Element;
|
1207
1360
|
|
1208
|
-
declare const nativeSelectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"
|
1361
|
+
declare const nativeSelectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "root" | "field", {
|
1209
1362
|
variant: {
|
1210
1363
|
core: {
|
1211
1364
|
field: {
|
@@ -1510,163 +1663,6 @@ declare const SearchInput: React__default.ForwardRefExoticComponent<_chakra_ui_r
|
|
1510
1663
|
onReset?: () => void;
|
1511
1664
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
1512
1665
|
|
1513
|
-
declare const switchSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "label" | "control" | "thumb", {
|
1514
|
-
size: {
|
1515
|
-
sm: {
|
1516
|
-
root: {
|
1517
|
-
"--switch-width": "3.3rem";
|
1518
|
-
"--switch-height": "1.5rem";
|
1519
|
-
};
|
1520
|
-
control: {
|
1521
|
-
borderRadius: "lg";
|
1522
|
-
padding: "0.12rem";
|
1523
|
-
};
|
1524
|
-
};
|
1525
|
-
md: {
|
1526
|
-
root: {
|
1527
|
-
"--switch-width": "4.1rem";
|
1528
|
-
"--switch-height": "1.8rem";
|
1529
|
-
};
|
1530
|
-
control: {
|
1531
|
-
borderRadius: "xl";
|
1532
|
-
padding: number;
|
1533
|
-
};
|
1534
|
-
};
|
1535
|
-
lg: {
|
1536
|
-
root: {
|
1537
|
-
"--switch-width": "4.8rem";
|
1538
|
-
"--switch-height": "2.25rem";
|
1539
|
-
};
|
1540
|
-
control: {
|
1541
|
-
borderRadius: "2xl";
|
1542
|
-
padding: number;
|
1543
|
-
};
|
1544
|
-
};
|
1545
|
-
};
|
1546
|
-
}>;
|
1547
|
-
|
1548
|
-
type SwitchVariants = RecipeVariantProps<typeof switchSlotRecipe>;
|
1549
|
-
type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & PropsWithChildren<SwitchVariants> & {
|
1550
|
-
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
|
1551
|
-
rootRef?: React__default.Ref<HTMLLabelElement>;
|
1552
|
-
trackLabel?: {
|
1553
|
-
on: React__default.ReactNode;
|
1554
|
-
off: React__default.ReactNode;
|
1555
|
-
};
|
1556
|
-
thumbLabel?: {
|
1557
|
-
on: React__default.ReactNode;
|
1558
|
-
off: React__default.ReactNode;
|
1559
|
-
};
|
1560
|
-
size?: ConditionalValue<"sm" | "md" | "lg">;
|
1561
|
-
label?: React__default.ReactNode;
|
1562
|
-
onCheckedChange?: (checked: boolean) => void;
|
1563
|
-
};
|
1564
|
-
/**
|
1565
|
-
* A switch lets you toggle between on and off, yes and no. It's an alternative to a checkbox.
|
1566
|
-
*
|
1567
|
-
* You can set a label inside of the Switch component by defining the `label` prop.
|
1568
|
-
*
|
1569
|
-
* ```tsx
|
1570
|
-
* <Switch label="This is a label"/>
|
1571
|
-
* ```
|
1572
|
-
*
|
1573
|
-
* Switches are available in three different sizes - `sm`, `md` and `lg`.
|
1574
|
-
*
|
1575
|
-
* ```tsx
|
1576
|
-
*
|
1577
|
-
* <Switch size="sm" />
|
1578
|
-
*
|
1579
|
-
* ```
|
1580
|
-
*/
|
1581
|
-
declare const Switch: React__default.ForwardRefExoticComponent<Switch$1.RootProps & {
|
1582
|
-
size?: ConditionalValue<"sm" | "md" | "lg" | undefined>;
|
1583
|
-
} & {
|
1584
|
-
children?: React__default.ReactNode | undefined;
|
1585
|
-
} & {
|
1586
|
-
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
|
1587
|
-
rootRef?: React__default.Ref<HTMLLabelElement>;
|
1588
|
-
trackLabel?: {
|
1589
|
-
on: React__default.ReactNode;
|
1590
|
-
off: React__default.ReactNode;
|
1591
|
-
};
|
1592
|
-
thumbLabel?: {
|
1593
|
-
on: React__default.ReactNode;
|
1594
|
-
off: React__default.ReactNode;
|
1595
|
-
};
|
1596
|
-
size?: ConditionalValue<"sm" | "md" | "lg">;
|
1597
|
-
label?: React__default.ReactNode;
|
1598
|
-
onCheckedChange?: (checked: boolean) => void;
|
1599
|
-
} & React__default.RefAttributes<HTMLInputElement>>;
|
1600
|
-
|
1601
|
-
declare const textareaRecipe: _chakra_ui_react.RecipeDefinition<{
|
1602
|
-
variant: {
|
1603
|
-
core: {
|
1604
|
-
backgroundColor?: "transparent" | undefined;
|
1605
|
-
outline?: "1px solid" | undefined;
|
1606
|
-
outlineColor?: "core.outline" | undefined;
|
1607
|
-
_hover?: {
|
1608
|
-
outline: "2px solid";
|
1609
|
-
outlineColor: "core.outline.hover";
|
1610
|
-
_active: {
|
1611
|
-
outline: "1px solid";
|
1612
|
-
outlineColor: "outline.disabled";
|
1613
|
-
backgroundColor: "core.surface.active";
|
1614
|
-
};
|
1615
|
-
} | undefined;
|
1616
|
-
_focus?: {
|
1617
|
-
outline: "2px solid";
|
1618
|
-
outlineColor: "outline.focus";
|
1619
|
-
} | undefined;
|
1620
|
-
};
|
1621
|
-
floating: {
|
1622
|
-
boxShadow?: "sm" | undefined;
|
1623
|
-
bg?: "floating.surface" | undefined;
|
1624
|
-
outline?: "1px solid" | undefined;
|
1625
|
-
outlineColor?: "floating.outline" | undefined;
|
1626
|
-
_hover?: {
|
1627
|
-
outline: "1px solid";
|
1628
|
-
outlineColor: "floating.outline.hover";
|
1629
|
-
} | undefined;
|
1630
|
-
_active?: {
|
1631
|
-
outline: "1px solid";
|
1632
|
-
outlineColor: "floating.outline.active";
|
1633
|
-
backgroundColor: "floating.surface.active";
|
1634
|
-
} | undefined;
|
1635
|
-
focus?: {
|
1636
|
-
outline: string;
|
1637
|
-
outlineColor: string;
|
1638
|
-
} | undefined;
|
1639
|
-
};
|
1640
|
-
};
|
1641
|
-
}>;
|
1642
|
-
|
1643
|
-
type TextareaVariants = RecipeVariantProps<typeof textareaRecipe>;
|
1644
|
-
type TextareaProps = Exclude<TextareaProps$1, "size" | "colorPalette"> & FieldProps & PropsWithChildren<TextareaVariants> & {
|
1645
|
-
label: ReactNode;
|
1646
|
-
};
|
1647
|
-
/**
|
1648
|
-
*
|
1649
|
-
* A simple Textarea component:
|
1650
|
-
*
|
1651
|
-
* ```tsx
|
1652
|
-
* <Textarea label="Description" />
|
1653
|
-
* ```
|
1654
|
-
*
|
1655
|
-
* Textarea has two variants core, and floating.
|
1656
|
-
*
|
1657
|
-
*/
|
1658
|
-
declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps$1 & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1659
|
-
children?: ReactNode | undefined;
|
1660
|
-
} & {
|
1661
|
-
label?: React__default.ReactNode;
|
1662
|
-
helperText?: React__default.ReactNode;
|
1663
|
-
errorText?: React__default.ReactNode;
|
1664
|
-
} & {
|
1665
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
|
1666
|
-
} & {
|
1667
|
-
label: ReactNode;
|
1668
|
-
} & React__default.RefAttributes<HTMLTextAreaElement>>;
|
1669
|
-
|
1670
1666
|
declare const selectSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "item" | "indicator" | "label" | "control" | "itemText" | "itemDescription" | "trigger" | "indicatorGroup" | "selectContent" | "itemGroup" | "itemGroupLabel" | "valueText", {
|
1671
1667
|
variant: {
|
1672
1668
|
core: {
|
@@ -1826,16 +1822,166 @@ declare const SelectLabel: React$1.ForwardRefExoticComponent<Select$1.LabelProps
|
|
1826
1822
|
declare const SelectItemText: React$1.ForwardRefExoticComponent<Select$1.ItemTextProps & React$1.RefAttributes<HTMLDivElement>>;
|
1827
1823
|
declare const SelectRoot: Select$1.RootComponent;
|
1828
1824
|
|
1829
|
-
declare const
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1825
|
+
declare const switchSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "label" | "control" | "thumb", {
|
1826
|
+
size: {
|
1827
|
+
sm: {
|
1828
|
+
root: {
|
1829
|
+
"--switch-width": "3.3rem";
|
1830
|
+
"--switch-height": "1.5rem";
|
1831
|
+
};
|
1832
|
+
control: {
|
1833
|
+
borderRadius: "lg";
|
1834
|
+
padding: "0.12rem";
|
1835
|
+
};
|
1836
|
+
};
|
1837
|
+
md: {
|
1838
|
+
root: {
|
1839
|
+
"--switch-width": "4.1rem";
|
1840
|
+
"--switch-height": "1.8rem";
|
1841
|
+
};
|
1842
|
+
control: {
|
1843
|
+
borderRadius: "xl";
|
1844
|
+
padding: number;
|
1845
|
+
};
|
1846
|
+
};
|
1847
|
+
lg: {
|
1848
|
+
root: {
|
1849
|
+
"--switch-width": "4.8rem";
|
1850
|
+
"--switch-height": "2.25rem";
|
1851
|
+
};
|
1852
|
+
control: {
|
1853
|
+
borderRadius: "2xl";
|
1854
|
+
padding: number;
|
1855
|
+
};
|
1856
|
+
};
|
1857
|
+
};
|
1858
|
+
}>;
|
1859
|
+
|
1860
|
+
type SwitchVariants = RecipeVariantProps<typeof switchSlotRecipe>;
|
1861
|
+
type SwitchProps = Exclude<Switch$1.RootProps, "size" | "colorPalette"> & PropsWithChildren<SwitchVariants> & {
|
1862
|
+
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
|
1863
|
+
rootRef?: React__default.Ref<HTMLLabelElement>;
|
1864
|
+
trackLabel?: {
|
1865
|
+
on: React__default.ReactNode;
|
1866
|
+
off: React__default.ReactNode;
|
1867
|
+
};
|
1868
|
+
thumbLabel?: {
|
1869
|
+
on: React__default.ReactNode;
|
1870
|
+
off: React__default.ReactNode;
|
1871
|
+
};
|
1872
|
+
size?: ConditionalValue<"sm" | "md" | "lg">;
|
1873
|
+
label?: React__default.ReactNode;
|
1874
|
+
onCheckedChange?: (checked: boolean) => void;
|
1875
|
+
};
|
1876
|
+
/**
|
1877
|
+
* A switch lets you toggle between on and off, yes and no. It's an alternative to a checkbox.
|
1878
|
+
*
|
1879
|
+
* You can set a label inside of the Switch component by defining the `label` prop.
|
1880
|
+
*
|
1881
|
+
* ```tsx
|
1882
|
+
* <Switch label="This is a label"/>
|
1883
|
+
* ```
|
1884
|
+
*
|
1885
|
+
* Switches are available in three different sizes - `sm`, `md` and `lg`.
|
1886
|
+
*
|
1887
|
+
* ```tsx
|
1888
|
+
*
|
1889
|
+
* <Switch size="sm" />
|
1890
|
+
*
|
1891
|
+
* ```
|
1892
|
+
*/
|
1893
|
+
declare const Switch: React__default.ForwardRefExoticComponent<Switch$1.RootProps & {
|
1894
|
+
size?: ConditionalValue<"sm" | "md" | "lg" | undefined>;
|
1833
1895
|
} & {
|
1834
1896
|
children?: React__default.ReactNode | undefined;
|
1835
1897
|
} & {
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1898
|
+
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
|
1899
|
+
rootRef?: React__default.Ref<HTMLLabelElement>;
|
1900
|
+
trackLabel?: {
|
1901
|
+
on: React__default.ReactNode;
|
1902
|
+
off: React__default.ReactNode;
|
1903
|
+
};
|
1904
|
+
thumbLabel?: {
|
1905
|
+
on: React__default.ReactNode;
|
1906
|
+
off: React__default.ReactNode;
|
1907
|
+
};
|
1908
|
+
size?: ConditionalValue<"sm" | "md" | "lg">;
|
1909
|
+
label?: React__default.ReactNode;
|
1910
|
+
onCheckedChange?: (checked: boolean) => void;
|
1911
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
1912
|
+
|
1913
|
+
declare const textareaRecipe: _chakra_ui_react.RecipeDefinition<{
|
1914
|
+
variant: {
|
1915
|
+
core: {
|
1916
|
+
backgroundColor?: "transparent" | undefined;
|
1917
|
+
outline?: "1px solid" | undefined;
|
1918
|
+
outlineColor?: "core.outline" | undefined;
|
1919
|
+
_hover?: {
|
1920
|
+
outline: "2px solid";
|
1921
|
+
outlineColor: "core.outline.hover";
|
1922
|
+
_active: {
|
1923
|
+
outline: "1px solid";
|
1924
|
+
outlineColor: "outline.disabled";
|
1925
|
+
backgroundColor: "core.surface.active";
|
1926
|
+
};
|
1927
|
+
} | undefined;
|
1928
|
+
_focus?: {
|
1929
|
+
outline: "2px solid";
|
1930
|
+
outlineColor: "outline.focus";
|
1931
|
+
} | undefined;
|
1932
|
+
};
|
1933
|
+
floating: {
|
1934
|
+
boxShadow?: "sm" | undefined;
|
1935
|
+
bg?: "floating.surface" | undefined;
|
1936
|
+
outline?: "1px solid" | undefined;
|
1937
|
+
outlineColor?: "floating.outline" | undefined;
|
1938
|
+
_hover?: {
|
1939
|
+
outline: "1px solid";
|
1940
|
+
outlineColor: "floating.outline.hover";
|
1941
|
+
} | undefined;
|
1942
|
+
_active?: {
|
1943
|
+
outline: "1px solid";
|
1944
|
+
outlineColor: "floating.outline.active";
|
1945
|
+
backgroundColor: "floating.surface.active";
|
1946
|
+
} | undefined;
|
1947
|
+
focus?: {
|
1948
|
+
outline: string;
|
1949
|
+
outlineColor: string;
|
1950
|
+
} | undefined;
|
1951
|
+
};
|
1952
|
+
};
|
1953
|
+
}>;
|
1954
|
+
|
1955
|
+
type TextareaVariants = RecipeVariantProps<typeof textareaRecipe>;
|
1956
|
+
type TextareaProps = Exclude<TextareaProps$1, "size" | "colorPalette"> & FieldProps & PropsWithChildren<TextareaVariants> & {
|
1957
|
+
label: ReactNode;
|
1958
|
+
};
|
1959
|
+
/**
|
1960
|
+
*
|
1961
|
+
* A simple Textarea component:
|
1962
|
+
*
|
1963
|
+
* ```tsx
|
1964
|
+
* <Textarea label="Description" />
|
1965
|
+
* ```
|
1966
|
+
*
|
1967
|
+
* Textarea has two variants core, and floating.
|
1968
|
+
*
|
1969
|
+
*/
|
1970
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps$1 & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1971
|
+
children?: ReactNode | undefined;
|
1972
|
+
} & {
|
1973
|
+
label?: React__default.ReactNode;
|
1974
|
+
helperText?: React__default.ReactNode;
|
1975
|
+
errorText?: React__default.ReactNode;
|
1976
|
+
} & {
|
1977
|
+
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
|
1978
|
+
} & {
|
1979
|
+
label: ReactNode;
|
1980
|
+
} & React__default.RefAttributes<HTMLTextAreaElement>>;
|
1981
|
+
|
1982
|
+
declare const PressableCard: React__default.ForwardRefExoticComponent<{
|
1983
|
+
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "accent" | undefined>;
|
1984
|
+
} & ButtonProps$1 & React__default.RefAttributes<HTMLDivElement>>;
|
1839
1985
|
|
1840
1986
|
declare const RadioCard: React__default.ForwardRefExoticComponent<RadioCard$1.ItemProps & {
|
1841
1987
|
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | undefined>;
|
@@ -1853,6 +1999,17 @@ declare const RadioCardGroup: React__default.ForwardRefExoticComponent<{
|
|
1853
1999
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
1854
2000
|
declare const RadioCardLabel: React__default.ForwardRefExoticComponent<RadioCard$1.LabelProps & React__default.RefAttributes<HTMLDivElement>>;
|
1855
2001
|
|
2002
|
+
declare const Separator: React__default.ForwardRefExoticComponent<SeparatorProps & {
|
2003
|
+
variant?: _chakra_ui_react.ConditionalValue<"dashed" | "solid" | undefined>;
|
2004
|
+
size?: _chakra_ui_react.ConditionalValue<"sm" | "md" | "lg" | undefined>;
|
2005
|
+
orientation?: _chakra_ui_react.ConditionalValue<"horizontal" | "vertical" | undefined>;
|
2006
|
+
} & {
|
2007
|
+
children?: React__default.ReactNode | undefined;
|
2008
|
+
} & {
|
2009
|
+
size?: "sm" | "md" | "lg";
|
2010
|
+
variant?: "solid" | "dashed";
|
2011
|
+
} & React__default.RefAttributes<HTMLDivElement>>;
|
2012
|
+
|
1856
2013
|
declare const staticCardRecipe: _chakra_ui_react.RecipeDefinition<{
|
1857
2014
|
colorPalette: {
|
1858
2015
|
white: {
|
@@ -1867,55 +2024,28 @@ declare const staticCardRecipe: _chakra_ui_react.RecipeDefinition<{
|
|
1867
2024
|
};
|
1868
2025
|
darkYellow: {
|
1869
2026
|
backgroundColor: "surface.color.yellow";
|
1870
|
-
};
|
1871
|
-
red: {
|
1872
|
-
backgroundColor: "surface.color.red";
|
1873
|
-
};
|
1874
|
-
green: {
|
1875
|
-
backgroundColor: "surface.color.green";
|
1876
|
-
};
|
1877
|
-
blue: {
|
1878
|
-
backgroundColor: "surface.color.blue";
|
1879
|
-
};
|
1880
|
-
orange: {
|
1881
|
-
backgroundColor: "surface.color.orange";
|
1882
|
-
};
|
1883
|
-
};
|
1884
|
-
}>;
|
1885
|
-
|
1886
|
-
type StaticCardProps = RecipeVariantProps<typeof staticCardRecipe> & BoxProps;
|
1887
|
-
declare const StaticCard: React__default.ForwardRefExoticComponent<{
|
1888
|
-
colorPalette?: _chakra_ui_react.ConditionalValue<"white" | "blue" | "green" | "grey" | "orange" | "red" | "yellow" | "darkYellow" | undefined>;
|
1889
|
-
} & BoxProps & React__default.RefAttributes<HTMLDivElement>>;
|
1890
|
-
|
1891
|
-
declare const PressableCard: React__default.ForwardRefExoticComponent<{
|
1892
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "accent" | undefined>;
|
1893
|
-
} & ButtonProps$1 & React__default.RefAttributes<HTMLDivElement>>;
|
1894
|
-
|
1895
|
-
type Variant$1 = "local-train" | "region-train" | "region-express-train" | "long-distance-train" | "airport-express-train" | "vy-bus" | "local-bus" | "ferry" | "subway" | "tram" | "alt-transport" | "walk";
|
1896
|
-
type Size = "sm" | "md" | "lg";
|
1897
|
-
type TagProps = VariantProps$1 & {
|
1898
|
-
size: Size;
|
1899
|
-
title: string;
|
1900
|
-
description?: string;
|
1901
|
-
};
|
1902
|
-
type DefaultVariantProps$1 = {
|
1903
|
-
variant: Variant$1;
|
1904
|
-
};
|
1905
|
-
type CustomVariantProps = {
|
1906
|
-
variant: "custom";
|
1907
|
-
/** When variant="custom", the foreground color of the tag */
|
1908
|
-
foregroundColor: string;
|
1909
|
-
/** When variant="custom", the background color of the tag */
|
1910
|
-
backgroundColor: string;
|
1911
|
-
/** When variant="custom", this is the icon you want to display.
|
1912
|
-
* It should be one of the other variants
|
1913
|
-
*/
|
1914
|
-
customIconVariant: Variant$1;
|
1915
|
-
};
|
1916
|
-
type VariantProps$1 = DefaultVariantProps$1 | CustomVariantProps;
|
2027
|
+
};
|
2028
|
+
red: {
|
2029
|
+
backgroundColor: "surface.color.red";
|
2030
|
+
};
|
2031
|
+
green: {
|
2032
|
+
backgroundColor: "surface.color.green";
|
2033
|
+
};
|
2034
|
+
blue: {
|
2035
|
+
backgroundColor: "surface.color.blue";
|
2036
|
+
};
|
2037
|
+
orange: {
|
2038
|
+
backgroundColor: "surface.color.orange";
|
2039
|
+
};
|
2040
|
+
};
|
2041
|
+
}>;
|
2042
|
+
|
2043
|
+
type StaticCardProps = RecipeVariantProps<typeof staticCardRecipe> & BoxProps;
|
2044
|
+
declare const StaticCard: React__default.ForwardRefExoticComponent<{
|
2045
|
+
colorPalette?: _chakra_ui_react.ConditionalValue<"white" | "blue" | "green" | "grey" | "orange" | "red" | "yellow" | "darkYellow" | undefined>;
|
2046
|
+
} & BoxProps & React__default.RefAttributes<HTMLDivElement>>;
|
1917
2047
|
|
1918
|
-
declare const infoTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"
|
2048
|
+
declare const infoTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "title" | "description" | "iconContainer" | "container" | "textContainer" | "walk", {
|
1919
2049
|
variant: {
|
1920
2050
|
walk: {
|
1921
2051
|
iconContainer: {
|
@@ -1965,6 +2095,29 @@ declare const infoTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"title" |
|
|
1965
2095
|
};
|
1966
2096
|
}>;
|
1967
2097
|
|
2098
|
+
type Variant$1 = "local-train" | "region-train" | "region-express-train" | "long-distance-train" | "airport-express-train" | "vy-bus" | "local-bus" | "ferry" | "subway" | "tram" | "alt-transport" | "walk";
|
2099
|
+
type Size = "sm" | "md" | "lg";
|
2100
|
+
type TagProps = VariantProps$1 & {
|
2101
|
+
size: Size;
|
2102
|
+
title: string;
|
2103
|
+
description?: string;
|
2104
|
+
};
|
2105
|
+
type DefaultVariantProps$1 = {
|
2106
|
+
variant: Variant$1;
|
2107
|
+
};
|
2108
|
+
type CustomVariantProps = {
|
2109
|
+
variant: "custom";
|
2110
|
+
/** When variant="custom", the foreground color of the tag */
|
2111
|
+
foregroundColor: string;
|
2112
|
+
/** When variant="custom", the background color of the tag */
|
2113
|
+
backgroundColor: string;
|
2114
|
+
/** When variant="custom", this is the icon you want to display.
|
2115
|
+
* It should be one of the other variants
|
2116
|
+
*/
|
2117
|
+
customIconVariant: Variant$1;
|
2118
|
+
};
|
2119
|
+
type VariantProps$1 = DefaultVariantProps$1 | CustomVariantProps;
|
2120
|
+
|
1968
2121
|
type InfoTagVariantProps = RecipeVariantProps<typeof infoTagSlotRecipe>;
|
1969
2122
|
type InfoTagProps = TagProps & PropsWithChildren<InfoTagVariantProps>;
|
1970
2123
|
/**
|
@@ -2001,7 +2154,7 @@ type InfoTagProps = TagProps & PropsWithChildren<InfoTagVariantProps>;
|
|
2001
2154
|
*/
|
2002
2155
|
declare const InfoTag: ({ variant, size, title, description, ...customProps }: InfoTagProps) => React__default.JSX.Element;
|
2003
2156
|
|
2004
|
-
declare const lineIconSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"
|
2157
|
+
declare const lineIconSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "root" | "title" | "iconContainer" | "desc", {
|
2005
2158
|
variant: {
|
2006
2159
|
"local-train": {
|
2007
2160
|
iconContainer: {
|
@@ -2155,7 +2308,7 @@ type LineIconProps = Exclude<BoxProps, "variant"> & VariantProps & PropsWithChil
|
|
2155
2308
|
*/
|
2156
2309
|
declare const LineIcon: React__default.ForwardRefExoticComponent<LineIconProps & React__default.RefAttributes<HTMLDivElement>>;
|
2157
2310
|
|
2158
|
-
declare const travelTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"
|
2311
|
+
declare const travelTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "title" | "description" | "iconContainer" | "container" | "textContainer" | "deviationIcon", {
|
2159
2312
|
deviationLevel: {
|
2160
2313
|
critical: {
|
2161
2314
|
container: {
|
@@ -2768,13 +2921,6 @@ declare const Skeleton: React$1.ForwardRefExoticComponent<SkeletonProps$1 & {
|
|
2768
2921
|
noOfLines?: number;
|
2769
2922
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
2770
2923
|
|
2771
|
-
declare const SvgBox: _chakra_ui_react.ChakraComponent<"svg", {}>;
|
2772
|
-
type VyLogoProps = BoxProps & React__default.SVGProps<SVGSVGElement>;
|
2773
|
-
declare const VyLogo: React__default.ForwardRefExoticComponent<Omit<VyLogoProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
2774
|
-
|
2775
|
-
type VyLogoPrideProps = BoxProps;
|
2776
|
-
declare const VyLogoPride: React__default.ForwardRefExoticComponent<BoxProps & React__default.RefAttributes<SVGSVGElement>>;
|
2777
|
-
|
2778
2924
|
type CargonetLogoProps = {
|
2779
2925
|
/** The color of the logo
|
2780
2926
|
*
|
@@ -2785,7 +2931,14 @@ type CargonetLogoProps = {
|
|
2785
2931
|
};
|
2786
2932
|
declare const CargonetLogo: React__default.ForwardRefExoticComponent<CargonetLogoProps & React__default.RefAttributes<SVGSVGElement>>;
|
2787
2933
|
|
2788
|
-
declare const
|
2934
|
+
declare const SvgBox: _chakra_ui_react.ChakraComponent<"svg", {}>;
|
2935
|
+
type VyLogoProps = BoxProps & React__default.SVGProps<SVGSVGElement>;
|
2936
|
+
declare const VyLogo: React__default.ForwardRefExoticComponent<Omit<VyLogoProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
2937
|
+
|
2938
|
+
type VyLogoPrideProps = BoxProps;
|
2939
|
+
declare const VyLogoPride: React__default.ForwardRefExoticComponent<BoxProps & React__default.RefAttributes<SVGSVGElement>>;
|
2940
|
+
|
2941
|
+
declare const mediaControllerSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" | "root", {
|
2789
2942
|
variant: {
|
2790
2943
|
play: {
|
2791
2944
|
root: {
|
@@ -2913,175 +3066,6 @@ declare const SkipButton: React__default.ForwardRefExoticComponent<BoxProps & {
|
|
2913
3066
|
size: "sm" | "lg";
|
2914
3067
|
} & React__default.RefAttributes<HTMLButtonElement>>;
|
2915
3068
|
|
2916
|
-
declare const drawerSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"title" | "content" | "description" | "body" | "footer" | "header" | "backdrop" | "positioner" | "closeTrigger", {
|
2917
|
-
size: {
|
2918
|
-
xs: {
|
2919
|
-
content: {
|
2920
|
-
width: "15rem";
|
2921
|
-
};
|
2922
|
-
};
|
2923
|
-
sm: {
|
2924
|
-
content: {
|
2925
|
-
width: "25rem";
|
2926
|
-
};
|
2927
|
-
};
|
2928
|
-
md: {
|
2929
|
-
content: {
|
2930
|
-
width: "40rem";
|
2931
|
-
};
|
2932
|
-
};
|
2933
|
-
lg: {
|
2934
|
-
content: {
|
2935
|
-
width: "56rem";
|
2936
|
-
};
|
2937
|
-
};
|
2938
|
-
xl: {
|
2939
|
-
content: {
|
2940
|
-
width: "68rem";
|
2941
|
-
};
|
2942
|
-
};
|
2943
|
-
full: {
|
2944
|
-
content: {
|
2945
|
-
width: "100vw";
|
2946
|
-
height: "100vh";
|
2947
|
-
borderRadius: "0 !important";
|
2948
|
-
paddingBottom: "4";
|
2949
|
-
};
|
2950
|
-
closeTrigger: {
|
2951
|
-
position: "relative";
|
2952
|
-
};
|
2953
|
-
title: {
|
2954
|
-
textAlign: "center";
|
2955
|
-
};
|
2956
|
-
};
|
2957
|
-
};
|
2958
|
-
placement: {
|
2959
|
-
start: {
|
2960
|
-
positioner: {
|
2961
|
-
justifyContent: "flex-start";
|
2962
|
-
};
|
2963
|
-
content: {
|
2964
|
-
paddingTop: "4";
|
2965
|
-
_open: {
|
2966
|
-
animationName: {
|
2967
|
-
base: "slide-from-left-full, fade-in";
|
2968
|
-
_rtl: "slide-from-right-full, fade-in";
|
2969
|
-
};
|
2970
|
-
};
|
2971
|
-
_closed: {
|
2972
|
-
animationName: {
|
2973
|
-
base: "slide-to-left-full, fade-out";
|
2974
|
-
_rtl: "slide-to-right-full, fade-out";
|
2975
|
-
};
|
2976
|
-
};
|
2977
|
-
};
|
2978
|
-
};
|
2979
|
-
end: {
|
2980
|
-
positioner: {
|
2981
|
-
justifyContent: "flex-end";
|
2982
|
-
};
|
2983
|
-
content: {
|
2984
|
-
paddingTop: "4";
|
2985
|
-
_open: {
|
2986
|
-
animationName: {
|
2987
|
-
base: "slide-from-right-full, fade-in";
|
2988
|
-
_rtl: "slide-from-left-full, fade-in";
|
2989
|
-
};
|
2990
|
-
};
|
2991
|
-
_closed: {
|
2992
|
-
animationName: {
|
2993
|
-
base: "slide-to-right-full, fade-out";
|
2994
|
-
_rtl: "slide-to-right-full, fade-out";
|
2995
|
-
};
|
2996
|
-
};
|
2997
|
-
};
|
2998
|
-
};
|
2999
|
-
top: {
|
3000
|
-
positioner: {
|
3001
|
-
alignItems: "flex-start";
|
3002
|
-
};
|
3003
|
-
content: {
|
3004
|
-
maxW: "100%";
|
3005
|
-
marginX: "auto";
|
3006
|
-
paddingTop: "4";
|
3007
|
-
borderBottomRadius: "lg";
|
3008
|
-
_open: {
|
3009
|
-
animationName: "slide-from-top-full, fade-in";
|
3010
|
-
};
|
3011
|
-
_closed: {
|
3012
|
-
animationName: "slide-to-top-full, fade-out";
|
3013
|
-
};
|
3014
|
-
};
|
3015
|
-
};
|
3016
|
-
bottom: {
|
3017
|
-
positioner: {
|
3018
|
-
alignItems: "flex-end";
|
3019
|
-
};
|
3020
|
-
content: {
|
3021
|
-
maxW: "100%";
|
3022
|
-
marginX: "auto";
|
3023
|
-
paddingBottom: "4";
|
3024
|
-
borderTopRadius: "lg";
|
3025
|
-
_open: {
|
3026
|
-
animationName: "slide-from-bottom-full, fade-in";
|
3027
|
-
};
|
3028
|
-
_closed: {
|
3029
|
-
animationName: "slide-to-bottom-full, fade-out";
|
3030
|
-
};
|
3031
|
-
};
|
3032
|
-
};
|
3033
|
-
};
|
3034
|
-
}>;
|
3035
|
-
|
3036
|
-
type DrawerVariantProps = RecipeVariantProps<typeof drawerSlotRecipe>;
|
3037
|
-
type DrawerProps = Omit<Drawer$1.RootProps, "colorPalette" | "contained" | "unstyled"> & Drawer$1.RootProps & PropsWithChildren<DrawerVariantProps> & {
|
3038
|
-
children: React.ReactNode;
|
3039
|
-
};
|
3040
|
-
|
3041
|
-
declare const DrawerContent: React__default.ForwardRefExoticComponent<Drawer$1.ContentProps & {
|
3042
|
-
size?: _chakra_ui_react.ConditionalValue<"sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined>;
|
3043
|
-
placement?: _chakra_ui_react.ConditionalValue<"bottom" | "top" | "end" | "start" | undefined>;
|
3044
|
-
} & {
|
3045
|
-
children?: React__default.ReactNode | undefined;
|
3046
|
-
} & {
|
3047
|
-
children: React__default.ReactNode;
|
3048
|
-
portalled?: boolean;
|
3049
|
-
portalRef?: React__default.RefObject<HTMLElement>;
|
3050
|
-
} & React__default.RefAttributes<HTMLDivElement>>;
|
3051
|
-
declare const CloseDrawerLine: React__default.ForwardRefExoticComponent<React__default.RefAttributes<HTMLButtonElement>>;
|
3052
|
-
declare const DrawerCloseTrigger: React__default.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
3053
|
-
declare const DrawerBackTrigger: React__default.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
3054
|
-
declare const DrawerFullScreenHeader: React__default.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
|
3055
|
-
backTrigger?: boolean;
|
3056
|
-
title?: string;
|
3057
|
-
} & React__default.RefAttributes<HTMLDivElement>>;
|
3058
|
-
declare const Drawer: (props: DrawerProps) => React__default.JSX.Element;
|
3059
|
-
declare const DrawerTrigger: React__default.ForwardRefExoticComponent<Drawer$1.TriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
3060
|
-
declare const DrawerFooter: React__default.ForwardRefExoticComponent<Drawer$1.FooterProps & React__default.RefAttributes<HTMLDivElement>>;
|
3061
|
-
declare const DrawerBody: React__default.ForwardRefExoticComponent<Drawer$1.BodyProps & React__default.RefAttributes<HTMLDivElement>>;
|
3062
|
-
declare const DrawerBackdrop: React__default.ForwardRefExoticComponent<Drawer$1.BackdropProps & React__default.RefAttributes<HTMLDivElement>>;
|
3063
|
-
declare const DrawerTitle: React__default.ForwardRefExoticComponent<Drawer$1.TitleProps & React__default.RefAttributes<HTMLDivElement>>;
|
3064
|
-
declare const DrawerActionTrigger: React__default.ForwardRefExoticComponent<Drawer$1.ActionTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
3065
|
-
declare const DrawerHeader: React__default.ForwardRefExoticComponent<Drawer$1.HeaderProps & React__default.RefAttributes<HTMLDivElement>>;
|
3066
|
-
|
3067
|
-
interface DialogContentProps extends Dialog.ContentProps {
|
3068
|
-
portalled?: boolean;
|
3069
|
-
portalRef?: React$1.RefObject<HTMLElement>;
|
3070
|
-
backdrop?: boolean;
|
3071
|
-
children?: React$1.ReactNode;
|
3072
|
-
}
|
3073
|
-
declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
3074
|
-
declare const DialogCloseTrigger: React$1.ForwardRefExoticComponent<Dialog.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
3075
|
-
declare const DialogRoot: React$1.FC<Dialog.RootProps>;
|
3076
|
-
declare const DialogFooter: React$1.ForwardRefExoticComponent<Dialog.FooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
3077
|
-
declare const DialogHeader: React$1.ForwardRefExoticComponent<Dialog.HeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
3078
|
-
declare const DialogBody: React$1.ForwardRefExoticComponent<Dialog.BodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
3079
|
-
declare const DialogBackdrop: React$1.ForwardRefExoticComponent<Dialog.BackdropProps & React$1.RefAttributes<HTMLDivElement>>;
|
3080
|
-
declare const DialogTitle: React$1.ForwardRefExoticComponent<Dialog.TitleProps & React$1.RefAttributes<HTMLDivElement>>;
|
3081
|
-
declare const DialogDescription: React$1.ForwardRefExoticComponent<Dialog.DescriptionProps & React$1.RefAttributes<HTMLDivElement>>;
|
3082
|
-
declare const DialogTrigger: React$1.ForwardRefExoticComponent<Dialog.TriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
3083
|
-
declare const DialogActionTrigger: React$1.ForwardRefExoticComponent<Dialog.ActionTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
3084
|
-
|
3085
3069
|
type NudgeProps = {
|
3086
3070
|
introducedDate: string;
|
3087
3071
|
} & PopoverRootProps;
|
@@ -3108,6 +3092,13 @@ declare const PaginationPrevTrigger: React$1.ForwardRefExoticComponent<Paginatio
|
|
3108
3092
|
declare const PaginationNextTrigger: React$1.ForwardRefExoticComponent<Pagination$1.NextTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
3109
3093
|
declare const PaginationItems: (props: React$1.HTMLAttributes<HTMLElement> & {}) => React$1.JSX.Element;
|
3110
3094
|
|
3095
|
+
declare const Popover: React__default.FC<Popover$1.RootProps>;
|
3096
|
+
declare const PopoverTrigger: React__default.ForwardRefExoticComponent<Popover$1.TriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
3097
|
+
type PopoverProps = Popover$1.ContentProps & React__default.RefAttributes<HTMLDivElement> & {
|
3098
|
+
showCloseButton?: boolean;
|
3099
|
+
};
|
3100
|
+
declare const PopoverContent: React__default.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
3101
|
+
|
3111
3102
|
declare const progressIndicatorRecipe: _chakra_ui_react.SlotRecipeDefinition<"root" | "container" | "circle" | "progressDot", _chakra_ui_react.SlotRecipeVariantRecord<"root" | "container" | "circle" | "progressDot">>;
|
3112
3103
|
|
3113
3104
|
type ProgressIndicatorVariantProps = RecipeVariantProps<typeof progressIndicatorRecipe>;
|
@@ -3139,6 +3130,15 @@ declare const ProgressIndicator: React__default.ForwardRefExoticComponent<BoxPro
|
|
3139
3130
|
colorPalette?: string;
|
3140
3131
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
3141
3132
|
|
3133
|
+
/** A string of CSS that should be injected in the global CSS space */
|
3134
|
+
declare const fontFaces: string;
|
3135
|
+
|
3136
|
+
declare enum Brand {
|
3137
|
+
VyDigital = "VyDigital",
|
3138
|
+
VyUtvikling = "VyUtvikling",
|
3139
|
+
CargoNet = "CargoNet"
|
3140
|
+
}
|
3141
|
+
|
3142
3142
|
type SporProviderProps = Omit<ChakraProviderProps, "value"> & {
|
3143
3143
|
language?: Language;
|
3144
3144
|
brand?: Brand;
|
@@ -3674,6 +3674,13 @@ declare const Table: React__default.ForwardRefExoticComponent<Table$1.RootProps
|
|
3674
3674
|
colorPalette?: "grey" | "green" | "white";
|
3675
3675
|
} & React__default.RefAttributes<HTMLTableElement>>;
|
3676
3676
|
|
3677
|
+
declare const themes: {
|
3678
|
+
VyDigital: _chakra_ui_react.SystemContext;
|
3679
|
+
CargoNet: _chakra_ui_react.SystemContext;
|
3680
|
+
VyUtvikling: _chakra_ui_react.SystemContext;
|
3681
|
+
};
|
3682
|
+
declare const system: _chakra_ui_react.SystemContext;
|
3683
|
+
|
3677
3684
|
type Variant = "info" | "success" | "error";
|
3678
3685
|
type ToastProps = {
|
3679
3686
|
duration?: number;
|
@@ -3767,11 +3774,4 @@ declare const Text: React__default.ForwardRefExoticComponent<Omit<TextProps$1, "
|
|
3767
3774
|
**/
|
3768
3775
|
declare function slugify(text: string | string[], maxLength?: number): string;
|
3769
3776
|
|
3770
|
-
declare const Popover: React__default.FC<Popover$1.RootProps>;
|
3771
|
-
declare const PopoverTrigger: React__default.ForwardRefExoticComponent<Popover$1.TriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
3772
|
-
type PopoverProps = Popover$1.ContentProps & React__default.RefAttributes<HTMLDivElement> & {
|
3773
|
-
showCloseButton?: boolean;
|
3774
|
-
};
|
3775
|
-
declare const PopoverContent: React__default.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
3776
|
-
|
3777
3777
|
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemTrigger, Alert, type AlertProps, AttachedInputs, type AttachedInputsProps, Badge, type BadgeProps, Brand, Breadcrumb, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonVariantProps, CardSelect, CardSelectContent, CardSelectTrigger, type CardSelectTriggerProps, CargonetLogo, type CargonetLogoProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, ChoiceChip, type ChoiceChipProps, Clipboard, ClipboardButton, CloseButton, type CloseButtonProps, CloseDrawerLine, Code, ColorInlineLoader, type ColorInlineLoaderProps, type ColorMode, ColorModeButton, ColorModeIcon, ColorModeProvider, type ColorModeProviderProps, ColorSpinner, type ColorSpinnerProps, Combobox, type ComboboxProps, ContentLoader, type ContentLoaderProps, type CountryCodeAndPhoneNumber, DarkFullScreenLoader, DarkInlineLoader, type DarkInlineLoaderProps, DarkSpinner, type DarkSpinnerProps, DatePicker, type DatePickerVariantProps, DateRangePicker, DialogActionTrigger, DialogBackdrop, DialogBody, DialogCloseTrigger, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger, Drawer, DrawerActionTrigger, DrawerBackTrigger, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerFooter, DrawerFullScreenHeader, DrawerHeader, DrawerTitle, DrawerTrigger, Expandable, ExpandableAlert, ExpandableItem, Fieldset, FieldsetContent, FieldsetErrorText, FieldsetHelperText, FieldsetLegend, FloatingActionButton, type GroupVariantProps, Heading, type HeadingProps, IconButton, type IconButtonProps, InfoTag, type InfoTagProps, Input, type InputProps, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, type LightInlineLoaderProps, LightSpinner, type LightSpinnerProps, LineIcon, type LineIconProps, type LinkProps, List, ListBox, ListIndicator, ListItem, type MediaControllerVariantProps, NativeSelect, type NativeSelectdProps, Nudge, NudgeActions, NudgeCloseTrigger, NudgeContent, type NudgeProps, NudgeTrigger, NudgeWizardStep, NumericStepper, type NumericStepperProps, Pagination, PaginationEllipsis, PaginationItem, PaginationItems, PaginationNextTrigger, PaginationPrevTrigger, PasswordInput, type PasswordInputProps, type PasswordVisibilityProps, PhoneNumberInput, PlayPauseButton, Popover, PopoverContent, type PopoverProps, PopoverTrigger, PressableCard, ProgressBar, type ProgressBarProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorVariantProps, ProgressLoader, type ProgressLoaderProps, type ProgressLoaderVariantProps, Radio, RadioCard, RadioCardGroup, RadioCardLabel, RadioGroup, type RadioProps, SearchInput, type SearchInputProps, Select, SelectContent, SelectItem, SelectItemGroup, SelectItemText, SelectLabel, type SelectProps, SelectRoot, SelectTrigger, SelectValueText, Separator, ServiceAlert, Skeleton, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, SkipButton, type SpinnerProps, SporProvider, StaticCard, type StaticCardProps, Stepper, StepperStep, type StepperVariantProps, SvgBox, Switch, type SwitchProps, Table, type TableProps, Tabs, TabsContent, TabsIndicator, TabsList, type TabsProps, TabsTrigger, Text, TextLink, type TextProps, Textarea, type TextareaProps, TimePicker, type TranslationObject, type Translations, TravelTag, type TravelTagProps, type UseColorModeReturn, VyLogo, VyLogoPride, type VyLogoPrideProps, createTexts, createToast, fontFaces, slugify, system, themes, useColorMode, useColorModeValue, useTranslation };
|