@vygruppen/spor-react 12.6.4 → 12.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/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group as Group$1, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, ClientOnly as ClientOnly$1, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, Input as Input$1, InputElement, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
1
+ import { useSlotRecipe, Accordion as Accordion$1, Stack, Box, HStack, Progress, defineRecipe, chakra, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, Code as Code$1, Clipboard as Clipboard$1, IconButton as IconButton$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, ClientOnly as ClientOnly$1, Field, defineStyle, PopoverAnchor, useFieldContext, Popover as Popover$1, Portal, Dialog, createContext as createContext$1, Drawer as Drawer$1, Grid, GridItem, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Fieldset as Fieldset$1, InputElement, Input as Input$1, NativeSelect as NativeSelect$1, useControllableState, createListCollection, RadioGroup as RadioGroup$1, Select as Select$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, RadioCard as RadioCard$1, Separator as Separator$1, Link, List as List$1, Center, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, createToaster, Tabs as Tabs$1, Table as Table$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
2
2
  export { Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableBody, TableCaption, TableCell, TableColumn, TableColumnGroup, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
3
3
  import { DropdownDownFill24Icon, CopyOutline18Icon, CheckmarkFill18Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, ServiceFill24Icon, QuestionFill24Icon, ErrorOutline24Icon, ErrorFill24Icon, AltTransportFill24Icon, WarningFill24Icon, SuccessFill24Icon, InformationFill24Icon, DropdownDownFill18Icon, DropdownRightFill18Icon, CalendarOutline24Icon, ArrowLeftFill24Icon, CloseOutline24Icon, SearchOutline24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, LinkOutOutline24Icon, LinkOutOutline18Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
4
4
  import * as React28 from 'react';
@@ -16,13 +16,14 @@ export { Item, Section } from 'react-stately';
16
16
  import { GregorianCalendar, createCalendar, getLocalTimeZone, endOfMonth, getWeeksInMonth, isSameMonth, isToday, parseTime } from '@internationalized/date';
17
17
  export { Time } from '@internationalized/date';
18
18
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
19
+ import { Global } from '@emotion/react';
19
20
  import tokens23__default from '@vygruppen/spor-design-tokens';
20
21
  import * as tokens23 from '@vygruppen/spor-design-tokens';
21
22
  export { tokens23 as tokens };
22
- import { Global } from '@emotion/react';
23
23
  import tokens4 from '@vygruppen/spor-design-tokens/raw-tokens';
24
24
  import { createAnatomy } from '@ark-ui/react/anatomy';
25
25
  import { popoverAnatomy as popoverAnatomy$1 } from '@ark-ui/react/popover';
26
+ import { collapsibleAnatomy } from '@ark-ui/react/collapsible';
26
27
 
27
28
  // src/accordion/Accordion.tsx
28
29
 
@@ -606,38 +607,12 @@ var texts2 = createTexts({
606
607
  sv: "Laddar\u2026"
607
608
  }
608
609
  });
609
- var groupRecipe = defineRecipe({
610
- className: "spor-group",
611
- base: {
612
- fontSize: "lg"
613
- },
614
- variants: {
615
- disabled: {
616
- true: {
617
- "& > *": {
618
- pointerEvents: "none",
619
- backgroundColor: "surface.disabled",
620
- color: "text.disabled"
621
- }
622
- }
623
- }
624
- }
625
- });
626
- var Group = chakra(Group$1, groupRecipe);
627
610
  var ButtonGroup = forwardRef(
628
611
  (props, ref) => {
629
- const { children, disabled, grow, attached, ...rest } = props;
630
- return /* @__PURE__ */ jsx(
631
- Group,
632
- {
633
- ...rest,
634
- ref,
635
- attached,
636
- grow,
637
- disabled,
638
- children
639
- }
640
- );
612
+ const recipe = useRecipe({ key: "buttonGroup" });
613
+ const [recipeProps, restProps] = recipe.splitVariantProps(props);
614
+ const styles = recipe(recipeProps);
615
+ return /* @__PURE__ */ jsx(Group, { ...restProps, ref, css: styles });
641
616
  }
642
617
  );
643
618
  ButtonGroup.displayName = "ButtonGroup";
@@ -2346,7 +2321,7 @@ var DialogContent = React28.forwardRef((props, ref) => {
2346
2321
  });
2347
2322
  DialogContent.displayName = "DialogContent";
2348
2323
  var DialogCloseTrigger = React28.forwardRef(function DialogCloseTrigger2(props, ref) {
2349
- return /* @__PURE__ */ jsx(Dialog.CloseTrigger, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { size: "md" }) });
2324
+ return /* @__PURE__ */ jsx(Dialog.CloseTrigger, { ref, position: "absolute", ...props, asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { size: "md" }) });
2350
2325
  });
