@equinor/eds-core-react 0.20.2 → 0.20.5-dev.20220701

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.
@@ -75,8 +75,8 @@ const {
75
75
  focused: outline
76
76
  },
77
77
  clickbounds: {
78
- default__base: clicboundHeight$1,
79
- compact__standard: compactClickboundHeight$1
78
+ default__base: clicboundHeight$2,
79
+ compact__standard: compactClickboundHeight$2
80
80
  }
81
81
  } = edsTokens.tokens;
82
82
  const button = {
@@ -100,10 +100,10 @@ const button = {
100
100
  right: "var(--eds_button__padding_x, ".concat(medium$6, ")")
101
101
  },
102
102
  clickbound: {
103
- height: clicboundHeight$1,
103
+ height: clicboundHeight$2,
104
104
  width: '100%',
105
105
  offset: {
106
- top: "".concat((parseInt(clicboundHeight$1) - parseInt(buttonHeight)) / 2 + 1, "px"),
106
+ top: "".concat((parseInt(clicboundHeight$2) - parseInt(buttonHeight)) / 2 + 1, "px"),
107
107
  left: '0'
108
108
  }
109
109
  },
@@ -154,10 +154,10 @@ const button = {
154
154
  bottom: 'var(--eds_button__padding_y_compact, 0)'
155
155
  },
156
156
  clickbound: {
157
- height: compactClickboundHeight$1,
157
+ height: compactClickboundHeight$2,
158
158
  width: '100%',
159
159
  offset: {
160
- top: "".concat((parseInt(compactClickboundHeight$1) - parseInt(compactButtonHeight)) / 2 + 1, "px"),
160
+ top: "".concat((parseInt(compactClickboundHeight$2) - parseInt(compactButtonHeight)) / 2 + 1, "px"),
161
161
  left: '0'
162
162
  }
163
163
  }
@@ -419,7 +419,7 @@ const {
419
419
  }
420
420
  }
421
421
  } = edsTokens.tokens;
