@vygruppen/spor-react 3.8.1 → 4.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/.turbo/turbo-build.log +12 -12
- package/CHANGELOG.md +27 -0
- package/dist/{CountryCodeSelect-UG3JHWO3.mjs → CountryCodeSelect-7WPJ6BDU.mjs} +1 -1
- package/dist/{chunk-HCSXVAA5.mjs → chunk-B77QE6EZ.mjs} +67 -98
- package/dist/index.d.mts +32 -73
- package/dist/index.d.ts +32 -73
- package/dist/index.js +71 -96
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/button/Button.tsx +2 -5
- package/src/button/ButtonGroup.tsx +1 -1
- package/src/button/FloatingActionButton.tsx +2 -11
- package/src/button/IconButton.tsx +1 -3
- package/src/datepicker/DatePicker.tsx +21 -13
- package/src/datepicker/DateRangePicker.tsx +2 -2
- package/src/link/TextLink.tsx +2 -6
- package/src/modal/Drawer.tsx +2 -2
- package/src/tab/Tabs.tsx +1 -11
- package/src/theme/components/button.ts +0 -20
- package/src/theme/components/close-button.ts +1 -1
- package/src/theme/components/drawer.ts +4 -3
- package/src/theme/components/link.ts +5 -46
- package/src/theme/components/modal.ts +1 -1
- package/src/theme/components/popover.ts +20 -4
- package/src/util/externals.tsx +2 -0
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DividerProps as DividerProps$1, As, BoxProps, StackProps as StackProps$1, AccordionProps as AccordionProps$1, AccordionItemProps, BreadcrumbProps as BreadcrumbProps$1, ButtonProps as ButtonProps$1, ButtonGroupProps as ButtonGroupProps$1, IconButtonProps as IconButtonProps$1, ComponentWithAs, ResponsiveValue, FlexProps, CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1, StackDirection, FormControlProps as FormControlProps$1, FormLabelProps as FormLabelProps$1, InputProps as InputProps$1, InputElementProps as InputElementProps$1, SelectProps, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SwitchProps as SwitchProps$1, TextareaProps as TextareaProps$1, LinkProps as LinkProps$1, SkeletonTextProps as SkeletonTextProps$1, ModalHeaderProps as ModalHeaderProps$1, DrawerContentProps, DrawerProps as DrawerProps$1, PopoverProps, ChakraProviderProps, TabsProps as TabsProps$1, TableProps as TableProps$1, BadgeProps as BadgeProps$1, CodeProps as CodeProps$1, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
2
|
-
export { AccordionButton, AccordionButtonProps, AccordionIcon, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, Box, BoxProps, Center, CenterProps, Collapse, CollapseProps, Container, ContainerProps, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormHelperText, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Img, ImgProps, InputGroup, InputGroupProps, LightMode, ListItem, ListItemProps, ListProps, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalFooter, ModalFooterProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, ScaleFade, ScaleFadeProps, SimpleGrid, SimpleGridProps, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, SpacerProps, Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCaption, TableCaptionProps, TableCellProps, TableColumnHeaderProps, TableFooterProps, TableHeadProps, TableRowProps, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, UseClipboardOptions, UseDisclosureProps, UseOutsideClickProps, VStack, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
2
|
+
export { AccordionButton, AccordionButtonProps, AccordionIcon, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, Box, BoxProps, Center, CenterProps, Collapse, CollapseProps, Container, ContainerProps, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormHelperText, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Img, ImgProps, InputGroup, InputGroupProps, LightMode, ListItem, ListItemProps, ListProps, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalFooter, ModalFooterProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, ScaleFade, ScaleFadeProps, SimpleGrid, SimpleGridProps, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, SpacerProps, Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCaption, TableCaptionProps, TableCellProps, TableColumnHeaderProps, TableFooterProps, TableHeadProps, TableRowProps, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, UseClipboardOptions, UseDisclosureProps, UseOutsideClickProps, VStack, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
3
3
|
import tokens__default from '@vygruppen/spor-design-tokens';
|
4
4
|
import * as tokens from '@vygruppen/spor-design-tokens';
|
5
5
|
export { tokens };
|
@@ -266,9 +266,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
|
|
266
266
|
*
|
267
267
|
* Defaults to "primary"
|
268
268
|
*/
|
269
|
-
variant?: "control" | "primary" | "secondary"
|
270
|
-
/** @deprecated Use `secondary` instead */
|
271
|
-
| "tertiary" | "additional" | "ghost" | "floating";
|
269
|
+
variant?: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
|
272
270
|
};
|
273
271
|
/**
|
274
272
|
* Buttons are used to trigger actions.
|
@@ -278,8 +276,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
|
|
278
276
|
* - `control`: This button is used for ticket controls only.
|
279
277
|
* - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
|
280
278
|
* - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
|
281
|
-
* - `
|
282
|
-
* - `additional`: Used for additional choices, like a less important tertiary action.
|
279
|
+
* - `additional`: Used for additional choices, like a less important secondary action.
|
283
280
|
* - `ghost`: Used inside other interactive elements, like date pickers and input fields.
|
284
281
|
* - `floating`: Used for floating actions, like a menu button in a menu.
|
285
282
|
*
|
@@ -292,7 +289,7 @@ type ButtonProps = Exclude<ButtonProps$1, "colorScheme" | "loadingText" | "size"
|
|
292
289
|
* There are also different sizes. You can specify which one you want with the `size` prop. The available sizes are "lg", "md", "sm" and "xs".
|
293
290
|
*
|
294
291
|
* ```tsx
|
295
|
-
* <Button variant="
|
292
|
+
* <Button variant="secondary" size="sm" onClick={cancelOrder}>
|
296
293
|
* Cancel trip
|
297
294
|
* </Button>
|
298
295
|
* ```
|
@@ -309,7 +306,7 @@ type ButtonGroupProps = ButtonGroupProps$1;
|
|
309
306
|
*
|
310
307
|
* ```tsx
|
311
308
|
* <ButtonGroup>
|
312
|
-
* <Button variant="
|
309
|
+
* <Button variant="secondary">Cancel</Button>
|
313
310
|
* <Button variant="primary">Save</Button>
|
314
311
|
* </ButtonGroup>
|
315
312
|
* ```
|
@@ -337,7 +334,7 @@ type ButtonGroupProps = ButtonGroupProps$1;
|
|
337
334
|
declare const ButtonGroup: _chakra_ui_system_dist_system_types.ComponentWithAs<"div", ButtonGroupProps$1>;
|
338
335
|
|
339
336
|
type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
|
340
|
-
variant: "control" | "primary" | "secondary" | "
|
337
|
+
variant: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating";
|
341
338
|
};
|
342
339
|
/**
|
343
340
|
* An icon-only button.
|
@@ -349,8 +346,7 @@ type IconButtonProps = Omit<IconButtonProps$1, "variant"> & {
|
|
349
346
|
* - `control`: This button is used for ticket controls only.
|
350
347
|
* - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
|
351
348
|
* - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
|
352
|
-
* - `
|
353
|
-
* - `additional`: Used for additional choices, like a less important tertiary action.
|
349
|
+
* - `additional`: Used for additional choices, like a less important secondary action.
|
354
350
|
* - `ghost`: Used inside other interactive elements, like date pickers and input fields.
|
355
351
|
* - `floating`: Used for floating actions, like a menu button in a menu.
|
356
352
|
*
|
@@ -393,13 +389,7 @@ type CloseButtonProps = Omit<IconButtonProps, "variant" | "aria-label"> & {
|
|
393
389
|
declare const CloseButton: _chakra_ui_system_dist_system_types.ComponentWithAs<"button", CloseButtonProps>;
|
394
390
|
|
395
391
|
type FloatingActionButtonProps = BoxProps & {
|
396
|
-
variant?:
|
397
|
-
/** @deprecated dark is deprecated please use accent*/
|
398
|
-
"green"
|
399
|
-
/** @deprecated dark is deprecated please use accent*/
|
400
|
-
| "light"
|
401
|
-
/** @deprecated dark is deprecated please use accent*/
|
402
|
-
| "dark" | "accent" | "base" | "brand";
|
392
|
+
variant?: "accent" | "base" | "brand";
|
403
393
|
placement?: "bottom right" | "bottom left" | "top right" | "top left";
|
404
394
|
icon: React__default.ReactNode;
|
405
395
|
children: React__default.ReactNode;
|
@@ -412,7 +402,7 @@ type FloatingActionButtonProps = BoxProps & {
|
|
412
402
|
*
|
413
403
|
* ```tsx
|
414
404
|
* <FloatingActionButton
|
415
|
-
* variant="
|
405
|
+
* variant="accent"
|
416
406
|
* icon={<TicketControlFill30Icon />}
|
417
407
|
* placement="bottom right"
|
418
408
|
* />
|
@@ -459,10 +449,10 @@ declare const Card: _chakra_ui_system_dist_system_types.ComponentWithAs<As, Card
|
|
459
449
|
/**
|
460
450
|
* A date picker component.
|
461
451
|
*
|
462
|
-
* There are
|
452
|
+
* There are three different variants – `base`, `floating` and `ghost`.
|
463
453
|
*
|
464
454
|
* ```tsx
|
465
|
-
* <DatePicker label="Dato" variant="
|
455
|
+
* <DatePicker label="Dato" variant="base" />
|
466
456
|
* ```
|
467
457
|
*/
|
468
458
|
declare const DatePicker: React__default.ForwardRefExoticComponent<AriaDatePickerProps<DateValue> & Pick<BoxProps, "width" | "minHeight"> & {
|
@@ -483,10 +473,10 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps,
|
|
483
473
|
/**
|
484
474
|
* A date range picker component.
|
485
475
|
*
|
486
|
-
* There are
|
476
|
+
* There are three variants to choose from – `base`, `floating` and `ghost`.
|
487
477
|
*
|
488
478
|
* ```tsx
|
489
|
-
* <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="
|
479
|
+
* <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="base" />
|
490
480
|
* ```
|
491
481
|
*/
|
492
482
|
declare function DateRangePicker({ variant, minHeight, startName, endName, withPortal, ...props }: DateRangePickerProps): React__default.JSX.Element;
|
@@ -1424,13 +1414,11 @@ type TravelTagProps = TagProps & BoxProps & {
|
|
1424
1414
|
declare const TravelTag: _chakra_ui_system_dist_system_types.ComponentWithAs<As, TravelTagProps>;
|
1425
1415
|
|
1426
1416
|
type LinkProps = Omit<LinkProps$1, "variant"> & {
|
1427
|
-
variant?: "primary" | "secondary"
|
1428
|
-
/** @deprecated Use `secondary` instead */
|
1429
|
-
| "tertiary";
|
1417
|
+
variant?: "primary" | "secondary";
|
1430
1418
|
};
|
1431
1419
|
/** Link to different sites or parts of site
|
1432
1420
|
*
|
1433
|
-
* You can specify the `variant` prop to get different link designs.
|
1421
|
+
* You can specify the `variant` prop to get different link designs.
|
1434
1422
|
*/
|
1435
1423
|
declare const TextLink: _chakra_ui_system_dist_system_types.ComponentWithAs<"a", LinkProps>;
|
1436
1424
|
|
@@ -1895,15 +1883,7 @@ type StepperStepProps = {
|
|
1895
1883
|
declare const StepperStep: ({ children, stepNumber }: StepperStepProps) => React__default.JSX.Element;
|
1896
1884
|
|
1897
1885
|
type TabsProps = Exclude<TabsProps$1, "colorScheme" | "variant" | "orientation" | "size"> & {
|
1898
|
-
colorScheme:
|
1899
|
-
/** @deprecated dark is deprecated please use accent*/
|
1900
|
-
"dark"
|
1901
|
-
/** @deprecated light is deprecated please use default*/
|
1902
|
-
| "light"
|
1903
|
-
/** @deprecated green is deprecated please use accent*/
|
1904
|
-
| "green"
|
1905
|
-
/** @deprecated grey is deprecated please use default*/
|
1906
|
-
| "grey" | "base" | "accent";
|
1886
|
+
colorScheme: "base" | "accent";
|
1907
1887
|
/** Defaults to `md` */
|
1908
1888
|
size?: "sm" | "md" | "lg" | "xl";
|
1909
1889
|
/** Defaults to `round` */
|
@@ -2341,20 +2321,6 @@ declare const theme: {
|
|
2341
2321
|
backgroundColor: string;
|
2342
2322
|
};
|
2343
2323
|
};
|
2344
|
-
tertiary: {
|
2345
|
-
_hover: {
|
2346
|
-
backgroundColor: string;
|
2347
|
-
};
|
2348
|
-
_active: {
|
2349
|
-
backgroundColor: string;
|
2350
|
-
};
|
2351
|
-
_focus: _chakra_ui_styled_system.SystemStyleObject;
|
2352
|
-
_focusVisible: _chakra_ui_styled_system.SystemStyleObject;
|
2353
|
-
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
2354
|
-
backgroundColor: string;
|
2355
|
-
color: string;
|
2356
|
-
fontWeight: string;
|
2357
|
-
};
|
2358
2324
|
additional: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2359
2325
|
_hover: {
|
2360
2326
|
boxShadow: string;
|
@@ -2405,7 +2371,7 @@ declare const theme: {
|
|
2405
2371
|
} | undefined;
|
2406
2372
|
defaultProps?: {
|
2407
2373
|
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
2408
|
-
variant?: "control" | "primary" | "secondary" | "
|
2374
|
+
variant?: "control" | "primary" | "secondary" | "additional" | "ghost" | "floating" | undefined;
|
2409
2375
|
colorScheme?: string | undefined;
|
2410
2376
|
} | undefined;
|
2411
2377
|
};
|
@@ -3123,6 +3089,7 @@ declare const theme: {
|
|
3123
3089
|
overlay: {
|
3124
3090
|
backgroundColor: string;
|
3125
3091
|
zIndex: string;
|
3092
|
+
color: string;
|
3126
3093
|
};
|
3127
3094
|
dialogContainer: {
|
3128
3095
|
display: string;
|
@@ -3132,7 +3099,7 @@ declare const theme: {
|
|
3132
3099
|
overflow: string;
|
3133
3100
|
};
|
3134
3101
|
dialog: {
|
3135
|
-
|
3102
|
+
backgroundColor: string;
|
3136
3103
|
color: string;
|
3137
3104
|
zIndex: string;
|
3138
3105
|
maxHeight: string | undefined;
|
@@ -3435,7 +3402,7 @@ declare const theme: {
|
|
3435
3402
|
} | undefined;
|
3436
3403
|
defaultProps?: {
|
3437
3404
|
size?: string | number | undefined;
|
3438
|
-
variant?: "base" | "green" | "light" | "
|
3405
|
+
variant?: "base" | "green" | "light" | "accent" | "brand" | "dark" | undefined;
|
3439
3406
|
colorScheme?: string | undefined;
|
3440
3407
|
} | undefined;
|
3441
3408
|
parts: ("text" | "container" | "icon")[];
|
@@ -3962,26 +3929,10 @@ declare const theme: {
|
|
3962
3929
|
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
3963
3930
|
color: string;
|
3964
3931
|
};
|
3965
|
-
tertiary: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3966
|
-
_hover: {
|
3967
|
-
color: string;
|
3968
|
-
backgroundColor: string;
|
3969
|
-
boxShadow: string;
|
3970
|
-
};
|
3971
|
-
_active: {
|
3972
|
-
color: string;
|
3973
|
-
backgroundColor: string;
|
3974
|
-
boxShadow: string;
|
3975
|
-
};
|
3976
|
-
_focus: _chakra_ui_styled_system.SystemStyleObject;
|
3977
|
-
_focusVisible: _chakra_ui_styled_system.SystemStyleObject;
|
3978
|
-
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
3979
|
-
color: string;
|
3980
|
-
};
|
3981
3932
|
} | undefined;
|
3982
3933
|
defaultProps?: {
|
3983
3934
|
size?: string | number | undefined;
|
3984
|
-
variant?: "primary" | "secondary" |
|
3935
|
+
variant?: "primary" | "secondary" | undefined;
|
3985
3936
|
colorScheme?: string | undefined;
|
3986
3937
|
} | undefined;
|
3987
3938
|
};
|
@@ -4239,7 +4190,7 @@ declare const theme: {
|
|
4239
4190
|
parts: ("body" | "dialog" | "footer" | "header" | "overlay" | "closeButton" | "dialogContainer")[];
|
4240
4191
|
};
|
4241
4192
|
Popover: {
|
4242
|
-
baseStyle?: {
|
4193
|
+
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
4243
4194
|
popper: {
|
4244
4195
|
zIndex: string;
|
4245
4196
|
};
|
@@ -4265,15 +4216,23 @@ declare const theme: {
|
|
4265
4216
|
clipPath: string;
|
4266
4217
|
};
|
4267
4218
|
closeButton: {
|
4268
|
-
|
4219
|
+
_active: {
|
4220
|
+
backgroundColor: string;
|
4221
|
+
};
|
4269
4222
|
borderRadius: string;
|
4270
4223
|
top: number;
|
4271
4224
|
insetEnd: number;
|
4272
4225
|
width: number;
|
4273
4226
|
height: number;
|
4274
4227
|
padding: number;
|
4228
|
+
_focus: _chakra_ui_styled_system.SystemStyleObject;
|
4229
|
+
_focusVisible: _chakra_ui_styled_system.SystemStyleObject;
|
4230
|
+
"&[data-focus]:not([data-focus-visible])": _chakra_ui_styled_system.SystemStyleObject;
|
4231
|
+
position: string;
|
4232
|
+
color: string;
|
4233
|
+
hover: string;
|
4275
4234
|
};
|
4276
|
-
} | undefined;
|
4235
|
+
}) | undefined;
|
4277
4236
|
sizes?: {
|
4278
4237
|
sm: {
|
4279
4238
|
content: {
|
package/dist/index.js
CHANGED
@@ -3484,37 +3484,53 @@ var init_DatePicker = __esm({
|
|
3484
3484
|
showYearNavigation
|
3485
3485
|
}
|
3486
3486
|
))));
|
3487
|
-
return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(
|
3488
|
-
react.
|
3487
|
+
return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(
|
3488
|
+
react.Box,
|
3489
3489
|
{
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3490
|
+
position: "relative",
|
3491
|
+
display: "inline-flex",
|
3492
|
+
flexDirection: "column",
|
3493
|
+
width
|
3494
3494
|
},
|
3495
|
-
/* @__PURE__ */ React69__namespace.default.createElement(
|
3496
|
-
|
3495
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3496
|
+
react.Popover,
|
3497
3497
|
{
|
3498
|
-
|
3499
|
-
|
3500
|
-
|
3501
|
-
|
3498
|
+
...dialogProps,
|
3499
|
+
isOpen: state2.isOpen,
|
3500
|
+
onOpen: state2.open,
|
3501
|
+
onClose: state2.close
|
3502
3502
|
},
|
3503
|
-
/* @__PURE__ */ React69__namespace.default.createElement(react.
|
3504
|
-
|
3505
|
-
DateField,
|
3503
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3504
|
+
StyledField,
|
3506
3505
|
{
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
}
|
3512
|
-
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3516
|
-
|
3517
|
-
|
3506
|
+
variant,
|
3507
|
+
onClick: onFieldClick,
|
3508
|
+
paddingX: 3,
|
3509
|
+
minHeight
|
3510
|
+
},
|
3511
|
+
/* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(
|
3512
|
+
CalendarTriggerButton,
|
3513
|
+
{
|
3514
|
+
variant,
|
3515
|
+
ref,
|
3516
|
+
...buttonProps
|
3517
|
+
}
|
3518
|
+
)),
|
3519
|
+
/* @__PURE__ */ React69__namespace.default.createElement(
|
3520
|
+
DateField,
|
3521
|
+
{
|
3522
|
+
label: props.label,
|
3523
|
+
labelProps,
|
3524
|
+
name: props.name,
|
3525
|
+
...fieldProps
|
3526
|
+
}
|
3527
|
+
)
|
3528
|
+
))),
|
3529
|
+
/* @__PURE__ */ React69__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
|
3530
|
+
state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React69__namespace.default.createElement(react.Portal, null, popoverContent),
|
3531
|
+
state2.isOpen && !props.isDisabled && !withPortal && popoverContent
|
3532
|
+
)
|
3533
|
+
));
|
3518
3534
|
}
|
3519
3535
|
);
|
3520
3536
|
}
|
@@ -6512,7 +6528,7 @@ var init_Drawer = __esm({
|
|
6512
6528
|
/* @__PURE__ */ React69__namespace.default.createElement(
|
6513
6529
|
react.Center,
|
6514
6530
|
{
|
6515
|
-
background:
|
6531
|
+
background: placement === "bottom" ? "bottom" : "top",
|
6516
6532
|
padding: 2,
|
6517
6533
|
borderRadius: "md"
|
6518
6534
|
},
|
@@ -13037,26 +13053,6 @@ var init_button2 = __esm({
|
|
13037
13053
|
}
|
13038
13054
|
}
|
13039
13055
|
}),
|
13040
|
-
/**
|
13041
|
-
* @deprecated use `secondary` instead.
|
13042
|
-
*/
|
13043
|
-
tertiary: {
|
13044
|
-
backgroundColor: "mint",
|
13045
|
-
color: "darkGrey",
|
13046
|
-
fontWeight: "normal",
|
13047
|
-
...focusVisible({
|
13048
|
-
focus: {
|
13049
|
-
boxShadow: `inset 0 0 0 4px ${colors.mint}, inset 0 0 0 4px ${colors.mint}, inset 0 0 0 6px currentColor`
|
13050
|
-
},
|
13051
|
-
notFocus: { boxShadow: "none" }
|
13052
|
-
}),
|
13053
|
-
_hover: {
|
13054
|
-
backgroundColor: "seaMist"
|
13055
|
-
},
|
13056
|
-
_active: {
|
13057
|
-
backgroundColor: "lightGrey"
|
13058
|
-
}
|
13059
|
-
},
|
13060
13056
|
additional: (props) => ({
|
13061
13057
|
backgroundColor: "transparent",
|
13062
13058
|
color: themeTools.mode("darkGrey", "white")(props),
|
@@ -13722,7 +13718,7 @@ var init_close_button = __esm({
|
|
13722
13718
|
}
|
13723
13719
|
}),
|
13724
13720
|
_hover: {
|
13725
|
-
backgroundColor: themeTools.mode("seaMist", "
|
13721
|
+
backgroundColor: themeTools.mode("seaMist", "whiteAlpha.100")(props),
|
13726
13722
|
_disabled: {
|
13727
13723
|
color: "dimGrey"
|
13728
13724
|
}
|
@@ -14114,7 +14110,8 @@ var init_drawer = __esm({
|
|
14114
14110
|
baseStyle: (props) => ({
|
14115
14111
|
overlay: {
|
14116
14112
|
backgroundColor: "blackAlpha.600",
|
14117
|
-
zIndex: "modal"
|
14113
|
+
zIndex: "modal",
|
14114
|
+
color: "red"
|
14118
14115
|
},
|
14119
14116
|
dialogContainer: {
|
14120
14117
|
display: "flex",
|
@@ -14124,8 +14121,8 @@ var init_drawer = __esm({
|
|
14124
14121
|
overflow: props.scrollBehavior === "inside" ? "hidden" : "auto"
|
14125
14122
|
},
|
14126
14123
|
dialog: {
|
14127
|
-
|
14128
|
-
color: "inherit",
|
14124
|
+
backgroundColor: themeTools.mode("white", "pine")(props),
|
14125
|
+
color: themeTools.mode("inherit", "white")(props),
|
14129
14126
|
zIndex: "modal",
|
14130
14127
|
maxHeight: props.scrollBehavior === "inside" ? "calc(100% - 7.5rem)" : void 0,
|
14131
14128
|
boxShadow: "md"
|
@@ -15149,47 +15146,6 @@ var init_link2 = __esm({
|
|
15149
15146
|
backgroundColor: themeTools.mode("mint", "whiteAlpha.100")(props),
|
15150
15147
|
color: themeTools.mode("darkGrey", "white")(props)
|
15151
15148
|
}
|
15152
|
-
}),
|
15153
|
-
/**
|
15154
|
-
* @deprecated tertiary style will be deprecated in the future.
|
15155
|
-
* Please use the secondary style instead.
|
15156
|
-
*/
|
15157
|
-
tertiary: (props) => ({
|
15158
|
-
color: "white",
|
15159
|
-
...focusVisible({
|
15160
|
-
focus: {
|
15161
|
-
color: "pine",
|
15162
|
-
backgroundColor: "white",
|
15163
|
-
boxShadow: getBoxShadowString({
|
15164
|
-
borderColor: "white",
|
15165
|
-
borderWidth: 3,
|
15166
|
-
isInset: false
|
15167
|
-
})
|
15168
|
-
},
|
15169
|
-
notFocus: {
|
15170
|
-
color: "white",
|
15171
|
-
boxShadow: "none",
|
15172
|
-
backgroundColor: "transparent"
|
15173
|
-
}
|
15174
|
-
}),
|
15175
|
-
_hover: {
|
15176
|
-
color: "white",
|
15177
|
-
backgroundColor: "whiteAlpha.200",
|
15178
|
-
boxShadow: getBoxShadowString({
|
15179
|
-
borderColor: props.theme.colors.whiteAlpha[200],
|
15180
|
-
borderWidth: 3,
|
15181
|
-
isInset: false
|
15182
|
-
})
|
15183
|
-
},
|
15184
|
-
_active: {
|
15185
|
-
color: "white",
|
15186
|
-
backgroundColor: "whiteAlpha.400",
|
15187
|
-
boxShadow: getBoxShadowString({
|
15188
|
-
borderColor: props.theme.colors.whiteAlpha[400],
|
15189
|
-
borderWidth: 3,
|
15190
|
-
isInset: false
|
15191
|
-
})
|
15192
|
-
}
|
15193
15149
|
})
|
15194
15150
|
},
|
15195
15151
|
defaultProps: {
|
@@ -15450,7 +15406,7 @@ var init_modal2 = __esm({
|
|
15450
15406
|
},
|
15451
15407
|
dialog: {
|
15452
15408
|
borderRadius: "md",
|
15453
|
-
background: themeTools.mode("white", "
|
15409
|
+
background: themeTools.mode("white", "pine")(props),
|
15454
15410
|
color: themeTools.mode("inherit", "white")(props),
|
15455
15411
|
my: "3.75rem",
|
15456
15412
|
zIndex: "modal",
|
@@ -15505,17 +15461,19 @@ var $popperBg2, $arrowBg3, $arrowShadowColor2, helpers18, config27, popover_defa
|
|
15505
15461
|
var init_popover2 = __esm({
|
15506
15462
|
"src/theme/components/popover.ts"() {
|
15507
15463
|
init_dist4();
|
15464
|
+
init_box_shadow_utils();
|
15465
|
+
init_focus_utils();
|
15508
15466
|
$popperBg2 = themeTools.cssVar("popper-bg");
|
15509
15467
|
$arrowBg3 = themeTools.cssVar("popper-arrow-bg");
|
15510
15468
|
$arrowShadowColor2 = themeTools.cssVar("popper-arrow-shadow-color");
|
15511
15469
|
helpers18 = react.createMultiStyleConfigHelpers(popoverAnatomy.keys);
|
15512
15470
|
config27 = helpers18.defineMultiStyleConfig({
|
15513
|
-
baseStyle: {
|
15471
|
+
baseStyle: (props) => ({
|
15514
15472
|
popper: {
|
15515
15473
|
zIndex: "popover"
|
15516
15474
|
},
|
15517
15475
|
content: {
|
15518
|
-
[$popperBg2.variable]: `colors.darkTeal`,
|
15476
|
+
[$popperBg2.variable]: themeTools.mode(`colors.darkTeal`, `colors.pine`)(props),
|
15519
15477
|
backgroundColor: $popperBg2.reference,
|
15520
15478
|
[$arrowBg3.variable]: $popperBg2.reference,
|
15521
15479
|
[$arrowShadowColor2.variable]: `colors.blackAlpha.300`,
|
@@ -15536,6 +15494,19 @@ var init_popover2 = __esm({
|
|
15536
15494
|
},
|
15537
15495
|
closeButton: {
|
15538
15496
|
position: "absolute",
|
15497
|
+
color: "white",
|
15498
|
+
hover: "whiteAlpha.100",
|
15499
|
+
...focusVisible({
|
15500
|
+
focus: {
|
15501
|
+
boxShadow: getBoxShadowString({ borderColor: "azure" })
|
15502
|
+
},
|
15503
|
+
notFocus: {
|
15504
|
+
boxShadow: "none"
|
15505
|
+
}
|
15506
|
+
}),
|
15507
|
+
_active: {
|
15508
|
+
backgroundColor: "whiteAlpha.200"
|
15509
|
+
},
|
15539
15510
|
borderRadius: "xs",
|
15540
15511
|
top: 1,
|
15541
15512
|
insetEnd: 1,
|
@@ -15543,7 +15514,7 @@ var init_popover2 = __esm({
|
|
15543
15514
|
height: 2,
|
15544
15515
|
padding: 1
|
15545
15516
|
}
|
15546
|
-
},
|
15517
|
+
}),
|
15547
15518
|
sizes: {
|
15548
15519
|
sm: {
|
15549
15520
|
content: {
|
@@ -17283,6 +17254,10 @@ Object.defineProperty(exports, 'PopoverTrigger', {
|
|
17283
17254
|
enumerable: true,
|
17284
17255
|
get: function () { return react.PopoverTrigger; }
|
17285
17256
|
});
|
17257
|
+
Object.defineProperty(exports, 'Portal', {
|
17258
|
+
enumerable: true,
|
17259
|
+
get: function () { return react.Portal; }
|
17260
|
+
});
|
17286
17261
|
Object.defineProperty(exports, 'ScaleFade', {
|
17287
17262
|
enumerable: true,
|
17288
17263
|
get: function () { return react.ScaleFade; }
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, SimplePopover, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardPopover, Wrap, WrapItem, createTexts, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToast, useToken, useTranslation } from './chunk-
|
1
|
+
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, Collapse, ColorInlineLoader, ColorSpinner, Combobox, Container, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkMode, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, ModalHeader as DrawerHeader, DrawerOverlay, Expandable, ExpandableAlert, ExpandableItem, Fade, Flex, FloatingActionButton, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, IconButton, Image, Img, InfoSelect, InfoTag, Input, InputGroup, InputLeftElement, InputRightElement, Item, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightMode, LightSpinner, LineIcon, ListBox, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, OrderedList, PasswordInput, PhoneNumberInput, PlayPauseButton, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, PopoverWizardBody, Portal, ProgressBar, ProgressLoader, Radio, RadioGroup, ScaleFade, SearchInput, Section, SimpleDrawer, SimpleGrid, SimplePopover, Skeleton, SkeletonCircle, SkeletonText, SkipButton, Slide, SlideFade, Spacer, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, Tabs, Tbody, Td, Text, TextLink, Textarea, Tfoot, Th, Thead, Time, TimePicker, Tr, TravelTag, UnorderedList, VStack, VyLogo, WizardPopover, Wrap, WrapItem, createTexts, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToast, useToken, useTranslation } from './chunk-B77QE6EZ.mjs';
|
package/package.json
CHANGED
package/src/button/Button.tsx
CHANGED
@@ -28,8 +28,6 @@ export type ButtonProps = Exclude<
|
|
28
28
|
| "control"
|
29
29
|
| "primary"
|
30
30
|
| "secondary"
|
31
|
-
/** @deprecated Use `secondary` instead */
|
32
|
-
| "tertiary"
|
33
31
|
| "additional"
|
34
32
|
| "ghost"
|
35
33
|
| "floating";
|
@@ -42,8 +40,7 @@ export type ButtonProps = Exclude<
|
|
42
40
|
* - `control`: This button is used for ticket controls only.
|
43
41
|
* - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
|
44
42
|
* - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
|
45
|
-
* - `
|
46
|
-
* - `additional`: Used for additional choices, like a less important tertiary action.
|
43
|
+
* - `additional`: Used for additional choices, like a less important secondary action.
|
47
44
|
* - `ghost`: Used inside other interactive elements, like date pickers and input fields.
|
48
45
|
* - `floating`: Used for floating actions, like a menu button in a menu.
|
49
46
|
*
|
@@ -56,7 +53,7 @@ export type ButtonProps = Exclude<
|
|
56
53
|
* There are also different sizes. You can specify which one you want with the `size` prop. The available sizes are "lg", "md", "sm" and "xs".
|
57
54
|
*
|
58
55
|
* ```tsx
|
59
|
-
* <Button variant="
|
56
|
+
* <Button variant="secondary" size="sm" onClick={cancelOrder}>
|
60
57
|
* Cancel trip
|
61
58
|
* </Button>
|
62
59
|
* ```
|
@@ -13,7 +13,7 @@ export type ButtonGroupProps = ChakraButtonGroupProps;
|
|
13
13
|
*
|
14
14
|
* ```tsx
|
15
15
|
* <ButtonGroup>
|
16
|
-
* <Button variant="
|
16
|
+
* <Button variant="secondary">Cancel</Button>
|
17
17
|
* <Button variant="primary">Save</Button>
|
18
18
|
* </ButtonGroup>
|
19
19
|
* ```
|
@@ -11,16 +11,7 @@ import React, { useEffect } from "react";
|
|
11
11
|
const MotionBox = motion(Box);
|
12
12
|
|
13
13
|
type FloatingActionButtonProps = BoxProps & {
|
14
|
-
variant?:
|
15
|
-
/** @deprecated dark is deprecated please use accent*/
|
16
|
-
"green"
|
17
|
-
/** @deprecated dark is deprecated please use accent*/
|
18
|
-
| "light"
|
19
|
-
/** @deprecated dark is deprecated please use accent*/
|
20
|
-
| "dark"
|
21
|
-
| "accent"
|
22
|
-
| "base"
|
23
|
-
| "brand"
|
14
|
+
variant?: "accent" | "base" | "brand";
|
24
15
|
placement?: "bottom right" | "bottom left" | "top right" | "top left";
|
25
16
|
icon: React.ReactNode;
|
26
17
|
children: React.ReactNode;
|
@@ -34,7 +25,7 @@ type FloatingActionButtonProps = BoxProps & {
|
|
34
25
|
*
|
35
26
|
* ```tsx
|
36
27
|
* <FloatingActionButton
|
37
|
-
* variant="
|
28
|
+
* variant="accent"
|
38
29
|
* icon={<TicketControlFill30Icon />}
|
39
30
|
* placement="bottom right"
|
40
31
|
* />
|
@@ -12,7 +12,6 @@ export type IconButtonProps = Omit<ChakraIconButtonProps, "variant"> & {
|
|
12
12
|
| "control"
|
13
13
|
| "primary"
|
14
14
|
| "secondary"
|
15
|
-
| "tertiary"
|
16
15
|
| "additional"
|
17
16
|
| "ghost"
|
18
17
|
| "floating";
|
@@ -27,8 +26,7 @@ export type IconButtonProps = Omit<ChakraIconButtonProps, "variant"> & {
|
|
27
26
|
* - `control`: This button is used for ticket controls only.
|
28
27
|
* - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
|
29
28
|
* - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
|
30
|
-
* - `
|
31
|
-
* - `additional`: Used for additional choices, like a less important tertiary action.
|
29
|
+
* - `additional`: Used for additional choices, like a less important secondary action.
|
32
30
|
* - `ghost`: Used inside other interactive elements, like date pickers and input fields.
|
33
31
|
* - `floating`: Used for floating actions, like a menu button in a menu.
|
34
32
|
*
|