@vygruppen/spor-react 3.3.1 → 3.3.2
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 +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/{CountryCodeSelect-A2JYYB5S.mjs → CountryCodeSelect-R5RS2HYK.mjs} +1 -1
- package/dist/{chunk-5JEY3QEF.mjs → chunk-U4A5DVNS.mjs} +22 -2
- package/dist/index.js +21 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/datepicker/CalendarCell.tsx +17 -2
- package/src/input/ListBox.tsx +16 -1
- package/src/input/NumericStepper.tsx +2 -2
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@3.3.
|
2
|
+
> @vygruppen/spor-react@3.3.2 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -9,13 +9,13 @@
|
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mDTS[39m Build start
|
12
|
-
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-5JEY3QEF.mjs".
|
13
12
|
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/index.js".
|
13
|
+
"toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-U4A5DVNS.mjs".
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m902.94 KB[39m
|
15
|
+
[32mCJS[39m ⚡️ Build success in 4694ms
|
14
16
|
[32mESM[39m [1mdist/index.mjs [22m[32m2.01 KB[39m
|
15
|
-
[32mESM[39m [1mdist/CountryCodeSelect-
|
16
|
-
[32mESM[39m [1mdist/chunk-
|
17
|
-
[32mESM[39m ⚡️ Build success in
|
18
|
-
[
|
19
|
-
[32mCJS[39m ⚡️ Build success in 4777ms
|
20
|
-
[32mDTS[39m ⚡️ Build success in 16972ms
|
17
|
+
[32mESM[39m [1mdist/CountryCodeSelect-R5RS2HYK.mjs [22m[32m350.82 KB[39m
|
18
|
+
[32mESM[39m [1mdist/chunk-U4A5DVNS.mjs [22m[32m420.18 KB[39m
|
19
|
+
[32mESM[39m ⚡️ Build success in 4694ms
|
20
|
+
[32mDTS[39m ⚡️ Build success in 16906ms
|
21
21
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m252.16 KB[39m
|
package/CHANGELOG.md
CHANGED
@@ -3314,6 +3314,16 @@ function CalendarCell({ state: state2, date, currentMonth }) {
|
|
3314
3314
|
if (isOutsideMonth) {
|
3315
3315
|
stateProps["data-unavailable"] = true;
|
3316
3316
|
}
|
3317
|
+
useEffect(() => {
|
3318
|
+
var _a6;
|
3319
|
+
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
3320
|
+
"touchend",
|
3321
|
+
(event) => {
|
3322
|
+
event.preventDefault();
|
3323
|
+
},
|
3324
|
+
{ passive: false, once: true }
|
3325
|
+
);
|
3326
|
+
}, []);
|
3317
3327
|
return /* @__PURE__ */ React49__default.createElement(
|
3318
3328
|
Box,
|
3319
3329
|
{
|
@@ -4540,6 +4550,16 @@ function Option({ item, state: state2 }) {
|
|
4540
4550
|
if (isFocused) {
|
4541
4551
|
dataFields["data-focus"] = true;
|
4542
4552
|
}
|
4553
|
+
useEffect(() => {
|
4554
|
+
var _a6;
|
4555
|
+
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
4556
|
+
"touchend",
|
4557
|
+
(event) => {
|
4558
|
+
event.preventDefault();
|
4559
|
+
},
|
4560
|
+
{ passive: false, once: true }
|
4561
|
+
);
|
4562
|
+
}, []);
|
4543
4563
|
return /* @__PURE__ */ React49__default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React49__default.createElement(ListItem, { ...optionProps, ...dataFields, ref, sx: styles2.item }, item.rendered));
|
4544
4564
|
}
|
4545
4565
|
var OptionContext = React49__default.createContext({
|
@@ -4822,7 +4842,7 @@ function NumericStepper({
|
|
4822
4842
|
{
|
4823
4843
|
fontSize: "sm",
|
4824
4844
|
fontWeight: "bold",
|
4825
|
-
width: "
|
4845
|
+
width: "4ch",
|
4826
4846
|
marginX: 1,
|
4827
4847
|
paddingX: 1,
|
4828
4848
|
textAlign: "center",
|
@@ -5045,7 +5065,7 @@ var texts14 = createTexts({
|
|
5045
5065
|
sv: "Telefonnummer"
|
5046
5066
|
}
|
5047
5067
|
});
|
5048
|
-
var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-
|
5068
|
+
var LazyCountryCodeSelect = React49__default.lazy(() => import('./CountryCodeSelect-R5RS2HYK.mjs'));
|
5049
5069
|
var Radio = forwardRef((props, ref) => {
|
5050
5070
|
return /* @__PURE__ */ React49__default.createElement(Radio$1, { ...props, ref });
|
5051
5071
|
});
|
package/dist/index.js
CHANGED
@@ -2931,6 +2931,16 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2931
2931
|
if (isOutsideMonth) {
|
2932
2932
|
stateProps["data-unavailable"] = true;
|
2933
2933
|
}
|
2934
|
+
React49.useEffect(() => {
|
2935
|
+
var _a6;
|
2936
|
+
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
2937
|
+
"touchend",
|
2938
|
+
(event) => {
|
2939
|
+
event.preventDefault();
|
2940
|
+
},
|
2941
|
+
{ passive: false, once: true }
|
2942
|
+
);
|
2943
|
+
}, []);
|
2934
2944
|
return /* @__PURE__ */ React49__namespace.default.createElement(
|
2935
2945
|
react.Box,
|
2936
2946
|
{
|
@@ -5077,6 +5087,16 @@ function Option({ item, state: state2 }) {
|
|
5077
5087
|
if (isFocused) {
|
5078
5088
|
dataFields["data-focus"] = true;
|
5079
5089
|
}
|
5090
|
+
React49.useEffect(() => {
|
5091
|
+
var _a6;
|
5092
|
+
(_a6 = ref == null ? void 0 : ref.current) == null ? void 0 : _a6.addEventListener(
|
5093
|
+
"touchend",
|
5094
|
+
(event) => {
|
5095
|
+
event.preventDefault();
|
5096
|
+
},
|
5097
|
+
{ passive: false, once: true }
|
5098
|
+
);
|
5099
|
+
}, []);
|
5080
5100
|
return /* @__PURE__ */ React49__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React49__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx: styles2.item }, item.rendered));
|
5081
5101
|
}
|
5082
5102
|
function ListBoxSection({ section, state: state2 }) {
|
@@ -5406,7 +5426,7 @@ function NumericStepper({
|
|
5406
5426
|
{
|
5407
5427
|
fontSize: "sm",
|
5408
5428
|
fontWeight: "bold",
|
5409
|
-
width: "
|
5429
|
+
width: "4ch",
|
5410
5430
|
marginX: 1,
|
5411
5431
|
paddingX: 1,
|
5412
5432
|
textAlign: "center",
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, AttachedInputs, Badge, Box, 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, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, 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, 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, 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, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, NativeSelect, NumericStepper, 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, 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-U4A5DVNS.mjs';
|
package/package.json
CHANGED
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
isSameMonth,
|
6
6
|
isToday,
|
7
7
|
} from "@internationalized/date";
|
8
|
-
import React, { useRef } from "react";
|
8
|
+
import React, { useEffect, useRef } from "react";
|
9
9
|
import { useCalendarCell } from "react-aria";
|
10
10
|
import { CalendarState, RangeCalendarState } from "react-stately";
|
11
11
|
|
@@ -41,7 +41,22 @@ export function CalendarCell({ state, date, currentMonth }: CalendarCellProps) {
|
|
41
41
|
if (isOutsideMonth) {
|
42
42
|
stateProps["data-unavailable"] = true;
|
43
43
|
}
|
44
|
-
|
44
|
+
|
45
|
+
/*
|
46
|
+
Workaround to fix click througs on mobile devices
|
47
|
+
Related to https://github.com/adobe/react-spectrum/issues/4970
|
48
|
+
TODO: Follow up with react-spectrum to see if they can solve it on their end
|
49
|
+
*/
|
50
|
+
useEffect(() => {
|
51
|
+
(ref as any)?.current?.addEventListener(
|
52
|
+
"touchend",
|
53
|
+
(event: TouchEvent) => {
|
54
|
+
event.preventDefault();
|
55
|
+
},
|
56
|
+
{ passive: false, once: true }
|
57
|
+
);
|
58
|
+
}, []);
|
59
|
+
|
45
60
|
return (
|
46
61
|
<Box
|
47
62
|
as="td"
|
package/src/input/ListBox.tsx
CHANGED
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
type BoxProps,
|
8
8
|
} from "@chakra-ui/react";
|
9
9
|
import type { Node } from "@react-types/shared";
|
10
|
-
import React, { useContext, useRef } from "react";
|
10
|
+
import React, { useContext, useEffect, useRef } from "react";
|
11
11
|
import {
|
12
12
|
AriaListBoxProps,
|
13
13
|
useListBox,
|
@@ -152,6 +152,21 @@ function Option({ item, state }: OptionProps) {
|
|
152
152
|
dataFields["data-focus"] = true;
|
153
153
|
}
|
154
154
|
|
155
|
+
/*
|
156
|
+
Workaround to fix click througs on mobile devices
|
157
|
+
Related to https://github.com/adobe/react-spectrum/issues/4970
|
158
|
+
TODO: Follow up with react-spectrum to see if they can solve it on their end
|
159
|
+
*/
|
160
|
+
useEffect(() => {
|
161
|
+
(ref as any)?.current?.addEventListener(
|
162
|
+
"touchend",
|
163
|
+
(event: TouchEvent) => {
|
164
|
+
event.preventDefault();
|
165
|
+
},
|
166
|
+
{ passive: false, once: true }
|
167
|
+
);
|
168
|
+
}, []);
|
169
|
+
|
155
170
|
return (
|
156
171
|
<OptionContext.Provider value={{ labelProps, descriptionProps }}>
|
157
172
|
<ListItem {...optionProps} {...dataFields} ref={ref} sx={styles.item}>
|
@@ -143,7 +143,7 @@ export function NumericStepper({
|
|
143
143
|
<chakra.text
|
144
144
|
fontSize="sm"
|
145
145
|
fontWeight="bold"
|
146
|
-
width="
|
146
|
+
width="4ch"
|
147
147
|
marginX={1}
|
148
148
|
paddingX={1}
|
149
149
|
textAlign="center"
|
@@ -262,4 +262,4 @@ const texts = createTexts({
|
|
262
262
|
nn: "Legg til 1",
|
263
263
|
sv: "Lägg till 1",
|
264
264
|
},
|
265
|
-
});
|
265
|
+
});
|