@vygruppen/spor-react 3.8.1 → 4.0.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.js CHANGED
@@ -3476,7 +3476,7 @@ var init_DatePicker = __esm({
3476
3476
  const onFieldClick = () => {
3477
3477
  state2.setOpen(true);
3478
3478
  };
3479
- const popoverContent = /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", boxShadow: "md", sx: styles3.calendar }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React69__namespace.default.createElement(
3479
+ const popoverContent = /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { color: "darkGrey", sx: styles3.calendarPopover }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React69__namespace.default.createElement(
3480
3480
  Calendar,
3481
3481
  {
3482
3482
  ...calendarProps,
@@ -3484,37 +3484,53 @@ var init_DatePicker = __esm({
3484
3484
  showYearNavigation
3485
3485
  }
3486
3486
  ))));
3487
- return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column", width }, /* @__PURE__ */ React69__namespace.default.createElement(
3488
- react.Popover,
3487
+ return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(
3488
+ react.Box,
3489
3489
  {
3490
- ...dialogProps,
3491
- isOpen: state2.isOpen,
3492
- onOpen: state2.open,
3493
- onClose: state2.close
3490
+ position: "relative",
3491
+ display: "inline-flex",
3492
+ flexDirection: "column",
3493
+ width
3494
3494
  },
3495
- /* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React69__namespace.default.createElement(
3496
- StyledField,
3495
+ /* @__PURE__ */ React69__namespace.default.createElement(
3496
+ react.Popover,
3497
3497
  {
3498
- variant,
3499
- onClick: onFieldClick,
3500
- paddingX: 3,
3501
- minHeight
3498
+ ...dialogProps,
3499
+ isOpen: state2.isOpen,
3500
+ onOpen: state2.open,
3501
+ onClose: state2.close
3502
3502
  },
3503
- /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(CalendarTriggerButton, { variant, ref, ...buttonProps })),
3504
- /* @__PURE__ */ React69__namespace.default.createElement(
3505
- DateField,
3503
+ /* @__PURE__ */ React69__namespace.default.createElement(react.InputGroup, { ...groupProps, display: "inline-flex" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverAnchor, null, /* @__PURE__ */ React69__namespace.default.createElement(
3504
+ StyledField,
3506
3505
  {
3507
- label: props.label,
3508
- labelProps,
3509
- name: props.name,
3510
- ...fieldProps
3511
- }
3512
- )
3513
- ))),
3514
- /* @__PURE__ */ React69__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
3515
- state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React69__namespace.default.createElement(react.Portal, null, popoverContent),
3516
- state2.isOpen && !props.isDisabled && !withPortal && popoverContent
3517
- )));
3506
+ variant,
3507
+ onClick: onFieldClick,
3508
+ paddingX: 3,
3509
+ minHeight
3510
+ },
3511
+ /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(
3512
+ CalendarTriggerButton,
3513
+ {
3514
+ variant,
3515
+ ref,
3516
+ ...buttonProps
3517
+ }
3518
+ )),
3519
+ /* @__PURE__ */ React69__namespace.default.createElement(
3520
+ DateField,
3521
+ {
3522
+ label: props.label,
3523
+ labelProps,
3524
+ name: props.name,
3525
+ ...fieldProps
3526
+ }
3527
+ )
3528
+ ))),
3529
+ /* @__PURE__ */ React69__namespace.default.createElement(exports.FormErrorMessage, { ...errorMessageProps }, errorMessage),
3530
+ state2.isOpen && !props.isDisabled && withPortal && /* @__PURE__ */ React69__namespace.default.createElement(react.Portal, null, popoverContent),
3531
+ state2.isOpen && !props.isDisabled && !withPortal && popoverContent
3532
+ )
3533
+ ));
3518
3534
  }
3519
3535
  );
3520
3536
  }