2351
2326
  var DialogRoot = Dialog.Root;
2352
2327
  var DialogFooter = Dialog.Footer;
@@ -2447,51 +2422,12 @@ var texts12 = createTexts({
2447
2422
  sv: "St\xE4ng"
2448
2423
  }
2449
2424
  });
2450
- var attachedInputsRecipe = defineRecipe({
2451
- base: {
2452
- display: "flex",
2453
- gap: "0.1rem",
2454
- width: "100%",
2455
- "& select": {
2456
- borderEndRadius: 0
2457
- }
2458
- },
2459
- variants: {
2460
- orientation: {
2461
- horizontal: {
2462
- flexDirection: "row",
2463
- "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
2464
- borderEndRadius: 0
2465
- },
2466
- "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
2467
- borderRadius: 0
2468
- },
2469
- "& > *:not(:first-of-type):last-of-type [data-attachable]": {
2470
- borderStartRadius: 0
2471
- }
2472
- },
2473
- vertical: {
2474
- flexDirection: "column",
2475
- "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
2476
- borderBottomRadius: 0
2477
- },
2478
- "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
2479
- borderRadius: 0
2480
- },
2481
- "& > *:not(:first-of-type):last-of-type [data-attachable]": {
2482
- borderTopRadius: 0
2483
- }
2484
- }
2485
- }
2486
- },
2487
- defaultVariants: {
2488
- orientation: "horizontal"
2489
- }
2490
- });
2491
- var StyledGroup = chakra(Group$1, attachedInputsRecipe);
2492
2425
  var AttachedInputs = forwardRef(
2493
2426
  (props, ref) => {
2494
- return /* @__PURE__ */ jsx(StyledGroup, { ref, attached: true, ...props });
2427
+ const recipe = useRecipe({ key: "attachedInputs" });
2428
+ const [recipeProps, restProps] = recipe.splitVariantProps(props);
2429
+ const styles = recipe(recipeProps);
2430
+ return /* @__PURE__ */ jsx(Group, { ref, css: styles, attached: true, ...restProps });
2495
2431
  }
2496
2432
  );
2497
2433
  AttachedInputs.displayName = "AttachedInputs";
@@ -2813,90 +2749,6 @@ var FieldsetLegend = Fieldset$1.Legend;
2813
2749
  var FieldsetContent = Fieldset$1.Content;
2814
2750
  var FieldsetHelperText = Fieldset$1.HelperText;
2815
2751
  var FieldsetErrorText = Fieldset$1.ErrorText;
