@nulogy/components 13.5.1 → 14.0.0

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.
Files changed (35) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +7 -7
  3. package/dist/main.js +181 -102
  4. package/dist/main.module.js +182 -104
  5. package/dist/src/BottomSheet/BottomSheet.parts.d.ts +4 -2
  6. package/dist/src/BottomSheet/BottomSheet.styled.d.ts +4 -2
  7. package/dist/src/DescriptionList/DescriptionList.d.ts +3 -6
  8. package/dist/src/DescriptionList/DescriptionList.parts.d.ts +14 -0
  9. package/dist/src/DescriptionList/DescriptionListContext.d.ts +16 -10
  10. package/dist/src/DescriptionList/index.d.ts +5 -4
  11. package/dist/src/DescriptionList/lib/types.d.ts +26 -0
  12. package/dist/src/DescriptionList/lib/utils.d.ts +5 -0
  13. package/dist/src/DescriptionList/stories/DescriptionList.column.story.d.ts +17 -0
  14. package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +9 -0
  15. package/dist/src/DescriptionList/stories/DescriptionList.layout.story.d.ts +17 -0
  16. package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +9 -0
  17. package/dist/src/DescriptionList/stories/DescriptionList.sizing.story.d.ts +10 -0
  18. package/dist/src/DescriptionList/stories/DescriptionList.spanning.story.d.ts +10 -0
  19. package/dist/src/DescriptionList/stories/DescriptionList.story.d.ts +8 -0
  20. package/dist/src/DescriptionList/stories/fixtures.d.ts +17 -0
  21. package/dist/src/DropdownMenu/DropdownText.d.ts +2 -1
  22. package/dist/src/FieldLabel/HelpText.d.ts +2 -1
  23. package/dist/src/Layout/Sidebar.d.ts +1 -1
  24. package/dist/src/TopBar/components/MenuItemLink.d.ts +1 -2
  25. package/dist/src/TopBar/index.d.ts +1 -0
  26. package/dist/src/Type/Headings.d.ts +8 -4
  27. package/dist/src/Type/Text.d.ts +1 -0
  28. package/dist/src/index.d.ts +3 -1
  29. package/dist/src/theme/theme.type.d.ts +1 -1
  30. package/dist/src/utils/story/code.d.ts +8 -0
  31. package/dist/src/utils/story/resizable.d.ts +18 -0
  32. package/package.json +2 -1
  33. package/dist/src/DescriptionList/DescriptionDetails.d.ts +0 -2
  34. package/dist/src/DescriptionList/DescriptionList.story.d.ts +0 -14
  35. package/dist/src/DescriptionList/DescriptionTerm.d.ts +0 -2
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { createContext, useContext, useRef, useEffect, createElement, useLayoutEffect, useCallback, useMemo, forwardRef, Fragment, Component as Component$1, useState, cloneElement, Children, isValidElement, PureComponent, useImperativeHandle } from 'react';
3
- import styled, { useTheme, createGlobalStyle, styled as styled$1, ThemeContext as ThemeContext$1, StyleSheetManager, ThemeProvider } from 'styled-components';
3
+ import styled, { useTheme, createGlobalStyle, ThemeContext as ThemeContext$1, StyleSheetManager, ThemeProvider } from 'styled-components';
4
4
  import assign$1 from 'object-assign';
5
5
  import icons from '@nulogy/icons';
6
6
  import _extends$5 from '@babel/runtime/helpers/extends';