422
- const primary$9 = mergeDeepRight(button, {
422
+ const primary$a = mergeDeepRight(button, {
423
423
  background: primaryColor$8,
424
424
  typography: {
425
425
  color: primaryWhite
@@ -437,7 +437,7 @@ const primary$9 = mergeDeepRight(button, {
437
437
  }
438
438
  }
439
439
  });
440
- const secondary$4 = mergeDeepRight(primary$9, {
440
+ const secondary$5 = mergeDeepRight(primary$a, {
441
441
  background: secondaryColor$3,
442
442
  border: {
443
443
  color: secondaryColor$3
@@ -451,7 +451,7 @@ const secondary$4 = mergeDeepRight(primary$9, {
451
451
  }
452
452
  }
453
453
  });
454
- const danger$5 = mergeDeepRight(primary$9, {
454
+ const danger$6 = mergeDeepRight(primary$a, {
455
455
  background: dangerColor$3,
456
456
  border: {
457
457
  color: dangerColor$3
@@ -504,7 +504,7 @@ const {
504
504
  }
505
505
  }
506
506
  } = edsTokens.tokens;
507
- const primary$8 = mergeDeepRight(button, {
507
+ const primary$9 = mergeDeepRight(button, {
508
508
  typography: {
509
509
  color: primaryColor$7
510
510
  },
@@ -533,7 +533,7 @@ const primary$8 = mergeDeepRight(button, {
533
533
  }
534
534
  }
535
535
  });
536
- const secondary$3 = mergeDeepRight(primary$8, {
536
+ const secondary$4 = mergeDeepRight(primary$9, {
537
537
  typography: {
538
538
  color: secondaryColor$2
539
539
  },
@@ -552,7 +552,7 @@ const secondary$3 = mergeDeepRight(primary$8, {
552
552
  }
553
553
  }
554
554
  });
555
- const danger$4 = mergeDeepRight(primary$8, {
555
+ const danger$5 = mergeDeepRight(primary$9, {
556
556
  typography: {
557
557
  color: dangerColor$2
558
558
  },
@@ -605,7 +605,7 @@ const {
605
605
  }
606
606
  }
607
607
  } = edsTokens.tokens;
608
- const primary$7 = mergeDeepRight(button, {
608
+ const primary$8 = mergeDeepRight(button, {
609
609
  typography: {
610
610
  color: primaryColor$6
611
611
  },
@@ -624,7 +624,7 @@ const primary$7 = mergeDeepRight(button, {
624
624
  }
625
625
  }
626
626
  });
627
- const secondary$2 = mergeDeepRight(primary$7, {
627
+ const secondary$3 = mergeDeepRight(primary$8, {
628
628
  typography: {
629
629
  color: secondaryColor$1
630
630
  },
@@ -637,7 +637,7 @@ const secondary$2 = mergeDeepRight(primary$7, {
637
637
  }
638
638
  }
639
639
  });
640
- const danger$3 = mergeDeepRight(primary$7, {
640
+ const danger$4 = mergeDeepRight(primary$8, {
641
641
  typography: {
642
642
  color: dangerColor$1
643
643
  },
@@ -681,19 +681,19 @@ const {
681
681
  }
682
682
  },
683
683
  clickbounds: {
684
- default__base: clicboundHeight,
685
- compact__standard: compactClickboundHeight
684
+ default__base: clicboundHeight$1,
685
+ compact__standard: compactClickboundHeight$1
686
686
  },
687
- shape: shape$3,
687
+ shape: shape$4,
688
688
  interactions: {
689
689
  focused: {
690
690
  width: focusOutlineWidth$8
691
691
  }
692
692
  }
693
693
  } = edsTokens.tokens;
694
- const primary$6 = mergeDeepRight(button, {
695
- height: shape$3.icon_button.minHeight,
696
- width: shape$3.icon_button.minWidth,
694
+ const primary$7 = mergeDeepRight(button, {
695
+ height: shape$4.icon_button.minHeight,
696
+ width: shape$4.icon_button.minWidth,
697
697
  typography: {
698
698
  color: primaryColor$5
699
699
  },
@@ -707,10 +707,10 @@ const primary$6 = mergeDeepRight(button, {
707
707
  right: '0'
708
708
  },
709
709
  clickbound: {
710
- width: clicboundHeight,
710
+ width: clicboundHeight$1,
711
711
  offset: {
712
712
  top: '0',
713
- left: "".concat((parseInt(clicboundHeight) - parseInt(shape$3.icon_button.minWidth)) / 2, "px")
713
+ left: "".concat((parseInt(clicboundHeight$1) - parseInt(shape$4.icon_button.minWidth)) / 2, "px")
714
714
  }
715
715
  },
716
716
  states: {
@@ -735,19 +735,19 @@ const primary$6 = mergeDeepRight(button, {
735
735
  },
736
736
  modes: {
737
737
  compact: {
738
- height: shape$3._modes.compact.icon_button.minHeight,
739
- width: shape$3._modes.compact.icon_button.minWidth,
738
+ height: shape$4._modes.compact.icon_button.minHeight,
739
+ width: shape$4._modes.compact.icon_button.minWidth,
740
740
  clickbound: {
741
- width: compactClickboundHeight,
741
+ width: compactClickboundHeight$1,
742
742
  offset: {
743
743
  top: '0',
744
- left: "".concat((parseInt(compactClickboundHeight) - parseInt(shape$3._modes.compact.icon_button.minWidth)) / 2, "px")
744
+ left: "".concat((parseInt(compactClickboundHeight$1) - parseInt(shape$4._modes.compact.icon_button.minWidth)) / 2, "px")
745
745
  }
746
746
  }
747
747
  }
748
748
  }
749
749
  });
750
- const secondary$1 = mergeDeepRight(primary$6, {
750
+ const secondary$2 = mergeDeepRight(primary$7, {
751
751
  typography: {
752
752
  color: secondaryColor
753
753
  },
@@ -760,7 +760,7 @@ const secondary$1 = mergeDeepRight(primary$6, {
760
760
  }
761
761
  }
762
762
  });
763
- const danger$2 = mergeDeepRight(primary$6, {
763
+ const danger$3 = mergeDeepRight(primary$7, {
764
764
  typography: {
765
765
  color: dangerColor
766
766
  },
@@ -774,24 +774,78 @@ const danger$2 = mergeDeepRight(primary$6, {
774
774
  }
775
775
  });
776
776
 
777
+ const {
778
+ clickbounds: {
779
+ default__base: clicboundHeight,
780
+ compact__standard: compactClickboundHeight
781
+ },
782
+ shape: shape$3
783
+ } = edsTokens.tokens;
784
+ const contained_icon = {
785
+ height: shape$3.icon_button.minHeight,
786
+ width: shape$3.icon_button.minWidth,
787
+ border: {
788
+ width: '0px',
789
+ radius: '50%'
790
+ },
791
+ spacings: {
792
+ left: '0',
793
+ right: '0'
794
+ },
795
+ clickbound: {
796
+ width: clicboundHeight,
797
+ offset: {
798
+ top: '0',
799
+ left: "".concat((parseInt(clicboundHeight) - parseInt('40px')) / 2, "px")
800
+ }
801
+ },
802
+ states: {
803
+ hover: {
804
+ border: {
805
+ width: '0px',
806
+ radius: '50%'
807
+ }
808
+ }
809
+ },
810
+ modes: {
811
+ compact: {
812
+ height: shape$3._modes.compact.icon_button.minHeight,
813
+ width: shape$3._modes.compact.icon_button.minWidth,
814
+ clickbound: {
815
+ width: compactClickboundHeight,
816
+ offset: {
817
+ top: '0',
818
+ left: "".concat((parseInt(compactClickboundHeight) - parseInt(shape$3._modes.compact.icon_button.minWidth)) / 2, "px")
819
+ }
820
+ }
821
+ }
822
+ }
823
+ };
824
+ const primary$6 = mergeDeepRight(primary$a, contained_icon);
825
+ const secondary$1 = mergeDeepRight(secondary$5, contained_icon);
826
+ const danger$2 = mergeDeepRight(danger$6, contained_icon);
827
+
777
828
  const token$5 = {
778
829
  primary: {
779
- contained: primary$9,
780
- outlined: primary$8,
781
- ghost: primary$7,
782
- ghost_icon: primary$6
830
+ contained: primary$a,
831
+ outlined: primary$9,
832
+ ghost: primary$8,
833
+ ghost_icon: primary$7,
834
+ contained_icon: primary$6
783
835
  },
784
836
  secondary: {
785
- contained: secondary$4,
786
- outlined: secondary$3,
787
- ghost: secondary$2,
788
- ghost_icon: secondary$1
837
+ contained: secondary$5,
838
+ outlined: secondary$4,
839
+ ghost: secondary$3,
840
+ ghost_icon: secondary$2,
841
+ contained_icon: secondary$1
789
842
  },
790
843
  danger: {
791
- contained: danger$5,
792
- outlined: danger$4,
793
- ghost: danger$3,
794
- ghost_icon: danger$2
844
+ contained: danger$6,
845
+ outlined: danger$5,
846
+ ghost: danger$4,
847
+ ghost_icon: danger$3,
848
+ contained_icon: danger$2
795
849
  }
796
850
  };
797
851
 
@@ -860,6 +914,9 @@ const getVariant = (tokenSet, variant) => {
860
914
  case 'outlined':
861
915
  return tokenSet.outlined;
862
916
 
917
+ case 'contained_icon':
918
+ return tokenSet.contained_icon;
919
+
863
920
  case 'contained':
864
921
  default:
865
922
  return tokenSet.contained;
@@ -2720,6 +2777,7 @@ const TextField = /*#__PURE__*/react.forwardRef(function TextField(_ref, ref) {
2720
2777
  inputIcon,
2721
2778
  helperIcon,
2722
2779
  rowsMax,
2780
+ style,
2723
2781
  ...other
2724
2782
  } = _ref;
2725
2783
  const helperTextId = edsUtils.useId(null, 'helpertext');
@@ -2746,7 +2804,7 @@ const TextField = /*#__PURE__*/react.forwardRef(function TextField(_ref, ref) {
2746
2804
  const containerProps = {
2747
2805
  ref,
2748
2806
  className,
2749
- style: other.style
2807
+ style
2750
2808
  };
2751
2809
  const labelProps = {
2752
2810
  htmlFor: id,
@@ -2860,7 +2918,7 @@ const findIcon = (name, data, size) => {
2860
2918
 
2861
2919
  const Icon$2 = /*#__PURE__*/react.forwardRef(function Icon(_ref4, ref) {
2862
2920
  let {
2863
- size = 24,
2921
+ size,
2864
2922
  color = 'currentColor',
2865
2923
  name,
2866
2924
  rotation,
@@ -3518,6 +3576,12 @@ const {
3518
3576
  focused: {
3519
3577
  width: focusOutlineWidth$5
3520
3578
  }
3579
+ },
3580
+ typography: {
3581
+ navigation: {
3582
+ menu_tabs,
3583
+ menu_title
3584
+ }
3521
3585
  }
3522
3586
  } = edsTokens.tokens;
3523
3587
  const token$1 = {
@@ -3536,6 +3600,8 @@ const token$1 = {
3536
3600
  color: focusOutlineColor$5
3537
3601
  }
3538
3602
  }
3603
+ },
3604
+ typography: { ...menu_title
3539
3605
  }
3540
3606
  },
3541
3607
  tab: {
@@ -3553,7 +3619,8 @@ const token$1 = {
3553
3619
  },
3554
3620
  typography: {
3555
3621
  color: defaultColor,
3556
- textAlign: 'center'
3622
+ textAlign: 'center',
3623
+ ...menu_tabs
3557
3624
  },
3558
3625
  border: {
3559
3626
  type: 'bordergroup',
@@ -3830,7 +3897,7 @@ const StyledTab = styled__default["default"].button.attrs(_ref => {
3830
3897
  tab
3831
3898
  }
3832
3899
  } = theme;
3833
- return styled.css(["appearance:none;box-sizing:border-box;font-family:inherit;border:none;outline:none;font-size:1rem;height:", ";", " color:", ";background-color:", ";position:relative;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;scroll-snap-align:end;scroll-snap-stop:always;&:focus{outline:none;}&[data-focus],&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}@media (hover:hover) and (pointer:fine){&[data-hover],&:hover{color:", ";", "}}", " ", ""], tab.height, edsUtils.spacingsTemplate(tab.spacings), active ? tab.states.active.typography.color : tab.typography.color, tab.background, edsUtils.outlineTemplate(tab.states.focus.outline), edsUtils.outlineTemplate(tab.states.focus.outline), active ? tab.states.active.states.hover.typography.color : tab.typography.color, disabled ? styled.css(["background:", ";cursor:not-allowed;"], tab.states.disabled.background) : styled.css(["background:", ";cursor:pointer;"], tab.states.hover.background), disabled ? edsUtils.bordersTemplate(tab.states.disabled.border) : edsUtils.bordersTemplate(tab.border), active && edsUtils.bordersTemplate(tab.states.active.border));
3900
+ return styled.css(["appearance:none;box-sizing:border-box;border:none;outline:none;height:", ";", " ", " color:", ";background-color:", ";position:relative;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;scroll-snap-align:end;scroll-snap-stop:always;&:focus{outline:none;}&[data-focus],&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}@media (hover:hover) and (pointer:fine){&[data-hover],&:hover{color:", ";", "}}", " ", ""], tab.height, edsUtils.spacingsTemplate(tab.spacings), edsUtils.typographyTemplate(tab.typography), active ? tab.states.active.typography.color : tab.typography.color, tab.background, edsUtils.outlineTemplate(tab.states.focus.outline), edsUtils.outlineTemplate(tab.states.focus.outline), active ? tab.states.active.states.hover.typography.color : tab.typography.color, disabled ? styled.css(["background:", ";cursor:not-allowed;"], tab.states.disabled.background) : styled.css(["background:", ";cursor:pointer;"], tab.states.hover.background), disabled ? edsUtils.bordersTemplate(tab.states.disabled.border) : edsUtils.bordersTemplate(tab.border), active && edsUtils.bordersTemplate(tab.states.active.border));
3834
3901
  });
3835
3902
  const Tab = /*#__PURE__*/react.forwardRef(function Tab(props, ref) {
3836
3903
  return /*#__PURE__*/jsxRuntime.jsx(StyledTab, {
@@ -3875,7 +3942,7 @@ const StyledTabPanel = styled__default["default"].div.attrs(() => ({
3875
3942
  panel
3876
3943
  }
3877
3944
  } = theme;
3878
- return styled.css(["", " &:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}"], edsUtils.spacingsTemplate(panel.spacings), edsUtils.outlineTemplate(panel.states.focus.outline), edsUtils.outlineTemplate(panel.states.focus.outline));
3945
+ return styled.css(["", " ", " &:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}"], edsUtils.spacingsTemplate(panel.spacings), edsUtils.typographyTemplate(panel.typography), edsUtils.outlineTemplate(panel.states.focus.outline), edsUtils.outlineTemplate(panel.states.focus.outline));
3879
3946
  });
3880
3947
  const TabPanel = /*#__PURE__*/react.forwardRef(function TabPanel(_ref2, ref) {
3881
3948
  let { ...props
@@ -3898,10 +3965,46 @@ Tabs.Panel.displayName = 'Tabs.Panel';
3898
3965
  Tabs.List.displayName = 'Tabs.List';
3899
3966
 
3900
3967
  const {
3968
+ elevation,
3901
3969
  colors: {
3902
3970
  ui: {
3903
3971
  background__default: {
3904
3972
  rgba: background$c
3973
+ }
3974
+ }
3975
+ }
3976
+ } = edsTokens.tokens;
3977
+ const paper = {
3978
+ background: background$c
3979
+ };
3980
+
3981
+ const StyledPaper = styled__default["default"].div.withConfig({
3982
+ displayName: "Paper__StyledPaper",
3983
+ componentId: "sc-6ncnv9-0"
3984
+ })(["background:", ";box-shadow:", ";"], paper.background, _ref => {
3985
+ let {
3986
+ elevation
3987
+ } = _ref;
3988
+ return elevation;
3989
+ });
3990
+ const Paper = /*#__PURE__*/react.forwardRef(function Paper(_ref2, ref) {
3991
+ let {
3992
+ elevation: elevation$1,
3993
+ ...rest
3994
+ } = _ref2;
3995
+ const props = { ...rest,
3996
+ elevation: elevation[elevation$1] || 'none'
3997
+ };
3998
+ return /*#__PURE__*/jsxRuntime.jsx(StyledPaper, { ...props,
3999
+ ref: ref
4000
+ });
4001
+ });
4002
+
4003
+ const {
4004
+ colors: {
4005
+ ui: {
4006
+ background__default: {
4007
+ rgba: background$b
3905
4008
  },
3906
4009
  background__info: {
3907
4010
  rgba: backgroundInfo
@@ -3926,7 +4029,7 @@ const {
3926
4029
  }
3927
4030
  } = edsTokens.tokens;
3928
4031
  const primary$4 = {
3929
- background: background$c,
4032
+ background: background$b,
3930
4033
  border: {
3931
4034
  type: 'border',
3932
4035
  radius: borderRadius$8
@@ -3959,7 +4062,7 @@ var tokens$4 = /*#__PURE__*/Object.freeze({
3959
4062
  const {
3960
4063
  primary: primary$3
3961
4064
  } = tokens$4;
3962
- const StyledCard = styled__default["default"].div.withConfig({
4065
+ const StyledCard = styled__default["default"](Paper).withConfig({
3963
4066
  displayName: "Card__StyledCard",
3964
4067
  componentId: "sc-bjucjn-0"
3965
4068
  })(["width:100%;position:relative;background-color:", ";box-sizing:border-box;display:flex;flex-direction:column;grid-gap:16px;cursor:", ";", ";"], _ref => {
@@ -3977,6 +4080,7 @@ const Card$1 = /*#__PURE__*/react.forwardRef(function Card(_ref3, ref) {
3977
4080
  let {
3978
4081
  children,
3979
4082
  variant = 'default',
4083
+ elevation = 'none',
3980
4084
  onClick,
3981
4085
  ...rest
3982
4086
  } = _ref3;
@@ -3989,7 +4093,9 @@ const Card$1 = /*#__PURE__*/react.forwardRef(function Card(_ref3, ref) {
3989
4093
  cursor,
3990
4094
  ...rest
3991
4095
  };
3992
- return /*#__PURE__*/jsxRuntime.jsx(StyledCard, { ...props,
4096
+ return /*#__PURE__*/jsxRuntime.jsx(StyledCard, {
4097
+ elevation: elevation,
4098
+ ...props,
3993
4099
  onClick: onClick,
3994
4100
  children: children
3995
4101
  });
@@ -4156,7 +4262,7 @@ const topbar = {
4156
4262
  }
4157
4263
  };
4158
4264
 
4159
- const StyledTopBar = styled__default["default"].header.withConfig({
4265
+ const StyledTopBar = styled__default["default"](Paper).withConfig({
4160
4266
  displayName: "TopBar__StyledTopBar",
4161
4267
  componentId: "sc-1yj236q-0"
4162
4268
  })(_ref => {
@@ -4168,6 +4274,7 @@ const StyledTopBar = styled__default["default"].header.withConfig({
4168
4274
  const TopBar$1 = /*#__PURE__*/react.forwardRef(function TopBar(_ref2, ref) {
4169
4275
  let {
4170
4276
  children,
4277
+ elevation = 'none',
4171
4278
  ...props
4172
4279
  } = _ref2;
4173
4280
  const {
@@ -4176,10 +4283,15 @@ const TopBar$1 = /*#__PURE__*/react.forwardRef(function TopBar(_ref2, ref) {
4176
4283
  const token = edsUtils.useToken({
4177
4284
  density
4178
4285
  }, topbar);
4286
+ const rest = { ...props,
4287
+ ref
4288
+ };
4179
4289
  return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
4180
4290
  theme: token,
4181
- children: /*#__PURE__*/jsxRuntime.jsx(StyledTopBar, { ...props,
4182
- ref: ref,
4291
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledTopBar, {
4292
+ forwardedAs: 'header',
4293
+ elevation: elevation,
4294
+ ...rest,
4183
4295
  children: children
4184
4296
  })
4185
4297
  });
@@ -4241,44 +4353,6 @@ TopBar.Actions.displayName = 'Topbar.Actions';
4241
4353
  TopBar.Header.displayName = 'Topbar.Header';
4242
4354
  TopBar.CustomContent.displayName = 'Topbar.CustomContent';
4243
4355
 
4244
- const {
4245
- elevation,
4246
- colors: {
4247
- ui: {
4248
- background__default: {
4249
- rgba: background$b
4250
- }
4251
- }
4252
- }
4253
- } = edsTokens.tokens;
4254
- const paper = {
4255
- maxWidth: 'calc(100% - 32px)',
4256
- minWidth: '96px',
4257
- background: background$b
4258
- };
4259
-
4260
- const StyledPaper = styled__default["default"].div.withConfig({
4261
- displayName: "Paper__StyledPaper",
4262
- componentId: "sc-6ncnv9-0"
4263
- })(["min-width:", ";max-width:", ";background:", ";box-shadow:", ";"], paper.minWidth, paper.maxWidth, paper.background, _ref => {
4264
- let {
4265
- elevation
4266
- } = _ref;
4267
- return elevation;
4268
- });
4269
- const Paper = /*#__PURE__*/react.forwardRef(function Paper(_ref2, ref) {
4270
- let {
4271
- elevation: elevation$1,
4272
- ...rest
4273
- } = _ref2;
4274
- const props = { ...rest,
4275
- elevation: elevation[elevation$1] || 'none'
4276
- };
4277
- return /*#__PURE__*/jsxRuntime.jsx(StyledPaper, { ...props,
4278
- ref: ref
4279
- });
4280
- });
4281
-
4282
4356
  const {
4283
4357
  colors: {
4284
4358
  ui: {
@@ -6827,13 +6901,9 @@ const BannerIcon = /*#__PURE__*/react.forwardRef(function BannerIcon(_ref2, ref)
6827
6901
  });
6828
6902
  });
6829
6903
 
6830
- const StyledBanner = styled__default["default"].div.withConfig({
6831
- displayName: "Banner__StyledBanner",
6832
- componentId: "sc-1ju451i-0"
6833
- })([""]);
6834
6904
  const Content$1 = styled__default["default"].div.withConfig({
6835
6905
  displayName: "Banner__Content",
6836
- componentId: "sc-1ju451i-1"
6906
+ componentId: "sc-1ju451i-0"
6837
6907
  })(_ref => {
6838
6908
  let {
6839
6909
  theme,
@@ -6843,12 +6913,13 @@ const Content$1 = styled__default["default"].div.withConfig({
6843
6913
  });
6844
6914
  const NonMarginDivider = styled__default["default"](Divider).withConfig({
6845
6915
  displayName: "Banner__NonMarginDivider",
6846
- componentId: "sc-1ju451i-2"
6916
+ componentId: "sc-1ju451i-1"
6847
6917
  })(["margin:0;height:2px;"]);
6848
6918
  const Banner$1 = /*#__PURE__*/react.forwardRef(function Banner(_ref2, ref) {
6849
6919
  let {
6850
6920
  children,
6851
6921
  className,
6922
+ elevation = 'none',
6852
6923
  ...rest
6853
6924
  } = _ref2;
6854
6925
  const childrenWhereBannerIcon = react.Children.map(children, child => {
@@ -6867,8 +6938,9 @@ const Banner$1 = /*#__PURE__*/react.forwardRef(function Banner(_ref2, ref) {
6867
6938
  }, enabled);
6868
6939
  return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
6869
6940
  theme: token,
6870
- children: /*#__PURE__*/jsxRuntime.jsxs(StyledBanner, { ...props,
6941
+ children: /*#__PURE__*/jsxRuntime.jsxs(Paper, { ...props,
6871
6942
  className: className,
6943
+ elevation: elevation,
6872
6944
  role: "alert",
6873
6945
  children: [/*#__PURE__*/jsxRuntime.jsx(Content$1, {
6874
6946
  hasIcon: hasIcon,
@@ -10238,10 +10310,12 @@ function AutocompleteInner(props, ref) {
10238
10310
  let {
10239
10311
  selectedItem
10240
10312
  } = _ref8;
10241
-
10242
10313
  // Show all options when single select is reopened with a selected item
10243
- if (availableItems.length === 1 && selectedItem === availableItems[0]) {
10244
- setAvailableItems(options);
10314
+ const availableHash = JSON.stringify(availableItems[0]);
10315
+ const selectedsHash = JSON.stringify(selectedItem);
10316
+
10317
+ if (availableItems.length === 1 && selectedsHash === availableHash) {
10318
+ setAvailableItems(inputOptions);
10245
10319
  }
10246
10320
  },
10247
10321
  onStateChange: _ref9 => {
@@ -10301,20 +10375,25 @@ function AutocompleteInner(props, ref) {
10301
10375
  }
10302
10376
  };
10303
10377
 
10304
- if (isControlled && !multiple) {
10378
+ if (!multiple) {
10305
10379
  comboBoxProps = { ...comboBoxProps,
10306
- selectedItem: selectedOptions[0] || null,
10307
10380
  onSelectedItemChange: changes => {
10308
10381
  if (onOptionsChange) {
10309
10382
  const {
10310
10383
  selectedItem
10311
10384
  } = changes;
10312
10385
  onOptionsChange({
10313
- selectedItems: [selectedItem]
10386
+ selectedItems: selectedItem ? [selectedItem] : []
10314
10387
  });
10315
10388
  }
10316
10389
  }
10317
10390
  };
10391
+
10392
+ if (isControlled) {
10393
+ comboBoxProps = { ...comboBoxProps,
10394
+ selectedItem: selectedOptions[0] || null
10395
+ };
10396
+ }
10318
10397
  }
10319
10398
 
10320
10399
  if (multiple) {
@@ -246,10 +246,12 @@ function AutocompleteInner(props, ref) {
246
246
  let {
247
247
  selectedItem
248
248
  } = _ref8;
249
-
250
249
  // Show all options when single select is reopened with a selected item
251
- if (availableItems.length === 1 && selectedItem === availableItems[0]) {
252
- setAvailableItems(options);
250
+ const availableHash = JSON.stringify(availableItems[0]);
251
+ const selectedsHash = JSON.stringify(selectedItem);
252
+
253
+ if (availableItems.length === 1 && selectedsHash === availableHash) {
254
+ setAvailableItems(inputOptions);
253
255
  }
254
256
  },
255
257
  onStateChange: _ref9 => {
@@ -309,20 +311,25 @@ function AutocompleteInner(props, ref) {
309
311
  }
310
312
  };
311
313
 
312
- if (isControlled && !multiple) {
314
+ if (!multiple) {
313
315
  comboBoxProps = { ...comboBoxProps,
314
- selectedItem: selectedOptions[0] || null,
315
316
  onSelectedItemChange: changes => {
316
317
  if (onOptionsChange) {
317
318
  const {
318
319
  selectedItem
319
320
  } = changes;
320
321
  onOptionsChange({
321
- selectedItems: [selectedItem]
322
+ selectedItems: selectedItem ? [selectedItem] : []
322
323
  });
323
324
  }
324
325
  }
325
326
  };
327
+
328
+ if (isControlled) {
329
+ comboBoxProps = { ...comboBoxProps,
330
+ selectedItem: selectedOptions[0] || null
331
+ };
332
+ }
326
333
  }
327
334
 
328
335
  if (multiple) {
@@ -1,19 +1,16 @@
1
1
  import { forwardRef, Children, isValidElement } from 'react';
2
2
  import styled, { css, ThemeProvider } from 'styled-components';
3
3
  import { spacingsTemplate, useToken } from '@equinor/eds-utils';
4
+ import { Paper } from '../Paper/Paper.js';
4
5
  import { enabled } from './Banner.tokens.js';
5
6
  import { Divider } from '../Divider/Divider.js';
6
7
  import { BannerIcon } from './BannerIcon.js';
7
8
  import { useEds } from '../EdsProvider/eds.context.js';
8
9
  import { jsx, jsxs } from 'react/jsx-runtime';
9
10
 
10
- const StyledBanner = styled.div.withConfig({
11
- displayName: "Banner__StyledBanner",
12
- componentId: "sc-1ju451i-0"
13
- })([""]);
14
11
  const Content = styled.div.withConfig({
15
12
  displayName: "Banner__Content",
16
- componentId: "sc-1ju451i-1"
13
+ componentId: "sc-1ju451i-0"
17
14
  })(_ref => {
18
15
  let {
19
16
  theme,
@@ -23,12 +20,13 @@ const Content = styled.div.withConfig({
23
20
  });
24
21
  const NonMarginDivider = styled(Divider).withConfig({
25
22
  displayName: "Banner__NonMarginDivider",
26
- componentId: "sc-1ju451i-2"
23
+ componentId: "sc-1ju451i-1"
27
24
  })(["margin:0;height:2px;"]);
28
25
  const Banner = /*#__PURE__*/forwardRef(function Banner(_ref2, ref) {
29
26
  let {
30
27
  children,
31
28
  className,
29
+ elevation = 'none',
32
30
  ...rest
33
31
  } = _ref2;
34
32
  const childrenWhereBannerIcon = Children.map(children, child => {
@@ -47,8 +45,9 @@ const Banner = /*#__PURE__*/forwardRef(function Banner(_ref2, ref) {
47
45
  }, enabled);
48
46
  return /*#__PURE__*/jsx(ThemeProvider, {
49
47
  theme: token,
50
- children: /*#__PURE__*/jsxs(StyledBanner, { ...props,
48
+ children: /*#__PURE__*/jsxs(Paper, { ...props,
51
49
  className: className,
50
+ elevation: elevation,
52
51
  role: "alert",
53
52
  children: [/*#__PURE__*/jsx(Content, {
54
53
  hasIcon: hasIcon,
@@ -17,6 +17,9 @@ const getVariant = (tokenSet, variant) => {
17
17
  case 'outlined':
18
18
  return tokenSet.outlined;
19
19
 
20
+ case 'contained_icon':
21
+ return tokenSet.contained_icon;
22
+
20
23
  case 'contained':
21
24
  default:
22
25
  return tokenSet.contained;
@@ -0,0 +1,56 @@
1
+ import { tokens } from '@equinor/eds-tokens';
2
+ import mergeDeepRight from '../../../node_modules/.pnpm/ramda@0.28.0/node_modules/ramda/es/mergeDeepRight.js';
3
+ import { primary as primary$1, secondary as secondary$1, danger as danger$1 } from './contained.js';
4
+
5
+ const {
6
+ clickbounds: {
7
+ default__base: clicboundHeight,
8
+ compact__standard: compactClickboundHeight
9
+ },
10
+ shape
11
+ } = tokens;
12
+ const contained_icon = {
13
+ height: shape.icon_button.minHeight,
14
+ width: shape.icon_button.minWidth,
15
+ border: {
16
+ width: '0px',
17
+ radius: '50%'
18
+ },
19
+ spacings: {
20
+ left: '0',
21
+ right: '0'
22
+ },
23
+ clickbound: {
24
+ width: clicboundHeight,
25
+ offset: {
26
+ top: '0',
27
+ left: "".concat((parseInt(clicboundHeight) - parseInt('40px')) / 2, "px")
28
+ }
29
+ },
30
+ states: {
31
+ hover: {
32
+ border: {
33
+ width: '0px',
34
+ radius: '50%'
35
+ }
36
+ }
37
+ },
38
+ modes: {
39
+ compact: {
40
+ height: shape._modes.compact.icon_button.minHeight,
41
+ width: shape._modes.compact.icon_button.minWidth,
42
+ clickbound: {
43
+ width: compactClickboundHeight,
44
+ offset: {
45
+ top: '0',
46
+ left: "".concat((parseInt(compactClickboundHeight) - parseInt(shape._modes.compact.icon_button.minWidth)) / 2, "px")
47
+ }
48
+ }
49
+ }
50
+ }
51
+ };
52
+ const primary = mergeDeepRight(primary$1, contained_icon);
53
+ const secondary = mergeDeepRight(secondary$1, contained_icon);
54
+ const danger = mergeDeepRight(danger$1, contained_icon);
55
+
56
+ export { danger, primary, secondary };
@@ -2,25 +2,29 @@ import { primary, secondary, danger } from './contained.js';
2
2
  import { primary as primary$1, secondary as secondary$1, danger as danger$1 } from './outlined.js';
3
3
  import { primary as primary$2, secondary as secondary$2, danger as danger$2 } from './ghost.js';
4
4
  import { primary as primary$3, secondary as secondary$3, danger as danger$3 } from './icon.js';
5
+ import { primary as primary$4, secondary as secondary$4, danger as danger$4 } from './contained_icon.js';
5
6
 
6
7
  const token = {
7
8
  primary: {
8
9
  contained: primary,
9
10
  outlined: primary$1,
10
11
  ghost: primary$2,
11
- ghost_icon: primary$3
12
+ ghost_icon: primary$3,
13
+ contained_icon: primary$4
12
14
  },
13
15
  secondary: {
14
16
  contained: secondary,
15
17
  outlined: secondary$1,
16
18
  ghost: secondary$2,
17
- ghost_icon: secondary$3
19
+ ghost_icon: secondary$3,
20
+ contained_icon: secondary$4
18
21
  },
19
22
  danger: {
20
23
  contained: danger,
21
24
  outlined: danger$1,
22
25
  ghost: danger$2,
23
- ghost_icon: danger$3
26
+ ghost_icon: danger$3,
27
+ contained_icon: danger$4
24
28
  }
25
29
  };
26
30
 
@@ -1,5 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled from 'styled-components';
3
+ import { Paper } from '../Paper/Paper.js';
3
4
  import * as Card_tokens from './Card.tokens.js';
4
5
  import { bordersTemplate } from '@equinor/eds-utils';
5
6
  import { jsx } from 'react/jsx-runtime';
@@ -7,7 +8,7 @@ import { jsx } from 'react/jsx-runtime';
7
8
  const {
8
9
  primary
9
10
  } = Card_tokens;
10
- const StyledCard = styled.div.withConfig({
11
+ const StyledCard = styled(Paper).withConfig({
11
12
  displayName: "Card__StyledCard",
12
13
  componentId: "sc-bjucjn-0"
13
14
  })(["width:100%;position:relative;background-color:", ";box-sizing:border-box;display:flex;flex-direction:column;grid-gap:16px;cursor:", ";", ";"], _ref => {
@@ -25,6 +26,7 @@ const Card = /*#__PURE__*/forwardRef(function Card(_ref3, ref) {
25
26
  let {
26
27
  children,
27
28
  variant = 'default',
29
+ elevation = 'none',
28
30
  onClick,
29
31
  ...rest
30
32
  } = _ref3;
@@ -37,7 +39,9 @@ const Card = /*#__PURE__*/forwardRef(function Card(_ref3, ref) {
37
39
  cursor,
38
40
  ...rest
39
41
  };
40
- return /*#__PURE__*/jsx(StyledCard, { ...props,
42
+ return /*#__PURE__*/jsx(StyledCard, {
43
+ elevation: elevation,
44
+ ...props,
41
45
  onClick: onClick,
42
46
  children: children
43
47
  });
@@ -70,7 +70,7 @@ const findIcon = (name, data, size) => {
70
70
 
71
71
  const Icon = /*#__PURE__*/forwardRef(function Icon(_ref4, ref) {
72
72
  let {
73
- size = 24,
73
+ size,
74
74
  color = 'currentColor',
75
75
  name,
76
76
  rotation,
@@ -6,7 +6,7 @@ import { jsx } from 'react/jsx-runtime';
6
6
  const StyledPaper = styled.div.withConfig({
7
7
  displayName: "Paper__StyledPaper",
8
8
  componentId: "sc-6ncnv9-0"
9
- })(["min-width:", ";max-width:", ";background:", ";box-shadow:", ";"], paper.minWidth, paper.maxWidth, paper.background, _ref => {
9
+ })(["background:", ";box-shadow:", ";"], paper.background, _ref => {
10
10
  let {
11
11
  elevation
12
12
  } = _ref;
@@ -11,8 +11,6 @@ const {
11
11
  }
12
12
  } = tokens;
13
13
  const paper = {
14
- maxWidth: 'calc(100% - 32px)',
15
- minWidth: '96px',
16
14
  background
17
15
  };
18
16
 
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { spacingsTemplate, outlineTemplate, bordersTemplate } from '@equinor/eds-utils';
3
+ import { spacingsTemplate, typographyTemplate, outlineTemplate, bordersTemplate } from '@equinor/eds-utils';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const StyledTab = styled.button.attrs(_ref => {
@@ -29,7 +29,7 @@ const StyledTab = styled.button.attrs(_ref => {
29
29
  tab
30
30
  }
31
31
  } = theme;
32
- return css(["appearance:none;box-sizing:border-box;font-family:inherit;border:none;outline:none;font-size:1rem;height:", ";", " color:", ";background-color:", ";position:relative;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;scroll-snap-align:end;scroll-snap-stop:always;&:focus{outline:none;}&[data-focus],&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}@media (hover:hover) and (pointer:fine){&[data-hover],&:hover{color:", ";", "}}", " ", ""], tab.height, spacingsTemplate(tab.spacings), active ? tab.states.active.typography.color : tab.typography.color, tab.background, outlineTemplate(tab.states.focus.outline), outlineTemplate(tab.states.focus.outline), active ? tab.states.active.states.hover.typography.color : tab.typography.color, disabled ? css(["background:", ";cursor:not-allowed;"], tab.states.disabled.background) : css(["background:", ";cursor:pointer;"], tab.states.hover.background), disabled ? bordersTemplate(tab.states.disabled.border) : bordersTemplate(tab.border), active && bordersTemplate(tab.states.active.border));
32
+ return css(["appearance:none;box-sizing:border-box;border:none;outline:none;height:", ";", " ", " color:", ";background-color:", ";position:relative;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;scroll-snap-align:end;scroll-snap-stop:always;&:focus{outline:none;}&[data-focus],&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}@media (hover:hover) and (pointer:fine){&[data-hover],&:hover{color:", ";", "}}", " ", ""], tab.height, spacingsTemplate(tab.spacings), typographyTemplate(tab.typography), active ? tab.states.active.typography.color : tab.typography.color, tab.background, outlineTemplate(tab.states.focus.outline), outlineTemplate(tab.states.focus.outline), active ? tab.states.active.states.hover.typography.color : tab.typography.color, disabled ? css(["background:", ";cursor:not-allowed;"], tab.states.disabled.background) : css(["background:", ";cursor:pointer;"], tab.states.hover.background), disabled ? bordersTemplate(tab.states.disabled.border) : bordersTemplate(tab.border), active && bordersTemplate(tab.states.active.border));
33
33
  });
34
34
  const Tab = /*#__PURE__*/forwardRef(function Tab(props, ref) {
35
35
  return /*#__PURE__*/jsx(StyledTab, {
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { spacingsTemplate, outlineTemplate } from '@equinor/eds-utils';
3
+ import { spacingsTemplate, typographyTemplate, outlineTemplate } from '@equinor/eds-utils';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const StyledTabPanel = styled.div.attrs(() => ({
@@ -18,7 +18,7 @@ const StyledTabPanel = styled.div.attrs(() => ({
18
18
  panel
19
19
  }
20
20
  } = theme;
21
- return css(["", " &:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}"], spacingsTemplate(panel.spacings), outlineTemplate(panel.states.focus.outline), outlineTemplate(panel.states.focus.outline));
21
+ return css(["", " ", " &:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}"], spacingsTemplate(panel.spacings), typographyTemplate(panel.typography), outlineTemplate(panel.states.focus.outline), outlineTemplate(panel.states.focus.outline));
22
22
  });
23
23
  const TabPanel = /*#__PURE__*/forwardRef(function TabPanel(_ref2, ref) {
24
24
  let { ...props
@@ -39,6 +39,12 @@ const {
39
39
  focused: {
40
40
  width: focusOutlineWidth
41
41
  }
42
+ },
43
+ typography: {
44
+ navigation: {
45
+ menu_tabs,
46
+ menu_title
47
+ }
42
48
  }
43
49
  } = tokens;
44
50
  const token = {
@@ -57,6 +63,8 @@ const token = {
57
63
  color: focusOutlineColor
58
64
  }
59
65
  }
66
+ },
67
+ typography: { ...menu_title
60
68
  }
61
69
  },
62
70
  tab: {
@@ -74,7 +82,8 @@ const token = {
74
82
  },
75
83
  typography: {
76
84
  color: defaultColor,
77
- textAlign: 'center'
85
+ textAlign: 'center',
86
+ ...menu_tabs
78
87
  },
79
88
  border: {
80
89
  type: 'bordergroup',
@@ -29,6 +29,7 @@ const TextField = /*#__PURE__*/forwardRef(function TextField(_ref, ref) {
29
29
  inputIcon,
30
30
  helperIcon,
31
31
  rowsMax,
32
+ style,
32
33
  ...other
33
34
  } = _ref;
34
35
  const helperTextId = useId(null, 'helpertext');
@@ -55,7 +56,7 @@ const TextField = /*#__PURE__*/forwardRef(function TextField(_ref, ref) {
55
56
  const containerProps = {
56
57
  ref,
57
58
  className,
58
- style: other.style
59
+ style
59
60
  };
60
61
  const labelProps = {
61
62
  htmlFor: id,
@@ -1,11 +1,12 @@
1
1
  import { forwardRef } from 'react';
2
2
  import styled, { css, ThemeProvider } from 'styled-components';
3
3
  import { bordersTemplate, spacingsTemplate, typographyTemplate, useToken } from '@equinor/eds-utils';
4
+ import { Paper } from '../Paper/Paper.js';
4
5
  import { topbar } from './TopBar.tokens.js';
5
6
  import { useEds } from '../EdsProvider/eds.context.js';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
8
- const StyledTopBar = styled.header.withConfig({
9
+ const StyledTopBar = styled(Paper).withConfig({
9
10
  displayName: "TopBar__StyledTopBar",
10
11
  componentId: "sc-1yj236q-0"
11
12
  })(_ref => {
@@ -17,6 +18,7 @@ const StyledTopBar = styled.header.withConfig({
17
18
  const TopBar = /*#__PURE__*/forwardRef(function TopBar(_ref2, ref) {
18
19
  let {
19
20
  children,
21
+ elevation = 'none',
20
22
  ...props
21
23
  } = _ref2;
22
24
  const {
@@ -25,10 +27,15 @@ const TopBar = /*#__PURE__*/forwardRef(function TopBar(_ref2, ref) {
25
27
  const token = useToken({
26
28
  density
27
29
  }, topbar);
30
+ const rest = { ...props,
31
+ ref
32
+ };
28
33
  return /*#__PURE__*/jsx(ThemeProvider, {
29
34
  theme: token,
30
- children: /*#__PURE__*/jsx(StyledTopBar, { ...props,
31
- ref: ref,
35
+ children: /*#__PURE__*/jsx(StyledTopBar, {
36
+ forwardedAs: 'header',
37
+ elevation: elevation,
38
+ ...rest,
32
39
  children: children
33
40
  })
34
41
  });
@@ -1,7 +1,12 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ import type { Elevations } from '@equinor/eds-tokens';
3
+ declare type AvailableElevations = keyof Pick<Elevations, 'none' | 'raised' | 'overlay'>;
2
4
  export declare type BannerProps = {
5
+ elevation?: AvailableElevations;
3
6
  children: ReactNode;
4
7
  } & HTMLAttributes<HTMLDivElement>;
5
8
  export declare const Banner: import("react").ForwardRefExoticComponent<{
9
+ elevation?: AvailableElevations;
6
10
  children: ReactNode;
7
11
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -1,9 +1,11 @@
1
1
  import { ElementType, ButtonHTMLAttributes } from 'react';
2
+ declare type Colors = 'primary' | 'secondary' | 'danger';
3
+ declare type Variants = 'contained' | 'contained_icon' | 'outlined' | 'ghost' | 'ghost_icon';
2
4
  export declare type ButtonProps = {
3
5
  /** Specifies color */
4
- color?: 'primary' | 'secondary' | 'danger';
6
+ color?: Colors;
5
7
  /** Specifies which variant to use */
6
- variant?: 'contained' | 'outlined' | 'ghost' | 'ghost_icon';
8
+ variant?: Variants;
7
9
  /**
8
10
  * URL link destination
9
11
  * If defined, an 'a' element is used as root instead of 'button'
@@ -22,9 +24,9 @@ export declare type ButtonProps = {
22
24
  } & ButtonHTMLAttributes<HTMLButtonElement>;
23
25
  export declare const Button: import("react").ForwardRefExoticComponent<{
24
26
  /** Specifies color */
25
- color?: 'primary' | 'secondary' | 'danger';
27
+ color?: Colors;
26
28
  /** Specifies which variant to use */
27
- variant?: 'contained' | 'outlined' | 'ghost' | 'ghost_icon';
29
+ variant?: Variants;
28
30
  /**
29
31
  * URL link destination
30
32
  * If defined, an 'a' element is used as root instead of 'button'
@@ -41,3 +43,4 @@ export declare const Button: import("react").ForwardRefExoticComponent<{
41
43
  /** FullWidth (stretched) button */
42
44
  fullWidth?: boolean;
43
45
  } & ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
46
+ export {};
@@ -6,6 +6,7 @@ export declare type ButtonToken = ComponentToken & {
6
6
  };
7
7
  export declare type ButtonTokenSet = {
8
8
  contained: ButtonToken;
9
+ contained_icon: ButtonToken;
9
10
  outlined: ButtonToken;
10
11
  ghost: ButtonToken;
11
12
  ghost_icon: ButtonToken;
@@ -0,0 +1,4 @@
1
+ import { ButtonToken } from '../Button.types';
2
+ export declare const primary: ButtonToken;
3
+ export declare const secondary: Partial<ButtonToken>;
4
+ export declare const danger: Partial<ButtonToken>;
@@ -1,9 +1,16 @@
1
1
  import { HTMLAttributes } from 'react';
2
+ import type { Elevations } from '@equinor/eds-tokens';
3
+ declare type AvailableElevations = keyof Pick<Elevations, 'none' | 'raised' | 'overlay'>;
2
4
  export declare type CardProps = {
3
5
  /** Variant */
4
6
  variant?: 'default' | 'info' | 'warning' | 'danger';
7
+ /** Elevation */
8
+ elevation?: AvailableElevations;
5
9
  } & HTMLAttributes<HTMLDivElement>;
6
10
  export declare const Card: import("react").ForwardRefExoticComponent<{
7
11
  /** Variant */
8
12
  variant?: 'default' | 'info' | 'warning' | 'danger';
13
+ /** Elevation */
14
+ elevation?: AvailableElevations;
9
15
  } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
16
+ export {};
@@ -21,7 +21,7 @@ export declare const StyledList: import("styled-components").StyledComponent<imp
21
21
  export declare const StyledListItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../List").ListItemProps & import("react").RefAttributes<HTMLLIElement>>, import("styled-components").DefaultTheme, StyledListItemType, never>;
22
22
  export declare const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
23
23
  color?: "primary" | "secondary" | "danger";
24
- variant?: "contained" | "outlined" | "ghost" | "ghost_icon";
24
+ variant?: "contained" | "contained_icon" | "outlined" | "ghost" | "ghost_icon";
25
25
  href?: string;
26
26
  disabled?: boolean;
27
27
  as?: import("react").ElementType<any>;
@@ -1,3 +1,10 @@
1
1
  import { HTMLAttributes } from 'react';
2
- export declare type TopbarProps = HTMLAttributes<HTMLElement>;
3
- export declare const TopBar: import("react").ForwardRefExoticComponent<TopbarProps & import("react").RefAttributes<HTMLElement>>;
2
+ import type { Elevations } from '@equinor/eds-tokens';
3
+ declare type AvailableElevations = keyof Pick<Elevations, 'none' | 'raised'>;
4
+ export declare type TopbarProps = {
5
+ elevation?: AvailableElevations;
6
+ } & HTMLAttributes<HTMLDivElement>;
7
+ export declare const TopBar: import("react").ForwardRefExoticComponent<{
8
+ elevation?: AvailableElevations;
9
+ } & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
10
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/eds-core-react",
3
- "version": "0.20.2",
3
+ "version": "0.20.5-dev.20220701",
4
4
  "description": "The React implementation of the Equinor Design System",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -86,13 +86,12 @@
86
86
  },
87
87
  "dependencies": {
88
88
  "@babel/runtime": "^7.17.9",
89
- "@equinor/eds-icons": "0.11.0",
89
+ "@equinor/eds-icons": "0.12.0",
90
90
  "@equinor/eds-tokens": "0.7.1",
91
- "@equinor/eds-utils": "0.2.2",
91
+ "@equinor/eds-utils": "0.2.3",
92
92
  "@popperjs/core": "2.9.2",
93
93
  "downshift": "^6.1.7",
94
- "react-fast-compare": "3.2.0",
95
- "react-popper": "2.2.5"
94
+ "react-fast-compare": "3.2.0"
96
95
  },
97
96
  "engines": {
98
97
  "pnpm": ">=4",
@@ -100,13 +99,13 @@
100
99
  },
101
100
  "browserslist": "defaults, not IE 11",
102
101
  "scripts": {
103
- "build": "rollup -c && tsc -p tsconfig.json",
102
+ "build": "rollup -c && tsc -p tsconfig.build.json",
104
103
  "test": "tsc -p tsconfig.test.json && jest",
105
104
  "test:watch": "tsc-watch -p tsconfig.test.json --onFirstSuccess \"jest --watch\"",
106
105
  "test:update-snapshots": "jest --updateSnapshot",
107
106
  "storybook": "start-storybook -p 9000 --ci",
108
107
  "build:storybook": "build-storybook -o storybook-build",
109
- "types": "tsc"
108
+ "types": "tsc -p tsconfig.build.json"
110
109
  },
111
110
  "module": "dist/esm/index.js"
112
111
  }