@vygruppen/spor-react 13.7.1 → 13.8.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 +10 -10
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +19 -0
- package/dist/index.cjs +106 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -36
- package/dist/index.d.ts +24 -36
- package/dist/index.mjs +106 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/input/Radio.tsx +2 -2
- package/src/input/Select.tsx +1 -1
- package/src/layout/RadioCard.tsx +5 -3
- package/src/theme/slot-recipes/radio-card.ts +19 -0
- package/src/theme/slot-recipes/radio.ts +12 -0
- package/src/theme/slot-recipes/select.ts +13 -26
- package/src/theme/slot-recipes/tabs.ts +51 -36
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@13.
|
|
2
|
+
> @vygruppen/spor-react@13.8.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
|
-
CJS dist/index.cjs 381.85 KB
|
|
15
14
|
CJS dist/icons/index.cjs 381.00 B
|
|
16
|
-
CJS dist/index.cjs.
|
|
15
|
+
CJS dist/index.cjs 382.91 KB
|
|
17
16
|
CJS dist/icons/index.cjs.map 157.00 B
|
|
18
|
-
CJS
|
|
19
|
-
|
|
17
|
+
CJS dist/index.cjs.map 759.61 KB
|
|
18
|
+
CJS ⚡️ Build success in 2740ms
|
|
19
|
+
ESM dist/index.mjs 358.17 KB
|
|
20
20
|
ESM dist/icons/index.mjs 110.00 B
|
|
21
|
-
ESM dist/index.mjs.map
|
|
21
|
+
ESM dist/index.mjs.map 759.61 KB
|
|
22
22
|
ESM dist/icons/index.mjs.map 157.00 B
|
|
23
|
-
ESM ⚡️ Build success in
|
|
24
|
-
DTS ⚡️ Build success in
|
|
23
|
+
ESM ⚡️ Build success in 2741ms
|
|
24
|
+
DTS ⚡️ Build success in 19907ms
|
|
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.17 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.17 KB
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@13.
|
|
2
|
+
> @vygruppen/spor-react@13.8.0 postinstall /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> chakra typegen src/theme/index.ts
|
|
4
4
|
|
|
5
|
-
◇ injected env (0) from .env // tip:
|
|
5
|
+
◇ injected env (0) from .env // tip: ⌘ custom filepath { path: '/custom/path/.env' }
|
|
6
6
|
[90m┌[39m Chakra CLI ⚡️
|
|
7
7
|
[?25l[90m│[39m
|
|
8
8
|
[32m◇[39m ✅ Generated conditions typings
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @vygruppen/spor-react
|
|
2
2
|
|
|
3
|
+
## 13.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d5a0149: RadioGroup: Introduce invalid state for RadioGroup, Radio, and RadioCard.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 988b0ad: Select: adjust the styling of select-items to make them similar to the ones in Autocomplete
|
|
12
|
+
- 64589d0: Tabs: Added indicator with animation when navigating between tabtriggers.
|
|
13
|
+
- Updated dependencies [ee08c36]
|
|
14
|
+
- @vygruppen/spor-icon-react@5.0.4
|
|
15
|
+
|
|
16
|
+
## 13.7.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- ff28880: RadioCard: Make children take 100% width
|
|
21
|
+
|
|
3
22
|
## 13.7.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1595,11 +1595,11 @@ var RadioCard = ({
|
|
|
1595
1595
|
showIndicator = false,
|
|
1596
1596
|
...props
|
|
1597
1597
|
}) => {
|
|
1598
|
-
const { inputProps, children } = props;
|
|
1598
|
+
const { inputProps, children, invalid } = props;
|
|
1599
1599
|
const uniqueId = React14.useId();
|
|
1600
1600
|
const itemControlId = `radio-card-item-control-${uniqueId}`;
|
|
1601
1601
|
const inputHasAriaLabel = (inputProps == null ? void 0 : inputProps["aria-labelledby"]) || (inputProps == null ? void 0 : inputProps["aria-label"]);
|
|
1602
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
|
|
1602
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, "aria-invalid": invalid, children: [
|
|
1603
1603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1604
1604
|
react.RadioCard.ItemHiddenInput,
|
|
1605
1605
|
{
|
|
@@ -1610,7 +1610,7 @@ var RadioCard = ({
|
|
|
1610
1610
|
),
|
|
1611
1611
|
/* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.ItemControl, { id: itemControlId, "aria-hidden": true, children: [
|
|
1612
1612
|
showIndicator && /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemIndicator, {}),
|
|
1613
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: "column", children })
|
|
1613
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: "column", width: "100%", children })
|
|
1614
1614
|
] })
|
|
1615
1615
|
] });
|
|
1616
1616
|
};
|
|
@@ -5029,8 +5029,8 @@ var Radio = ({
|
|
|
5029
5029
|
ref,
|
|
5030
5030
|
...props
|
|
5031
5031
|
}) => {
|
|
5032
|
-
const { children, inputProps, rootRef, ...rest } = props;
|
|
5033
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioGroup.Item, { ref: rootRef, ...rest, children: [
|
|
5032
|
+
const { children, inputProps, rootRef, invalid, ...rest } = props;
|
|
5033
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioGroup.Item, { ref: rootRef, ...rest, "aria-invalid": invalid, children: [
|
|
5034
5034
|
/* @__PURE__ */ jsxRuntime.jsx(react.RadioGroup.ItemHiddenInput, { ref, ...inputProps }),
|
|
5035
5035
|
/* @__PURE__ */ jsxRuntime.jsx(react.RadioGroup.ItemIndicator, {}),
|
|
5036
5036
|
children && /* @__PURE__ */ jsxRuntime.jsx(react.RadioGroup.ItemText, { children })
|
|
@@ -5150,7 +5150,7 @@ var SelectItem = ({
|
|
|
5150
5150
|
const multiple = selectContext.multiple;
|
|
5151
5151
|
const isSelected = selectContext.value.includes(item.value);
|
|
5152
5152
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Select.Item, { item, ...rest, ref, children: [
|
|
5153
|
-
multiple && /* @__PURE__ */ jsxRuntime.jsx(react.Checkbox.Root, { checked: isSelected, pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(react.Checkbox.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Checkbox.Indicator, {}) }) }),
|
|
5153
|
+
multiple && /* @__PURE__ */ jsxRuntime.jsx(react.Checkbox.Root, { checked: isSelected, pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(react.Checkbox.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Checkbox.Indicator, { marginLeft: "1px" }) }) }),
|
|
5154
5154
|
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { width: "100%", children: [
|
|
5155
5155
|
/* @__PURE__ */ jsxRuntime.jsx(react.Select.ItemText, { display: "flex", children }),
|
|
5156
5156
|
description && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { "data-part": "item-description", children: description })
|
|
@@ -11278,6 +11278,18 @@ var radioGroupSlotRecipe = react.defineSlotRecipe({
|
|
|
11278
11278
|
backgroundColor: "outline.disabled"
|
|
11279
11279
|
}
|
|
11280
11280
|
},
|
|
11281
|
+
_invalid: {
|
|
11282
|
+
borderColor: "outline.error",
|
|
11283
|
+
"& .dot": {
|
|
11284
|
+
backgroundColor: "outline.error"
|
|
11285
|
+
},
|
|
11286
|
+
_hover: {
|
|
11287
|
+
borderColor: "outline.error",
|
|
11288
|
+
"& .dot": {
|
|
11289
|
+
backgroundColor: "outline.error"
|
|
11290
|
+
}
|
|
11291
|
+
}
|
|
11292
|
+
},
|
|
11281
11293
|
_focusVisible: {
|
|
11282
11294
|
outlineWidth: "2px",
|
|
11283
11295
|
outlineColor: "outline.focus",
|
|
@@ -11327,6 +11339,25 @@ var radioCardSlotRecipe = react.defineSlotRecipe({
|
|
|
11327
11339
|
pointerEvents: "none",
|
|
11328
11340
|
background: "surface.disabled",
|
|
11329
11341
|
color: "text.disabled"
|
|
11342
|
+
},
|
|
11343
|
+
_invalid: {
|
|
11344
|
+
outlineColor: "outline.error",
|
|
11345
|
+
"& .dot": {
|
|
11346
|
+
backgroundColor: "outline.error"
|
|
11347
|
+
},
|
|
11348
|
+
_hover: {
|
|
11349
|
+
outlineColor: "outline.error",
|
|
11350
|
+
"& .dot": {
|
|
11351
|
+
backgroundColor: "outline.error"
|
|
11352
|
+
},
|
|
11353
|
+
_active: {
|
|
11354
|
+
backgroundColor: "surface.critical"
|
|
11355
|
+
}
|
|
11356
|
+
},
|
|
11357
|
+
_checked: {
|
|
11358
|
+
outlineColor: "outline.error",
|
|
11359
|
+
backgroundColor: "surface.critical"
|
|
11360
|
+
}
|
|
11330
11361
|
}
|
|
11331
11362
|
},
|
|
11332
11363
|
label: {
|
|
@@ -11542,10 +11573,9 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
|
11542
11573
|
}
|
|
11543
11574
|
},
|
|
11544
11575
|
item: {
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
marginX: 1,
|
|
11576
|
+
px: 2,
|
|
11577
|
+
py: 1,
|
|
11578
|
+
margin: 1,
|
|
11549
11579
|
display: "flex",
|
|
11550
11580
|
alignItems: "center",
|
|
11551
11581
|
justifyContent: "space-between",
|
|
@@ -11554,38 +11584,28 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
|
11554
11584
|
color: "text.ghost",
|
|
11555
11585
|
cursor: "pointer",
|
|
11556
11586
|
outline: "none",
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
outline: "2px solid",
|
|
11560
|
-
outlineColor: "outline.focus",
|
|
11561
|
-
backgroundColor: "surface.accent.hover"
|
|
11562
|
-
},
|
|
11563
|
-
"&[data-highlighted]": {
|
|
11564
|
-
outlineOffset: "2px",
|
|
11565
|
-
outline: "2px solid",
|
|
11566
|
-
outlineColor: "outline.focus"
|
|
11567
|
-
},
|
|
11568
|
-
_active: {
|
|
11569
|
-
backgroundColor: "surface.accent.active"
|
|
11570
|
-
},
|
|
11571
|
-
_highlighted: {
|
|
11587
|
+
_hover: {
|
|
11588
|
+
backgroundColor: "surface.accent.hover",
|
|
11572
11589
|
_active: {
|
|
11573
|
-
|
|
11590
|
+
backgroundColor: "surface.accent.active"
|
|
11574
11591
|
}
|
|
11575
11592
|
},
|
|
11576
|
-
_hover: {
|
|
11577
|
-
backgroundColor: "surface.accent.hover"
|
|
11578
|
-
},
|
|
11579
11593
|
_selected: {
|
|
11580
11594
|
backgroundColor: "surface.accent"
|
|
11581
11595
|
},
|
|
11596
|
+
_highlighted: {
|
|
11597
|
+
backgroundColor: "surface.ghost.active",
|
|
11598
|
+
_selected: {
|
|
11599
|
+
backgroundColor: "surface.accent"
|
|
11600
|
+
}
|
|
11601
|
+
},
|
|
11582
11602
|
_icon: {
|
|
11583
11603
|
width: 3,
|
|
11584
11604
|
height: 3
|
|
11585
11605
|
},
|
|
11586
11606
|
"& [data-part='item-description']": {
|
|
11587
11607
|
fontSize: ["mobile.xs", "desktop.xs"],
|
|
11588
|
-
color: "text.
|
|
11608
|
+
color: "text.subtle"
|
|
11589
11609
|
}
|
|
11590
11610
|
},
|
|
11591
11611
|
control: {
|
|
@@ -11710,9 +11730,7 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
|
11710
11730
|
}
|
|
11711
11731
|
},
|
|
11712
11732
|
item: {
|
|
11713
|
-
|
|
11714
|
-
paddingY: 1,
|
|
11715
|
-
fontSize: "xs",
|
|
11733
|
+
fontSize: ["mobile.xs", "desktop.xs"],
|
|
11716
11734
|
"& [data-part='item-description']": {
|
|
11717
11735
|
fontSize: ["mobile.2xs", "desktop.2xs"]
|
|
11718
11736
|
}
|
|
@@ -12182,7 +12200,9 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
12182
12200
|
alignItems: "center",
|
|
12183
12201
|
gap: 0.5,
|
|
12184
12202
|
borderRadius: "xl",
|
|
12185
|
-
width: "fit-content"
|
|
12203
|
+
width: "fit-content",
|
|
12204
|
+
position: "relative",
|
|
12205
|
+
overflow: "hidden"
|
|
12186
12206
|
},
|
|
12187
12207
|
trigger: {
|
|
12188
12208
|
display: "flex",
|
|
@@ -12193,7 +12213,32 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
12193
12213
|
transitionDuration: "normal",
|
|
12194
12214
|
height: "100%",
|
|
12195
12215
|
whiteSpace: "nowrap",
|
|
12196
|
-
borderRadius: "xl"
|
|
12216
|
+
borderRadius: "xl",
|
|
12217
|
+
position: "relative",
|
|
12218
|
+
".spor-tabs__list:has(.spor-tabs__indicator) &": {
|
|
12219
|
+
transition: "color 0.2s ease"
|
|
12220
|
+
},
|
|
12221
|
+
_selected: {
|
|
12222
|
+
color: "text.brand",
|
|
12223
|
+
// @ts-expect-error — valid CSS selector, not recognized by Chakra's types
|
|
12224
|
+
".spor-tabs__list:not(:has(.spor-tabs__indicator)) &[data-selected]": {
|
|
12225
|
+
backgroundColor: "surface.brand",
|
|
12226
|
+
_hover: {
|
|
12227
|
+
backgroundColor: "surface.brand"
|
|
12228
|
+
}
|
|
12229
|
+
}
|
|
12230
|
+
}
|
|
12231
|
+
},
|
|
12232
|
+
indicator: {
|
|
12233
|
+
position: "absolute",
|
|
12234
|
+
top: "2.5px",
|
|
12235
|
+
left: 0,
|
|
12236
|
+
width: "var(--width)",
|
|
12237
|
+
height: "var(--height)",
|
|
12238
|
+
transform: "translate(var(--x), var(--y))",
|
|
12239
|
+
transition: "transform 0.2s ease, width 0.2s ease",
|
|
12240
|
+
borderRadius: "xl",
|
|
12241
|
+
backgroundColor: "surface.brand"
|
|
12197
12242
|
}
|
|
12198
12243
|
},
|
|
12199
12244
|
variants: {
|
|
@@ -12231,38 +12276,32 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
12231
12276
|
core: {
|
|
12232
12277
|
list: {
|
|
12233
12278
|
color: "text.core",
|
|
12234
|
-
border: "sm"
|
|
12279
|
+
border: "sm",
|
|
12280
|
+
borderColor: "outline"
|
|
12235
12281
|
},
|
|
12236
12282
|
trigger: {
|
|
12237
12283
|
color: "text.core",
|
|
12238
12284
|
border: "md",
|
|
12239
12285
|
borderColor: "transparent",
|
|
12240
|
-
|
|
12241
|
-
outline: "2px solid",
|
|
12242
|
-
outlineColor: "outline.core.hover",
|
|
12243
|
-
outlineOffset: "-2px"
|
|
12244
|
-
},
|
|
12245
|
-
_active: {
|
|
12246
|
-
backgroundColor: "surface.brand.active",
|
|
12247
|
-
color: "text.brand",
|
|
12248
|
-
outline: "none"
|
|
12249
|
-
},
|
|
12250
|
-
_selected: {
|
|
12251
|
-
backgroundColor: "surface.brand",
|
|
12252
|
-
color: "text.brand",
|
|
12286
|
+
"&:not([data-selected])": {
|
|
12253
12287
|
_hover: {
|
|
12254
|
-
|
|
12288
|
+
backgroundColor: "surface.ghost.hover",
|
|
12289
|
+
_active: {
|
|
12290
|
+
backgroundColor: "surface.ghost.active",
|
|
12291
|
+
outline: "none",
|
|
12292
|
+
outlineColor: "transparent"
|
|
12293
|
+
}
|
|
12255
12294
|
}
|
|
12256
|
-
},
|
|
12257
|
-
_disabled: {
|
|
12258
|
-
backgroundColor: "surface.disabled",
|
|
12259
|
-
color: "surface.disabled"
|
|
12260
12295
|
}
|
|
12296
|
+
},
|
|
12297
|
+
_disabled: {
|
|
12298
|
+
backgroundColor: "surface.disabled",
|
|
12299
|
+
color: "surface.disabled"
|
|
12261
12300
|
}
|
|
12262
12301
|
},
|
|
12263
12302
|
accent: {
|
|
12264
12303
|
list: {
|
|
12265
|
-
backgroundColor: "
|
|
12304
|
+
backgroundColor: "surface.accent",
|
|
12266
12305
|
color: "text.accent"
|
|
12267
12306
|
},
|
|
12268
12307
|
trigger: {
|
|
@@ -12271,22 +12310,17 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
12271
12310
|
backgroundColor: "surface.disabled",
|
|
12272
12311
|
color: "icon.disabled"
|
|
12273
12312
|
},
|
|
12274
|
-
|
|
12275
|
-
backgroundColor: "surface.accent.hover",
|
|
12276
|
-
_active: {
|
|
12277
|
-
backgroundColor: "surface.brand.active",
|
|
12278
|
-
color: "text.brand"
|
|
12279
|
-
}
|
|
12280
|
-
},
|
|
12281
|
-
_selected: {
|
|
12282
|
-
backgroundColor: "surface.brand",
|
|
12283
|
-
color: "text.brand",
|
|
12313
|
+
"&:not([data-selected])": {
|
|
12284
12314
|
_hover: {
|
|
12285
|
-
backgroundColor: "surface.
|
|
12286
|
-
|
|
12287
|
-
|
|
12315
|
+
backgroundColor: "surface.accent.hover",
|
|
12316
|
+
_active: {
|
|
12317
|
+
backgroundColor: "surface.accent.active"
|
|
12318
|
+
}
|
|
12288
12319
|
}
|
|
12289
12320
|
}
|
|
12321
|
+
},
|
|
12322
|
+
indicator: {
|
|
12323
|
+
backgroundColor: "surface.brand"
|
|
12290
12324
|
}
|
|
12291
12325
|
}
|
|
12292
12326
|
},
|
|
@@ -12299,6 +12333,9 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
12299
12333
|
trigger: {
|
|
12300
12334
|
paddingX: 2,
|
|
12301
12335
|
paddingY: 0
|
|
12336
|
+
},
|
|
12337
|
+
indicator: {
|
|
12338
|
+
top: "1px"
|
|
12302
12339
|
}
|
|
12303
12340
|
},
|
|
12304
12341
|
sm: {
|
|
@@ -12328,11 +12365,7 @@ var tabsSlotRecipe = react.defineSlotRecipe({
|
|
|
12328
12365
|
trigger: {
|
|
12329
12366
|
fontWeight: "bold",
|
|
12330
12367
|
fontSize: "sm",
|
|
12331
|
-
paddingX: 3
|
|
12332
|
-
_focus: {
|
|
12333
|
-
border: "md",
|
|
12334
|
-
borderColor: "surface.accent"
|
|
12335
|
-
}
|
|
12368
|
+
paddingX: 3
|
|
12336
12369
|
}
|
|
12337
12370
|
}
|
|
12338
12371
|
}
|