2816
- var inputRecipe = defineRecipe({
2817
- base: {
2818
- appearance: "none",
2819
- width: "100%",
2820
- outline: "none",
2821
- border: 0,
2822
- borderRadius: "sm",
2823
- transitionProperty: "common",
2824
- transitionDuration: "fast",
2825
- color: "text",
2826
- position: "relative",
2827
- paddingX: 3,
2828
- paddingTop: 3,
2829
- height: 8,
2830
- fontSize: "mobile.md",
2831
- _disabled: {
2832
- backgroundColor: "surface.disabled",
2833
- outline: "1px solid",
2834
- outlineColor: "outline.disabled",
2835
- pointerEvents: "none"
2836
- },
2837
- _invalid: {
2838
- outline: "2px solid",
2839
- outlineColor: "outline.error",
2840
- _active: {
2841
- outline: "2px solid",
2842
- outlineColor: "outline.error"
2843
- },
2844
- _focus: {
2845
- outline: "2px solid",
2846
- outlineColor: "outline.error"
2847
- },
2848
- _hover: {
2849
- outline: "2px solid",
2850
- outlineColor: "core.outline"
2851
- }
2852
- }
2853
- },
2854
- variants: {
2855
- variant: {
2856
- core: {
2857
- backgroundColor: "transparent",
2858
- outline: "1px solid",
2859
- outlineColor: "core.outline",
2860
- _hover: {
2861
- outline: "2px solid",
2862
- outlineColor: "core.outline.hover",
2863
- _active: {
2864
- outline: "1px solid",
2865
- outlineColor: "outline.disabled",
2866
- backgroundColor: "core.surface.active"
2867
- }
2868
- },
2869
- _focus: {
2870
- outline: "2px solid",
2871
- outlineColor: "outline.focus"
2872
- }
2873
- },
2874
- floating: {
2875
- boxShadow: "sm",
2876
- bg: "floating.surface",
2877
- outline: "1px solid",
2878
- outlineColor: "floating.outline",
2879
- _hover: {
2880
- outline: "1px solid",
2881
- outlineColor: "floating.outline.hover"
2882
- },
2883
- _active: {
2884
- outline: "1px solid",
2885
- outlineColor: "floating.outline.active",
2886
- backgroundColor: "floating.surface.active"
2887
- },
2888
- focus: {
2889
- outline: "1px solid",
2890
- outlineColor: "outline.focus"
2891
- }
2892
- }
2893
- }
2894
- },
2895
- defaultVariants: {
2896
- variant: "core"
2897
- }
2898
- });
2899
- var StyledInput = chakra(Input$1, inputRecipe);
2900
2752
  var Input = forwardRef(
2901
2753
  ({
2902
2754
  startElement,
@@ -2907,6 +2759,9 @@ var Input = forwardRef(
2907
2759
  errorText,
2908
2760
  ...props
2909
2761
  }, ref) => {
2762
+ const recipe = useRecipe({ key: "input" });
2763
+ const [recipeProps, restProps] = recipe.splitVariantProps(props);
2764
+ const styles = recipe(recipeProps);
2910
2765
  return /* @__PURE__ */ jsxs(
2911
2766
  Field3,
2912
2767
  {
@@ -2924,7 +2779,7 @@ var Input = forwardRef(
2924
2779
  children: [
2925
2780
  startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: "none", paddingX: 2, children: startElement }),
2926
2781
  /* @__PURE__ */ jsx(
2927
- StyledInput,
2782
+ Input$1,
2928
2783
  {
2929
2784
  "data-attachable": true,
2930
2785
  ref,
@@ -2932,9 +2787,10 @@ var Input = forwardRef(
2932
2787
  overflow: "hidden",
2933
2788
  paddingLeft: startElement ? "2.6rem" : void 0,
2934
2789
  paddingRight: endElement ? "2.6rem" : void 0,
2935
- ...props,
2790
+ ...restProps,
2936
2791
  className: `peer ${props.className}`,
2937
- placeholder: ""
2792
+ placeholder: "",
2793
+ css: styles
2938
2794
  }
2939
2795
  ),
2940
2796
  endElement && /* @__PURE__ */ jsx(InputElement, { placement: "end", paddingX: 2, children: endElement })
@@ -3770,97 +3626,12 @@ var Textarea = forwardRef(
3770
3626
  }
3771
3627
  );
3772
3628
  Textarea.displayName = "Textarea";
3773
-
3774
- // src/util/slugify.tsx
3775
- function slugify(text, maxLength = 50) {
3776
- if (!text) {
3777
- return text;
3778
- }
3779
- if (Array.isArray(text)) {
3780
- text = text.join(" ");
3781
- }
3782
- if (maxLength < 1) {
3783
- throw new Error("The maxLength parameter must be a positive number");
3784
- }
3785
- return text.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[\u00C6\u00E6]/g, "ae").replaceAll(/[\u00D8\u00F8]/g, "oe").replaceAll(/[\u00C5\u00E5]/g, "aa").toLowerCase().replaceAll(/\s+/g, "-").replaceAll(/[^\w-]+/g, "").replaceAll(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "").slice(0, Math.max(0, maxLength));
3786
- }
3787
-
3788
- // src/theme/recipes/pressable-card.ts
3789
- var pressableCardRecipe = defineRecipe({
3790
- base: {
3791
- appearance: "none",
3792
- border: "none",
3793
- overflow: "hidden",
3794
- fontSize: "inherit",
3795
- display: "block",
3796
- borderRadius: "md",
3797
- cursor: "pointer",
3798
- transitionProperty: "common",
3799
- transitionDuration: "fast",
3800
- _disabled: {
3801
- outline: "none",
3802
- pointerEvents: "none",
3803
- background: "surface.disabled",
3804
- color: "text.disabled"
3805
- }
3806
- },
3807
- variants: {
3808
- variant: {
3809
- floating: {
3810
- boxShadow: "0px 1px 3px 0px var(--shadow-color)",
3811
- shadowColor: "surface.disabled",
3812
- border: "sm",
3813
- borderColor: "floating.outline",
3814
- backgroundColor: "floating.surface",
3815
- _hover: {
3816
- boxShadow: "0px 2px 6px 0px var(--shadow-color)",
3817
- backgroundColor: "floating.surface.hover",
3818
- borderColor: "floating.outline.hover",
3819
- _active: {
3820
- boxShadow: "none",
3821
- backgroundColor: "floating.surface.active",
3822
- borderColor: "floating.outline.active"
3823
- }
3824
- }
3825
- },
3826
- core: {
3827
- outlineColor: "core.outline",
3828
- outlineWidth: tokens23__default.size.stroke.sm,
3829
- outlineStyle: "solid",
3830
- backgroundColor: "core.surface",
3831
- _hover: {
3832
- outlineColor: "core.outline.hover",
3833
- outlineWidth: tokens23__default.size.stroke.md,
3834
- outlineStyle: "solid",
3835
- _active: {
3836
- backgroundColor: "core.surface.active",
3837
- outlineWidth: tokens23__default.size.stroke.sm
3838
- }
3839
- }
3840
- },
3841
- accent: {
3842
- boxShadow: "0px 1px 3px 0px var(--shadow-color)",
3843
- shadowColor: "surface.disabled",
3844
- background: "alert.success.surface",
3845
- _hover: {
3846
- background: "alert.success.surface.hover",
3847
- boxShadow: "0px 2px 6px 0px var(--shadow-color)",
3848
- _active: {
3849
- background: "alert.success.surface.active",
3850
- boxShadow: "none"
3851
- }
3852
- }
3853
- }
3854
- }
3855
- },
3856
- defaultVariants: {
3857
- variant: "core"
3858
- }
3859
- });
3860
- var PressableCardButton = chakra("button", pressableCardRecipe);
3861
3629
  var PressableCard = forwardRef(
3862
3630
  (props, ref) => {
3863
- return /* @__PURE__ */ jsx(PressableCardButton, { ...props, ref });
3631
+ const recipe = useRecipe({ key: "pressableCard" });
3632
+ const [recipeProps, restProps] = recipe.splitVariantProps(props);
3633
+ const styles = recipe(recipeProps);
3634
+ return /* @__PURE__ */ jsx(chakra.button, { ...restProps, css: styles, ref });
3864
3635
  }
3865
3636
  );
3866
3637
  PressableCard.displayName = "PressableCard";
@@ -3923,55 +3694,20 @@ var Separator = forwardRef(
3923
3694
  }
3924
3695
  );
3925
3696
  Separator.displayName = "Separator";
3926
- var staticCardRecipe = defineRecipe({
3927
- base: {
3928
- borderRadius: "md"
3929
- },
3930
- variants: {
3931
- colorPalette: {
3932
- white: {
3933
- backgroundColor: "surface.color.neutral",
3934
- color: "text"
3935
- },
3936
- grey: {
3937
- backgroundColor: "surface.color.grey"
3938
- },
3939
- yellow: {
3940
- backgroundColor: "surface.color.cream"
3941
- },
3942
- darkYellow: {
3943
- backgroundColor: "surface.color.yellow"
3944
- },
3945
- red: {
3946
- backgroundColor: "surface.color.red"
3947
- },
3948
- green: {
3949
- backgroundColor: "surface.color.green"
3950
- },
3951
- blue: {
3952
- backgroundColor: "surface.color.blue"
3953
- },
3954
- orange: {
3955
- backgroundColor: "surface.color.orange"
3956
- }
3957
- }
3958
- },
3959
- defaultVariants: {
3960
- colorPalette: "white"
3961
- }
3962
- });
3963
- var StyledCardBox = chakra("div", staticCardRecipe);
3964
- var StaticCard = forwardRef(
3965
- (props, ref) => {
3966
- return /* @__PURE__ */ jsx(StyledCardBox, { ...props, ref });
3967
- }
3968
- );
3969
- StaticCard.displayName = "StaticCard";
3970
- var icons = {
3971
- "local-train": {
3972
- sm: TrainFill18Icon,
3973
- md: TrainFill24Icon,
3974
- lg: TrainFill30Icon
3697
+ var StaticCard = forwardRef(
3698
+ (props, ref) => {
3699
+ const recipe = useRecipe({ key: "staticCard" });
3700
+ const [recipeProps, restProps] = recipe.splitVariantProps(props);
3701
+ const styles = recipe(recipeProps);
3702
+ return /* @__PURE__ */ jsx(Box, { css: styles, ...restProps, ref });
3703
+ }
3704
+ );
3705
+ StaticCard.displayName = "StaticCard";
3706
+ var icons = {
3707
+ "local-train": {
3708
+ sm: TrainFill18Icon,
3709
+ md: TrainFill24Icon,
3710
+ lg: TrainFill30Icon
3975
3711
  },
3976
3712
  "region-train": {
3977
3713
  sm: TrainFill18Icon,
@@ -5524,6 +5260,47 @@ var Table = forwardRef((props, ref) => {
5524
5260
  );
5525
5261
  });
5526
5262
  Table.displayName = "Table";
5263
+ var attachedInputsRecipe = defineRecipe({
5264
+ base: {
5265
+ display: "flex",
5266
+ gap: "0.1rem",
5267
+ width: "100%",
5268
+ "& select": {
5269
+ borderEndRadius: 0
5270
+ }
5271
+ },
5272
+ variants: {
5273
+ orientation: {
5274
+ horizontal: {
5275
+ flexDirection: "row",
5276
+ "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
5277
+ borderEndRadius: 0
5278
+ },
5279
+ "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
5280
+ borderRadius: 0
5281
+ },
5282
+ "& > *:not(:first-of-type):last-of-type [data-attachable]": {
5283
+ borderStartRadius: 0
5284
+ }
5285
+ },
5286
+ vertical: {
5287
+ flexDirection: "column",
5288
+ "& > *:first-of-type:not(:last-of-type) [data-attachable]": {
5289
+ borderBottomRadius: 0
5290
+ },
5291
+ "& > *:not(:first-of-type):not(:last-of-type) [data-attachable]": {
5292
+ borderRadius: 0
5293
+ },
5294
+ "& > *:not(:first-of-type):last-of-type [data-attachable]": {
5295
+ borderTopRadius: 0
5296
+ }
5297
+ }
5298
+ }
5299
+ },
5300
+ defaultVariants: {
5301
+ orientation: "horizontal"
5302
+ }
5303
+ });
5527
5304
  var buttonRecipe = defineRecipe({
5528
5305
  className: "spor-button",
5529
5306
  base: {
@@ -5687,6 +5464,106 @@ var closeButtonRecipe = defineRecipe({
5687
5464
  }
5688
5465
  }
5689
5466
  });
5467
+ var groupRecipe = defineRecipe({
5468
+ className: "spor-group",
5469
+ base: {
5470
+ fontSize: "lg"
5471
+ },
5472
+ variants: {
5473
+ disabled: {
5474
+ true: {
5475
+ "& > *": {
5476
+ pointerEvents: "none",
5477
+ backgroundColor: "surface.disabled",
5478
+ color: "text.disabled"
5479
+ }
5480
+ }
5481
+ }
5482
+ }
5483
+ });
5484
+ var inputRecipe = defineRecipe({
5485
+ base: {
5486
+ appearance: "none",
5487
+ width: "100%",
5488
+ outline: "none",
5489
+ border: 0,
5490
+ borderRadius: "sm",
5491
+ transitionProperty: "common",
5492
+ transitionDuration: "fast",
5493
+ color: "text",
5494
+ position: "relative",
5495
+ paddingX: 3,
5496
+ paddingTop: 3,
5497
+ height: 8,
5498
+ fontSize: "mobile.md",
5499
+ _disabled: {
5500
+ backgroundColor: "surface.disabled",
5501
+ outline: "1px solid",
5502
+ outlineColor: "outline.disabled",
5503
+ pointerEvents: "none"
5504
+ },
5505
+ _invalid: {
5506
+ outline: "2px solid",
5507
+ outlineColor: "outline.error",
5508
+ _active: {
5509
+ outline: "2px solid",
5510
+ outlineColor: "outline.error"
5511
+ },
5512
+ _focus: {
5513
+ outline: "2px solid",
5514
+ outlineColor: "outline.error"
5515
+ },
5516
+ _hover: {
5517
+ outline: "2px solid",
5518
+ outlineColor: "core.outline"
5519
+ }
5520
+ }
5521
+ },
5522
+ variants: {
5523
+ variant: {
5524
+ core: {
5525
+ backgroundColor: "transparent",
5526
+ outline: "1px solid",
5527
+ outlineColor: "core.outline",
5528
+ _hover: {
5529
+ outline: "2px solid",
5530
+ outlineColor: "core.outline.hover",
5531
+ _active: {
5532
+ outline: "1px solid",
5533
+ outlineColor: "outline.disabled",
5534
+ backgroundColor: "core.surface.active"
5535
+ }
5536
+ },
5537
+ _focus: {
5538
+ outline: "2px solid",
5539
+ outlineColor: "outline.focus"
5540
+ }
5541
+ },
5542
+ floating: {
5543
+ boxShadow: "sm",
5544
+ bg: "floating.surface",
5545
+ outline: "1px solid",
5546
+ outlineColor: "floating.outline",
5547
+ _hover: {
5548
+ outline: "1px solid",
5549
+ outlineColor: "floating.outline.hover"
5550
+ },
5551
+ _active: {
5552
+ outline: "1px solid",
5553
+ outlineColor: "floating.outline.active",
5554
+ backgroundColor: "floating.surface.active"
5555
+ },
5556
+ focus: {
5557
+ outline: "1px solid",
5558
+ outlineColor: "outline.focus"
5559
+ }
5560
+ }
5561
+ }
5562
+ },
5563
+ defaultVariants: {
5564
+ variant: "core"
5565
+ }
5566
+ });
5690
5567
  var linkRecipe = defineRecipe({
5691
5568
  base: {
5692
5569
  transitionProperty: "common",
@@ -5765,6 +5642,93 @@ var linkRecipe = defineRecipe({
5765
5642
  size: "sm"
5766
5643
  }
5767
5644
  });
5645
+
5646
+ // src/util/slugify.tsx
5647
+ function slugify(text, maxLength = 50) {
5648
+ if (!text) {
5649
+ return text;
5650
+ }
5651
+ if (Array.isArray(text)) {
5652
+ text = text.join(" ");
5653
+ }
5654
+ if (maxLength < 1) {
5655
+ throw new Error("The maxLength parameter must be a positive number");
5656
+ }
5657
+ return text.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[\u00C6\u00E6]/g, "ae").replaceAll(/[\u00D8\u00F8]/g, "oe").replaceAll(/[\u00C5\u00E5]/g, "aa").toLowerCase().replaceAll(/\s+/g, "-").replaceAll(/[^\w-]+/g, "").replaceAll(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "").slice(0, Math.max(0, maxLength));
5658
+ }
5659
+
5660
+ // src/theme/recipes/pressable-card.ts
5661
+ var pressableCardRecipe = defineRecipe({
5662
+ base: {
5663
+ appearance: "none",
5664
+ border: "none",
5665
+ overflow: "hidden",
5666
+ fontSize: "inherit",
5667
+ display: "block",
5668
+ borderRadius: "md",
5669
+ cursor: "pointer",
5670
+ transitionProperty: "common",
5671
+ transitionDuration: "fast",
5672
+ _disabled: {
5673
+ outline: "none",
5674
+ pointerEvents: "none",
5675
+ background: "surface.disabled",
5676
+ color: "text.disabled"
5677
+ }
5678
+ },
5679
+ variants: {
5680
+ variant: {
5681
+ floating: {
5682
+ boxShadow: "0px 1px 3px 0px var(--shadow-color)",
5683
+ shadowColor: "surface.disabled",
5684
+ border: "sm",
5685
+ borderColor: "floating.outline",
5686
+ backgroundColor: "floating.surface",
5687
+ _hover: {
5688
+ boxShadow: "0px 2px 6px 0px var(--shadow-color)",
5689
+ backgroundColor: "floating.surface.hover",
5690
+ borderColor: "floating.outline.hover",
5691
+ _active: {
5692
+ boxShadow: "none",
5693
+ backgroundColor: "floating.surface.active",
5694
+ borderColor: "floating.outline.active"
5695
+ }
5696
+ }
5697
+ },
5698
+ core: {
5699
+ outlineColor: "core.outline",
5700
+ outlineWidth: tokens23__default.size.stroke.sm,
5701
+ outlineStyle: "solid",
5702
+ backgroundColor: "core.surface",
5703
+ _hover: {
5704
+ outlineColor: "core.outline.hover",
5705
+ outlineWidth: tokens23__default.size.stroke.md,
5706
+ outlineStyle: "solid",
5707
+ _active: {
5708
+ backgroundColor: "core.surface.active",
5709
+ outlineWidth: tokens23__default.size.stroke.sm
5710
+ }
5711
+ }
5712
+ },
5713
+ accent: {
5714
+ boxShadow: "0px 1px 3px 0px var(--shadow-color)",
5715
+ shadowColor: "surface.disabled",
5716
+ background: "alert.success.surface",
5717
+ _hover: {
5718
+ background: "alert.success.surface.hover",
5719
+ boxShadow: "0px 2px 6px 0px var(--shadow-color)",
5720
+ _active: {
5721
+ background: "alert.success.surface.active",
5722
+ boxShadow: "none"
5723
+ }
5724
+ }
5725
+ }
5726
+ }
5727
+ },
5728
+ defaultVariants: {
5729
+ variant: "core"
5730
+ }
5731
+ });
5768
5732
  var separatorRecipe = defineRecipe({
5769
5733
  className: "spor-separator",
5770
5734
  base: {
@@ -5898,6 +5862,43 @@ var skeletonRecipe = defineRecipe({
5898
5862
  }
5899
5863
  }
5900
5864
  });
5865
+ var staticCardRecipe = defineRecipe({
5866
+ base: {
5867
+ borderRadius: "md"
5868
+ },
5869
+ variants: {
5870
+ colorPalette: {
5871
+ white: {
5872
+ backgroundColor: "surface.color.neutral",
5873
+ color: "text"
5874
+ },
5875
+ grey: {
5876
+ backgroundColor: "surface.color.grey"
5877
+ },
5878
+ yellow: {
5879
+ backgroundColor: "surface.color.cream"
5880
+ },
5881
+ darkYellow: {
5882
+ backgroundColor: "surface.color.yellow"
5883
+ },
5884
+ red: {
5885
+ backgroundColor: "surface.color.red"
5886
+ },
5887
+ green: {
5888
+ backgroundColor: "surface.color.green"
5889
+ },
5890
+ blue: {
5891
+ backgroundColor: "surface.color.blue"
5892
+ },
5893
+ orange: {
5894
+ backgroundColor: "surface.color.orange"
5895
+ }
5896
+ }
5897
+ },
5898
+ defaultVariants: {
5899
+ colorPalette: "white"
5900
+ }
5901
+ });
5901
5902
  var _a2, _b;
5902
5903
  var textareaRecipe = defineRecipe({
5903
5904
  className: "spor-textarea",
@@ -5929,6 +5930,7 @@ var recipes = {
5929
5930
  attachedInputs: attachedInputsRecipe,
5930
5931
  badge: badgeRecipie,
5931
5932
  button: buttonRecipe,
5933
+ buttonGroup: groupRecipe,
5932
5934
  closeButton: closeButtonRecipe,
5933
5935
  code: codeRecipie,
5934
5936
  input: inputRecipe,
@@ -6932,6 +6934,23 @@ var choiceChipSlotRecipe = defineSlotRecipe({
6932
6934
  chipType: "choice"
6933
6935
  }
6934
6936
  });
6937
+ var collapsibleSlotRecipe = defineSlotRecipe({
6938
+ slots: collapsibleAnatomy.keys(),
6939
+ className: "chakra-collapsible",
6940
+ base: {
6941
+ content: {
6942
+ overflow: "hidden",
6943
+ _open: {
6944
+ animationName: "expand-height, fade-in",
6945
+ animationDuration: "moderate"
6946
+ },
6947
+ _closed: {
6948
+ animationName: "collapse-height, fade-out",
6949
+ animationDuration: "moderate"
6950
+ }
6951
+ }
6952
+ }
6953
+ });
6935
6954
  var datePickerSlotRecipe = defineSlotRecipe({
6936
6955
  slots: datepickerAnatomy.keys(),
6937
6956
  className: "spor-datepicker",
@@ -9719,7 +9738,8 @@ var slotRecipes = {
9719
9738
  tabs: tabsSlotRecipe,
9720
9739
  travelTag: travelTagSlotRecipe,
9721
9740
  toast: toastSlotRecipe,
9722
- checkboxCard: choiceChipSlotRecipe
9741
+ checkboxCard: choiceChipSlotRecipe,
9742
+ collapsible: collapsibleSlotRecipe
9723
9743
  };
9724
9744
  var animations = defineTokens.animations({
9725
9745
  spin: {