@@ -9753,13 +9753,14 @@ var Heading1 = styled(Text).attrs(function () {
9753
9753
  displayName: "Headings__Heading1",
9754
9754
  componentId: "sc-7kwh7g-0"
9755
9755
  })(function (_ref) {
9756
- var theme = _ref.theme;
9756
+ var theme = _ref.theme,
9757
+ compact = _ref.compact;
9757
9758
  return {
9758
9759
  fontSize: theme.fontSizes.heading1,
9759
9760
  lineHeight: theme.lineHeights.heading1,
9760
9761
  fontWeight: theme.fontWeights.light,
9761
9762
  marginTop: 0,
9762
- marginBottom: theme.space.x6
9763
+ marginBottom: compact ? theme.space.none : theme.space.x6
9763
9764
  };
9764
9765
  }, variant({
9765
9766
  variants: {
@@ -9777,13 +9778,14 @@ var Heading2 = styled(Text).attrs(function () {
9777
9778
  displayName: "Headings__Heading2",
9778
9779
  componentId: "sc-7kwh7g-1"
9779
9780
  })(function (_ref2) {
9780
- var theme = _ref2.theme;
9781
+ var theme = _ref2.theme,
9782
+ compact = _ref2.compact;
9781
9783
  return {
9782
9784
  fontSize: theme.fontSizes.heading2,
9783
9785
  lineHeight: theme.lineHeights.heading2,
9784
9786
  fontWeight: theme.fontWeights.normal,
9785
9787
  marginTop: 0,
9786
- marginBottom: theme.space.x2
9788
+ marginBottom: compact ? theme.space.none : theme.space.x2
9787
9789
  };
9788
9790
  }, variant({
9789
9791
  variants: {
@@ -9801,13 +9803,14 @@ var Heading3 = styled(Text).attrs(function () {
9801
9803
  displayName: "Headings__Heading3",
9802
9804
  componentId: "sc-7kwh7g-2"
9803
9805
  })(function (_ref3) {
9804
- var theme = _ref3.theme;
9806
+ var theme = _ref3.theme,
9807
+ compact = _ref3.compact;
9805
9808
  return {
9806
9809
  fontSize: theme.fontSizes.heading3,
9807
9810
  lineHeight: theme.lineHeights.heading3,
9808
9811
  fontWeight: theme.fontWeights.medium,
9809
9812
  marginTop: 0,
9810
- marginBottom: theme.space.x1
9813
+ marginBottom: compact ? theme.space.none : theme.space.x1
9811
9814
  };
9812
9815
  }, variant({
9813
9816
  variants: {
@@ -9825,13 +9828,14 @@ var Heading4 = styled(Text).attrs(function () {
9825
9828
  displayName: "Headings__Heading4",
9826
9829
  componentId: "sc-7kwh7g-3"
9827
9830
  })(function (_ref4) {
9828
- var theme = _ref4.theme;
9831
+ var theme = _ref4.theme,
9832
+ compact = _ref4.compact;
9829
9833
  return {
9830
9834
  fontSize: theme.fontSizes.heading4,
9831
9835
  lineHeight: theme.lineHeights.heading4,
9832
9836
  fontWeight: theme.fontWeights.bold,
9833
9837
  marginTop: 0,
9834
- marginBottom: theme.space.x1
9838
+ marginBottom: compact ? theme.space.none : theme.space.x1
9835
9839
  };
9836
9840
  }, variant({
9837
9841
  variants: {
@@ -13097,7 +13101,7 @@ var IconWrapper = styled.span.withConfig({
13097
13101
  flexShrink: 0,
13098
13102
  alignItems: "center",
13099
13103
  justifyContent: "center",
13100
- borderRadius: theme.radii.pill,
13104
+ borderRadius: theme.radii.rounded,
13101
13105
  height: "calc(" + ((_a = theme.sizes[size]) !== null && _a !== void 0 ? _a : size) + " + " + theme.sizes.x1 + ")",
13102
13106
  width: "calc(" + ((_b = theme.sizes[size]) !== null && _b !== void 0 ? _b : size) + " + " + theme.sizes.x1 + ")",
13103
13107
  transition: ".2s"
@@ -13249,7 +13253,7 @@ var WrapperButton = styled.button.withConfig({
13249
13253
  color: theme.colors.black,
13250
13254
  cursor: disabled ? "arrow" : "pointer"
13251
13255
  }, _ref2["" + Icon] = {
13252
- borderRadius: theme.radii.pill,
13256
+ borderRadius: theme.radii.rounded,
13253
13257
  transition: ".2s"
13254
13258
  }, _ref2["&:hover"] = (_hover = {}, _hover["" + Icon] = {
13255
13259
  backgroundColor: theme.colors.lightGrey
@@ -13305,7 +13309,7 @@ var StyledButton$2 = styled.button.withConfig({
13305
13309
  display: "flex",
13306
13310
  alignItems: "center",
13307
13311
  padding: theme.space.half,
13308
- borderRadius: theme.radii.pill,
13312
+ borderRadius: theme.radii.rounded,
13309
13313
  color: getIconColorByState({
13310
13314
  toggled: toggled,
13311
13315
  disabled: disabled,
@@ -47881,102 +47885,142 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
47881
47885
  }, props)));
47882
47886
  });
47883
47887
 
47884
- var DescriptionListContext = /*#__PURE__*/React__default.createContext({});
47885
- var useDescriptionListContext = function useDescriptionListContext() {
47886
- return React__default.useContext(DescriptionListContext);
47887
- };
47888
- function DescriptionListProvider(_a) {
47888
+ var DescriptionListContext = /*#__PURE__*/createContext(undefined);
47889
+ var DescriptionListProvider = function DescriptionListProvider(_a) {
47889
47890
  var children = _a.children,
47890
- config = __rest$3(_a, ["children"]);
47891
+ contextProps = __rest$3(_a, ["children"]);
47891
47892
 
47892
47893
  return /*#__PURE__*/React__default.createElement(DescriptionListContext.Provider, {
47893
- value: Object.assign({}, config)
47894
+ value: contextProps
47894
47895
  }, children);
47895
- }
47896
+ };
47897
+ var useDescriptionListContext = function useDescriptionListContext() {
47898
+ var context = useContext(DescriptionListContext);
47896
47899
 
47897
- function DescriptionList(_ref) {
47898
- var _ref$descriptionTermM = _ref.descriptionTermMaxWidth,
47899
- descriptionTermMaxWidth = _ref$descriptionTermM === void 0 ? "50%" : _ref$descriptionTermM,
47900
- _ref$layout = _ref.layout,
47901
- layout = _ref$layout === void 0 ? "auto" : _ref$layout,
47902
- _ref$showDivider = _ref.showDivider,
47903
- showDivider = _ref$showDivider === void 0 ? false : _ref$showDivider,
47904
- _ref$density = _ref.density,
47905
- density = _ref$density === void 0 ? "medium" : _ref$density,
47906
- _ref$fontSize = _ref.fontSize,
47907
- fontSize = _ref$fontSize === void 0 ? "medium" : _ref$fontSize,
47908
- _ref$lineHeight = _ref.lineHeight,
47909
- lineHeight = _ref$lineHeight === void 0 ? "base" : _ref$lineHeight,
47910
- _ref$autoLayoutBreakp = _ref.autoLayoutBreakpoint,
47911
- autoLayoutBreakpoint = _ref$autoLayoutBreakp === void 0 ? "640px" : _ref$autoLayoutBreakp,
47912
- children = _ref.children;
47913
- return /*#__PURE__*/React__default.createElement(DescriptionListProvider, {
47914
- descriptionTermMaxWidth: descriptionTermMaxWidth,
47915
- layout: layout,
47916
- showDivider: showDivider,
47917
- density: density,
47918
- fontSize: fontSize,
47919
- lineHeight: lineHeight,
47920
- autoLayoutBreakpoint: autoLayoutBreakpoint
47921
- }, /*#__PURE__*/React__default.createElement(DescriptionListContainer, null, /*#__PURE__*/React__default.createElement(StyledDescriptionList, null, children)));
47900
+ if (!context) {
47901
+ throw new Error("useDescriptionListContext must be used within a DescriptionListProvider");
47902
+ }
47903
+
47904
+ return context;
47905
+ };
47906
+
47907
+ function validateAndExtractGridProps(props) {
47908
+ var columns = "columns" in props ? props.columns : undefined;
47909
+ var groupMinWidth = "groupMinWidth" in props ? props.groupMinWidth : undefined;
47910
+
47911
+ if (columns && groupMinWidth) {
47912
+ throw new Error("Please provide either a `columns` or `groupMinWidth` prop to the DescriptionList, not both.\n\nSee component documentation: https://github.com/nulogy/design-system/blob/master/src/DescriptionList/README.md");
47913
+ }
47914
+
47915
+ return {
47916
+ columns: columns,
47917
+ groupMinWidth: groupMinWidth
47918
+ };
47922
47919
  }
47920
+
47921
+ var gapConfig = {
47922
+ compact: "x0_75",
47923
+ medium: "x1_5",
47924
+ relaxed: "x3"
47925
+ };
47923
47926
  var DescriptionListContainer = styled.div.withConfig({
47924
- displayName: "DescriptionList__DescriptionListContainer",
47925
- componentId: "sc-11s88xm-0"
47927
+ displayName: "DescriptionListparts__DescriptionListContainer",
47928
+ componentId: "sc-cia3w5-0"
47926
47929
  })({
47927
47930
  containerType: "inline-size",
47928
47931
  width: "100%"
47929
47932
  });
47930
- var StyledDescriptionList = styled.dl.withConfig({
47931
- displayName: "DescriptionList__StyledDescriptionList",
47932
- componentId: "sc-11s88xm-1"
47933
- })(function (_ref2) {
47933
+ var DescriptionList$1 = styled.dl.withConfig({
47934
+ displayName: "DescriptionListparts__DescriptionList",
47935
+ componentId: "sc-cia3w5-1"
47936
+ })(function (_ref) {
47934
47937
  var _Object$assign;
47935
47938
 
47936
- var theme = _ref2.theme;
47939
+ var theme = _ref.theme;
47937
47940
 
47938
47941
  var _a, _b;
47939
47942
 
47940
47943
  var _useDescriptionListCo = useDescriptionListContext(),
47941
- descriptionTermMaxWidth = _useDescriptionListCo.descriptionTermMaxWidth,
47942
- layout = _useDescriptionListCo.layout,
47943
47944
  fontSize = _useDescriptionListCo.fontSize,
47944
47945
  lineHeight = _useDescriptionListCo.lineHeight,
47945
- autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint;
47946
+ density = _useDescriptionListCo.density,
47947
+ columns = _useDescriptionListCo.columns,
47948
+ groupMinWidth = _useDescriptionListCo.groupMinWidth;
47946
47949
 
47947
- return Object.assign(Object.assign(Object.assign({
47950
+ return Object.assign(Object.assign(Object.assign(Object.assign({
47951
+ containerType: "inline-size",
47952
+ width: "100%",
47948
47953
  margin: 0,
47949
47954
  display: "grid",
47955
+ columnGap: theme.space[gapConfig[density]],
47950
47956
  fontSize: (_a = theme.fontSizes[fontSize]) !== null && _a !== void 0 ? _a : theme.fontSizes.medium,
47951
47957
  lineHeight: (_b = theme.lineHeights[lineHeight]) !== null && _b !== void 0 ? _b : theme.lineHeights.base
47952
- }, layout === "inline" && {
47953
- gridTemplateColumns: "minmax(0, " + descriptionTermMaxWidth + ") auto"
47954
- }), (layout === "stacked" || layout === "auto") && {
47955
- gridTemplateColumns: "1fr"
47958
+ }, typeof columns === "number" && {
47959
+ gridTemplateColumns: "repeat(" + columns + ", minmax(0, 1fr))"
47956
47960
  }), (_Object$assign = {}, _Object$assign["" + Link] = {
47957
47961
  fontSize: "inherit",
47958
47962
  lineHeight: "inherit"
47959
- }, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign({}, layout === "auto" && {
47960
- gridTemplateColumns: "minmax(0, min(50%, " + descriptionTermMaxWidth + ")) auto"
47961
- }), _Object$assign));
47963
+ }, _Object$assign["" + Text] = {
47964
+ fontSize: "inherit",
47965
+ lineHeight: "inherit"
47966
+ }, _Object$assign)), groupMinWidth && {
47967
+ gridTemplateColumns: "repeat(auto-fit, minmax(" + groupMinWidth + ", 1fr))"
47968
+ }), typeof columns === "object" && Object.assign({}, Object.fromEntries(Object.entries(columns).map(function (_ref2) {
47969
+ var key = _ref2[0],
47970
+ value = _ref2[1];
47971
+ return ["@container (min-width: " + theme.breakpoints[key] + ")", {
47972
+ gridTemplateColumns: "repeat(" + value + ", minmax(0, 1fr))"
47973
+ }];
47974
+ }))));
47962
47975
  });
47976
+ var DescriptionGroup = styled.div.withConfig({
47977
+ displayName: "DescriptionListparts__DescriptionGroup",
47978
+ componentId: "sc-cia3w5-2"
47979
+ })(function (_ref3) {
47980
+ var _Object$assign2;
47963
47981
 
47964
- var DescriptionTerm = styled$1.dt.withConfig({
47965
- displayName: "DescriptionTerm",
47966
- componentId: "sc-fbwp2v-0"
47967
- })(function (_ref) {
47968
- var _Object$assign;
47982
+ var theme = _ref3.theme,
47983
+ rowSpan = _ref3.rowSpan,
47984
+ columnSpan = _ref3.columnSpan;
47969
47985
 
47970
- var theme = _ref.theme;
47986
+ var _useDescriptionListCo2 = useDescriptionListContext(),
47987
+ descriptionTermMaxWidth = _useDescriptionListCo2.descriptionTermMaxWidth,
47988
+ layout = _useDescriptionListCo2.layout,
47989
+ showDivider = _useDescriptionListCo2.showDivider,
47990
+ autoLayoutBreakpoint = _useDescriptionListCo2.autoLayoutBreakpoint;
47971
47991
 
47972
- var _useDescriptionListCo = useDescriptionListContext(),
47973
- showDivider = _useDescriptionListCo.showDivider,
47974
- density = _useDescriptionListCo.density,
47975
- layout = _useDescriptionListCo.layout,
47976
- autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint;
47992
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
47993
+ display: "grid",
47994
+ gridTemplateRows: "auto 1fr"
47995
+ }, showDivider && {
47996
+ borderBottom: "1px solid " + theme.colors.lightGrey
47997
+ }), layout === "inline" && {
47998
+ gridTemplateColumns: "minmax(0, " + descriptionTermMaxWidth + ") 1fr"
47999
+ }), (layout === "stacked" || layout === "auto") && {
48000
+ gridTemplateColumns: "1fr"
48001
+ }), columnSpan && {
48002
+ gridColumn: "span " + columnSpan + " / span " + columnSpan
48003
+ }), rowSpan && {
48004
+ gridRow: "span " + rowSpan + " / span " + rowSpan
48005
+ }), (_Object$assign2 = {}, _Object$assign2["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign({}, layout === "auto" && {
48006
+ gridTemplateColumns: "minmax(0, min(50%, " + descriptionTermMaxWidth + ")) 1fr"
48007
+ }), _Object$assign2));
48008
+ });
48009
+ var DescriptionTerm = styled.dt.withConfig({
48010
+ displayName: "DescriptionListparts__DescriptionTerm",
48011
+ componentId: "sc-cia3w5-3"
48012
+ })(function (_ref4) {
48013
+ var _Object$assign3;
48014
+
48015
+ var theme = _ref4.theme;
48016
+
48017
+ var _useDescriptionListCo3 = useDescriptionListContext(),
48018
+ showDivider = _useDescriptionListCo3.showDivider,
48019
+ layout = _useDescriptionListCo3.layout,
48020
+ density = _useDescriptionListCo3.density,
48021
+ autoLayoutBreakpoint = _useDescriptionListCo3.autoLayoutBreakpoint;
47977
48022
 
47978
48023
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
47979
- // narrow stuff + non-auto layout
47980
48024
  gridColumnStart: 1,
47981
48025
  color: theme.colors.midGrey,
47982
48026
  paddingLeft: theme.space.none,
@@ -48000,11 +48044,11 @@ var DescriptionTerm = styled$1.dt.withConfig({
48000
48044
  borderTopWidth: "1px",
48001
48045
  borderTopStyle: "solid",
48002
48046
  borderTopColor: theme.colors.lightGrey
48003
- }), (_Object$assign = {
48047
+ }), (_Object$assign3 = {
48004
48048
  "&:first-child": {
48005
48049
  border: "none"
48006
48050
  }
48007
- }, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
48051
+ }, _Object$assign3["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
48008
48052
  borderTopWidth: "1px",
48009
48053
  borderTopStyle: "solid",
48010
48054
  borderTopColor: theme.colors.lightGrey
@@ -48014,22 +48058,21 @@ var DescriptionTerm = styled$1.dt.withConfig({
48014
48058
  paddingBottom: theme.space.x0_75
48015
48059
  }), density === "relaxed" && layout !== "stacked" && {
48016
48060
  paddingBottom: theme.space.x1_5
48017
- }), _Object$assign));
48061
+ }), _Object$assign3));
48018
48062
  });
48063
+ var DescriptionDetails = styled.dd.withConfig({
48064
+ displayName: "DescriptionListparts__DescriptionDetails",
48065
+ componentId: "sc-cia3w5-4"
48066
+ })(function (_ref5) {
48067
+ var _Object$assign4;
48019
48068
 
48020
- var DescriptionDetails = styled$1.dd.withConfig({
48021
- displayName: "DescriptionDetails",
48022
- componentId: "sc-m5zvn4-0"
48023
- })(function (_ref) {
48024
- var _Object$assign;
48025
-
48026
- var theme = _ref.theme;
48069
+ var theme = _ref5.theme;
48027
48070
 
48028
- var _useDescriptionListCo = useDescriptionListContext(),
48029
- autoLayoutBreakpoint = _useDescriptionListCo.autoLayoutBreakpoint,
48030
- showDivider = _useDescriptionListCo.showDivider,
48031
- density = _useDescriptionListCo.density,
48032
- layout = _useDescriptionListCo.layout;
48071
+ var _useDescriptionListCo4 = useDescriptionListContext(),
48072
+ autoLayoutBreakpoint = _useDescriptionListCo4.autoLayoutBreakpoint,
48073
+ showDivider = _useDescriptionListCo4.showDivider,
48074
+ density = _useDescriptionListCo4.density,
48075
+ layout = _useDescriptionListCo4.layout;
48033
48076
 
48034
48077
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
48035
48078
  // narrow stuff + non-auto layout
@@ -48056,11 +48099,11 @@ var DescriptionDetails = styled$1.dd.withConfig({
48056
48099
  borderTopWidth: "1px",
48057
48100
  borderTopStyle: "solid",
48058
48101
  borderTopColor: theme.colors.lightGrey
48059
- }), (_Object$assign = {
48102
+ }), (_Object$assign4 = {
48060
48103
  "&:nth-child(2)": {
48061
48104
  border: "none"
48062
48105
  }
48063
- }, _Object$assign["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
48106
+ }, _Object$assign4["@container (min-width: " + autoLayoutBreakpoint + ")"] = Object.assign(Object.assign(Object.assign(Object.assign({}, showDivider && layout !== "stacked" && {
48064
48107
  borderTopWidth: "1px",
48065
48108
  borderTopStyle: "solid",
48066
48109
  borderTopColor: theme.colors.lightGrey
@@ -48070,9 +48113,44 @@ var DescriptionDetails = styled$1.dd.withConfig({
48070
48113
  paddingTop: theme.space.x0_75
48071
48114
  }), density === "relaxed" && layout !== "stacked" && {
48072
48115
  paddingTop: theme.space.x1_5
48073
- }), _Object$assign));
48116
+ }), _Object$assign4));
48074
48117
  });
48075
48118
 
48119
+ function DescriptionList(_a) {
48120
+ var _a$descriptionTermMax = _a.descriptionTermMaxWidth,
48121
+ descriptionTermMaxWidth = _a$descriptionTermMax === void 0 ? "320px" : _a$descriptionTermMax,
48122
+ _a$layout = _a.layout,
48123
+ layout = _a$layout === void 0 ? "stacked" : _a$layout,
48124
+ _a$autoLayoutBreakpoi = _a.autoLayoutBreakpoint,
48125
+ autoLayoutBreakpoint = _a$autoLayoutBreakpoi === void 0 ? "640px" : _a$autoLayoutBreakpoi,
48126
+ _a$showDivider = _a.showDivider,
48127
+ showDivider = _a$showDivider === void 0 ? false : _a$showDivider,
48128
+ _a$density = _a.density,
48129
+ density = _a$density === void 0 ? "medium" : _a$density,
48130
+ _a$fontSize = _a.fontSize,
48131
+ fontSize = _a$fontSize === void 0 ? "medium" : _a$fontSize,
48132
+ _a$lineHeight = _a.lineHeight,
48133
+ lineHeight = _a$lineHeight === void 0 ? "base" : _a$lineHeight,
48134
+ children = _a.children,
48135
+ props = __rest$3(_a, ["descriptionTermMaxWidth", "layout", "autoLayoutBreakpoint", "showDivider", "density", "fontSize", "lineHeight", "children"]);
48136
+
48137
+ var _validateAndExtractGr = validateAndExtractGridProps(props),
48138
+ columns = _validateAndExtractGr.columns,
48139
+ groupMinWidth = _validateAndExtractGr.groupMinWidth;
48140
+
48141
+ return /*#__PURE__*/React__default.createElement(DescriptionListProvider, {
48142
+ descriptionTermMaxWidth: descriptionTermMaxWidth,
48143
+ layout: layout,
48144
+ autoLayoutBreakpoint: autoLayoutBreakpoint,
48145
+ showDivider: showDivider,
48146
+ density: density,
48147
+ fontSize: fontSize,
48148
+ lineHeight: lineHeight,
48149
+ columns: columns,
48150
+ groupMinWidth: groupMinWidth
48151
+ }, /*#__PURE__*/React__default.createElement(DescriptionListContainer, null, /*#__PURE__*/React__default.createElement(DescriptionList$1, null, children)));
48152
+ }
48153
+
48076
48154
  var Divider$1 = styled.hr.withConfig({
48077
48155
  displayName: "Divider",
48078
48156
  componentId: "sc-1r789ib-0"
@@ -48325,7 +48403,7 @@ function Sidebar(_a) {
48325
48403
  _a$closeOnOutsideClic = _a.closeOnOutsideClick,
48326
48404
  closeOnOutsideClick = _a$closeOnOutsideClic === void 0 ? true : _a$closeOnOutsideClic,
48327
48405
  _a$overlay = _a.overlay,
48328
- overlay = _a$overlay === void 0 ? true : _a$overlay,
48406
+ overlay = _a$overlay === void 0 ? "show" : _a$overlay,
48329
48407
  _a$disableScroll = _a.disableScroll,
48330
48408
  disableScroll = _a$disableScroll === void 0 ? true : _a$disableScroll,
48331
48409
  _a$hideCloseButton = _a.hideCloseButton,
@@ -48401,9 +48479,9 @@ function Sidebar(_a) {
48401
48479
  }
48402
48480
  }
48403
48481
  };
48404
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, closeOnOutsideClick && /*#__PURE__*/React__default.createElement(AnimatePresence, null, isOpen && /*#__PURE__*/React__default.createElement(SidebarOverlay, {
48482
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, closeOnOutsideClick && /*#__PURE__*/React__default.createElement(AnimatePresence, null, isOpen && overlay !== "hide" && /*#__PURE__*/React__default.createElement(SidebarOverlay, {
48405
48483
  top: top,
48406
- transparent: !overlay,
48484
+ transparent: overlay === "transparent" || overlay === false,
48407
48485
  transitionDuration: duration,
48408
48486
  zIndex: zIndex,
48409
48487
  onClick: closeOnOutsideClick && isOpen && onClose
@@ -53583,7 +53661,7 @@ var themes = {
53583
53661
  medium: "4px",
53584
53662
  large: "8px",
53585
53663
  circle: "50%",
53586
- pill: "9999px"
53664
+ rounded: "9999px"
53587
53665
  },
53588
53666
  borders: []
53589
53667
  },
@@ -53737,7 +53815,7 @@ var themes = {
53737
53815
  medium: "4px",
53738
53816
  large: "8px",
53739
53817
  circle: "50%",
53740
- pill: "99999px"
53818
+ rounded: "9999px"
53741
53819
  },
53742
53820
  borders: []
53743
53821
  },
@@ -53891,7 +53969,7 @@ var themes = {
53891
53969
  medium: "5.6px",
53892
53970
  large: "11.2px",
53893
53971
  circle: "50%",
53894
- pill: "99999px"
53972
+ rounded: "9999px"
53895
53973
  },
53896
53974
  borders: []
53897
53975
  },
@@ -54045,7 +54123,7 @@ var themes = {
54045
54123
  medium: "3.6px",
54046
54124
  large: "7.2px",
54047
54125
  circle: "50%",
54048
- pill: "99999px"
54126
+ rounded: "9999px"
54049
54127
  },
54050
54128
  borders: []
54051
54129
  }
@@ -54602,7 +54680,7 @@ var VisualRadio = styled.div.withConfig({
54602
54680
  minWidth: theme.space.x2,
54603
54681
  height: theme.space.x2,
54604
54682
  marginRight: theme.space.x1,
54605
- borderRadius: theme.radii.pill,
54683
+ borderRadius: theme.radii.rounded,
54606
54684
  marginTop: theme.space.x0_5,
54607
54685
  border: "solid 1px",
54608
54686
  position: "relative",
@@ -54613,7 +54691,7 @@ var VisualRadio = styled.div.withConfig({
54613
54691
  width: "calc(" + theme.sizes.x1 + " - 2px)",
54614
54692
  height: "calc(" + theme.sizes.x1 + " - 2px)",
54615
54693
  background: theme.colors.white,
54616
- borderRadius: theme.radii.pill
54694
+ borderRadius: theme.radii.rounded
54617
54695
  }
54618
54696
  };
54619
54697
  }, function (_ref2) {
@@ -57415,7 +57493,7 @@ var SwitchButton = styled.button.withConfig({
57415
57493
  color: selected ? theme.colors.darkBlue : theme.colors.darkGrey,
57416
57494
  cursor: "pointer",
57417
57495
  border: "none",
57418
- borderRadius: theme.radii.pill,
57496
+ borderRadius: theme.radii.rounded,
57419
57497
  fontSize: theme.fontSizes.base,
57420
57498
  fontWeight: theme.fontWeights.medium,
57421
57499
  lineHeight: theme.lineHeights.base,
@@ -59275,4 +59353,4 @@ var VerticalDivider = styled.div.withConfig({
59275
59353
  }, addStyledProps);
59276
59354
  VerticalDivider.displayName = "VerticalDivider";
59277
59355
 
59278
- export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Banner, BottomSheet, BottomSheetParts, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DescriptionDetails, DescriptionList, DescriptionTerm, DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header$1 as Header, Heading1, Heading2, Heading3, Heading4, HelpText$1 as HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, MonthPicker, NDSProvider, NavBarBackground, NotificationTypes, Overlay$1 as Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, NDSSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, ToggleComponent as Toggle, Tooltip, TopBar, TruncatedText, VerticalDivider, WeekPicker, addStyledProps, legacy as desktop, phone, tablet, themes, toast, useMediaQuery, useWindowDimensions };
59356
+ export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Banner, BottomSheet, BottomSheetParts, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DescriptionDetails, DescriptionGroup, DescriptionList, DescriptionTerm, DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header$1 as Header, Heading1, Heading2, Heading3, Heading4, HelpText$1 as HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, MonthPicker, NDSProvider, NavBarBackground, NotificationTypes, Overlay$1 as Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, NDSSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, ToggleComponent as Toggle, Tooltip, TopBar, TruncatedText, VerticalDivider, WeekPicker, addStyledProps, legacy as desktop, phone, tablet, themes, toast, useMediaQuery, useWindowDimensions };
@@ -23,9 +23,10 @@ export declare const BottomSheetParts: {
23
23
  Sheet: typeof SheetPart;
24
24
  ContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
25
25
  Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
26
- Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "inline" | "disabled" | keyof React.HTMLAttributes<HTMLParagraphElement> | "textTransform" | keyof import("..").StyledProps> & React.HTMLAttributes<HTMLParagraphElement> & {
26
+ Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "inline" | "compact" | "disabled" | keyof React.HTMLAttributes<HTMLParagraphElement> | "textTransform" | keyof import("..").StyledProps> & React.HTMLAttributes<HTMLParagraphElement> & {
27
27
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
28
28
  inline?: boolean;
29
+ compact?: boolean;
29
30
  disabled?: boolean;
30
31
  textTransform?: "initial" | "-moz-initial" | "inherit" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
31
32
  fontSize?: string;
@@ -34,9 +35,10 @@ export declare const BottomSheetParts: {
34
35
  }, Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
35
36
  ref?: React.Ref<HTMLHeadingElement>;
36
37
  }>, never>, never>, never>> & string;
37
- HelpText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "inline" | "disabled" | keyof React.HTMLAttributes<HTMLParagraphElement> | "textTransform" | keyof import("..").StyledProps> & React.HTMLAttributes<HTMLParagraphElement> & {
38
+ HelpText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "inline" | "compact" | "disabled" | keyof React.HTMLAttributes<HTMLParagraphElement> | "textTransform" | keyof import("..").StyledProps> & React.HTMLAttributes<HTMLParagraphElement> & {
38
39
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
39
40
  inline?: boolean;
41
+ compact?: boolean;
40
42
  disabled?: boolean;
41
43
  textTransform?: "initial" | "-moz-initial" | "inherit" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
42
44
  fontSize?: string;
@@ -25,9 +25,10 @@ declare const Sheet: import("styled-components/dist/types").IStyledComponentBase
25
25
  declare const ContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
26
26
  declare const Footer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
27
27
  declare const Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
28
- declare const Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "inline" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | keyof import("../StyledProps").StyledProps> & import("react").HTMLAttributes<HTMLParagraphElement> & {
28
+ declare const Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "inline" | "compact" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | keyof import("../StyledProps").StyledProps> & import("react").HTMLAttributes<HTMLParagraphElement> & {
29
29
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
30
30
  inline?: boolean;
31
+ compact?: boolean;
31
32
  disabled?: boolean;
32
33
  textTransform?: "initial" | "inherit" | "-moz-initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
33
34
  fontSize?: string;
@@ -36,9 +37,10 @@ declare const Title: import("styled-components/dist/types").IStyledComponentBase
36
37
  }, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
37
38
  ref?: import("react").Ref<HTMLHeadingElement>;
38
39
  }>, never>, never>, never>> & string;
39
- declare const HelpText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "inline" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | keyof import("../StyledProps").StyledProps> & import("react").HTMLAttributes<HTMLParagraphElement> & {
40
+ declare const HelpText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "textTransform" | "inline" | "compact" | "disabled" | keyof import("react").HTMLAttributes<HTMLParagraphElement> | keyof import("../StyledProps").StyledProps> & import("react").HTMLAttributes<HTMLParagraphElement> & {
40
41
  variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
41
42
  inline?: boolean;
43
+ compact?: boolean;
42
44
  disabled?: boolean;
43
45
  textTransform?: "initial" | "inherit" | "-moz-initial" | "revert" | "unset" | "none" | "full-width" | "capitalize" | "full-size-kana" | "lowercase" | "uppercase";
44
46
  fontSize?: string;
@@ -1,6 +1,3 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { DescriptionListConfig } from "./DescriptionListContext";
3
- export type Props = PropsWithChildren<DescriptionListConfig>;
4
- export declare function DescriptionList({ descriptionTermMaxWidth, layout, showDivider, density, fontSize, lineHeight, autoLayoutBreakpoint, children, }: Props): React.JSX.Element;
5
- export declare const DescriptionListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
- export declare const StyledDescriptionList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>, never>> & string;
1
+ import React from "react";
2
+ import { DescriptionListProps } from "./lib/types";
3
+ export default function DescriptionList({ descriptionTermMaxWidth, layout, autoLayoutBreakpoint, showDivider, density, fontSize, lineHeight, children, ...props }: DescriptionListProps): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { BaseDescriptionListProps, Columns, GroupMinWidth } from "./lib/types";
3
+ export type DescriptionListPartsProps = BaseDescriptionListProps & {
4
+ columns?: Columns;
5
+ groupMinWidth?: GroupMinWidth;
6
+ };
7
+ export declare const DescriptionListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ export declare const DescriptionList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, never>> & string;
9
+ export declare const DescriptionGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
10
+ rowSpan?: number;
11
+ columnSpan?: number;
12
+ }>> & string;
13
+ export declare const DescriptionTerm: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
14
+ export declare const DescriptionDetails: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -1,13 +1,19 @@
1
1
  import React, { PropsWithChildren } from "react";
2
+ import { Breakpoints } from "../theme/theme.type";
2
3
  import { DefaultNDSThemeType } from "../theme";
3
- export interface DescriptionListConfig {
4
- descriptionTermMaxWidth?: string;
5
- layout?: "stacked" | "inline" | "auto";
6
- showDivider?: boolean;
7
- density?: "medium" | "compact" | "relaxed";
8
- fontSize?: keyof DefaultNDSThemeType["fontSizes"];
9
- lineHeight?: keyof DefaultNDSThemeType["lineHeights"];
10
- autoLayoutBreakpoint?: string;
4
+ import { Density } from "./lib/types";
5
+ import { Layout } from "./lib/types";
6
+ interface DescriptionListContextProps {
7
+ descriptionTermMaxWidth: string;
8
+ layout: Layout;
9
+ autoLayoutBreakpoint: string;
10
+ showDivider: boolean;
11
+ density: Density;
12
+ fontSize: keyof DefaultNDSThemeType["fontSizes"];
13
+ lineHeight: keyof DefaultNDSThemeType["lineHeights"];
14
+ columns?: number | Partial<Record<keyof Breakpoints, number>>;
15
+ groupMinWidth?: string;
11
16
  }
12
- export declare const useDescriptionListContext: () => DescriptionListConfig;
13
- export declare function DescriptionListProvider({ children, ...config }: PropsWithChildren<DescriptionListConfig>): React.JSX.Element;
17
+ export declare const DescriptionListProvider: ({ children, ...contextProps }: PropsWithChildren<DescriptionListContextProps>) => React.JSX.Element;
18
+ export declare const useDescriptionListContext: () => DescriptionListContextProps;
19
+ export {};
@@ -1,4 +1,5 @@
1
- export type { Props as DescriptionListProps } from "./DescriptionList";
2
- export { DescriptionList } from "./DescriptionList";
3
- export { DescriptionTerm } from "./DescriptionTerm";
4
- export { DescriptionDetails } from "./DescriptionDetails";
1
+ export type { DescriptionListProps } from "./lib/types";
2
+ export { default as DescriptionList } from "./DescriptionList";
3
+ export { DescriptionGroup } from "./DescriptionList.parts";
4
+ export { DescriptionTerm } from "./DescriptionList.parts";
5
+ export { DescriptionDetails } from "./DescriptionList.parts";