@vygruppen/spor-react 12.0.1 → 12.0.3
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 -11
- package/.turbo/turbo-typegen.log +3 -2
- package/CHANGELOG.md +15 -0
- package/dist/index.d.mts +576 -576
- package/dist/index.d.ts +576 -576
- package/dist/index.js +8643 -8613
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8848 -8818
- package/dist/index.mjs.map +1 -1
- package/eslint.config.mjs +9 -0
- package/package.json +9 -6
- package/src/accordion/Accordion.tsx +5 -4
- package/src/accordion/Expandable.tsx +2 -1
- package/src/accordion/types.ts +3 -2
- package/src/alert/Alert.tsx +5 -3
- package/src/alert/AlertIcon.tsx +2 -1
- package/src/alert/ExpandableAlert.tsx +6 -4
- package/src/alert/ServiceAlert.tsx +5 -4
- package/src/alert/index.ts +1 -1
- package/src/breadcrumb/Breadcrumb.tsx +3 -3
- package/src/button/Button.tsx +4 -3
- package/src/button/ButtonGroup.tsx +3 -2
- package/src/button/Clipboard.tsx +5 -3
- package/src/button/CloseButton.tsx +1 -0
- package/src/button/FloatingActionButton.tsx +1 -0
- package/src/button/IconButton.tsx +1 -0
- package/src/button/index.tsx +1 -1
- package/src/color-mode/color-mode.tsx +1 -1
- package/src/datepicker/Calendar.tsx +5 -3
- package/src/datepicker/CalendarCell.tsx +2 -1
- package/src/datepicker/CalendarGrid.tsx +4 -3
- package/src/datepicker/CalendarHeader.tsx +1 -0
- package/src/datepicker/CalendarNavigationButton.tsx +1 -0
- package/src/datepicker/CalendarTriggerButton.tsx +1 -0
- package/src/datepicker/DateField.tsx +5 -4
- package/src/datepicker/DatePicker.tsx +4 -2
- package/src/datepicker/DateRangePicker.tsx +7 -7
- package/src/datepicker/DateTimeSegment.tsx +3 -2
- package/src/datepicker/RangeCalendar.tsx +5 -3
- package/src/datepicker/StyledField.tsx +2 -1
- package/src/datepicker/TimeField.tsx +2 -1
- package/src/datepicker/TimePicker.tsx +4 -2
- package/src/datepicker/index.tsx +1 -1
- package/src/datepicker/utils.ts +1 -0
- package/src/dialog/Dialog.tsx +1 -0
- package/src/dialog/Drawer.tsx +2 -1
- package/src/dialog/index.ts +1 -1
- package/src/dialog/types.ts +3 -2
- package/src/image/index.tsx +1 -1
- package/src/index.tsx +5 -5
- package/src/input/AttachedInputs.tsx +3 -1
- package/src/input/CardSelect.tsx +3 -2
- package/src/input/Checkbox.tsx +2 -1
- package/src/input/ChoiceChip.tsx +2 -1
- package/src/input/Combobox.tsx +1 -0
- package/src/input/CountryCodeSelect.tsx +2 -1
- package/src/input/Field.tsx +1 -0
- package/src/input/Input.tsx +5 -3
- package/src/input/InputGroup.tsx +2 -1
- package/src/input/ListBox.tsx +5 -4
- package/src/input/NativeSelect.tsx +2 -1
- package/src/input/NumericStepper.tsx +1 -0
- package/src/input/PasswordInput.tsx +1 -0
- package/src/input/PhoneNumberInput.tsx +2 -1
- package/src/input/Radio.tsx +3 -2
- package/src/input/SearchInput.tsx +1 -0
- package/src/input/Select.tsx +5 -4
- package/src/input/Switch.tsx +2 -1
- package/src/input/Textarea.tsx +3 -2
- package/src/input/index.ts +1 -1
- package/src/layout/PressableCard.tsx +2 -1
- package/src/layout/RadioCard.tsx +1 -0
- package/src/layout/Separator.tsx +2 -1
- package/src/layout/StaticCard.tsx +2 -1
- package/src/layout/index.tsx +16 -16
- package/src/linjetag/InfoTag.tsx +2 -1
- package/src/linjetag/LineIcon.tsx +1 -0
- package/src/linjetag/TravelTag.tsx +2 -1
- package/src/linjetag/icons.tsx +1 -0
- package/src/link/TextLink.tsx +1 -0
- package/src/loader/ClientOnly.tsx +1 -0
- package/src/loader/ColorInlineLoader.tsx +1 -0
- package/src/loader/ColorSpinner.tsx +1 -0
- package/src/loader/ContentLoader.tsx +1 -0
- package/src/loader/DarkFullScreenLoader.tsx +1 -0
- package/src/loader/DarkInlineLoader.tsx +1 -0
- package/src/loader/DarkSpinner.tsx +1 -0
- package/src/loader/LightFullScreenLoader.tsx +1 -0
- package/src/loader/LightInlineLoader.tsx +1 -0
- package/src/loader/LightSpinner.tsx +1 -0
- package/src/loader/Lottie.tsx +1 -2
- package/src/loader/ProgressBar.tsx +2 -1
- package/src/loader/ProgressLoader.tsx +3 -2
- package/src/loader/Skeleton.tsx +4 -3
- package/src/loader/useHydrated.tsx +1 -1
- package/src/logo/VyLogo.tsx +1 -0
- package/src/logo/VyLogoPride.tsx +1 -0
- package/src/logo/index.tsx +1 -1
- package/src/media-controller/JumpButton.tsx +3 -2
- package/src/media-controller/PlayPauseButton.tsx +3 -2
- package/src/media-controller/SkipButton.tsx +3 -2
- package/src/nudge/Nudge.tsx +14 -14
- package/src/pagination/Pagination.tsx +4 -3
- package/src/pagination/types.ts +2 -1
- package/src/popover/index.tsx +4 -3
- package/src/progress-indicator/ProgressDot.tsx +2 -1
- package/src/progress-indicator/ProgressIndicator.tsx +2 -1
- package/src/provider/SporProvider.tsx +4 -5
- package/src/stepper/Stepper.tsx +2 -1
- package/src/stepper/StepperStep.tsx +1 -0
- package/src/tab/Tabs.tsx +2 -1
- package/src/table/Table.tsx +2 -1
- package/src/table/index.tsx +14 -14
- package/src/theme/index.ts +7 -6
- package/src/theme/recipes/close-button.ts +1 -0
- package/src/theme/recipes/code.ts +1 -0
- package/src/theme/recipes/link.ts +1 -0
- package/src/theme/recipes/pressable-card.ts +2 -1
- package/src/theme/recipes/textarea.ts +1 -0
- package/src/theme/semantic-tokens/colors.ts +1 -1
- package/src/theme/semantic-tokens/index.ts +1 -1
- package/src/theme/slot-recipes/accordion.ts +2 -1
- package/src/theme/slot-recipes/alert-expandable.ts +2 -1
- package/src/theme/slot-recipes/alert-service.ts +1 -0
- package/src/theme/slot-recipes/alert.ts +1 -0
- package/src/theme/slot-recipes/breadcrumb.ts +2 -1
- package/src/theme/slot-recipes/checkbox.ts +1 -0
- package/src/theme/slot-recipes/datepicker.ts +1 -0
- package/src/theme/slot-recipes/dialog.ts +1 -0
- package/src/theme/slot-recipes/drawer.ts +1 -0
- package/src/theme/slot-recipes/field.ts +1 -0
- package/src/theme/slot-recipes/floating-action-button.ts +1 -0
- package/src/theme/slot-recipes/index.ts +2 -2
- package/src/theme/slot-recipes/info-tag.ts +3 -2
- package/src/theme/slot-recipes/line-icon.ts +1 -0
- package/src/theme/slot-recipes/list.ts +1 -0
- package/src/theme/slot-recipes/listbox.ts +1 -0
- package/src/theme/slot-recipes/media-controller-button.ts +1 -0
- package/src/theme/slot-recipes/native-select.ts +3 -2
- package/src/theme/slot-recipes/numeric-stepper.ts +1 -0
- package/src/theme/slot-recipes/pagination.ts +1 -0
- package/src/theme/slot-recipes/popover.ts +2 -1
- package/src/theme/slot-recipes/progress-bar.ts +1 -0
- package/src/theme/slot-recipes/radio-card.ts +2 -1
- package/src/theme/slot-recipes/radio.ts +1 -0
- package/src/theme/slot-recipes/select.ts +1 -0
- package/src/theme/slot-recipes/stepper.ts +1 -0
- package/src/theme/slot-recipes/switch.ts +2 -1
- package/src/theme/slot-recipes/table.ts +3 -0
- package/src/theme/slot-recipes/tabs.ts +1 -0
- package/src/theme/slot-recipes/toast.ts +1 -0
- package/src/theme/slot-recipes/travel-tag.ts +1 -0
- package/src/theme/tokens/colors.ts +1 -1
- package/src/theme/tokens/index.ts +4 -4
- package/src/theme/tokens/sizes.ts +1 -0
- package/src/theme/utils/input-utils.ts +1 -1
- package/src/toast/toast.tsx +6 -6
- package/src/transition/index.ts +1 -1
- package/src/typography/Badge.tsx +1 -2
- package/src/typography/Code.tsx +2 -1
- package/src/typography/Heading.tsx +2 -1
- package/src/typography/index.ts +1 -1
- package/src/util/externals.tsx +11 -11
package/src/index.tsx
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
export * as tokens from "@vygruppen/spor-design-tokens";
|
2
1
|
export * from "./accordion";
|
3
2
|
export * from "./alert";
|
4
3
|
export * from "./breadcrumb";
|
5
4
|
export * from "./button";
|
6
5
|
export * from "./color-mode";
|
7
6
|
export * from "./datepicker";
|
8
|
-
export * from "./
|
9
|
-
export * from "./theme";
|
7
|
+
export * from "./dialog";
|
10
8
|
export * from "./i18n";
|
11
9
|
export * from "./image";
|
12
10
|
export * from "./input";
|
@@ -17,16 +15,18 @@ export * from "./list";
|
|
17
15
|
export * from "./loader";
|
18
16
|
export * from "./logo";
|
19
17
|
export * from "./media-controller";
|
20
|
-
export * from "./dialog";
|
21
18
|
export * from "./nudge";
|
22
19
|
export * from "./pagination";
|
20
|
+
export * from "./popover";
|
23
21
|
export * from "./progress-indicator";
|
24
22
|
export * from "./provider";
|
25
23
|
export * from "./stepper";
|
26
24
|
export * from "./tab";
|
27
25
|
export * from "./table";
|
26
|
+
export * from "./theme";
|
27
|
+
export * from "./theme/brand";
|
28
28
|
export * from "./toast";
|
29
29
|
export * from "./transition";
|
30
30
|
export * from "./typography";
|
31
31
|
export * from "./util";
|
32
|
-
export * from "
|
32
|
+
export * as tokens from "@vygruppen/spor-design-tokens";
|
@@ -1,8 +1,10 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import React, { forwardRef, PropsWithChildren } from "react";
|
4
3
|
import { chakra, Group, RecipeVariantProps, useRecipe } from "@chakra-ui/react";
|
4
|
+
import React, { forwardRef, PropsWithChildren } from "react";
|
5
|
+
|
5
6
|
import { attachedInputsRecipe } from "@/theme/recipes/attached-inputs";
|
7
|
+
|
6
8
|
import { InputGroupProps } from "./InputGroup";
|
7
9
|
|
8
10
|
/**
|
package/src/input/CardSelect.tsx
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
+
Popover as ChakraPopover,
|
3
4
|
PopoverRootProps,
|
4
|
-
usePopoverContext,
|
5
5
|
Portal,
|
6
|
-
|
6
|
+
usePopoverContext,
|
7
7
|
} from "@chakra-ui/react";
|
8
8
|
import {
|
9
9
|
DropdownDownFill18Icon,
|
10
10
|
DropdownDownFill24Icon,
|
11
11
|
} from "@vygruppen/spor-icon-react";
|
12
12
|
import React, { forwardRef, ReactNode } from "react";
|
13
|
+
|
13
14
|
import { Button, ButtonProps, StaticCard, StaticCardProps } from "..";
|
14
15
|
|
15
16
|
export const CardSelect = ({ size = "md", ...props }: PopoverRootProps) => {
|
package/src/input/Checkbox.tsx
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { checkboxSlotRecipe } from "@/theme/slot-recipes/checkbox";
|
2
1
|
import {
|
3
2
|
Checkbox as ChakraCheckbox,
|
4
3
|
RecipeVariantProps,
|
@@ -6,6 +5,8 @@ import {
|
|
6
5
|
import * as React from "react";
|
7
6
|
import { PropsWithChildren } from "react";
|
8
7
|
|
8
|
+
import { checkboxSlotRecipe } from "@/theme/slot-recipes/checkbox";
|
9
|
+
|
9
10
|
type CheckboxVariantProps = RecipeVariantProps<typeof checkboxSlotRecipe>;
|
10
11
|
|
11
12
|
type CheckboxProps = ChakraCheckbox.RootProps &
|
package/src/input/ChoiceChip.tsx
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
"use client";
|
2
|
-
import { choiceChipRecipe } from "@/theme/recipes/choice-chip";
|
3
2
|
import {
|
4
3
|
chakra,
|
5
4
|
RecipeVariantProps,
|
@@ -9,6 +8,8 @@ import {
|
|
9
8
|
import { CloseOutline24Icon } from "@vygruppen/spor-icon-react";
|
10
9
|
import React, { ChangeEvent, PropsWithChildren, useId } from "react";
|
11
10
|
|
11
|
+
import { choiceChipRecipe } from "@/theme/recipes/choice-chip";
|
12
|
+
|
12
13
|
type ChoiceChipVariantProps = RecipeVariantProps<typeof choiceChipRecipe>;
|
13
14
|
|
14
15
|
export type ChoiceChipProps = PropsWithChildren<ChoiceChipVariantProps> & {
|
package/src/input/Combobox.tsx
CHANGED
@@ -9,6 +9,7 @@ import React, {
|
|
9
9
|
} from "react";
|
10
10
|
import { AriaComboBoxProps, useComboBox, useFilter } from "react-aria";
|
11
11
|
import { useComboBoxState } from "react-stately";
|
12
|
+
|
12
13
|
import { ColorSpinner, Input, InputProps, ListBox } from "..";
|
13
14
|
import { Popover } from "./Popover";
|
14
15
|
|
@@ -3,11 +3,12 @@
|
|
3
3
|
import { createListCollection } from "@chakra-ui/react";
|
4
4
|
import { getSupportedCallingCodes } from "awesome-phonenumber";
|
5
5
|
import React, { forwardRef } from "react";
|
6
|
+
|
6
7
|
import {
|
8
|
+
createTexts,
|
7
9
|
Select,
|
8
10
|
SelectItem,
|
9
11
|
SelectProps,
|
10
|
-
createTexts,
|
11
12
|
useTranslation,
|
12
13
|
} from "..";
|
13
14
|
|
package/src/input/Field.tsx
CHANGED
package/src/input/Input.tsx
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import { inputRecipe } from "@/theme/recipes/input";
|
4
3
|
import {
|
5
4
|
chakra,
|
5
|
+
Input as ChakraInput,
|
6
6
|
InputProps as ChakraInputProps,
|
7
|
-
useRecipe,
|
8
7
|
type RecipeVariantProps,
|
9
|
-
|
8
|
+
useRecipe,
|
10
9
|
} from "@chakra-ui/react";
|
11
10
|
import React, { forwardRef, PropsWithChildren } from "react";
|
11
|
+
|
12
|
+
import { inputRecipe } from "@/theme/recipes/input";
|
13
|
+
|
12
14
|
import { Field, FieldProps } from "./Field";
|
13
15
|
import { InputGroup } from "./InputGroup";
|
14
16
|
|
package/src/input/InputGroup.tsx
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import type {
|
3
|
+
import type { GroupProps, InputElementProps } from "@chakra-ui/react";
|
4
4
|
import { Group, InputElement } from "@chakra-ui/react";
|
5
5
|
import * as React from "react";
|
6
|
+
|
6
7
|
import { FieldLabel } from "./Field";
|
7
8
|
|
8
9
|
export type InputGroupProps = GroupProps & {
|
package/src/input/ListBox.tsx
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
3
|
Box,
|
4
|
+
type BoxProps,
|
4
5
|
ListItem,
|
5
6
|
ListRootProps,
|
6
7
|
RecipeVariantProps,
|
7
8
|
useSlotRecipe,
|
8
|
-
type BoxProps,
|
9
9
|
} from "@chakra-ui/react";
|
10
10
|
import type { Node } from "@react-types/shared";
|
11
11
|
import React, {
|
@@ -22,6 +22,7 @@ import {
|
|
22
22
|
useOption,
|
23
23
|
} from "react-aria";
|
24
24
|
import { type ListState, type SelectState } from "react-stately";
|
25
|
+
|
25
26
|
import { List } from "..";
|
26
27
|
import { useColorModeValue } from "../color-mode";
|
27
28
|
import { listBoxSlotRecipe } from "../theme/slot-recipes/listbox";
|
@@ -117,7 +118,7 @@ export const ListBox = forwardRef<HTMLDivElement, ListBoxProps<object>>(
|
|
117
118
|
* Useful if you want to render a custom Item - especially if it has a description.
|
118
119
|
*/
|
119
120
|
export function ItemLabel({ children }: { children: React.ReactNode }) {
|
120
|
-
|
121
|
+
const { labelProps } = useOptionContext();
|
121
122
|
return <Box {...labelProps}>{children}</Box>;
|
122
123
|
}
|
123
124
|
|
@@ -127,7 +128,7 @@ export function ItemLabel({ children }: { children: React.ReactNode }) {
|
|
127
128
|
* Useful if you want to render a custom Item with more than just a label.
|
128
129
|
*/
|
129
130
|
export function ItemDescription({ children }: { children: React.ReactNode }) {
|
130
|
-
|
131
|
+
const { descriptionProps } = useOptionContext();
|
131
132
|
const recipe = useSlotRecipe({ key: "listbox" });
|
132
133
|
const styles = recipe({});
|
133
134
|
return (
|
@@ -156,7 +157,7 @@ function Option({ item, state }: OptionProps) {
|
|
156
157
|
const recipe = useSlotRecipe({ key: "listBox" });
|
157
158
|
const styles = recipe({});
|
158
159
|
|
159
|
-
|
160
|
+
const dataFields: Record<string, boolean> = {};
|
160
161
|
if (isSelected) {
|
161
162
|
dataFields["data-selected"] = true;
|
162
163
|
}
|
@@ -1,12 +1,13 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
-
RecipeVariantProps,
|
4
3
|
NativeSelect as ChakraNativeSelect,
|
4
|
+
RecipeVariantProps,
|
5
5
|
useSlotRecipe,
|
6
6
|
NativeSelectFieldProps as ChakraNativeSelectFieldProps,
|
7
7
|
} from "@chakra-ui/react";
|
8
8
|
import { DropdownDownFill18Icon } from "@vygruppen/spor-icon-react";
|
9
9
|
import * as React from "react";
|
10
|
+
|
10
11
|
import { nativeSelectSlotRecipe } from "../theme/slot-recipes/native-select";
|
11
12
|
import { Field } from "./Field";
|
12
13
|
|
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
useSlotRecipe,
|
7
7
|
} from "@chakra-ui/react";
|
8
8
|
import React, { PropsWithChildren, useRef } from "react";
|
9
|
+
|
9
10
|
import { BoxProps, createTexts, IconButton, useTranslation } from "..";
|
10
11
|
import { numericStepperRecipe } from "../theme/slot-recipes/numeric-stepper";
|
11
12
|
import { Field } from "./Field";
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
import { Button, useControllableState } from "@chakra-ui/react";
|
4
4
|
import React, { forwardRef } from "react";
|
5
|
+
|
5
6
|
import { ButtonProps, Input, InputProps } from "..";
|
6
7
|
import { createTexts, useTranslation } from "..";
|
7
8
|
import { InputGroupProps } from "./InputGroup";
|
@@ -1,7 +1,8 @@
|
|
1
1
|
"use client";
|
2
2
|
import { useControllableState } from "@chakra-ui/react";
|
3
3
|
import React, { forwardRef } from "react";
|
4
|
-
|
4
|
+
|
5
|
+
import { createTexts, Input, InputProps, useTranslation } from "..";
|
5
6
|
import { AttachedInputs } from "./AttachedInputs";
|
6
7
|
import { CountryCodeSelect } from "./CountryCodeSelect";
|
7
8
|
|
package/src/input/Radio.tsx
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
"use client";
|
2
|
-
import React, { forwardRef, PropsWithChildren } from "react";
|
3
2
|
import { RecipeVariantProps } from "@chakra-ui/react";
|
4
|
-
import { radioGroupSlotRecipe } from "../theme/slot-recipes/radio";
|
5
3
|
import { RadioGroup as ChakraRadioGroup } from "@chakra-ui/react";
|
4
|
+
import React, { forwardRef, PropsWithChildren } from "react";
|
5
|
+
|
6
|
+
import { radioGroupSlotRecipe } from "../theme/slot-recipes/radio";
|
6
7
|
|
7
8
|
type RadioVariants = RecipeVariantProps<typeof radioGroupSlotRecipe>;
|
8
9
|
|
package/src/input/Select.tsx
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import { CloseButton } from "@/button";
|
4
|
-
import { selectSlotRecipe } from "@/theme/slot-recipes/select";
|
5
3
|
import type {
|
6
|
-
SelectRootProps as ChakraSelectRootProps,
|
7
4
|
CollectionItem,
|
8
5
|
RecipeVariantProps,
|
6
|
+
SelectRootProps as ChakraSelectRootProps,
|
9
7
|
} from "@chakra-ui/react";
|
10
8
|
import {
|
11
9
|
Box,
|
12
|
-
Select as ChakraSelect,
|
13
10
|
Portal,
|
11
|
+
Select as ChakraSelect,
|
14
12
|
useSlotRecipe,
|
15
13
|
} from "@chakra-ui/react";
|
16
14
|
import {
|
@@ -20,6 +18,9 @@ import {
|
|
20
18
|
import * as React from "react";
|
21
19
|
import { PropsWithChildren } from "react";
|
22
20
|
|
21
|
+
import { CloseButton } from "@/button";
|
22
|
+
import { selectSlotRecipe } from "@/theme/slot-recipes/select";
|
23
|
+
|
23
24
|
type SelectVariantProps = RecipeVariantProps<typeof selectSlotRecipe>;
|
24
25
|
|
25
26
|
export type SelectProps = ChakraSelectRootProps &
|
package/src/input/Switch.tsx
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
+
ConditionalValue,
|
3
4
|
RecipeVariantProps,
|
4
5
|
Switch as ChakraSwitch,
|
5
|
-
ConditionalValue,
|
6
6
|
useSlotRecipe,
|
7
7
|
} from "@chakra-ui/react";
|
8
8
|
import React, { forwardRef, PropsWithChildren } from "react";
|
9
|
+
|
9
10
|
import { switchSlotRecipe } from "../theme/slot-recipes/switch";
|
10
11
|
import { Field } from "./Field";
|
11
12
|
|
package/src/input/Textarea.tsx
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
import {
|
4
|
+
FieldLabel,
|
4
5
|
RecipeVariantProps,
|
5
|
-
useRecipe,
|
6
6
|
Textarea as ChakraTextarea,
|
7
7
|
TextareaProps as ChakraTextareaProps,
|
8
|
-
|
8
|
+
useRecipe,
|
9
9
|
} from "@chakra-ui/react";
|
10
10
|
import React, {
|
11
11
|
forwardRef,
|
@@ -15,6 +15,7 @@ import React, {
|
|
15
15
|
useRef,
|
16
16
|
useState,
|
17
17
|
} from "react";
|
18
|
+
|
18
19
|
import { textareaRecipe } from "../theme/recipes/textarea";
|
19
20
|
import { Field, FieldProps } from "./Field";
|
20
21
|
|
package/src/input/index.ts
CHANGED
package/src/layout/RadioCard.tsx
CHANGED
package/src/layout/Separator.tsx
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
import {
|
4
4
|
RecipeVariantProps,
|
5
|
-
useRecipe,
|
6
5
|
Separator as ChakraSeparator,
|
7
6
|
SeparatorProps as ChakraSeparatorProps,
|
7
|
+
useRecipe,
|
8
8
|
} from "@chakra-ui/react";
|
9
9
|
import React, { forwardRef, PropsWithChildren } from "react";
|
10
|
+
|
10
11
|
import { separatorRecipe } from "../theme/recipes/separator";
|
11
12
|
|
12
13
|
type SeparatorVariantProps = RecipeVariantProps<typeof separatorRecipe>;
|
package/src/layout/index.tsx
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
export * from "./PressableCard";
|
2
|
+
export * from "./RadioCard";
|
3
|
+
export * from "./Separator";
|
4
|
+
export * from "./StaticCard";
|
5
|
+
export type {
|
6
|
+
BoxProps,
|
7
|
+
CenterProps,
|
8
|
+
ContainerProps,
|
9
|
+
FlexProps,
|
10
|
+
GridItemProps,
|
11
|
+
GridProps,
|
12
|
+
SimpleGridProps,
|
13
|
+
SpacerProps,
|
14
|
+
} from "@chakra-ui/react";
|
1
15
|
export {
|
2
16
|
Box,
|
3
17
|
Center,
|
@@ -5,24 +19,10 @@ export {
|
|
5
19
|
Flex,
|
6
20
|
Grid,
|
7
21
|
GridItem,
|
8
|
-
Stack,
|
9
22
|
HStack,
|
10
23
|
SimpleGrid,
|
11
24
|
Spacer,
|
12
|
-
VStack,
|
13
25
|
Span,
|
26
|
+
Stack,
|
27
|
+
VStack,
|
14
28
|
} from "@chakra-ui/react";
|
15
|
-
export type {
|
16
|
-
BoxProps,
|
17
|
-
CenterProps,
|
18
|
-
ContainerProps,
|
19
|
-
FlexProps,
|
20
|
-
GridItemProps,
|
21
|
-
GridProps,
|
22
|
-
SimpleGridProps,
|
23
|
-
SpacerProps,
|
24
|
-
} from "@chakra-ui/react";
|
25
|
-
export * from "./Separator";
|
26
|
-
export * from "./RadioCard";
|
27
|
-
export * from "./StaticCard";
|
28
|
-
export * from "./PressableCard";
|
package/src/linjetag/InfoTag.tsx
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
"use client";
|
2
2
|
import { Box, RecipeVariantProps, useSlotRecipe } from "@chakra-ui/react";
|
3
3
|
import React, { PropsWithChildren } from "react";
|
4
|
+
|
5
|
+
import { infoTagSlotRecipe } from "../theme/slot-recipes/info-tag";
|
4
6
|
import { LineIcon } from "./LineIcon";
|
5
7
|
import type { TagProps } from "./types";
|
6
|
-
import { infoTagSlotRecipe } from "../theme/slot-recipes/info-tag";
|
7
8
|
|
8
9
|
type InfoTagVariantProps = RecipeVariantProps<typeof infoTagSlotRecipe>;
|
9
10
|
|
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
useSlotRecipe,
|
7
7
|
} from "@chakra-ui/react";
|
8
8
|
import React, { forwardRef, PropsWithChildren } from "react";
|
9
|
+
|
9
10
|
import { lineIconSlotRecipe } from "../theme/slot-recipes/line-icon";
|
10
11
|
import { getCorrectIcon } from "./icons";
|
11
12
|
import { CustomVariantProps, TagProps } from "./types";
|
@@ -14,9 +14,10 @@ import {
|
|
14
14
|
WarningFill24Icon,
|
15
15
|
} from "@vygruppen/spor-icon-react";
|
16
16
|
import React, { forwardRef, PropsWithChildren } from "react";
|
17
|
+
|
18
|
+
import { travelTagSlotRecipe } from "../theme/slot-recipes/travel-tag";
|
17
19
|
import { LineIcon } from "./LineIcon";
|
18
20
|
import type { TagProps } from "./types";
|
19
|
-
import { travelTagSlotRecipe } from "../theme/slot-recipes/travel-tag";
|
20
21
|
|
21
22
|
type TravelTagVariantProps = RecipeVariantProps<typeof travelTagSlotRecipe>;
|
22
23
|
|
package/src/linjetag/icons.tsx
CHANGED
package/src/link/TextLink.tsx
CHANGED
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
} from "@chakra-ui/react";
|
7
7
|
import { LinkOutOutline24Icon } from "@vygruppen/spor-icon-react";
|
8
8
|
import React, { forwardRef, PropsWithChildren } from "react";
|
9
|
+
|
9
10
|
import { createTexts, useTranslation } from "..";
|
10
11
|
import { linkRecipe } from "../theme/recipes/link";
|
11
12
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import { spinnerDarkData, spinnerLightData } from "@vygruppen/spor-loader";
|
3
3
|
import React from "react";
|
4
|
+
|
4
5
|
import { Box, BoxProps, Center, useColorMode, VisuallyHidden } from "..";
|
5
6
|
import { ClientOnly } from "./ClientOnly";
|
6
7
|
import Lottie from "./Lottie";
|
package/src/loader/Lottie.tsx
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
import {
|
3
3
|
BoxProps,
|
4
4
|
Progress,
|
5
|
-
UseProgressProps,
|
6
5
|
RecipeVariantProps,
|
6
|
+
UseProgressProps,
|
7
7
|
useSlotRecipe,
|
8
8
|
} from "@chakra-ui/react";
|
9
9
|
import React, { forwardRef, PropsWithChildren } from "react";
|
10
|
+
|
10
11
|
import { progressBarRecipe } from "../theme/slot-recipes/progress-bar";
|
11
12
|
import { useRotatingLabel } from "./useRotatingLabel";
|
12
13
|
|
@@ -6,11 +6,12 @@ import {
|
|
6
6
|
RecipeVariantProps,
|
7
7
|
Text,
|
8
8
|
} from "@chakra-ui/react";
|
9
|
-
import React, { forwardRef, useId, useRef, useState
|
9
|
+
import React, { forwardRef, useEffect, useId, useRef, useState } from "react";
|
10
10
|
import { useProgressBar } from "react-aria";
|
11
|
+
|
11
12
|
import { createTexts, useTranslation } from "..";
|
12
|
-
import { useRotatingLabel } from "./useRotatingLabel";
|
13
13
|
import { progressLoaderRecipe } from "../theme/recipes/progress-loader";
|
14
|
+
import { useRotatingLabel } from "./useRotatingLabel";
|
14
15
|
export type ProgressLoaderVariantProps = RecipeVariantProps<
|
15
16
|
typeof progressLoaderRecipe
|
16
17
|
>;
|
package/src/loader/Skeleton.tsx
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
"use client";
|
2
|
-
import { skeletonRecipe } from "@/theme/recipes/skeleton";
|
3
2
|
import type {
|
4
|
-
SkeletonProps as ChakraSkeletonProps,
|
5
3
|
CircleProps,
|
6
4
|
RecipeVariantProps,
|
5
|
+
SkeletonProps as ChakraSkeletonProps,
|
7
6
|
} from "@chakra-ui/react";
|
8
7
|
import {
|
9
|
-
Skeleton as ChakraSkeleton,
|
10
8
|
Circle,
|
9
|
+
Skeleton as ChakraSkeleton,
|
11
10
|
Stack,
|
12
11
|
useRecipe,
|
13
12
|
} from "@chakra-ui/react";
|
14
13
|
import * as React from "react";
|
15
14
|
import { forwardRef } from "react";
|
16
15
|
|
16
|
+
import { skeletonRecipe } from "@/theme/recipes/skeleton";
|
17
|
+
|
17
18
|
type SkeletonVariantProps = RecipeVariantProps<typeof skeletonRecipe>;
|
18
19
|
|
19
20
|
export type SkeletonCircleProps = ChakraSkeletonProps &
|