@vygruppen/spor-react 12.4.7 → 12.4.9

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,5 +1,5 @@
1
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, defineSlotRecipe, 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, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, VisuallyHidden, defineConfig, ListItem, ChakraProvider, Toaster as Toaster$1, Toast, Icon } from '@chakra-ui/react';
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, TableColumnHeader, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
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, 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, ArrowLeftOutline24Icon, ArrowRightOutline24Icon, DropdownLeftFill18Icon, SuccessFill18Icon } from '@vygruppen/spor-icon-react';
4
4
  import * as React28 from 'react';
5
5
  import React28__default, { forwardRef, createContext, useId, cloneElement, useEffect, useRef, isValidElement, useState, useMemo, useLayoutEffect, useContext } from 'react';
@@ -73,7 +73,13 @@ var Accordion = forwardRef(
73
73
  }
74
74
  );
75
75
  var AccordionItemTrigger = forwardRef(function AccordionItemTrigger2(props, ref) {
76
- const { startElement, children, headingLevel, ...rest } = props;
76
+ const {
77
+ startElement,
78
+ children,
79
+ headingLevel,
80
+ showChevron = true,
81
+ ...rest
82
+ } = props;
77
83
  warnAboutMismatchingIcon({ icon: startElement });
78
84
  const recipe = useSlotRecipe({ key: "accordion" });
79
85
  const styles = recipe();
@@ -82,7 +88,7 @@ var AccordionItemTrigger = forwardRef(function AccordionItemTrigger2(props, ref)
82
88
  startElement && startElement,
83
89
  children
84
90
  ] }),
85
- /* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: /* @__PURE__ */ jsx(DropdownDownFill24Icon, {}) })
91
+ showChevron && /* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: /* @__PURE__ */ jsx(DropdownDownFill24Icon, {}) })
86
92
  ] }) });
87
93
  });
88
94
  var AccordionItemContent = forwardRef(function AccordionItemContent2(props, ref) {
@@ -3326,6 +3332,7 @@ var inputRecipe = defineRecipe({
3326
3332
  borderRadius: "sm",
3327
3333
  transitionProperty: "common",
3328
3334
  transitionDuration: "fast",
3335
+ color: "text",
3329
3336
  position: "relative",
3330
3337
  paddingX: 3,
3331
3338
  paddingTop: 3,
@@ -4153,7 +4160,7 @@ var SearchInput = forwardRef(
4153
4160
  type: "search",
4154
4161
  variant,
4155
4162
  ...props,
4156
- startElement: /* @__PURE__ */ jsx(SearchOutline24Icon, {}),
4163
+ startElement: /* @__PURE__ */ jsx(SearchOutline24Icon, { color: "icon" }),
4157
4164
  endElement: clearButton && /* @__PURE__ */ jsx(
4158
4165
  IconButton,
4159
4166
  {
@@ -6218,15 +6225,11 @@ var tableSlotRecipe = defineSlotRecipe({
6218
6225
  columnHeader: {
6219
6226
  fontWeight: "bold",
6220
6227
  textAlign: "start",
6221
- borderBottom: "sm",
6222
- borderColor: "outline.disabled",
6223
6228
  ...numericStyles,
6224
6229
  paddingX: 1.5,
6225
6230
  paddingY: 1
6226
6231
  },
6227
6232
  row: {
6228
- borderBottom: "sm",
6229
- borderColor: "outline.disabled",
6230
6233
  ...numericStyles
6231
6234
  },
6232
6235
  cell: {
@@ -6280,48 +6283,53 @@ var tableSlotRecipe = defineSlotRecipe({
6280
6283
  backgroundColor: "none"
6281
6284
  },
6282
6285
  columnHeader: {
6283
- borderLeft: "none",
6284
6286
  borderBottom: "sm",
6285
6287
  borderColor: "outline.disabled",
6286
6288
  backgroundColor: "none",
6287
6289
  color: "text"
6288
6290
  },
6289
6291
  cell: {
6292
+ ...numericStyles
6293
+ },
6294
+ row: {
6290
6295
  borderBottom: "sm",
6291
6296
  borderColor: "outline.disabled",
6292
- ...numericStyles,
6293
- _first: {
6294
- borderLeft: "none"
6295
- }
6297
+ ...numericStyles
6296
6298
  }
6297
6299
  },
6298
6300
  core: {
6301
+ root: {
6302
+ boxShadow: "0 0 0 1px var(--shadow-color)",
6303
+ shadowColor: "outline.disabled",
6304
+ borderRadius: "sm"
6305
+ },
6299
6306
  table: {
6300
- borderRadius: "md",
6301
- overflow: "hidden",
6302
- border: "sm",
6303
- borderColor: "outline.disabled"
6307
+ overflow: "hidden"
6304
6308
  },
6305
6309
  cell: {
6306
- borderLeft: "sm",
6307
- borderColor: "outline.disabled",
6308
6310
  ...numericStyles,
6309
- _first: {
6310
- borderLeft: "none"
6311
+ borderRight: "sm",
6312
+ borderColor: "outline.disabled",
6313
+ _last: {
6314
+ borderRight: "none"
6311
6315
  }
6312
6316
  },
6313
- header: {
6314
- border: "none"
6315
- },
6316
6317
  columnHeader: {
6317
- borderBottom: "sm",
6318
- borderLeft: "sm",
6319
- borderLeftColor: "outline.disabled",
6320
6318
  ...numericStyles,
6319
+ borderRight: "sm",
6320
+ borderColor: "outline.disabled",
6321
6321
  _first: {
6322
- borderLeft: "none"
6322
+ borderTopLeftRadius: "sm"
6323
+ },
6324
+ _last: {
6325
+ borderTopRightRadius: "sm",
6326
+ borderRight: "none"
6323
6327
  }
6324
6328
  },
6329
+ header: {
6330
+ borderBottom: "sm",
6331
+ borderColor: "outline.disabled"
6332
+ },
6325
6333
  row: {
6326
6334
  ...numericStyles,
6327
6335
  borderBottom: "sm",
@@ -6397,7 +6405,7 @@ var Table = forwardRef((props, ref) => {
6397
6405
  const { variant = "ghost", size, colorPalette = "green", children } = props;
6398
6406
  const recipe = useSlotRecipe({ recipe: tableSlotRecipe });
6399
6407
  const styles = recipe({ variant, size });
6400
- return /* @__PURE__ */ jsx(Box, { overflowX: "auto", role: "region", ...getStyleProps(props), ...props, children: /* @__PURE__ */ jsx(
6408
+ return /* @__PURE__ */ jsx(
6401
6409
  Table$1.Root,
6402
6410
  {
6403
6411
  variant,
@@ -6405,18 +6413,12 @@ var Table = forwardRef((props, ref) => {
6405
6413
  colorPalette,
6406
6414
  css: styles,
6407
6415
  ref,
6416
+ ...props,
6408
6417
  children
6409
6418
  }
6410
- ) });
6419
+ );
6411
6420
  });
6412
6421
  Table.displayName = "Table";
6413
- function getStyleProps(props) {
6414
- return props.variant === "core" ? {
6415
- borderRadius: "sm",
6416
- border: "sm",
6417
- borderColor: "outline.disabled"
6418
- } : {};
6419
- }
6420
6422
  var buttonRecipe = defineRecipe({
6421
6423
  className: "spor-button",
6422
6424
  base: {