@vygruppen/spor-react 12.0.2 → 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 +9 -9
- package/.turbo/turbo-typegen.log +1 -1
- package/CHANGELOG.md +9 -0
- package/dist/index.d.mts +576 -576
- package/dist/index.d.ts +576 -576
- package/dist/index.js +8641 -8613
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8842 -8814
- package/dist/index.mjs.map +1 -1
- package/eslint.config.mjs +9 -0
- package/package.json +8 -5
- 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 +1 -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/logo/VyLogo.tsx
CHANGED
package/src/logo/VyLogoPride.tsx
CHANGED
package/src/logo/index.tsx
CHANGED
@@ -5,12 +5,13 @@ import {
|
|
5
5
|
RecipeVariantProps,
|
6
6
|
useSlotRecipe,
|
7
7
|
} from "@chakra-ui/react";
|
8
|
-
import React, { forwardRef, PropsWithChildren } from "react";
|
9
|
-
import { createTexts, useTranslation } from "..";
|
10
8
|
import {
|
11
9
|
Backward15MediaControllerFill30Icon,
|
12
10
|
Forward15MediaControllerFill30Icon,
|
13
11
|
} from "@vygruppen/spor-icon-react";
|
12
|
+
import React, { forwardRef, PropsWithChildren } from "react";
|
13
|
+
|
14
|
+
import { createTexts, useTranslation } from "..";
|
14
15
|
import { mediaControllerSlotRecipe } from "../theme/slot-recipes/media-controller-button";
|
15
16
|
|
16
17
|
export type MediaControllerVariantProps = RecipeVariantProps<
|
@@ -1,11 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
import { BoxProps, Center, useSlotRecipe } from "@chakra-ui/react";
|
3
|
-
import React, { forwardRef, PropsWithChildren } from "react";
|
4
|
-
import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
|
5
3
|
import {
|
6
4
|
PauseMediaControllerFill24Icon,
|
7
5
|
PlayMediaControllerFill24Icon,
|
8
6
|
} from "@vygruppen/spor-icon-react";
|
7
|
+
import React, { forwardRef, PropsWithChildren } from "react";
|
8
|
+
|
9
|
+
import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
|
9
10
|
|
10
11
|
type PlayPauseButtonProps = BoxProps &
|
11
12
|
PropsWithChildren<MediaControllerVariantProps> & {
|
@@ -1,11 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
import { BoxProps, Center, useSlotRecipe } from "@chakra-ui/react";
|
3
|
-
import React, { forwardRef, PropsWithChildren } from "react";
|
4
|
-
import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
|
5
3
|
import {
|
6
4
|
NextMediaControllerFill30Icon,
|
7
5
|
PreviousMediaControllerFill30Icon,
|
8
6
|
} from "@vygruppen/spor-icon-react";
|
7
|
+
import React, { forwardRef, PropsWithChildren } from "react";
|
8
|
+
|
9
|
+
import { createTexts, MediaControllerVariantProps, useTranslation } from "..";
|
9
10
|
|
10
11
|
type SkipButtonProps = BoxProps &
|
11
12
|
PropsWithChildren<MediaControllerVariantProps> & {
|
package/src/nudge/Nudge.tsx
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
"use client";
|
2
|
+
import {
|
3
|
+
PopoverCloseTrigger,
|
4
|
+
usePopover,
|
5
|
+
usePopoverContext,
|
6
|
+
} from "@ark-ui/react";
|
7
|
+
import {
|
8
|
+
Box,
|
9
|
+
BoxProps,
|
10
|
+
chakra,
|
11
|
+
Popover as ChakraPopover,
|
12
|
+
PopoverRootProps,
|
13
|
+
} from "@chakra-ui/react";
|
14
|
+
import { ArrowRightFill18Icon } from "@vygruppen/spor-icon-react";
|
2
15
|
import React, {
|
3
16
|
forwardRef,
|
4
17
|
PropsWithChildren,
|
@@ -6,6 +19,7 @@ import React, {
|
|
6
19
|
useRef,
|
7
20
|
useState,
|
8
21
|
} from "react";
|
22
|
+
|
9
23
|
import {
|
10
24
|
Button,
|
11
25
|
createTexts,
|
@@ -18,20 +32,6 @@ import {
|
|
18
32
|
useTranslation,
|
19
33
|
} from "..";
|
20
34
|
|
21
|
-
import {
|
22
|
-
Box,
|
23
|
-
BoxProps,
|
24
|
-
chakra,
|
25
|
-
Popover as ChakraPopover,
|
26
|
-
PopoverRootProps,
|
27
|
-
} from "@chakra-ui/react";
|
28
|
-
import { ArrowRightFill18Icon } from "@vygruppen/spor-icon-react";
|
29
|
-
import {
|
30
|
-
PopoverCloseTrigger,
|
31
|
-
usePopover,
|
32
|
-
usePopoverContext,
|
33
|
-
} from "@ark-ui/react";
|
34
|
-
|
35
35
|
const EXPIRATION_DELAY_MS = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds
|
36
36
|
|
37
37
|
const isNudgeExpired = (
|
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
import {
|
4
4
|
Box,
|
5
|
-
Pagination as ChakraPagination,
|
6
5
|
createContext,
|
6
|
+
Pagination as ChakraPagination,
|
7
7
|
usePaginationContext,
|
8
8
|
useSlotRecipe,
|
9
9
|
} from "@chakra-ui/react";
|
10
|
-
import * as React from "react";
|
11
10
|
import {
|
12
|
-
DropdownRightOutline18Icon,
|
13
11
|
DropdownLeftOutline18Icon,
|
12
|
+
DropdownRightOutline18Icon,
|
14
13
|
} from "@vygruppen/spor-icon-react";
|
14
|
+
import * as React from "react";
|
15
|
+
|
15
16
|
import { createTexts, List, ListItem, useTranslation } from "..";
|
16
17
|
import { ButtonVariantContext, PaginationRootProps } from "./types";
|
17
18
|
|
package/src/pagination/types.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import { paginationSlotRecipe } from "@/theme/slot-recipes/pagination";
|
2
1
|
import {
|
3
2
|
Pagination as ChakraPagination,
|
4
3
|
RecipeVariantProps,
|
5
4
|
} from "@chakra-ui/react";
|
6
5
|
|
6
|
+
import { paginationSlotRecipe } from "@/theme/slot-recipes/pagination";
|
7
|
+
|
7
8
|
export type PaginationVariantProps = RecipeVariantProps<
|
8
9
|
typeof paginationSlotRecipe
|
9
10
|
>;
|
package/src/popover/index.tsx
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
|
-
import { CloseButton } from "@/button";
|
4
|
-
import { useColorMode } from "@/color-mode";
|
5
3
|
import {
|
6
|
-
Portal,
|
7
4
|
Popover as ChakraPopover,
|
5
|
+
Portal,
|
8
6
|
usePopoverContext,
|
9
7
|
} from "@chakra-ui/react";
|
10
8
|
import React, { forwardRef, useEffect } from "react";
|
11
9
|
|
10
|
+
import { CloseButton } from "@/button";
|
11
|
+
import { useColorMode } from "@/color-mode";
|
12
|
+
|
12
13
|
export const Popover = ChakraPopover.Root;
|
13
14
|
|
14
15
|
export const PopoverTrigger = forwardRef<
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use client";
|
2
|
-
import React, { PropsWithChildren } from "react";
|
3
2
|
import { chakra, useSlotRecipe } from "@chakra-ui/react";
|
3
|
+
import React, { PropsWithChildren } from "react";
|
4
|
+
|
4
5
|
import { ProgressIndicatorVariantProps } from "./ProgressIndicator";
|
5
6
|
|
6
7
|
type ProgressDot = PropsWithChildren<ProgressIndicatorVariantProps> & {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
"use client";
|
2
2
|
import { BoxProps, RecipeVariantProps, useSlotRecipe } from "@chakra-ui/react";
|
3
3
|
import React, { forwardRef, PropsWithChildren } from "react";
|
4
|
+
|
4
5
|
import { Box, createTexts, useTranslation } from "..";
|
5
|
-
import { ProgressDot } from "./ProgressDot";
|
6
6
|
import { progressIndicatorRecipe } from "../theme/slot-recipes/progress-indicator";
|
7
|
+
import { ProgressDot } from "./ProgressDot";
|
7
8
|
|
8
9
|
export type ProgressIndicatorVariantProps = RecipeVariantProps<
|
9
10
|
typeof progressIndicatorRecipe
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use client";
|
2
|
+
import { ChakraProvider, ChakraProviderProps } from "@chakra-ui/react";
|
2
3
|
import { Global } from "@emotion/react";
|
3
4
|
import React from "react";
|
4
|
-
import { Language, LanguageProvider, system, themes } from "..";
|
5
5
|
|
6
|
-
import {
|
7
|
-
|
8
|
-
import { Brand, fontFaces } from "../theme/brand";
|
9
|
-
import { ChakraProvider, ChakraProviderProps } from "@chakra-ui/react";
|
6
|
+
import { Language, LanguageProvider, system, themes } from "..";
|
10
7
|
import { ColorModeProvider } from "../color-mode";
|
8
|
+
import { Brand, fontFaces } from "../theme/brand";
|
9
|
+
import { Toaster } from "../toast/toast";
|
11
10
|
|
12
11
|
type SporProviderProps = Omit<ChakraProviderProps, "value"> & {
|
13
12
|
language?: Language;
|
package/src/stepper/Stepper.tsx
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
import { Flex, RecipeVariantProps, useSlotRecipe } from "@chakra-ui/react";
|
3
3
|
import { ArrowLeftFill24Icon } from "@vygruppen/spor-icon-react";
|
4
4
|
import React, { forwardRef, PropsWithChildren } from "react";
|
5
|
-
|
5
|
+
|
6
6
|
import { Box, createTexts, IconButton, Text, useTranslation } from "..";
|
7
7
|
import { stepperSlotRecipe } from "../theme/slot-recipes/stepper";
|
8
|
+
import { StepperStep } from ".";
|
8
9
|
import { StepperProvider } from "./StepperContext";
|
9
10
|
|
10
11
|
export type StepperVariantProps = RecipeVariantProps<typeof stepperSlotRecipe>;
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { useSlotRecipe } from "@chakra-ui/react";
|
3
3
|
import { DropdownRightFill18Icon } from "@vygruppen/spor-icon-react";
|
4
4
|
import React, { PropsWithChildren } from "react";
|
5
|
+
|
5
6
|
import { Box, Button, Text } from "..";
|
6
7
|
import { StepperVariantProps } from "./Stepper";
|
7
8
|
import { useStepper } from "./StepperContext";
|
package/src/tab/Tabs.tsx
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
|
+
RecipeVariantProps,
|
3
4
|
Tabs as ChakraTabs,
|
4
5
|
TabsRootProps as ChakraTabsRootProps,
|
5
|
-
RecipeVariantProps,
|
6
6
|
} from "@chakra-ui/react";
|
7
7
|
import * as React from "react";
|
8
8
|
import { forwardRef, PropsWithChildren } from "react";
|
9
|
+
|
9
10
|
import { tabsSlotRecipe } from "../theme/slot-recipes/tabs";
|
10
11
|
|
11
12
|
type TabsVariantProps = RecipeVariantProps<typeof tabsSlotRecipe>;
|
package/src/table/Table.tsx
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
3
|
Box,
|
4
|
+
RecipeVariantProps,
|
4
5
|
Table as ChakraTable,
|
5
6
|
TableRootProps as ChakraTableProps,
|
6
|
-
RecipeVariantProps,
|
7
7
|
useSlotRecipe,
|
8
8
|
} from "@chakra-ui/react";
|
9
9
|
import React, { forwardRef, PropsWithChildren } from "react";
|
10
|
+
|
10
11
|
import { tableSlotRecipe } from "../theme/slot-recipes/table";
|
11
12
|
|
12
13
|
type TableVariantProps = RecipeVariantProps<typeof tableSlotRecipe>;
|
package/src/table/index.tsx
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
export
|
2
|
-
TableCaption,
|
3
|
-
TableHeader,
|
4
|
-
TableRow,
|
5
|
-
TableColumn,
|
6
|
-
TableColumnHeader,
|
7
|
-
TableRoot,
|
8
|
-
TableBody,
|
9
|
-
TableCell,
|
10
|
-
TableFooter,
|
11
|
-
} from "@chakra-ui/react";
|
1
|
+
export * from "./Table";
|
12
2
|
export type {
|
13
3
|
TableBodyProps,
|
14
4
|
TableCaptionProps,
|
15
5
|
TableCellProps,
|
16
6
|
TableColumnHeaderProps,
|
7
|
+
TableColumnProps,
|
17
8
|
TableFooterProps,
|
18
|
-
TableRowProps,
|
19
9
|
TableHeaderProps,
|
20
|
-
TableColumnProps,
|
21
10
|
TableRootProps,
|
11
|
+
TableRowProps,
|
12
|
+
} from "@chakra-ui/react";
|
13
|
+
export {
|
14
|
+
TableBody,
|
15
|
+
TableCaption,
|
16
|
+
TableCell,
|
17
|
+
TableColumn,
|
18
|
+
TableColumnHeader,
|
19
|
+
TableFooter,
|
20
|
+
TableHeader,
|
21
|
+
TableRoot,
|
22
|
+
TableRow,
|
22
23
|
} from "@chakra-ui/react";
|
23
|
-
export * from "./Table";
|
package/src/theme/index.ts
CHANGED
@@ -3,17 +3,18 @@ import {
|
|
3
3
|
defaultBaseConfig,
|
4
4
|
defineConfig,
|
5
5
|
} from "@chakra-ui/react";
|
6
|
-
|
7
|
-
import {
|
8
|
-
import { globalCss } from "./tokens/global-css";
|
9
|
-
import { keyframes } from "./tokens/keyframes";
|
6
|
+
|
7
|
+
import { Brand } from "./brand";
|
10
8
|
import { recipes } from "./recipes";
|
11
9
|
import { semanticTokens } from "./semantic-tokens";
|
12
10
|
import { slotRecipes } from "./slot-recipes";
|
13
|
-
import { textStyles } from "./tokens/text-styles";
|
14
11
|
import { tokens } from "./tokens";
|
15
|
-
import {
|
12
|
+
import { animationStyles } from "./tokens/animation-styles";
|
13
|
+
import { breakpoints } from "./tokens/breakpoints";
|
16
14
|
import { config } from "./tokens/config";
|
15
|
+
import { globalCss } from "./tokens/global-css";
|
16
|
+
import { keyframes } from "./tokens/keyframes";
|
17
|
+
import { textStyles } from "./tokens/text-styles";
|
17
18
|
|
18
19
|
const generateTheme = (brand: Brand) => {
|
19
20
|
return defineConfig({
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineSemanticTokens } from "@chakra-ui/react";
|
2
|
+
import cargonetJson from "@vygruppen/spor-design-tokens/tokens/color/cargonet.json";
|
2
3
|
import vyDigitalJson from "@vygruppen/spor-design-tokens/tokens/color/vy-digital.json";
|
3
4
|
import VyUtviklingJson from "@vygruppen/spor-design-tokens/tokens/color/vy-utvikling.json";
|
4
|
-
import cargonetJson from "@vygruppen/spor-design-tokens/tokens/color/cargonet.json";
|
5
5
|
|
6
6
|
export enum Brand {
|
7
7
|
VyDigital = "VyDigital",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Brand } from "../brand";
|
2
|
-
import { cargonetColors,
|
2
|
+
import { cargonetColors, vyDigitalColors, vyUtviklingColors } from "./colors";
|
3
3
|
import { radii } from "./radii";
|
4
4
|
import { shadows } from "./shadows";
|
5
5
|
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
|
+
|
1
3
|
import { coreBorder, coreText } from "../utils/core-utils";
|
2
4
|
import { floatingBackground, floatingBorder } from "../utils/floating-utils";
|
3
5
|
import { ghostBackground } from "../utils/ghost-utils";
|
4
|
-
import { defineSlotRecipe } from "@chakra-ui/react";
|
5
6
|
import { accordionAnatomy } from "./anatomy";
|
6
7
|
|
7
8
|
export const accordionSlotRecipe = defineSlotRecipe({
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
|
+
import tokens from "@vygruppen/spor-design-tokens";
|
3
|
+
|
2
4
|
import { alertSlotRecipe } from "./alert";
|
3
5
|
import { alertExpandableAnatomy } from "./anatomy";
|
4
|
-
import tokens from "@vygruppen/spor-design-tokens";
|
5
6
|
|
6
7
|
export const alertExpandableSlotRecipe = defineSlotRecipe({
|
7
8
|
className: "spor-alert-expandable",
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
|
-
import { breadcrumbAnatomy } from "./anatomy";
|
3
2
|
import tokens from "@vygruppen/spor-design-tokens";
|
4
3
|
|
4
|
+
import { breadcrumbAnatomy } from "./anatomy";
|
5
|
+
|
5
6
|
export const breadcrumbSlotRecipe = defineSlotRecipe({
|
6
7
|
slots: breadcrumbAnatomy.keys(),
|
7
8
|
base: {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
2
|
import tokens from "@vygruppen/spor-design-tokens";
|
3
|
+
|
3
4
|
import { brandBackground, brandText } from "../utils/brand-utils";
|
4
5
|
import { coreBackground, coreText } from "../utils/core-utils";
|
5
6
|
import { checkboxAnatomy } from "./anatomy";
|
@@ -16,10 +16,10 @@ import { listBoxSlotRecipe } from "./listbox";
|
|
16
16
|
import { mediaControllerSlotRecipe } from "./media-controller-button";
|
17
17
|
import { nativeSelectSlotRecipe } from "./native-select";
|
18
18
|
import { numericStepperRecipe } from "./numeric-stepper";
|
19
|
+
import { paginationSlotRecipe } from "./pagination";
|
19
20
|
import { popoverSlotRecipe } from "./popover";
|
20
21
|
import { progressBarRecipe } from "./progress-bar";
|
21
22
|
import { progressIndicatorRecipe } from "./progress-indicator";
|
22
|
-
import { paginationSlotRecipe } from "./pagination";
|
23
23
|
import { radioGroupSlotRecipe } from "./radio";
|
24
24
|
import { radioCardSlotRecipe } from "./radio-card";
|
25
25
|
import { selectSlotRecipe } from "./select";
|
@@ -27,8 +27,8 @@ import { stepperSlotRecipe } from "./stepper";
|
|
27
27
|
import { switchSlotRecipe } from "./switch";
|
28
28
|
import { tableSlotRecipe } from "./table";
|
29
29
|
import { tabsSlotRecipe } from "./tabs";
|
30
|
-
import { travelTagSlotRecipe } from "./travel-tag";
|
31
30
|
import { toastSlotRecipe } from "./toast";
|
31
|
+
import { travelTagSlotRecipe } from "./travel-tag";
|
32
32
|
|
33
33
|
export const slotRecipes = {
|
34
34
|
accordion: accordionSlotRecipe,
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
|
-
|
3
|
-
import { infoTagAnatomy } from "./anatomy";
|
2
|
+
|
4
3
|
import { coreBorder } from "../utils/core-utils";
|
4
|
+
import { infoTagAnatomy } from "./anatomy";
|
5
|
+
import { travelTagSlotRecipe } from "./travel-tag";
|
5
6
|
|
6
7
|
export const infoTagSlotRecipe = defineSlotRecipe({
|
7
8
|
slots: infoTagAnatomy.keys(),
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { coreText } from "../utils/core-utils";
|
2
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
3
|
-
|
2
|
+
|
4
3
|
import { inputRecipe } from "../recipes/input";
|
4
|
+
import { coreText } from "../utils/core-utils";
|
5
|
+
import { NativeSelectAnatomy } from "./anatomy";
|
5
6
|
|
6
7
|
export const nativeSelectSlotRecipe = defineSlotRecipe({
|
7
8
|
slots: NativeSelectAnatomy.keys(),
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
|
+
import tokens from "@vygruppen/spor-design-tokens";
|
3
|
+
|
2
4
|
import { coreBackground, coreBorder, coreText } from "../utils/core-utils";
|
3
5
|
import { floatingBackground, floatingBorder } from "../utils/floating-utils";
|
4
6
|
import { outlineBorder } from "../utils/outline-utils";
|
5
7
|
import { radioCardAnatomy } from "./anatomy";
|
6
|
-
import tokens from "@vygruppen/spor-design-tokens";
|
7
8
|
|
8
9
|
export const radioCardSlotRecipe = defineSlotRecipe({
|
9
10
|
className: "spor-radio-card",
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { defineSlotRecipe } from "@chakra-ui/react";
|
2
|
-
import { switchAnatomy } from "./anatomy";
|
3
2
|
import tokens from "@vygruppen/spor-design-tokens";
|
4
3
|
|
4
|
+
import { switchAnatomy } from "./anatomy";
|
5
|
+
|
5
6
|
export const switchSlotRecipe = defineSlotRecipe({
|
6
7
|
slots: switchAnatomy.keys(),
|
7
8
|
className: "spor-switch",
|