@vygruppen/spor-react 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +12 -10
- package/CHANGELOG.md +18 -0
- package/dist/{CountryCodeSelect-YOBYHYCF.mjs → CountryCodeSelect-M5TBGWY5.mjs} +1 -1
- package/dist/{chunk-UOZQ4EDI.mjs → chunk-VXZX2ZXT.mjs} +104 -11
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +123 -10
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/button/Button.tsx +4 -2
- package/src/button/IconButton.tsx +3 -1
- package/src/datepicker/DateField.tsx +1 -1
- package/src/datepicker/TimeField.tsx +2 -2
- package/src/datepicker/TimePicker.tsx +3 -2
- package/src/index.tsx +0 -1
- package/src/util/externals.tsx +6 -0
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@5.
|
2
|
+
> @vygruppen/spor-react@5.1.0 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -8,13 +8,15 @@
|
|
8
8
|
[34mCLI[39m Target: node16
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
|
+
"Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/index.js".
|
12
|
+
"Collapse" is imported from external module "@chakra-ui/react" but never used in "dist/chunk-VXZX2ZXT.mjs".
|
11
13
|
[34mDTS[39m Build start
|
12
|
-
[
|
13
|
-
[
|
14
|
-
[32mESM[39m [1mdist/
|
15
|
-
[32mESM[39m
|
16
|
-
[
|
17
|
-
[
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m262.
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m262.
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m493.70 KB[39m
|
15
|
+
[32mCJS[39m ⚡️ Build success in 2337ms
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m2.12 KB[39m
|
17
|
+
[32mESM[39m [1mdist/CountryCodeSelect-M5TBGWY5.mjs [22m[32m1.19 KB[39m
|
18
|
+
[32mESM[39m [1mdist/chunk-VXZX2ZXT.mjs [22m[32m385.58 KB[39m
|
19
|
+
[32mESM[39m ⚡️ Build success in 2338ms
|
20
|
+
[32mDTS[39m ⚡️ Build success in 12621ms
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m262.63 KB[39m
|
22
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m262.63 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 5.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- a16a9972: Expose new methods and components from Chakra:
|
8
|
+
|
9
|
+
- defineStyleConfig
|
10
|
+
- Collapse
|
11
|
+
- useSize
|
12
|
+
- ComponentStyleConfig (type)
|
13
|
+
- CSSWithMultiValues (type)
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- f3394fb3: DatePicker: Fix bug where field went from uncontrolled to controleld
|
18
|
+
- 1a6eb2f8: TimePicker: Allow for null values (so the time can be reset)
|
19
|
+
- 6043ebfb: Button, IconButton: Fix a bug that broke loading states
|
20
|
+
|
3
21
|
## 5.0.0
|
4
22
|
|
5
23
|
### Major Changes
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { forwardRef, Divider as Divider$1, Stack as Stack$1, Accordion as Accordion$1, Skeleton as Skeleton$1, useButtonGroup, Button as Button$1, Box, Center, ButtonGroup as ButtonGroup$1, IconButton as IconButton$1, useMultiStyleConfig, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, Flex, useFormControlContext, PopoverContent, PopoverArrow, PopoverBody, FocusLock, Popover, InputGroup, PopoverTrigger, Portal, chakra, Checkbox as Checkbox$1, useCheckbox, FormControl as FormControl$1, InputLeftElement, Input as Input$1, InputRightElement, Select, useDisclosure, useControllableState, Radio as Radio$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Textarea as Textarea$1, Link, ModalHeader as ModalHeader$1, useModalContext, DrawerContent as DrawerContent$1, Tabs as Tabs$1, Table as Table$1, defineStyleConfig as defineStyleConfig$1, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, useColorMode, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, Heading as Heading$1, CheckboxGroup as CheckboxGroup$1, List, ListItem, useColorModeValue, useFormControlProps, useFormControl, Drawer as Drawer$1, DrawerOverlay, DrawerCloseButton, DrawerBody, usePopoverContext, DarkMode, PopoverCloseButton, ChakraProvider, HStack, useToast as useToast$1, useInterval } from '@chakra-ui/react';
|
2
|
-
export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Center, Collapse, Container, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, Fade, Flex, FormHelperText, Grid, GridItem, HStack, Image, Img, InputGroup, LightMode, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
3
1
|
import tokens10__default from '@vygruppen/spor-design-tokens';
|
4
2
|
import * as tokens10 from '@vygruppen/spor-design-tokens';
|
5
3
|
export { tokens10 as tokens };
|
4
|
+
import { forwardRef, Divider as Divider$1, Stack as Stack$1, Accordion as Accordion$1, Skeleton as Skeleton$1, useButtonGroup, Button as Button$1, Box, Center, ButtonGroup as ButtonGroup$1, IconButton as IconButton$1, useMultiStyleConfig, useStyleConfig, Badge as Badge$1, Code as Code$1, Text, PopoverAnchor, FormLabel, Flex, useFormControlContext, PopoverContent, PopoverArrow, PopoverBody, FocusLock, Popover, InputGroup, PopoverTrigger, Portal, chakra, Checkbox as Checkbox$1, useCheckbox, FormControl as FormControl$1, InputLeftElement, Input as Input$1, InputRightElement, Select, useDisclosure, useControllableState, Radio as Radio$1, RadioGroup as RadioGroup$1, Switch as Switch$1, Textarea as Textarea$1, Link, ModalHeader as ModalHeader$1, useModalContext, DrawerContent as DrawerContent$1, Tabs as Tabs$1, Table as Table$1, defineStyleConfig as defineStyleConfig$1, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, useColorMode, SkeletonCircle as SkeletonCircle$1, SkeletonText as SkeletonText$1, Breadcrumb as Breadcrumb$1, BreadcrumbItem as BreadcrumbItem$1, BreadcrumbLink as BreadcrumbLink$1, Heading as Heading$1, CheckboxGroup as CheckboxGroup$1, List, ListItem, useColorModeValue, useFormControlProps, useFormControl, Drawer as Drawer$1, DrawerOverlay, DrawerCloseButton, DrawerBody, usePopoverContext, DarkMode, PopoverCloseButton, ChakraProvider, HStack, useToast as useToast$1, useInterval } from '@chakra-ui/react';
|
5
|
+
export { AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Center, Container, DarkMode, DrawerBody, DrawerCloseButton, DrawerFooter, DrawerOverlay, Fade, Flex, FormHelperText, Grid, GridItem, HStack, Image, Img, InputGroup, LightMode, ListItem, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalOverlay, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, ScaleFade, SimpleGrid, Slide, SlideFade, Spacer, Tab, TabList, TabPanel, TabPanels, TableCaption, Tbody, Td, Tfoot, Th, Thead, Tr, UnorderedList, VStack, Wrap, WrapItem, defineStyleConfig, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
6
6
|
import * as React69 from 'react';
|
7
|
-
import React69__default, { createContext, useEffect, forwardRef as forwardRef$1, useRef, useState, useId, Suspense, useContext, useCallback, useMemo } from 'react';
|
7
|
+
import React69__default, { createContext, useEffect, forwardRef as forwardRef$1, useRef, useState, useId, Suspense, useContext, useCallback, useMemo, useLayoutEffect } from 'react';
|
8
8
|
import { CloseFill30Icon, CloseFill24Icon, CloseFill18Icon, CalendarOutline24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill24Icon, InformationFill18Icon, WarningFill24Icon, WarningFill18Icon, ErrorFill24Icon, ErrorFill18Icon, LinkOutOutline24Icon, DropdownRightFill18Icon, DropdownLeftFill18Icon, DropdownDownFill18Icon, DropdownDownFill24Icon, DropdownUpFill24Icon, ArrowRightFill18Icon, DropdownLeftFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, ErrorOutline24Icon, AltTransportOutline24Icon, WarningOutline24Icon, SuccessOutline24Icon, InformationOutline24Icon, TrainFill18Icon, TrainFill24Icon, TrainFill30Icon, ExpressBusFill18Icon, ExpressBusFill24Icon, ExpressBusFill30Icon, BusFill18Icon, BusFill24Icon, BusFill30Icon, FerryFill18Icon, FerryFill24Icon, FerryFill30Icon, SubwayFill18Icon, SubwayFill24Icon, SubwayFill30Icon, TramFill18Icon, TramFill24Icon, TramFill30Icon, AltTransportFill18Icon, AltTransportFill24Icon, AltTransportFill30Icon, WalkFill18Icon, WalkFill24Icon, WalkFill30Icon } from '@vygruppen/spor-icon-react';
|
9
9
|
import { inlineLoaderColorData, spinnerColorData, contentLoaderData, fullScreenLoaderWhiteData, inlineLoaderDarkData, fullScreenLoaderBlackData, inlineLoaderLightData, spinnerLightData, spinnerDarkData } from '@vygruppen/spor-loader';
|
10
10
|
import { useLottie } from 'lottie-react';
|
@@ -1167,7 +1167,8 @@ var Button = forwardRef((props, ref) => {
|
|
1167
1167
|
isLoading,
|
1168
1168
|
isDisabled,
|
1169
1169
|
leftIcon,
|
1170
|
-
rightIcon
|
1170
|
+
rightIcon,
|
1171
|
+
...rest
|
1171
1172
|
} = props;
|
1172
1173
|
const ariaLabel = useCorrectAriaLabel(props);
|
1173
1174
|
const buttonGroup = useButtonGroup();
|
@@ -1178,7 +1179,7 @@ var Button = forwardRef((props, ref) => {
|
|
1178
1179
|
{
|
1179
1180
|
size: finalSize,
|
1180
1181
|
variant: finalVariant,
|
1181
|
-
...
|
1182
|
+
...rest,
|
1182
1183
|
ref,
|
1183
1184
|
"aria-label": ariaLabel,
|
1184
1185
|
"aria-busy": isLoading,
|
@@ -1200,8 +1201,9 @@ var Button = forwardRef((props, ref) => {
|
|
1200
1201
|
ColorInlineLoader,
|
1201
1202
|
{
|
1202
1203
|
maxWidth: getLoaderWidth(finalSize),
|
1203
|
-
width: "
|
1204
|
-
marginX: 2
|
1204
|
+
width: "80%",
|
1205
|
+
marginX: 2,
|
1206
|
+
marginY: 2
|
1205
1207
|
}
|
1206
1208
|
)
|
1207
1209
|
),
|
@@ -1251,7 +1253,7 @@ var IconButton = forwardRef(
|
|
1251
1253
|
{
|
1252
1254
|
title: props["aria-label"],
|
1253
1255
|
...props,
|
1254
|
-
spinner: /* @__PURE__ */ React69__default.createElement(ColorSpinner, {
|
1256
|
+
spinner: /* @__PURE__ */ React69__default.createElement(ColorSpinner, { width: "80%", height: "80%", marginX: 1, marginTop: 1 }),
|
1255
1257
|
ref
|
1256
1258
|
}
|
1257
1259
|
)
|
@@ -2004,7 +2006,7 @@ var DateField = forwardRef$1(
|
|
2004
2006
|
"input",
|
2005
2007
|
{
|
2006
2008
|
type: "hidden",
|
2007
|
-
value: (_a6 = state2.value) == null ? void 0 : _a6.toString(),
|
2009
|
+
value: ((_a6 = state2.value) == null ? void 0 : _a6.toString()) ?? "",
|
2008
2010
|
name: props.name
|
2009
2011
|
}
|
2010
2012
|
));
|
@@ -3416,7 +3418,7 @@ var texts14 = createTexts({
|
|
3416
3418
|
sv: "Telefonnummer"
|
3417
3419
|
}
|
3418
3420
|
});
|
3419
|
-
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-
|
3421
|
+
var LazyCountryCodeSelect = React69__default.lazy(() => import('./CountryCodeSelect-M5TBGWY5.mjs'));
|
3420
3422
|
var Radio = forwardRef((props, ref) => {
|
3421
3423
|
return /* @__PURE__ */ React69__default.createElement(Radio$1, { ...props, ref });
|
3422
3424
|
});
|
@@ -13533,4 +13535,95 @@ var getToastComponent = (opts) => {
|
|
13533
13535
|
return ({ id }) => /* @__PURE__ */ React69__default.createElement(BaseToast, { id, variant: opts.variant }, opts.text);
|
13534
13536
|
};
|
13535
13537
|
|
13536
|
-
|
13538
|
+
// ../../node_modules/@zag-js/element-size/dist/track-size.mjs
|
13539
|
+
function trackElementSize(element, callback) {
|
13540
|
+
if (!element) {
|
13541
|
+
callback(void 0);
|
13542
|
+
return;
|
13543
|
+
}
|
13544
|
+
callback({ width: element.offsetWidth, height: element.offsetHeight });
|
13545
|
+
const win = element.ownerDocument.defaultView ?? window;
|
13546
|
+
const observer = new win.ResizeObserver((entries) => {
|
13547
|
+
if (!Array.isArray(entries) || !entries.length)
|
13548
|
+
return;
|
13549
|
+
const [entry] = entries;
|
13550
|
+
let width;
|
13551
|
+
let height;
|
13552
|
+
if ("borderBoxSize" in entry) {
|
13553
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
13554
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
13555
|
+
width = borderSize["inlineSize"];
|
13556
|
+
height = borderSize["blockSize"];
|
13557
|
+
} else {
|
13558
|
+
width = element.offsetWidth;
|
13559
|
+
height = element.offsetHeight;
|
13560
|
+
}
|
13561
|
+
callback({ width, height });
|
13562
|
+
});
|
13563
|
+
observer.observe(element, { box: "border-box" });
|
13564
|
+
return () => observer.unobserve(element);
|
13565
|
+
}
|
13566
|
+
var useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? useLayoutEffect : useEffect;
|
13567
|
+
function trackMutation(el, cb) {
|
13568
|
+
var _a6, _b5;
|
13569
|
+
if (!el || !el.parentElement)
|
13570
|
+
return;
|
13571
|
+
const win = (_b5 = (_a6 = el.ownerDocument) == null ? void 0 : _a6.defaultView) != null ? _b5 : window;
|
13572
|
+
const observer = new win.MutationObserver(() => {
|
13573
|
+
cb();
|
13574
|
+
});
|
13575
|
+
observer.observe(el.parentElement, { childList: true });
|
13576
|
+
return () => {
|
13577
|
+
observer.disconnect();
|
13578
|
+
};
|
13579
|
+
}
|
13580
|
+
function useSizes({
|
13581
|
+
getNodes,
|
13582
|
+
observeMutation = true
|
13583
|
+
}) {
|
13584
|
+
const [sizes26, setSizes] = useState([]);
|
13585
|
+
const [count, setCount] = useState(0);
|
13586
|
+
useSafeLayoutEffect(() => {
|
13587
|
+
const elements = getNodes();
|
13588
|
+
const cleanups = elements.map(
|
13589
|
+
(element, index) => trackElementSize(element, (size2) => {
|
13590
|
+
setSizes((sizes27) => {
|
13591
|
+
return [
|
13592
|
+
...sizes27.slice(0, index),
|
13593
|
+
size2,
|
13594
|
+
...sizes27.slice(index + 1)
|
13595
|
+
];
|
13596
|
+
});
|
13597
|
+
})
|
13598
|
+
);
|
13599
|
+
if (observeMutation) {
|
13600
|
+
const firstNode = elements[0];
|
13601
|
+
cleanups.push(
|
13602
|
+
trackMutation(firstNode, () => {
|
13603
|
+
setCount((count2) => count2 + 1);
|
13604
|
+
})
|
13605
|
+
);
|
13606
|
+
}
|
13607
|
+
return () => {
|
13608
|
+
cleanups.forEach((cleanup) => {
|
13609
|
+
cleanup == null ? void 0 : cleanup();
|
13610
|
+
});
|
13611
|
+
};
|
13612
|
+
}, [count]);
|
13613
|
+
return sizes26;
|
13614
|
+
}
|
13615
|
+
function isRef(ref) {
|
13616
|
+
return typeof ref === "object" && ref !== null && "current" in ref;
|
13617
|
+
}
|
13618
|
+
function useSize(subject) {
|
13619
|
+
const [size2] = useSizes({
|
13620
|
+
observeMutation: false,
|
13621
|
+
getNodes() {
|
13622
|
+
const node = isRef(subject) ? subject.current : subject;
|
13623
|
+
return [node];
|
13624
|
+
}
|
13625
|
+
});
|
13626
|
+
return size2;
|
13627
|
+
}
|
13628
|
+
|
13629
|
+
export { Accordion, AttachedInputs, Badge, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, ColorInlineLoader, ColorSpinner, Combobox, ContentLoader, DarkFullScreenLoader, DarkInlineLoader, DarkSpinner, DatePicker, DateRangePicker, Divider, Drawer, DrawerContent, Expandable, ExpandableAlert, ExpandableItem, FloatingActionButton, FormControl, FormErrorMessage, FormLabel3 as FormLabel, Heading, IconButton, InfoSelect, InfoTag, Input, InputLeftElement2 as InputLeftElement, InputRightElement2 as InputRightElement, ItemDescription, ItemLabel, JumpButton, Language, LanguageProvider, LightFullScreenLoader, LightInlineLoader, LightSpinner, LineIcon, ListBox, ModalHeader, NativeSelect, NumericStepper, PasswordInput, PhoneNumberInput, PlayPauseButton, PopoverWizardBody, ProgressBar, ProgressLoader, Radio, RadioGroup, SearchInput, SimpleDrawer, SimplePopover, Skeleton, SkeletonCircle, SkeletonText, SkipButton, SporProvider, Stack, StaticAlert, Stepper, StepperStep, Switch, Table, Tabs, Text4 as Text, TextLink, Textarea, TimePicker, TravelTag, VyLogo, WizardPopover, createTexts, fontFaces, theme, useSize, useToast, useTranslation };
|
package/dist/index.d.mts
CHANGED
@@ -1,9 +1,9 @@
|
|
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, 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
1
|
import tokens__default from '@vygruppen/spor-design-tokens';
|
4
2
|
import * as tokens from '@vygruppen/spor-design-tokens';
|
5
3
|
export { tokens };
|
6
4
|
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
5
|
+
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';
|
6
|
+
export { AccordionButton, AccordionButtonProps, AccordionIcon, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, Box, BoxProps, CSSWithMultiValues, Center, CenterProps, Collapse, CollapseProps, ComponentStyleConfig, 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, defineStyleConfig, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
7
7
|
import * as React from 'react';
|
8
8
|
import React__default, { ChangeEvent } from 'react';
|
9
9
|
import * as _chakra_ui_breadcrumb_dist_breadcrumb_link from '@chakra-ui/breadcrumb/dist/breadcrumb-link';
|
@@ -15,6 +15,7 @@ import { TimeValue } from '@react-types/datepicker';
|
|
15
15
|
import { ListState, SelectState } from 'react-stately';
|
16
16
|
export { Item, Section } from 'react-stately';
|
17
17
|
import * as _chakra_ui_styled_system from '@chakra-ui/styled-system';
|
18
|
+
export { useSize } from '@chakra-ui/react-use-size';
|
18
19
|
|
19
20
|
type DividerProps = DividerProps$1 & {
|
20
21
|
size?: "sm" | "md" | "lg";
|
@@ -488,9 +489,10 @@ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
|
|
488
489
|
name?: string;
|
489
490
|
/** The controlled value, if any.
|
490
491
|
*
|
491
|
-
* A `new Time(hours, minutes)` should be passed
|
492
|
+
* A `new Time(hours, minutes)` should be passed.
|
493
|
+
* Or `null` if the time should be unset.
|
492
494
|
**/
|
493
|
-
value?: TimeValue;
|
495
|
+
value?: TimeValue | null;
|
494
496
|
/** A default value, if any.
|
495
497
|
*
|
496
498
|
* A `new Time(hours, minutes)` should be passed.
|
package/dist/index.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
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, 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
1
|
import tokens__default from '@vygruppen/spor-design-tokens';
|
4
2
|
import * as tokens from '@vygruppen/spor-design-tokens';
|
5
3
|
export { tokens };
|
6
4
|
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
5
|
+
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';
|
6
|
+
export { AccordionButton, AccordionButtonProps, AccordionIcon, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, Box, BoxProps, CSSWithMultiValues, Center, CenterProps, Collapse, CollapseProps, ComponentStyleConfig, 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, defineStyleConfig, extendTheme, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useTheme, useToken } from '@chakra-ui/react';
|
7
7
|
import * as React from 'react';
|
8
8
|
import React__default, { ChangeEvent } from 'react';
|
9
9
|
import * as _chakra_ui_breadcrumb_dist_breadcrumb_link from '@chakra-ui/breadcrumb/dist/breadcrumb-link';
|
@@ -15,6 +15,7 @@ import { TimeValue } from '@react-types/datepicker';
|
|
15
15
|
import { ListState, SelectState } from 'react-stately';
|
16
16
|
export { Item, Section } from 'react-stately';
|
17
17
|
import * as _chakra_ui_styled_system from '@chakra-ui/styled-system';
|
18
|
+
export { useSize } from '@chakra-ui/react-use-size';
|
18
19
|
|
19
20
|
type DividerProps = DividerProps$1 & {
|
20
21
|
size?: "sm" | "md" | "lg";
|
@@ -488,9 +489,10 @@ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
|
|
488
489
|
name?: string;
|
489
490
|
/** The controlled value, if any.
|
490
491
|
*
|
491
|
-
* A `new Time(hours, minutes)` should be passed
|
492
|
+
* A `new Time(hours, minutes)` should be passed.
|
493
|
+
* Or `null` if the time should be unset.
|
492
494
|
**/
|
493
|
-
value?: TimeValue;
|
495
|
+
value?: TimeValue | null;
|
494
496
|
/** A default value, if any.
|
495
497
|
*
|
496
498
|
* A `new Time(hours, minutes)` should be passed.
|
package/dist/index.js
CHANGED
@@ -664,7 +664,8 @@ var init_Button = __esm({
|
|
664
664
|
isLoading,
|
665
665
|
isDisabled,
|
666
666
|
leftIcon,
|
667
|
-
rightIcon
|
667
|
+
rightIcon,
|
668
|
+
...rest
|
668
669
|
} = props;
|
669
670
|
const ariaLabel = useCorrectAriaLabel(props);
|
670
671
|
const buttonGroup = react.useButtonGroup();
|
@@ -675,7 +676,7 @@ var init_Button = __esm({
|
|
675
676
|
{
|
676
677
|
size: finalSize,
|
677
678
|
variant: finalVariant,
|
678
|
-
...
|
679
|
+
...rest,
|
679
680
|
ref,
|
680
681
|
"aria-label": ariaLabel,
|
681
682
|
"aria-busy": isLoading,
|
@@ -697,8 +698,9 @@ var init_Button = __esm({
|
|
697
698
|
exports.ColorInlineLoader,
|
698
699
|
{
|
699
700
|
maxWidth: getLoaderWidth(finalSize),
|
700
|
-
width: "
|
701
|
-
marginX: 2
|
701
|
+
width: "80%",
|
702
|
+
marginX: 2,
|
703
|
+
marginY: 2
|
702
704
|
}
|
703
705
|
)
|
704
706
|
),
|
@@ -739,7 +741,7 @@ var init_IconButton = __esm({
|
|
739
741
|
{
|
740
742
|
title: props["aria-label"],
|
741
743
|
...props,
|
742
|
-
spinner: /* @__PURE__ */ React69__namespace.default.createElement(exports.ColorSpinner, {
|
744
|
+
spinner: /* @__PURE__ */ React69__namespace.default.createElement(exports.ColorSpinner, { width: "80%", height: "80%", marginX: 1, marginTop: 1 }),
|
743
745
|
ref
|
744
746
|
}
|
745
747
|
)
|
@@ -1663,7 +1665,7 @@ var init_DateField = __esm({
|
|
1663
1665
|
"input",
|
1664
1666
|
{
|
1665
1667
|
type: "hidden",
|
1666
|
-
value: (_a6 = state2.value) == null ? void 0 : _a6.toString(),
|
1668
|
+
value: ((_a6 = state2.value) == null ? void 0 : _a6.toString()) ?? "",
|
1667
1669
|
name: props.name
|
1668
1670
|
}
|
1669
1671
|
));
|
@@ -15394,8 +15396,118 @@ var init_transition = __esm({
|
|
15394
15396
|
"src/transition/index.ts"() {
|
15395
15397
|
}
|
15396
15398
|
});
|
15399
|
+
|
15400
|
+
// ../../node_modules/@zag-js/element-size/dist/track-size.mjs
|
15401
|
+
function trackElementSize(element, callback) {
|
15402
|
+
if (!element) {
|
15403
|
+
callback(void 0);
|
15404
|
+
return;
|
15405
|
+
}
|
15406
|
+
callback({ width: element.offsetWidth, height: element.offsetHeight });
|
15407
|
+
const win = element.ownerDocument.defaultView ?? window;
|
15408
|
+
const observer = new win.ResizeObserver((entries) => {
|
15409
|
+
if (!Array.isArray(entries) || !entries.length)
|
15410
|
+
return;
|
15411
|
+
const [entry] = entries;
|
15412
|
+
let width;
|
15413
|
+
let height;
|
15414
|
+
if ("borderBoxSize" in entry) {
|
15415
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
15416
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
15417
|
+
width = borderSize["inlineSize"];
|
15418
|
+
height = borderSize["blockSize"];
|
15419
|
+
} else {
|
15420
|
+
width = element.offsetWidth;
|
15421
|
+
height = element.offsetHeight;
|
15422
|
+
}
|
15423
|
+
callback({ width, height });
|
15424
|
+
});
|
15425
|
+
observer.observe(element, { box: "border-box" });
|
15426
|
+
return () => observer.unobserve(element);
|
15427
|
+
}
|
15428
|
+
var init_track_size = __esm({
|
15429
|
+
"../../node_modules/@zag-js/element-size/dist/track-size.mjs"() {
|
15430
|
+
}
|
15431
|
+
});
|
15432
|
+
|
15433
|
+
// ../../node_modules/@zag-js/element-size/dist/index.mjs
|
15434
|
+
var init_dist8 = __esm({
|
15435
|
+
"../../node_modules/@zag-js/element-size/dist/index.mjs"() {
|
15436
|
+
init_track_size();
|
15437
|
+
}
|
15438
|
+
});
|
15439
|
+
function trackMutation(el, cb) {
|
15440
|
+
var _a6, _b5;
|
15441
|
+
if (!el || !el.parentElement)
|
15442
|
+
return;
|
15443
|
+
const win = (_b5 = (_a6 = el.ownerDocument) == null ? void 0 : _a6.defaultView) != null ? _b5 : window;
|
15444
|
+
const observer = new win.MutationObserver(() => {
|
15445
|
+
cb();
|
15446
|
+
});
|
15447
|
+
observer.observe(el.parentElement, { childList: true });
|
15448
|
+
return () => {
|
15449
|
+
observer.disconnect();
|
15450
|
+
};
|
15451
|
+
}
|
15452
|
+
function useSizes({
|
15453
|
+
getNodes,
|
15454
|
+
observeMutation = true
|
15455
|
+
}) {
|
15456
|
+
const [sizes26, setSizes] = React69.useState([]);
|
15457
|
+
const [count, setCount] = React69.useState(0);
|
15458
|
+
useSafeLayoutEffect(() => {
|
15459
|
+
const elements = getNodes();
|
15460
|
+
const cleanups = elements.map(
|
15461
|
+
(element, index) => trackElementSize(element, (size2) => {
|
15462
|
+
setSizes((sizes27) => {
|
15463
|
+
return [
|
15464
|
+
...sizes27.slice(0, index),
|
15465
|
+
size2,
|
15466
|
+
...sizes27.slice(index + 1)
|
15467
|
+
];
|
15468
|
+
});
|
15469
|
+
})
|
15470
|
+
);
|
15471
|
+
if (observeMutation) {
|
15472
|
+
const firstNode = elements[0];
|
15473
|
+
cleanups.push(
|
15474
|
+
trackMutation(firstNode, () => {
|
15475
|
+
setCount((count2) => count2 + 1);
|
15476
|
+
})
|
15477
|
+
);
|
15478
|
+
}
|
15479
|
+
return () => {
|
15480
|
+
cleanups.forEach((cleanup) => {
|
15481
|
+
cleanup == null ? void 0 : cleanup();
|
15482
|
+
});
|
15483
|
+
};
|
15484
|
+
}, [count]);
|
15485
|
+
return sizes26;
|
15486
|
+
}
|
15487
|
+
function isRef(ref) {
|
15488
|
+
return typeof ref === "object" && ref !== null && "current" in ref;
|
15489
|
+
}
|
15490
|
+
function useSize(subject) {
|
15491
|
+
const [size2] = useSizes({
|
15492
|
+
observeMutation: false,
|
15493
|
+
getNodes() {
|
15494
|
+
const node = isRef(subject) ? subject.current : subject;
|
15495
|
+
return [node];
|
15496
|
+
}
|
15497
|
+
});
|
15498
|
+
return size2;
|
15499
|
+
}
|
15500
|
+
var useSafeLayoutEffect;
|
15501
|
+
var init_dist9 = __esm({
|
15502
|
+
"../../node_modules/@chakra-ui/react-use-size/dist/index.mjs"() {
|
15503
|
+
"use client";
|
15504
|
+
init_dist8();
|
15505
|
+
useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? React69.useLayoutEffect : React69.useEffect;
|
15506
|
+
}
|
15507
|
+
});
|
15397
15508
|
var init_externals = __esm({
|
15398
15509
|
"src/util/externals.tsx"() {
|
15510
|
+
init_dist9();
|
15399
15511
|
}
|
15400
15512
|
});
|
15401
15513
|
|
@@ -15462,10 +15574,6 @@ Object.defineProperty(exports, 'Center', {
|
|
15462
15574
|
enumerable: true,
|
15463
15575
|
get: function () { return react.Center; }
|
15464
15576
|
});
|
15465
|
-
Object.defineProperty(exports, 'Collapse', {
|
15466
|
-
enumerable: true,
|
15467
|
-
get: function () { return react.Collapse; }
|
15468
|
-
});
|
15469
15577
|
Object.defineProperty(exports, 'Container', {
|
15470
15578
|
enumerable: true,
|
15471
15579
|
get: function () { return react.Container; }
|
@@ -15682,6 +15790,10 @@ Object.defineProperty(exports, 'WrapItem', {
|
|
15682
15790
|
enumerable: true,
|
15683
15791
|
get: function () { return react.WrapItem; }
|
15684
15792
|
});
|
15793
|
+
Object.defineProperty(exports, 'defineStyleConfig', {
|
15794
|
+
enumerable: true,
|
15795
|
+
get: function () { return react.defineStyleConfig; }
|
15796
|
+
});
|
15685
15797
|
Object.defineProperty(exports, 'extendTheme', {
|
15686
15798
|
enumerable: true,
|
15687
15799
|
get: function () { return react.extendTheme; }
|
@@ -15761,4 +15873,5 @@ exports.LanguageProvider = LanguageProvider;
|
|
15761
15873
|
exports.ListBox = ListBox;
|
15762
15874
|
exports.NumericStepper = NumericStepper;
|
15763
15875
|
exports.createTexts = createTexts;
|
15876
|
+
exports.useSize = useSize;
|
15764
15877
|
exports.useTranslation = useTranslation;
|
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,
|
1
|
+
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button, ButtonGroup, Card, CardSelect, Center, Checkbox, CheckboxGroup, ChoiceChip, ClosableAlert, CloseButton, Code, 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, defineStyleConfig, extendTheme, fontFaces, theme, tokens, useBreakpointValue, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useControllableProp, useDisclosure, useMediaQuery, useMergeRefs, useOutsideClick, usePrefersReducedMotion, useSize, useTheme, useToast, useToken, useTranslation } from './chunk-VXZX2ZXT.mjs';
|
package/package.json
CHANGED
package/src/button/Button.tsx
CHANGED
@@ -69,6 +69,7 @@ export const Button = forwardRef<ButtonProps, "button">((props, ref) => {
|
|
69
69
|
isDisabled,
|
70
70
|
leftIcon,
|
71
71
|
rightIcon,
|
72
|
+
...rest
|
72
73
|
} = props;
|
73
74
|
const ariaLabel = useCorrectAriaLabel(props);
|
74
75
|
const buttonGroup = useButtonGroup();
|
@@ -83,7 +84,7 @@ export const Button = forwardRef<ButtonProps, "button">((props, ref) => {
|
|
83
84
|
<ChakraButton
|
84
85
|
size={finalSize}
|
85
86
|
variant={finalVariant}
|
86
|
-
{...
|
87
|
+
{...rest}
|
87
88
|
ref={ref}
|
88
89
|
aria-label={ariaLabel}
|
89
90
|
aria-busy={isLoading}
|
@@ -118,8 +119,9 @@ export const Button = forwardRef<ButtonProps, "button">((props, ref) => {
|
|
118
119
|
>
|
119
120
|
<ColorInlineLoader
|
120
121
|
maxWidth={getLoaderWidth(finalSize)}
|
121
|
-
width="
|
122
|
+
width="80%"
|
122
123
|
marginX={2}
|
124
|
+
marginY={2}
|
123
125
|
/>
|
124
126
|
</Center>
|
125
127
|
)}
|
@@ -56,7 +56,9 @@ export const IconButton = forwardRef<IconButtonProps, As>(
|
|
56
56
|
<ChakraIconButton
|
57
57
|
title={props["aria-label"]}
|
58
58
|
{...props}
|
59
|
-
spinner={
|
59
|
+
spinner={
|
60
|
+
<ColorSpinner width="80%" height="80%" marginX={1} marginTop={1} />
|
61
|
+
}
|
60
62
|
ref={ref}
|
61
63
|
/>
|
62
64
|
),
|
@@ -2,13 +2,13 @@ import { Box, Flex } from "@chakra-ui/react";
|
|
2
2
|
import { CalendarDateTime, Time } from "@internationalized/date";
|
3
3
|
import React, { useRef } from "react";
|
4
4
|
import { AriaTimeFieldProps, useTimeField } from "react-aria";
|
5
|
-
import {
|
5
|
+
import { TimeFieldState } from "@react-stately/datepicker";
|
6
6
|
import { FormLabel } from "..";
|
7
7
|
import { DateTimeSegment } from "./DateTimeSegment";
|
8
8
|
import { getTimestampFromTime } from "./utils";
|
9
9
|
|
10
10
|
type TimeFieldProps = AriaTimeFieldProps<Time> & {
|
11
|
-
state:
|
11
|
+
state: TimeFieldState;
|
12
12
|
label: string;
|
13
13
|
name?: string;
|
14
14
|
};
|
@@ -19,9 +19,10 @@ type TimePickerProps = Omit<BoxProps, "defaultValue" | "onChange"> & {
|
|
19
19
|
name?: string;
|
20
20
|
/** The controlled value, if any.
|
21
21
|
*
|
22
|
-
* A `new Time(hours, minutes)` should be passed
|
22
|
+
* A `new Time(hours, minutes)` should be passed.
|
23
|
+
* Or `null` if the time should be unset.
|
23
24
|
**/
|
24
|
-
value?: TimeValue;
|
25
|
+
value?: TimeValue | null;
|
25
26
|
/** A default value, if any.
|
26
27
|
*
|
27
28
|
* A `new Time(hours, minutes)` should be passed.
|
package/src/index.tsx
CHANGED
package/src/util/externals.tsx
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
/** This file works as a proxy for all Chakra UI exports */
|
2
2
|
export {
|
3
|
+
Collapse,
|
3
4
|
DarkMode,
|
4
5
|
LightMode,
|
5
6
|
Portal,
|
7
|
+
defineStyleConfig,
|
8
|
+
extendTheme,
|
6
9
|
useBreakpointValue,
|
7
10
|
useClipboard,
|
8
11
|
useColorMode,
|
@@ -18,8 +21,11 @@ export {
|
|
18
21
|
useToken,
|
19
22
|
} from "@chakra-ui/react";
|
20
23
|
export type {
|
24
|
+
CSSWithMultiValues,
|
25
|
+
ComponentStyleConfig,
|
21
26
|
PortalProps,
|
22
27
|
UseClipboardOptions,
|
23
28
|
UseDisclosureProps,
|
24
29
|
UseOutsideClickProps,
|
25
30
|
} from "@chakra-ui/react";
|
31
|
+
export { useSize } from "@chakra-ui/react-use-size";
|