@@ -3575,7 +3591,7 @@ function DateRangePicker({
3575
3591
  const onFieldClick = () => {
3576
3592
  state2.setOpen(true);
3577
3593
  };
3578
- const popoverContent = /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { sx: styles3.calendar, boxShadow: "md", maxWidth: "none" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React69__namespace.default.createElement(RangeCalendar, { variant: "base", ...calendarProps }))));
3594
+ const popoverContent = /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverContent, { sx: styles3.calendarPopover, maxWidth: "none" }, /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverArrow, { sx: styles3.arrow }), /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverBody, null, /* @__PURE__ */ React69__namespace.default.createElement(react.FocusLock, null, /* @__PURE__ */ React69__namespace.default.createElement(RangeCalendar, { variant: "base", ...calendarProps }))));
3579
3595
  return /* @__PURE__ */ React69__namespace.default.createElement(reactAria.I18nProvider, { locale }, /* @__PURE__ */ React69__namespace.default.createElement(react.Box, { position: "relative", display: "inline-flex", flexDirection: "column" }, props.label && /* @__PURE__ */ React69__namespace.default.createElement(react.FormLabel, { ...labelProps, sx: styles3.inputLabel }, props.label), /* @__PURE__ */ React69__namespace.default.createElement(
3580
3596
  react.Popover,
3581
3597
  {
@@ -3594,7 +3610,16 @@ function DateRangePicker({
3594
3610
  onKeyPress: handleEnterClick,
3595
3611
  minHeight
3596
3612
  },
3597
- variant && /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(CalendarTriggerButton, { paddingLeft: 1, paddingRight: 1, variant, ref, ...buttonProps })),
3613
+ variant && /* @__PURE__ */ React69__namespace.default.createElement(react.PopoverTrigger, null, /* @__PURE__ */ React69__namespace.default.createElement(
3614
+ CalendarTriggerButton,
3615
+ {
3616
+ paddingLeft: 1,
3617
+ paddingRight: 1,
3618
+ variant,
3619
+ ref,
3620
+ ...buttonProps
3621
+ }
3622
+ )),
3598
3623
  /* @__PURE__ */ React69__namespace.default.createElement(
3599
3624
  DateField,
3600
3625
  {
@@ -6512,7 +6537,7 @@ var init_Drawer = __esm({
6512
6537
  /* @__PURE__ */ React69__namespace.default.createElement(
6513
6538
  react.Center,
6514
6539
  {
6515
- background: `linear-gradient(to ${placement === "bottom" ? "bottom" : "top"}, white 0%, white 60%, transparent)`,
6540
+ background: placement === "bottom" ? "bottom" : "top",
6516
6541
  padding: 2,
6517
6542
  borderRadius: "md"
6518
6543
  },
@@ -13037,26 +13062,6 @@ var init_button2 = __esm({
13037
13062
  }
13038
13063
  }
13039
13064
  }),
13040
- /**
13041
- * @deprecated use `secondary` instead.
13042
- */
13043
- tertiary: {
13044
- backgroundColor: "mint",
13045
- color: "darkGrey",
13046
- fontWeight: "normal",
13047
- ...focusVisible({
13048
- focus: {
13049
- boxShadow: `inset 0 0 0 4px ${colors.mint}, inset 0 0 0 4px ${colors.mint}, inset 0 0 0 6px currentColor`
13050
- },
13051
- notFocus: { boxShadow: "none" }
13052
- }),
13053
- _hover: {
13054
- backgroundColor: "seaMist"
13055
- },
13056
- _active: {
13057
- backgroundColor: "lightGrey"
13058
- }
13059
- },
13060
13065
  additional: (props) => ({
13061
13066
  backgroundColor: "transparent",
13062
13067
  color: themeTools.mode("darkGrey", "white")(props),
@@ -13722,7 +13727,7 @@ var init_close_button = __esm({
13722
13727
  }
13723
13728
  }),
13724
13729
  _hover: {
13725
- backgroundColor: themeTools.mode("seaMist", "pine")(props),
13730
+ backgroundColor: themeTools.mode("seaMist", "whiteAlpha.100")(props),
13726
13731
  _disabled: {
13727
13732
  color: "dimGrey"
13728
13733
  }
@@ -13780,6 +13785,7 @@ var init_datepicker2 = __esm({
13780
13785
  "wrapper",
13781
13786
  "calendarTriggerButton",
13782
13787
  "arrow",
13788
+ "calendarPopover",
13783
13789
  "calendar",
13784
13790
  "weekdays",
13785
13791
  "weekend",
@@ -13804,36 +13810,10 @@ var init_datepicker2 = __esm({
13804
13810
  paddingY: 0.5,
13805
13811
  alignItems: "center",
13806
13812
  _hover: {
13807
- boxShadow: getBoxShadowString({
13808
- borderColor: themeTools.mode("darkGrey", "white")(props),
13809
- borderWidth: 2
13810
- }),
13811
13813
  zIndex: zIndices2.docked
13812
13814
  },
13813
- _focusWithin: {
13814
- boxShadow: getBoxShadowString({
13815
- borderColor: themeTools.mode("greenHaze", "azure")(props),
13816
- borderWidth: 2
13817
- })
13818
- },
13819
- _invalid: {
13820
- boxShadow: getBoxShadowString({
13821
- borderColor: "brightRed",
13822
- borderWidth: 2
13823
- })
13824
- },
13825
13815
  _disabled: {
13826
- pointerEvents: "none",
13827
- boxShadow: getBoxShadowString({
13828
- borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
13829
- borderWidth: 1
13830
- }),
13831
- _focus: {
13832
- boxShadow: getBoxShadowString({
13833
- borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
13834
- borderWidth: 1
13835
- })
13836
- }
13816
+ pointerEvents: "none"
13837
13817
  }
13838
13818
  },
13839
13819
  inputLabel: {
@@ -13895,12 +13875,13 @@ var init_datepicker2 = __esm({
13895
13875
  arrow: {
13896
13876
  [$arrowBackground.variable]: themeTools.mode("white", colors.night)(props)
13897
13877
  },
13898
- calendar: {
13878
+ calendarPopover: {
13899
13879
  backgroundColor: themeTools.mode("white", "night")(props),
13900
13880
  color: themeTools.mode("darkGrey", "white")(props),
13901
13881
  boxShadow: getBoxShadowString({
13902
13882
  borderWidth: 2,
13903
- borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props)
13883
+ borderColor: themeTools.mode("blackAlpha.200", "whiteAlpha.200")(props),
13884
+ baseShadow: "md"
13904
13885
  })
13905
13886
  },
13906
13887
  weekdays: {
@@ -13984,6 +13965,41 @@ var init_datepicker2 = __esm({
13984
13965
  }),
13985
13966
  variants: {
13986
13967
  base: (props) => ({
13968
+ wrapper: {
13969
+ boxShadow: getBoxShadowString({
13970
+ borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props)
13971
+ }),
13972
+ _hover: {
13973
+ boxShadow: getBoxShadowString({
13974
+ borderColor: themeTools.mode("darkGrey", "white")(props),
13975
+ borderWidth: 2
13976
+ })
13977
+ },
13978
+ _focusWithin: {
13979
+ boxShadow: getBoxShadowString({
13980
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
13981
+ borderWidth: 2
13982
+ })
13983
+ },
13984
+ _invalid: {
13985
+ boxShadow: getBoxShadowString({
13986
+ borderColor: "brightRed",
13987
+ borderWidth: 2
13988
+ })
13989
+ },
13990
+ _disabled: {
13991
+ boxShadow: getBoxShadowString({
13992
+ borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
13993
+ borderWidth: 1
13994
+ }),
13995
+ _focus: {
13996
+ boxShadow: getBoxShadowString({
13997
+ borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
13998
+ borderWidth: 1
13999
+ })
14000
+ }
14001
+ }
14002
+ },
13987
14003
  calendar: {
13988
14004
  backgroundColor: themeTools.mode("white", "night")(props),
13989
14005
  color: themeTools.mode("darkGrey", "white")(props),
@@ -14006,6 +14022,47 @@ var init_datepicker2 = __esm({
14006
14022
  }
14007
14023
  }),
14008
14024
  floating: (props) => ({
14025
+ wrapper: {
14026
+ boxShadow: getBoxShadowString({
14027
+ borderColor: themeTools.mode("blackAlpha.400", "whiteAlpha.400")(props),
14028
+ baseShadow: "sm"
14029
+ }),
14030
+ _hover: {
14031
+ boxShadow: getBoxShadowString({
14032
+ borderColor: themeTools.mode("darkGrey", "white")(props),
14033
+ borderWidth: 2,
14034
+ baseShadow: "sm"
14035
+ })
14036
+ },
14037
+ _focusWithin: {
14038
+ boxShadow: getBoxShadowString({
14039
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
14040
+ borderWidth: 2,
14041
+ baseShadow: "sm"
14042
+ })
14043
+ },
14044
+ _invalid: {
14045
+ boxShadow: getBoxShadowString({
14046
+ borderColor: "brightRed",
14047
+ borderWidth: 2,
14048
+ baseShadow: "sm"
14049
+ })
14050
+ },
14051
+ _disabled: {
14052
+ boxShadow: getBoxShadowString({
14053
+ borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
14054
+ borderWidth: 1,
14055
+ baseShadow: "sm"
14056
+ }),
14057
+ _focus: {
14058
+ boxShadow: getBoxShadowString({
14059
+ borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
14060
+ borderWidth: 1,
14061
+ baseShadow: "sm"
14062
+ })
14063
+ }
14064
+ }
14065
+ },
14009
14066
  calendar: {
14010
14067
  backgroundColor: themeTools.mode("white", "night")(props),
14011
14068
  color: themeTools.mode("darkGrey", "white")(props),
@@ -14022,13 +14079,43 @@ var init_datepicker2 = __esm({
14022
14079
  }
14023
14080
  }),
14024
14081
  ghost: (props) => ({
14082
+ wrapper: {
14083
+ boxShadow: "none",
14084
+ _hover: {
14085
+ boxShadow: getBoxShadowString({
14086
+ borderColor: themeTools.mode("darkGrey", "white")(props),
14087
+ borderWidth: 2
14088
+ })
14089
+ },
14090
+ _focusWithin: {
14091
+ boxShadow: getBoxShadowString({
14092
+ borderColor: themeTools.mode("greenHaze", "azure")(props),
14093
+ borderWidth: 2
14094
+ })
14095
+ },
14096
+ _invalid: {
14097
+ boxShadow: getBoxShadowString({
14098
+ borderColor: "brightRed",
14099
+ borderWidth: 2
14100
+ })
14101
+ },
14102
+ _disabled: {
14103
+ boxShadow: getBoxShadowString({
14104
+ borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
14105
+ borderWidth: 1
14106
+ }),
14107
+ _focus: {
14108
+ boxShadow: getBoxShadowString({
14109
+ borderColor: themeTools.mode("osloGrey", "whiteAlpha.400")(props),
14110
+ borderWidth: 1
14111
+ })
14112
+ }
14113
+ }
14114
+ },
14025
14115
  calendar: {
14026
14116
  backgroundColor: themeTools.mode("white", "night")(props),
14027
14117
  color: themeTools.mode("darkGrey", "white")(props),
14028
- boxShadow: getBoxShadowString({
14029
- borderWidth: 2,
14030
- borderColor: themeTools.mode("", "")(props)
14031
- })
14118
+ boxShadow: "none"
14032
14119
  },
14033
14120
  dateCell: {
14034
14121
  color: themeTools.mode("darkGrey", "white")(props),
@@ -14036,7 +14123,7 @@ var init_datepicker2 = __esm({
14036
14123
  backgroundColor: themeTools.mode("seaMist", "pine")(props)
14037
14124
  },
14038
14125
  _selected: {
14039
- backgroundColor: themeTools.mode("", "primaryGreen")(props),
14126
+ backgroundColor: themeTools.mode("transparent", "primaryGreen")(props),
14040
14127
  color: "darkGrey"
14041
14128
  }
14042
14129
  }
@@ -14114,7 +14201,8 @@ var init_drawer = __esm({
14114
14201
  baseStyle: (props) => ({
14115
14202
  overlay: {
14116
14203
  backgroundColor: "blackAlpha.600",
14117
- zIndex: "modal"
14204
+ zIndex: "modal",
14205
+ color: "red"
14118
14206
  },
14119
14207
  dialogContainer: {
14120
14208
  display: "flex",
@@ -14124,8 +14212,8 @@ var init_drawer = __esm({
14124
14212
  overflow: props.scrollBehavior === "inside" ? "hidden" : "auto"
14125
14213
  },
14126
14214
  dialog: {
14127
- background: "white",
14128
- color: "inherit",
14215
+ backgroundColor: themeTools.mode("white", "pine")(props),
14216
+ color: themeTools.mode("inherit", "white")(props),
14129
14217
  zIndex: "modal",
14130
14218
  maxHeight: props.scrollBehavior === "inside" ? "calc(100% - 7.5rem)" : void 0,
14131
14219
  boxShadow: "md"
@@ -15149,47 +15237,6 @@ var init_link2 = __esm({
15149
15237
  backgroundColor: themeTools.mode("mint", "whiteAlpha.100")(props),
15150
15238
  color: themeTools.mode("darkGrey", "white")(props)
15151
15239
  }
15152
- }),
15153
- /**
15154
- * @deprecated tertiary style will be deprecated in the future.
15155
- * Please use the secondary style instead.
15156
- */
15157
- tertiary: (props) => ({
15158
- color: "white",
15159
- ...focusVisible({
15160
- focus: {
15161
- color: "pine",
15162
- backgroundColor: "white",
15163
- boxShadow: getBoxShadowString({
15164
- borderColor: "white",
15165
- borderWidth: 3,
15166
- isInset: false
15167
- })
15168
- },
15169
- notFocus: {
15170
- color: "white",
15171
- boxShadow: "none",
15172
- backgroundColor: "transparent"
15173
- }
15174
- }),
15175
- _hover: {
15176
- color: "white",
15177
- backgroundColor: "whiteAlpha.200",
15178
- boxShadow: getBoxShadowString({
15179
- borderColor: props.theme.colors.whiteAlpha[200],
15180
- borderWidth: 3,
15181
- isInset: false
15182
- })
15183
- },
15184
- _active: {
15185
- color: "white",
15186
- backgroundColor: "whiteAlpha.400",
15187
- boxShadow: getBoxShadowString({
15188
- borderColor: props.theme.colors.whiteAlpha[400],
15189
- borderWidth: 3,
15190
- isInset: false
15191
- })
15192
- }
15193
15240
  })
15194
15241
  },
15195
15242
  defaultProps: {
@@ -15450,7 +15497,7 @@ var init_modal2 = __esm({
15450
15497
  },
15451
15498
  dialog: {
15452
15499
  borderRadius: "md",
15453
- background: themeTools.mode("white", "night")(props),
15500
+ background: themeTools.mode("white", "pine")(props),
15454
15501
  color: themeTools.mode("inherit", "white")(props),
15455
15502
  my: "3.75rem",
15456
15503
  zIndex: "modal",
@@ -15505,17 +15552,19 @@ var $popperBg2, $arrowBg3, $arrowShadowColor2, helpers18, config27, popover_defa
15505
15552
  var init_popover2 = __esm({
15506
15553
  "src/theme/components/popover.ts"() {
15507
15554
  init_dist4();
15555
+ init_box_shadow_utils();
15556
+ init_focus_utils();
15508
15557
  $popperBg2 = themeTools.cssVar("popper-bg");
15509
15558
  $arrowBg3 = themeTools.cssVar("popper-arrow-bg");
15510
15559
  $arrowShadowColor2 = themeTools.cssVar("popper-arrow-shadow-color");
15511
15560
  helpers18 = react.createMultiStyleConfigHelpers(popoverAnatomy.keys);
15512
15561
  config27 = helpers18.defineMultiStyleConfig({
15513
- baseStyle: {
15562
+ baseStyle: (props) => ({
15514
15563
  popper: {
15515
15564
  zIndex: "popover"
15516
15565
  },
15517
15566
  content: {
15518
- [$popperBg2.variable]: `colors.darkTeal`,
15567
+ [$popperBg2.variable]: themeTools.mode(`colors.darkTeal`, `colors.pine`)(props),
15519
15568
  backgroundColor: $popperBg2.reference,
15520
15569
  [$arrowBg3.variable]: $popperBg2.reference,
15521
15570
  [$arrowShadowColor2.variable]: `colors.blackAlpha.300`,
@@ -15536,6 +15585,19 @@ var init_popover2 = __esm({
15536
15585
  },
15537
15586
  closeButton: {
15538
15587
  position: "absolute",
15588
+ color: "white",
15589
+ hover: "whiteAlpha.100",
15590
+ ...focusVisible({
15591
+ focus: {
15592
+ boxShadow: getBoxShadowString({ borderColor: "azure" })
15593
+ },
15594
+ notFocus: {
15595
+ boxShadow: "none"
15596
+ }
15597
+ }),
15598
+ _active: {
15599
+ backgroundColor: "whiteAlpha.200"
15600
+ },
15539
15601
  borderRadius: "xs",
15540
15602
  top: 1,
15541
15603
  insetEnd: 1,
@@ -15543,7 +15605,7 @@ var init_popover2 = __esm({
15543
15605
  height: 2,
15544
15606
  padding: 1
15545
15607
  }
15546
- },
15608
+ }),
15547
15609
  sizes: {
15548
15610
  sm: {
15549
15611
  content: {
@@ -17283,6 +17345,10 @@ Object.defineProperty(exports, 'PopoverTrigger', {
17283
17345
  enumerable: true,
17284
17346
  get: function () { return react.PopoverTrigger; }
17285
17347
  });
17348
+ Object.defineProperty(exports, 'Portal', {
17349
+ enumerable: true,
17350
+ get: function () { return react.Portal; }
17351
+ });
17286
17352
  Object.defineProperty(exports, 'ScaleFade', {
17287
17353
  enumerable: true,
17288
17354
  get: function () { return react.ScaleFade; }
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-HCSXVAA5.mjs';
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, Portal, 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-3SY4N6MP.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "3.8.1",
3
+ "version": "4.0.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -28,8 +28,6 @@ export type ButtonProps = Exclude<
28
28
  | "control"
29
29
  | "primary"
30
30
  | "secondary"
31
- /** @deprecated Use `secondary` instead */
32
- | "tertiary"
33
31
  | "additional"
34
32
  | "ghost"
35
33
  | "floating";
@@ -42,8 +40,7 @@ export type ButtonProps = Exclude<
42
40
  * - `control`: This button is used for ticket controls only.
43
41
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
44
42
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
45
- * - `tertiary`: Used for non-essential actions, as well as in combination with the primary button.
46
- * - `additional`: Used for additional choices, like a less important tertiary action.
43
+ * - `additional`: Used for additional choices, like a less important secondary action.
47
44
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
48
45
  * - `floating`: Used for floating actions, like a menu button in a menu.
49
46
  *
@@ -56,7 +53,7 @@ export type ButtonProps = Exclude<
56
53
  * There are also different sizes. You can specify which one you want with the `size` prop. The available sizes are "lg", "md", "sm" and "xs".
57
54
  *
58
55
  * ```tsx
59
- * <Button variant="tertiary" size="sm" onClick={cancelOrder}>
56
+ * <Button variant="secondary" size="sm" onClick={cancelOrder}>
60
57
  * Cancel trip
61
58
  * </Button>
62
59
  * ```
@@ -13,7 +13,7 @@ export type ButtonGroupProps = ChakraButtonGroupProps;
13
13
  *
14
14
  * ```tsx
15
15
  * <ButtonGroup>
16
- * <Button variant="tertiary">Cancel</Button>
16
+ * <Button variant="secondary">Cancel</Button>
17
17
  * <Button variant="primary">Save</Button>
18
18
  * </ButtonGroup>
19
19
  * ```
@@ -11,16 +11,7 @@ import React, { useEffect } from "react";
11
11
  const MotionBox = motion(Box);
12
12
 
13
13
  type FloatingActionButtonProps = BoxProps & {
14
- variant?:
15
- /** @deprecated dark is deprecated please use accent*/
16
- "green"
17
- /** @deprecated dark is deprecated please use accent*/
18
- | "light"
19
- /** @deprecated dark is deprecated please use accent*/
20
- | "dark"
21
- | "accent"
22
- | "base"
23
- | "brand"
14
+ variant?: "accent" | "base" | "brand";
24
15
  placement?: "bottom right" | "bottom left" | "top right" | "top left";
25
16
  icon: React.ReactNode;
26
17
  children: React.ReactNode;
@@ -34,7 +25,7 @@ type FloatingActionButtonProps = BoxProps & {
34
25
  *
35
26
  * ```tsx
36
27
  * <FloatingActionButton
37
- * variant="green"
28
+ * variant="accent"
38
29
  * icon={<TicketControlFill30Icon />}
39
30
  * placement="bottom right"
40
31
  * />
@@ -12,7 +12,6 @@ export type IconButtonProps = Omit<ChakraIconButtonProps, "variant"> & {
12
12
  | "control"
13
13
  | "primary"
14
14
  | "secondary"
15
- | "tertiary"
16
15
  | "additional"
17
16
  | "ghost"
18
17
  | "floating";
@@ -27,8 +26,7 @@ export type IconButtonProps = Omit<ChakraIconButtonProps, "variant"> & {
27
26
  * - `control`: This button is used for ticket controls only.
28
27
  * - `primary`: This is our main button. It's used for the main actions in a view, like a call to action. There should only be a single primary button in each view.
29
28
  * - `secondary`: Used for secondary actions in a view, and when you need to make several actions available at the same time.
30
- * - `tertiary`: Used for non-essential actions, as well as in combination with the primary button.
31
- * - `additional`: Used for additional choices, like a less important tertiary action.
29
+ * - `additional`: Used for additional choices, like a less important secondary action.
32
30
  * - `ghost`: Used inside other interactive elements, like date pickers and input fields.
33
31
  * - `floating`: Used for floating actions, like a menu button in a menu.
34
32
  *