@vygruppen/spor-react 3.7.0 → 3.7.1
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/CHANGELOG.md +7 -0
- package/dist/{CountryCodeSelect-GKQNQL5N.mjs → CountryCodeSelect-3P7RFAM2.mjs} +1 -1
- package/dist/{chunk-WONJHGCG.mjs → chunk-IP63HI2Y.mjs} +92 -89
- package/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +97 -88
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/provider/SporProvider.tsx +0 -6
- package/src/theme/foundations/fonts.ts +3 -3
- package/src/theme/foundations/index.ts +1 -0
- package/src/theme/foundations/styles.ts +12 -0
package/dist/index.js
CHANGED
@@ -945,8 +945,8 @@ var BaseAlert;
|
|
945
945
|
var init_BaseAlert = __esm({
|
946
946
|
"src/alert/BaseAlert.tsx"() {
|
947
947
|
BaseAlert = ({ variant, children, ...boxProps }) => {
|
948
|
-
const
|
949
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css:
|
948
|
+
const styles3 = react.useMultiStyleConfig("Alert", { variant });
|
949
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: styles3.container, ...boxProps }, children);
|
950
950
|
};
|
951
951
|
}
|
952
952
|
});
|
@@ -964,7 +964,7 @@ var init_ClosableAlert = __esm({
|
|
964
964
|
}
|
965
965
|
}) => {
|
966
966
|
const { isOpen, onClose } = react.useDisclosure({ defaultIsOpen: true });
|
967
|
-
const
|
967
|
+
const styles3 = react.useMultiStyleConfig("Alert", { variant });
|
968
968
|
const { t: t2 } = useTranslation();
|
969
969
|
if (!isOpen) {
|
970
970
|
return null;
|
@@ -981,7 +981,7 @@ var init_ClosableAlert = __esm({
|
|
981
981
|
onClick: handleClose,
|
982
982
|
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
983
983
|
"aria-label": t2(texts6.close),
|
984
|
-
sx:
|
984
|
+
sx: styles3.closeButton
|
985
985
|
}
|
986
986
|
), /* @__PURE__ */ React50__namespace.default.createElement(AlertIcon, { variant }), children);
|
987
987
|
};
|
@@ -1093,11 +1093,11 @@ var init_Card = __esm({
|
|
1093
1093
|
init_layout();
|
1094
1094
|
exports.Card = react.forwardRef(
|
1095
1095
|
({ size: size2 = "sm", colorScheme = "white", children, ...props }, ref) => {
|
1096
|
-
const
|
1096
|
+
const styles3 = react.useStyleConfig("Card", {
|
1097
1097
|
colorScheme,
|
1098
1098
|
size: size2
|
1099
1099
|
});
|
1100
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css:
|
1100
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { __css: styles3, ...props, ref }, children);
|
1101
1101
|
}
|
1102
1102
|
);
|
1103
1103
|
}
|
@@ -2929,7 +2929,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2929
2929
|
isOutsideVisibleRange
|
2930
2930
|
} = reactAria.useCalendarCell({ date: date$1 }, state2, ref);
|
2931
2931
|
const isOutsideMonth = !date.isSameMonth(currentMonth, date$1);
|
2932
|
-
const
|
2932
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
2933
2933
|
const stateProps = {};
|
2934
2934
|
if (isSelected) {
|
2935
2935
|
stateProps["data-selected"] = true;
|
@@ -2984,7 +2984,7 @@ function CalendarCell({ state: state2, date: date$1, currentMonth }) {
|
|
2984
2984
|
...buttonProps,
|
2985
2985
|
...stateProps,
|
2986
2986
|
ref,
|
2987
|
-
sx:
|
2987
|
+
sx: styles3.dateCell,
|
2988
2988
|
hidden: isOutsideVisibleRange,
|
2989
2989
|
width: "100%"
|
2990
2990
|
},
|
@@ -3038,14 +3038,14 @@ function CalendarGrid({ state: state2, offset = {} }) {
|
|
3038
3038
|
);
|
3039
3039
|
const weeksInMonth = date.getWeeksInMonth(state2.visibleRange.start, locale);
|
3040
3040
|
const weeksInMonthRange = new Array(weeksInMonth).fill(0).map((_, i) => i);
|
3041
|
-
const
|
3041
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3042
3042
|
return /* @__PURE__ */ React50__namespace.default.createElement("table", { ...gridProps }, /* @__PURE__ */ React50__namespace.default.createElement("thead", { ...headerProps }, /* @__PURE__ */ React50__namespace.default.createElement("tr", null, weekDays[language].map((day, index) => {
|
3043
3043
|
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3044
3044
|
exports.Text,
|
3045
3045
|
{
|
3046
3046
|
as: "th",
|
3047
3047
|
key: index,
|
3048
|
-
sx: index < 5 ?
|
3048
|
+
sx: index < 5 ? styles3.weekdays : styles3.weekend,
|
3049
3049
|
variant: "sm"
|
3050
3050
|
},
|
3051
3051
|
day
|
@@ -3255,7 +3255,7 @@ var init_CalendarTriggerButton = __esm({
|
|
3255
3255
|
CalendarTriggerButton = react.forwardRef(
|
3256
3256
|
({ ...buttonProps }, ref) => {
|
3257
3257
|
const { t: t2 } = useTranslation();
|
3258
|
-
const
|
3258
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3259
3259
|
const { onPress, ...filteredButtonProps } = buttonProps;
|
3260
3260
|
const handleOnPress = (event) => {
|
3261
3261
|
if (onPress) {
|
@@ -3270,7 +3270,7 @@ var init_CalendarTriggerButton = __esm({
|
|
3270
3270
|
as: "button",
|
3271
3271
|
type: "button",
|
3272
3272
|
"aria-label": t2(texts9.openCalendar),
|
3273
|
-
sx:
|
3273
|
+
sx: styles3.calendarTriggerButton,
|
3274
3274
|
...filteredButtonProps,
|
3275
3275
|
onKeyUp: handleOnPress
|
3276
3276
|
},
|
@@ -3300,7 +3300,7 @@ var init_DateTimeSegment = __esm({
|
|
3300
3300
|
state2,
|
3301
3301
|
ref
|
3302
3302
|
);
|
3303
|
-
const
|
3303
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {
|
3304
3304
|
isPlaceholder: segment.isPlaceholder,
|
3305
3305
|
isEditable: segment.isEditable
|
3306
3306
|
});
|
@@ -3319,7 +3319,7 @@ var init_DateTimeSegment = __esm({
|
|
3319
3319
|
borderRadius: "xs",
|
3320
3320
|
fontSize: ["mobile.sm", "desktop.sm"],
|
3321
3321
|
minWidth: isPaddable(segment.type) ? "1.3em" : "auto",
|
3322
|
-
sx:
|
3322
|
+
sx: styles3.dateTimeSegment,
|
3323
3323
|
_focus: {
|
3324
3324
|
backgroundColor: "darkTeal",
|
3325
3325
|
color: "white"
|
@@ -3350,7 +3350,7 @@ var init_DateField = __esm({
|
|
3350
3350
|
(props, externalRef) => {
|
3351
3351
|
var _a6;
|
3352
3352
|
const locale = useCurrentLocale();
|
3353
|
-
const
|
3353
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3354
3354
|
const state2 = $3c0fc76039f1c516$export$60e84778edff6d26({
|
3355
3355
|
...props,
|
3356
3356
|
locale,
|
@@ -3368,7 +3368,7 @@ var init_DateField = __esm({
|
|
3368
3368
|
{
|
3369
3369
|
...props.labelProps,
|
3370
3370
|
...labelProps,
|
3371
|
-
sx:
|
3371
|
+
sx: styles3.inputLabel,
|
3372
3372
|
position: "absolute",
|
3373
3373
|
paddingTop: "2px"
|
3374
3374
|
},
|
@@ -3401,12 +3401,12 @@ var init_StyledField = __esm({
|
|
3401
3401
|
const { isInvalid } = react.useFormControlContext() ?? {
|
3402
3402
|
isInvalid: false
|
3403
3403
|
};
|
3404
|
-
const
|
3404
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", { variant });
|
3405
3405
|
return /* @__PURE__ */ React50__namespace.default.createElement(
|
3406
3406
|
react.Box,
|
3407
3407
|
{
|
3408
3408
|
...otherProps,
|
3409
|
-
__css:
|
3409
|
+
__css: styles3.wrapper,
|
3410
3410
|
ref,
|
3411
3411
|
"aria-invalid": isInvalid
|
3412
3412
|
},
|
@@ -3459,7 +3459,7 @@ var init_DatePicker = __esm({
|
|
3459
3459
|
state2,
|
3460
3460
|
ref
|
3461
3461
|
);
|
3462
|
-
const
|
3462
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {});
|
3463
3463
|
const locale = useCurrentLocale();
|
3464
3464
|
const responsiveVariant = react.useBreakpointValue(typeof variant === "string" ? [variant] : variant) ?? "simple";
|
3465
3465
|
const hasTrigger = responsiveVariant === "with-trigger";
|
@@ -3468,7 +3468,7 @@ var init_DatePicker = __esm({
|
|
3468
3468
|
state2.setOpen(true);
|
3469
3469
|
}
|
3470
3470
|
};
|
3471
|
-
const popoverContent = /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", boxShadow: "md", sx:
|
3471
|
+
const popoverContent = /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", boxShadow: "md", sx: styles3.calendar }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React50__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
3472
3472
|
Calendar,
|
3473
3473
|
{
|
3474
3474
|
...calendarProps,
|
@@ -3566,7 +3566,7 @@ function DateRangePicker({
|
|
3566
3566
|
calendarProps
|
3567
3567
|
} = reactAria.useDateRangePicker(props, state2, ref);
|
3568
3568
|
const responsiveVariant = react.useBreakpointValue(typeof variant === "string" ? [variant] : variant) ?? "simple";
|
3569
|
-
const
|
3569
|
+
const styles3 = react.useMultiStyleConfig("Datepicker", {
|
3570
3570
|
variant: responsiveVariant
|
3571
3571
|
});
|
3572
3572
|
const locale = useCurrentLocale();
|
@@ -3582,8 +3582,8 @@ function DateRangePicker({
|
|
3582
3582
|
}
|
3583
3583
|
};
|
3584
3584
|
const hasTrigger = responsiveVariant === "with-trigger";
|
3585
|
-
const popoverContent = /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { sx:
|
3586
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React50__namespace.default.createElement(react.FormLabel, { ...labelProps, sx:
|
3585
|
+
const popoverContent = /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverContent, { sx: styles3.calendar, boxShadow: "md", maxWidth: "none" }, /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React50__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React50__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React50__namespace.default.createElement(RangeCalendar, { ...calendarProps }))));
|
3586
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React50__namespace.default.createElement(react.FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React50__namespace.default.createElement(
|
3587
3587
|
react.Popover,
|
3588
3588
|
{
|
3589
3589
|
...dialogProps,
|
@@ -3976,7 +3976,7 @@ var init_CardSelect = __esm({
|
|
3976
3976
|
triggerRef
|
3977
3977
|
);
|
3978
3978
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
3979
|
-
const
|
3979
|
+
const styles3 = react.useMultiStyleConfig("CardSelect", { variant, size: size2 });
|
3980
3980
|
useForceRerender(state2.isOpen);
|
3981
3981
|
const ChevronIcon = size2 === "sm" ? sporIconReact.DropdownDownFill18Icon : sporIconReact.DropdownDownFill24Icon;
|
3982
3982
|
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...props }, /* @__PURE__ */ React50__namespace.default.createElement(
|
@@ -3984,7 +3984,7 @@ var init_CardSelect = __esm({
|
|
3984
3984
|
{
|
3985
3985
|
type: "button",
|
3986
3986
|
ref: triggerRef,
|
3987
|
-
sx:
|
3987
|
+
sx: styles3.trigger,
|
3988
3988
|
...buttonProps,
|
3989
3989
|
width,
|
3990
3990
|
"data-attachable": true
|
@@ -4009,7 +4009,7 @@ var init_CardSelect = __esm({
|
|
4009
4009
|
{
|
4010
4010
|
colorScheme: "white",
|
4011
4011
|
size: "lg",
|
4012
|
-
sx:
|
4012
|
+
sx: styles3.card,
|
4013
4013
|
...overlayProps
|
4014
4014
|
},
|
4015
4015
|
/* @__PURE__ */ React50__namespace.default.createElement(Dialog, { "aria-label": label }, children)
|
@@ -4802,7 +4802,7 @@ var init_ChoiceChip = __esm({
|
|
4802
4802
|
getRootProps,
|
4803
4803
|
getLabelProps
|
4804
4804
|
} = react.useCheckbox(props);
|
4805
|
-
const
|
4805
|
+
const styles3 = react.useMultiStyleConfig("ChoiceChip", {
|
4806
4806
|
size: size2,
|
4807
4807
|
variant,
|
4808
4808
|
icon,
|
@@ -4821,13 +4821,13 @@ var init_ChoiceChip = __esm({
|
|
4821
4821
|
react.chakra.div,
|
4822
4822
|
{
|
4823
4823
|
...getLabelProps(),
|
4824
|
-
__css:
|
4824
|
+
__css: styles3.container,
|
4825
4825
|
"data-checked": dataAttr(state2.isChecked),
|
4826
4826
|
"data-hover": dataAttr(state2.isHovered),
|
4827
4827
|
"data-focus": dataAttr(state2.isFocused)
|
4828
4828
|
},
|
4829
|
-
icon && /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css:
|
4830
|
-
/* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css:
|
4829
|
+
icon && /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css: styles3.icon }, state2.isChecked ? icon.checked : icon.default),
|
4830
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.chakra.span, { __css: styles3.label, ...getCheckboxProps() }, variant !== "icon" && children),
|
4831
4831
|
variant === "filter" && state2.isChecked && /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseOutline24Icon, { marginLeft: 1.5 })
|
4832
4832
|
)
|
4833
4833
|
);
|
@@ -5063,13 +5063,13 @@ function ListBox({
|
|
5063
5063
|
...props
|
5064
5064
|
}) {
|
5065
5065
|
const { listBoxProps } = reactAria.useListBox(props, state2, listBoxRef);
|
5066
|
-
const
|
5066
|
+
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5067
5067
|
return /* @__PURE__ */ React50__namespace.default.createElement(
|
5068
5068
|
react.List,
|
5069
5069
|
{
|
5070
5070
|
...listBoxProps,
|
5071
5071
|
ref: listBoxRef,
|
5072
|
-
sx:
|
5072
|
+
sx: styles3.container,
|
5073
5073
|
"aria-busy": isLoading,
|
5074
5074
|
maxWidth
|
5075
5075
|
},
|
@@ -5081,13 +5081,13 @@ function ListBox({
|
|
5081
5081
|
}
|
5082
5082
|
function ItemLabel({ children }) {
|
5083
5083
|
let { labelProps } = useOptionContext();
|
5084
|
-
const
|
5085
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...labelProps, sx:
|
5084
|
+
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5085
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...labelProps, sx: styles3.label }, children);
|
5086
5086
|
}
|
5087
5087
|
function ItemDescription({ children }) {
|
5088
5088
|
let { descriptionProps } = useOptionContext();
|
5089
|
-
const
|
5090
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...descriptionProps, sx:
|
5089
|
+
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5090
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...descriptionProps, sx: styles3.description }, children);
|
5091
5091
|
}
|
5092
5092
|
function Option({ item, state: state2 }) {
|
5093
5093
|
const ref = React50.useRef(null);
|
@@ -5099,7 +5099,7 @@ function Option({ item, state: state2 }) {
|
|
5099
5099
|
labelProps,
|
5100
5100
|
descriptionProps
|
5101
5101
|
} = reactAria.useOption({ key: item.key }, state2, ref);
|
5102
|
-
const
|
5102
|
+
const styles3 = react.useMultiStyleConfig("ListBox", {});
|
5103
5103
|
let dataFields = {};
|
5104
5104
|
if (isSelected) {
|
5105
5105
|
dataFields["data-selected"] = true;
|
@@ -5120,7 +5120,7 @@ function Option({ item, state: state2 }) {
|
|
5120
5120
|
{ passive: false, once: true }
|
5121
5121
|
);
|
5122
5122
|
}, []);
|
5123
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React50__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx:
|
5123
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(OptionContext.Provider, { value: { labelProps, descriptionProps } }, /* @__PURE__ */ React50__namespace.default.createElement(react.ListItem, { ...optionProps, ...dataFields, ref, sx: styles3.item }, item.rendered));
|
5124
5124
|
}
|
5125
5125
|
function ListBoxSection({ section, state: state2 }) {
|
5126
5126
|
const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
|
@@ -5182,14 +5182,14 @@ function InfoSelect({
|
|
5182
5182
|
state2,
|
5183
5183
|
triggerRef
|
5184
5184
|
);
|
5185
|
-
const
|
5185
|
+
const styles3 = react.useMultiStyleConfig("InfoSelect", {
|
5186
5186
|
isOpen: state2.isOpen,
|
5187
5187
|
isLabelSrOnly
|
5188
5188
|
});
|
5189
5189
|
const { buttonProps } = reactAria.useButton(triggerProps, triggerRef);
|
5190
5190
|
const { t: t2 } = useTranslation();
|
5191
5191
|
const formControl = react.useFormControlProps(props);
|
5192
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx:
|
5192
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React50__namespace.default.createElement(react.chakra.div, { ...labelProps, sx: styles3.label }, props.label), /* @__PURE__ */ React50__namespace.default.createElement(
|
5193
5193
|
reactAria.HiddenSelect,
|
5194
5194
|
{
|
5195
5195
|
state: state2,
|
@@ -5202,7 +5202,7 @@ function InfoSelect({
|
|
5202
5202
|
{
|
5203
5203
|
type: "button",
|
5204
5204
|
ref: triggerRef,
|
5205
|
-
sx:
|
5205
|
+
sx: styles3.button,
|
5206
5206
|
...buttonProps,
|
5207
5207
|
width,
|
5208
5208
|
height,
|
@@ -5211,7 +5211,7 @@ function InfoSelect({
|
|
5211
5211
|
"aria-describedby": formControl["aria-describedby"]
|
5212
5212
|
},
|
5213
5213
|
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { ...valueProps }, state2.selectedItem ? state2.selectedItem.textValue ?? state2.selectedItem.rendered : placeholder ?? t2(texts11.selectAnOption)),
|
5214
|
-
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx:
|
5214
|
+
/* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles3.arrowIcon }, state2.isOpen ? /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownUpFill24Icon, null) : /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.DropdownDownFill24Icon, null))
|
5215
5215
|
), state2.isOpen && /* @__PURE__ */ React50__namespace.default.createElement(
|
5216
5216
|
Popover3,
|
5217
5217
|
{
|
@@ -5288,13 +5288,13 @@ var init_NativeSelect = __esm({
|
|
5288
5288
|
init_input();
|
5289
5289
|
exports.NativeSelect = react.forwardRef(
|
5290
5290
|
({ label, ...props }, ref) => {
|
5291
|
-
const
|
5291
|
+
const styles3 = react.useMultiStyleConfig("Select", props);
|
5292
5292
|
return /* @__PURE__ */ React50__namespace.default.createElement(exports.FormControl, null, /* @__PURE__ */ React50__namespace.default.createElement(
|
5293
5293
|
react.Select,
|
5294
5294
|
{
|
5295
5295
|
"data-attachable": true,
|
5296
5296
|
...props,
|
5297
|
-
rootProps: { __css:
|
5297
|
+
rootProps: { __css: styles3.root },
|
5298
5298
|
ref
|
5299
5299
|
}
|
5300
5300
|
), label && /* @__PURE__ */ React50__namespace.default.createElement(exports.FormLabel, null, label));
|
@@ -5997,12 +5997,12 @@ var init_LineIcon = __esm({
|
|
5997
5997
|
sx,
|
5998
5998
|
...rest
|
5999
5999
|
}) => {
|
6000
|
-
const
|
6000
|
+
const styles3 = react.useMultiStyleConfig("LineIcon", { variant, size: size2 });
|
6001
6001
|
const Icon = getCorrectIcon({ variant, size: size2 });
|
6002
6002
|
if (!Icon) {
|
6003
6003
|
return null;
|
6004
6004
|
}
|
6005
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: { ...
|
6005
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: { ...styles3.iconContainer, ...sx }, ...rest }, /* @__PURE__ */ React50__namespace.default.createElement(Icon, { sx: styles3.icon }));
|
6006
6006
|
};
|
6007
6007
|
}
|
6008
6008
|
});
|
@@ -6016,8 +6016,8 @@ var init_InfoTag = __esm({
|
|
6016
6016
|
title,
|
6017
6017
|
description
|
6018
6018
|
}) => {
|
6019
|
-
const
|
6020
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx:
|
6019
|
+
const styles3 = react.useMultiStyleConfig("InfoTag", { variant, size: size2 });
|
6020
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles3.container }, /* @__PURE__ */ React50__namespace.default.createElement(exports.LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles3.description }, description)));
|
6021
6021
|
};
|
6022
6022
|
}
|
6023
6023
|
});
|
@@ -6035,13 +6035,13 @@ var init_TravelTag = __esm({
|
|
6035
6035
|
isDisabled,
|
6036
6036
|
...rest
|
6037
6037
|
}, ref) => {
|
6038
|
-
const
|
6038
|
+
const styles3 = react.useMultiStyleConfig("TravelTag", {
|
6039
6039
|
variant,
|
6040
6040
|
size: size2,
|
6041
6041
|
deviationLevel
|
6042
6042
|
});
|
6043
6043
|
const DeviationLevelIcon = getDeviationLevelIcon({ deviationLevel, size: size2 });
|
6044
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx:
|
6044
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles3.container, "aria-disabled": isDisabled, ref, ...rest }, /* @__PURE__ */ React50__namespace.default.createElement(exports.LineIcon, { variant, size: size2, sx: styles3.iconContainer }), /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { sx: styles3.textContainer }, title && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles3.title }, title), title && description && " ", description && /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { as: "span", sx: styles3.description }, description)), DeviationLevelIcon && /* @__PURE__ */ React50__namespace.default.createElement(DeviationLevelIcon, { sx: styles3.deviationIcon }));
|
6045
6045
|
}
|
6046
6046
|
);
|
6047
6047
|
getDeviationLevelIcon = ({
|
@@ -6315,7 +6315,7 @@ var init_JumpButton = __esm({
|
|
6315
6315
|
...props
|
6316
6316
|
}) => {
|
6317
6317
|
const { t: t2 } = useTranslation();
|
6318
|
-
const
|
6318
|
+
const styles3 = react.useMultiStyleConfig("MediaControllerButton", {
|
6319
6319
|
variant: "jumpSkip",
|
6320
6320
|
size: size2
|
6321
6321
|
});
|
@@ -6323,12 +6323,12 @@ var init_JumpButton = __esm({
|
|
6323
6323
|
react.Center,
|
6324
6324
|
{
|
6325
6325
|
as: "button",
|
6326
|
-
sx:
|
6326
|
+
sx: styles3.container,
|
6327
6327
|
"aria-label": direction2 === "forward" ? t2(texts18.forward) : t2(texts18.backward),
|
6328
6328
|
disabled: isDisabled,
|
6329
6329
|
...props
|
6330
6330
|
},
|
6331
|
-
direction2 === "forward" ? /* @__PURE__ */ React50__namespace.default.createElement(JumpForwardIcon, { sx:
|
6331
|
+
direction2 === "forward" ? /* @__PURE__ */ React50__namespace.default.createElement(JumpForwardIcon, { sx: styles3.icon }) : /* @__PURE__ */ React50__namespace.default.createElement(JumpBackwardIcon, { sx: styles3.icon })
|
6332
6332
|
);
|
6333
6333
|
};
|
6334
6334
|
texts18 = createTexts({
|
@@ -6359,7 +6359,7 @@ var init_PlayPauseButton = __esm({
|
|
6359
6359
|
...props
|
6360
6360
|
}) => {
|
6361
6361
|
const { t: t2 } = useTranslation();
|
6362
|
-
const
|
6362
|
+
const styles3 = react.useMultiStyleConfig("MediaControllerButton", {
|
6363
6363
|
variant: "play",
|
6364
6364
|
size: size2
|
6365
6365
|
});
|
@@ -6367,12 +6367,12 @@ var init_PlayPauseButton = __esm({
|
|
6367
6367
|
react.Center,
|
6368
6368
|
{
|
6369
6369
|
as: "button",
|
6370
|
-
sx:
|
6370
|
+
sx: styles3.container,
|
6371
6371
|
"aria-label": isPlaying ? t2(texts19.pause) : t2(texts19.play),
|
6372
6372
|
disabled: isDisabled,
|
6373
6373
|
...props
|
6374
6374
|
},
|
6375
|
-
isPlaying ? /* @__PURE__ */ React50__namespace.default.createElement(PauseIcon, { sx:
|
6375
|
+
isPlaying ? /* @__PURE__ */ React50__namespace.default.createElement(PauseIcon, { sx: styles3.icon }) : /* @__PURE__ */ React50__namespace.default.createElement(PlayIcon, { sx: styles3.icon })
|
6376
6376
|
);
|
6377
6377
|
};
|
6378
6378
|
texts19 = createTexts({
|
@@ -6403,7 +6403,7 @@ var init_SkipButton = __esm({
|
|
6403
6403
|
...props
|
6404
6404
|
}) => {
|
6405
6405
|
const { t: t2 } = useTranslation();
|
6406
|
-
const
|
6406
|
+
const styles3 = react.useMultiStyleConfig("MediaControllerButton", {
|
6407
6407
|
variant: "jumpSkip",
|
6408
6408
|
size: size2
|
6409
6409
|
});
|
@@ -6411,12 +6411,12 @@ var init_SkipButton = __esm({
|
|
6411
6411
|
react.Center,
|
6412
6412
|
{
|
6413
6413
|
as: "button",
|
6414
|
-
sx:
|
6414
|
+
sx: styles3.container,
|
6415
6415
|
"aria-label": direction2 === "forward" ? t2(texts20.next) : t2(texts20.previous),
|
6416
6416
|
disabled: isDisabled,
|
6417
6417
|
...props
|
6418
6418
|
},
|
6419
|
-
direction2 === "forward" ? /* @__PURE__ */ React50__namespace.default.createElement(SkipNextIcon, { sx:
|
6419
|
+
direction2 === "forward" ? /* @__PURE__ */ React50__namespace.default.createElement(SkipNextIcon, { sx: styles3.icon }) : /* @__PURE__ */ React50__namespace.default.createElement(SkipPreviousIcon, { sx: styles3.icon })
|
6420
6420
|
);
|
6421
6421
|
};
|
6422
6422
|
texts20 = createTexts({
|
@@ -6449,11 +6449,11 @@ var init_ModalHeader = __esm({
|
|
6449
6449
|
"src/modal/ModalHeader.tsx"() {
|
6450
6450
|
exports.ModalHeader = react.forwardRef(
|
6451
6451
|
({ size: size2, ...props }, ref) => {
|
6452
|
-
const
|
6452
|
+
const styles3 = {
|
6453
6453
|
fontSize: size2 === "lg" ? ["mobile.lg", "desktop.lg"] : ["mobile.md", "desktop.md"],
|
6454
6454
|
textAlign: size2 === "lg" ? "center" : "left"
|
6455
6455
|
};
|
6456
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.ModalHeader, { ...props, ref, ...
|
6456
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.ModalHeader, { ...props, ref, ...styles3 });
|
6457
6457
|
}
|
6458
6458
|
);
|
6459
6459
|
}
|
@@ -6696,15 +6696,7 @@ var init_SporProvider = __esm({
|
|
6696
6696
|
children,
|
6697
6697
|
...props
|
6698
6698
|
}) => {
|
6699
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React50__namespace.default.createElement(react.ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react$1.Global, { styles: exports.fontFaces }),
|
6700
|
-
react$1.Global,
|
6701
|
-
{
|
6702
|
-
styles: `
|
6703
|
-
html, body { color: ${theme3.colors.darkGrey}; }
|
6704
|
-
svg { display: initial; }
|
6705
|
-
`
|
6706
|
-
}
|
6707
|
-
), children));
|
6699
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(LanguageProvider, { language }, /* @__PURE__ */ React50__namespace.default.createElement(react.ChakraProvider, { theme: theme3, ...props }, /* @__PURE__ */ React50__namespace.default.createElement(react$1.Global, { styles: exports.fontFaces }), children));
|
6708
6700
|
};
|
6709
6701
|
}
|
6710
6702
|
});
|
@@ -7631,8 +7623,8 @@ function defineCssVars(scope, keys2) {
|
|
7631
7623
|
}
|
7632
7624
|
return vars2;
|
7633
7625
|
}
|
7634
|
-
function defineStyle(
|
7635
|
-
return
|
7626
|
+
function defineStyle(styles3) {
|
7627
|
+
return styles3;
|
7636
7628
|
}
|
7637
7629
|
function defineStyleConfig(config37) {
|
7638
7630
|
return config37;
|
@@ -8219,11 +8211,11 @@ var init_dist3 = __esm({
|
|
8219
8211
|
overflow: "visible",
|
8220
8212
|
whiteSpace: "normal"
|
8221
8213
|
};
|
8222
|
-
getWithPriority = (theme3, key,
|
8214
|
+
getWithPriority = (theme3, key, styles3) => {
|
8223
8215
|
const result = {};
|
8224
8216
|
const obj = memoizedGet(theme3, key, {});
|
8225
8217
|
for (const prop in obj) {
|
8226
|
-
const isInStyles = prop in
|
8218
|
+
const isInStyles = prop in styles3 && styles3[prop] != null;
|
8227
8219
|
if (!isInStyles)
|
8228
8220
|
result[prop] = obj[prop];
|
8229
8221
|
}
|
@@ -8241,15 +8233,15 @@ var init_dist3 = __esm({
|
|
8241
8233
|
},
|
8242
8234
|
layerStyle: {
|
8243
8235
|
processResult: true,
|
8244
|
-
transform: (value, theme3,
|
8236
|
+
transform: (value, theme3, styles3) => getWithPriority(theme3, `layerStyles.${value}`, styles3)
|
8245
8237
|
},
|
8246
8238
|
textStyle: {
|
8247
8239
|
processResult: true,
|
8248
|
-
transform: (value, theme3,
|
8240
|
+
transform: (value, theme3, styles3) => getWithPriority(theme3, `textStyles.${value}`, styles3)
|
8249
8241
|
},
|
8250
8242
|
apply: {
|
8251
8243
|
processResult: true,
|
8252
|
-
transform: (value, theme3,
|
8244
|
+
transform: (value, theme3, styles3) => getWithPriority(theme3, value, styles3)
|
8253
8245
|
}
|
8254
8246
|
};
|
8255
8247
|
position = {
|
@@ -12266,9 +12258,9 @@ var fonts;
|
|
12266
12258
|
var init_fonts = __esm({
|
12267
12259
|
"src/theme/foundations/fonts.ts"() {
|
12268
12260
|
fonts = {
|
12269
|
-
body: tokens10__namespace.default.font.family.body,
|
12270
|
-
heading: tokens10__namespace.default.font.family.heading,
|
12271
|
-
mono: tokens10__namespace.default.font.family.monospace
|
12261
|
+
body: `${tokens10__namespace.default.font.family.body}, sans-serif`,
|
12262
|
+
heading: `${tokens10__namespace.default.font.family.heading}, sans-serif`,
|
12263
|
+
mono: `${tokens10__namespace.default.font.family.monospace}, monospace`
|
12272
12264
|
};
|
12273
12265
|
}
|
12274
12266
|
});
|
@@ -12487,6 +12479,21 @@ var init_zIndices = __esm({
|
|
12487
12479
|
};
|
12488
12480
|
}
|
12489
12481
|
});
|
12482
|
+
var styles2;
|
12483
|
+
var init_styles = __esm({
|
12484
|
+
"src/theme/foundations/styles.ts"() {
|
12485
|
+
styles2 = {
|
12486
|
+
global: (props) => ({
|
12487
|
+
"html, body": {
|
12488
|
+
color: themeTools.mode("darkGrey", "lightGrey")(props)
|
12489
|
+
},
|
12490
|
+
svg: {
|
12491
|
+
display: "initial"
|
12492
|
+
}
|
12493
|
+
})
|
12494
|
+
};
|
12495
|
+
}
|
12496
|
+
});
|
12490
12497
|
|
12491
12498
|
// src/theme/foundations/index.ts
|
12492
12499
|
var foundations_exports = {};
|
@@ -12504,6 +12511,7 @@ __export(foundations_exports, {
|
|
12504
12511
|
sizes: () => sizes24,
|
12505
12512
|
space: () => space2,
|
12506
12513
|
spacing: () => spacing2,
|
12514
|
+
styles: () => styles2,
|
12507
12515
|
textStyles: () => textStyles,
|
12508
12516
|
zIndices: () => zIndices2
|
12509
12517
|
});
|
@@ -12523,6 +12531,7 @@ var init_foundations = __esm({
|
|
12523
12531
|
init_spacing();
|
12524
12532
|
init_textStyles();
|
12525
12533
|
init_zIndices();
|
12534
|
+
init_styles();
|
12526
12535
|
}
|
12527
12536
|
});
|
12528
12537
|
|
@@ -12741,12 +12750,12 @@ var init_alert2 = __esm({
|
|
12741
12750
|
}
|
12742
12751
|
});
|
12743
12752
|
function getColorScheme(colorScheme) {
|
12744
|
-
let
|
12745
|
-
if (!
|
12753
|
+
let styles3 = colorCombinations[colorScheme];
|
12754
|
+
if (!styles3 && process.env.NODE_ENV === "development") {
|
12746
12755
|
console.warn(`Invalid color scheme ${colorScheme} provided.`);
|
12747
|
-
|
12756
|
+
styles3 = colorCombinations.grey;
|
12748
12757
|
}
|
12749
|
-
return
|
12758
|
+
return styles3;
|
12750
12759
|
}
|
12751
12760
|
var config5, badge_default, colorCombinations;
|
12752
12761
|
var init_badge = __esm({
|
@@ -16579,8 +16588,8 @@ var init_BaseToast = __esm({
|
|
16579
16588
|
"src/toast/BaseToast.tsx"() {
|
16580
16589
|
init_src();
|
16581
16590
|
BaseToast = ({ children, variant, id }) => {
|
16582
|
-
const
|
16583
|
-
return /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { sx:
|
16591
|
+
const styles3 = react.useStyleConfig("Toast", { variant });
|
16592
|
+
return /* @__PURE__ */ React50__namespace.default.createElement(react.Flex, { sx: styles3, id }, /* @__PURE__ */ React50__namespace.default.createElement(ToastIcon, { variant }), children);
|
16584
16593
|
};
|
16585
16594
|
ToastIcon = ({ variant }) => {
|
16586
16595
|
const Icon = getIcon3(variant);
|
@@ -16655,12 +16664,12 @@ var init_ClosableToast = __esm({
|
|
16655
16664
|
variant,
|
16656
16665
|
id
|
16657
16666
|
}) => {
|
16658
|
-
const
|
16667
|
+
const styles3 = react.useMultiStyleConfig("Toast", { variant });
|
16659
16668
|
const { t: t2 } = useTranslation();
|
16660
16669
|
return /* @__PURE__ */ React50__namespace.default.createElement(BaseToast, { variant, id }, /* @__PURE__ */ React50__namespace.default.createElement(react.Box, { flexGrow: "1" }, children), /* @__PURE__ */ React50__namespace.default.createElement(
|
16661
16670
|
exports.IconButton,
|
16662
16671
|
{
|
16663
|
-
sx:
|
16672
|
+
sx: styles3.dismissButton,
|
16664
16673
|
variant: "ghost",
|
16665
16674
|
"aria-label": t2(texts24.dismiss),
|
16666
16675
|
icon: /* @__PURE__ */ React50__namespace.default.createElement(sporIconReact.CloseFill18Icon, null),
|
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, 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-IP63HI2Y.mjs';
|
package/package.json
CHANGED
@@ -54,12 +54,6 @@ export const SporProvider = ({
|
|
54
54
|
<LanguageProvider language={language}>
|
55
55
|
<ChakraProvider theme={theme} {...props}>
|
56
56
|
<Global styles={fontFaces} />
|
57
|
-
<Global
|
58
|
-
styles={`
|
59
|
-
html, body { color: ${theme.colors.darkGrey}; }
|
60
|
-
svg { display: initial; }
|
61
|
-
`}
|
62
|
-
/>
|
63
57
|
{children}
|
64
58
|
</ChakraProvider>
|
65
59
|
</LanguageProvider>
|