@vygruppen/spor-react 12.8.10 → 12.10.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/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +19 -0
- package/dist/index.cjs +25 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.mjs +26 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/dialog/Drawer.tsx +32 -22
- package/src/provider/SporProvider.tsx +12 -1
- package/src/theme/slot-recipes/choice-chip.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.
|
2
|
+
> @vygruppen/spor-react@12.10.0 build /home/runner/work/spor/spor/packages/spor-react
|
3
3
|
> tsup
|
4
4
|
|
5
5
|
CLI Building entry: src/index.tsx, src/icons/index.tsx
|
@@ -11,18 +11,18 @@ CLI Cleaning output folder
|
|
11
11
|
ESM Build start
|
12
12
|
CJS Build start
|
13
13
|
DTS Build start
|
14
|
-
|
15
|
-
CJS dist/icons/index.cjs.map 157.00 B
|
16
|
-
CJS dist/index.cjs 315.14 KB
|
17
|
-
CJS dist/index.cjs.map 629.02 KB
|
18
|
-
CJS ⚡️ Build success in 3030ms
|
14
|
+
ESM dist/index.mjs 294.10 KB
|
19
15
|
ESM dist/icons/index.mjs 110.00 B
|
20
|
-
ESM dist/index.mjs
|
16
|
+
ESM dist/index.mjs.map 630.10 KB
|
21
17
|
ESM dist/icons/index.mjs.map 157.00 B
|
22
|
-
ESM
|
23
|
-
|
24
|
-
|
18
|
+
ESM ⚡️ Build success in 3192ms
|
19
|
+
CJS dist/index.cjs 315.51 KB
|
20
|
+
CJS dist/icons/index.cjs 381.00 B
|
21
|
+
CJS dist/icons/index.cjs.map 157.00 B
|
22
|
+
CJS dist/index.cjs.map 630.10 KB
|
23
|
+
CJS ⚡️ Build success in 3193ms
|
24
|
+
DTS ⚡️ Build success in 31693ms
|
25
25
|
DTS dist/icons/index.d.ts 44.00 B
|
26
|
-
DTS dist/index.d.ts 156.
|
26
|
+
DTS dist/index.d.ts 156.80 KB
|
27
27
|
DTS dist/icons/index.d.cts 44.00 B
|
28
|
-
DTS dist/index.d.cts 156.
|
28
|
+
DTS dist/index.d.cts 156.80 KB
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 12.10.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- c367662: Bump to 12.10.0 - error with previous changeset.
|
8
|
+
|
9
|
+
## 12.9.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- 5e4f450: Drawer: Make it possible to close a drawer by swiping
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- e375b23: Make it possible to turn off automatic system detection for color mode
|
18
|
+
- a4ed71b: Add gap between icon and text in ChoiceChip
|
19
|
+
- Updated dependencies [33ffcc7]
|
20
|
+
- @vygruppen/spor-design-tokens@4.0.8
|
21
|
+
|
3
22
|
## 12.8.10
|
4
23
|
|
5
24
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
@@ -12,6 +12,7 @@ var nextThemes = require('next-themes');
|
|
12
12
|
var lu = require('react-icons/lu');
|
13
13
|
var reactStately = require('react-stately');
|
14
14
|
var date = require('@internationalized/date');
|
15
|
+
var reactSwipeable = require('react-swipeable');
|
15
16
|
var awesomePhonenumber = require('awesome-phonenumber');
|
16
17
|
var react$1 = require('@emotion/react');
|
17
18
|
var tokens23 = require('@vygruppen/spor-design-tokens');
|
@@ -2376,38 +2377,38 @@ var DrawerContent = React27.forwardRef(
|
|
2376
2377
|
(props, ref) => {
|
2377
2378
|
const { children, portalled = true, portalRef, ...rest } = props;
|
2378
2379
|
const { size, placement } = useRootDrawerProps();
|
2380
|
+
const { setOpen } = react.useDialogContext();
|
2381
|
+
const handlers = reactSwipeable.useSwipeable({
|
2382
|
+
onSwiped: (e) => {
|
2383
|
+
const shouldClose = placement === "bottom" && e.dir === "Down" || placement === "top" && e.dir === "Up" || placement === "end" && e.dir === "Right" || placement === "start" && e.dir === "Left";
|
2384
|
+
if (shouldClose) {
|
2385
|
+
setOpen(false);
|
2386
|
+
}
|
2387
|
+
},
|
2388
|
+
swipeDuration: 250
|
2389
|
+
});
|
2379
2390
|
const sizeNotFull = size !== "full";
|
2380
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Drawer.Content, { ref, ...rest, children: [
|
2391
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { ...handlers, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(react.Drawer.Content, { ref, ...rest, children: [
|
2381
2392
|
sizeNotFull && placement === "bottom" && /* @__PURE__ */ jsxRuntime.jsx(CloseDrawerLine, {}),
|
2382
2393
|
children,
|
2383
2394
|
sizeNotFull && placement === "top" && /* @__PURE__ */ jsxRuntime.jsx(CloseDrawerLine, {})
|
2384
|
-
] }) }) });
|
2395
|
+
] }) }) }) });
|
2385
2396
|
}
|
2386
2397
|
);
|
2387
2398
|
DrawerContent.displayName = "DrawerContent";
|
2388
2399
|
var CloseDrawerLine = React27.forwardRef((props, ref) => {
|
2389
|
-
const { t } = useTranslation();
|
2390
2400
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
2391
|
-
react.
|
2401
|
+
react.Box,
|
2392
2402
|
{
|
2393
|
-
|
2394
|
-
|
2395
|
-
position: "relative",
|
2396
|
-
insetEnd: "unset",
|
2397
|
-
"aria-label": t(texts12.close),
|
2398
|
-
cursor: "pointer",
|
2403
|
+
width: 7,
|
2404
|
+
minHeight: 1,
|
2399
2405
|
top: 0,
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2406
|
-
backgroundColor: "silver",
|
2407
|
-
borderRadius: "xs",
|
2408
|
-
marginX: "auto"
|
2409
|
-
}
|
2410
|
-
)
|
2406
|
+
marginY: 2,
|
2407
|
+
marginX: "auto",
|
2408
|
+
backgroundColor: "silver",
|
2409
|
+
borderRadius: "xs",
|
2410
|
+
...props,
|
2411
|
+
ref
|
2411
2412
|
}
|
2412
2413
|
);
|
2413
2414
|
});
|
@@ -5133,9 +5134,10 @@ var texts25 = createTexts({
|
|
5133
5134
|
var SporProvider = ({
|
5134
5135
|
language = "nb" /* NorwegianBokmal */,
|
5135
5136
|
theme = system,
|
5137
|
+
enableSystemColorMode = true,
|
5136
5138
|
children
|
5137
5139
|
}) => {
|
5138
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LanguageProvider, { language, children: /* @__PURE__ */ jsxRuntime.jsx(react.ChakraProvider, { value: theme, children: /* @__PURE__ */ jsxRuntime.jsxs(ColorModeProvider, { children: [
|
5140
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LanguageProvider, { language, children: /* @__PURE__ */ jsxRuntime.jsx(react.ChakraProvider, { value: theme, children: /* @__PURE__ */ jsxRuntime.jsxs(ColorModeProvider, { enableSystem: enableSystemColorMode, children: [
|
5139
5141
|
/* @__PURE__ */ jsxRuntime.jsx(Toaster, {}),
|
5140
5142
|
/* @__PURE__ */ jsxRuntime.jsx(react$1.Global, { styles: fontFaces }),
|
5141
5143
|
children
|
@@ -6904,6 +6906,7 @@ var choiceChipSlotRecipe = react.defineSlotRecipe({
|
|
6904
6906
|
label: {
|
6905
6907
|
display: "flex",
|
6906
6908
|
alignItems: "center",
|
6909
|
+
gap: "1",
|
6907
6910
|
fontSize: "xs"
|
6908
6911
|
}
|
6909
6912
|
},
|