@surveycake/rc 3.0.0-alpha.20 → 3.0.0-alpha.24

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/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.0.0-alpha.24](https://fox.25sprout.com/surveycake/sdk/rc/compare/v3.0.0-alpha.23...v3.0.0-alpha.24) (2021-12-08)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * update VarSelect export name ([2cfcdf5](https://fox.25sprout.com/surveycake/sdk/rc/commit/2cfcdf5dd6aeaf02f7641e71e63db26845fd1e7c))
11
+
12
+ ## [3.0.0-alpha.23](https://fox.25sprout.com/surveycake/sdk/rc/compare/v3.0.0-alpha.22...v3.0.0-alpha.23) (2021-12-08)
13
+
14
+
15
+ ### Features
16
+
17
+ * VarSelect groups ([4e87e3c](https://fox.25sprout.com/surveycake/sdk/rc/commit/4e87e3c4b7c7c22665a27ec035bd9951b8b52755))
18
+
19
+ ## [3.0.0-alpha.22](https://fox.25sprout.com/surveycake/sdk/rc/compare/v3.0.0-alpha.20...v3.0.0-alpha.22) (2021-11-30)
20
+
21
+
22
+ ### Features
23
+
24
+ * set letter-spacing and text-transform of Typography to none - surveycake/pm[#5088](https://fox.25sprout.com//undefined/issues/5088) ([b1221cd](https://fox.25sprout.com/surveycake/sdk/rc/commit/b1221cdf28098b7af51ea570874e0e8495bcbd47))
25
+ * show Tooltip without delay when the element is touched - surveycake/pm[#5087](https://fox.25sprout.com//undefined/issues/5087) ([8b1756d](https://fox.25sprout.com/surveycake/sdk/rc/commit/8b1756d9209ad06fdaaa028b4bd690a565132bab))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * GroupSelect default background, default height ([76a9eb8](https://fox.25sprout.com/surveycake/sdk/rc/commit/76a9eb8ea7b6bdc42012f19d888a7446fc6470bc))
31
+
32
+ ## [3.0.0-alpha.21](https://fox.25sprout.com/surveycake/sdk/rc/compare/v3.0.0-alpha.20...v3.0.0-alpha.21) (2021-11-28)
33
+
34
+
35
+ ### Features
36
+
37
+ * set letter-spacing and text-transform of Typography to none - surveycake/pm[#5088](https://fox.25sprout.com/surveycake/pm/-/issues/5088) ([b1221cd](https://fox.25sprout.com/surveycake/sdk/rc/commit/b1221cdf28098b7af51ea570874e0e8495bcbd47))
38
+ * show Tooltip without delay when the element is touched - surveycake/pm[#5087](https://fox.25sprout.com/surveycake/pm/-/issues/5087) ([8b1756d](https://fox.25sprout.com/surveycake/sdk/rc/commit/8b1756d9209ad06fdaaa028b4bd690a565132bab))
39
+
5
40
  ## [3.0.0-alpha.20](https://fox.25sprout.com/surveycake/sdk/rc/compare/v3.0.0-alpha.19...v3.0.0-alpha.20) (2021-11-26)
6
41
 
7
42
 
@@ -2,3 +2,4 @@ import { Story, Meta } from '@storybook/react';
2
2
  declare const _default: Meta<import("@storybook/react").Args>;
3
3
  export default _default;
4
4
  export declare const Base: Story;
5
+ export declare const Groups: Story;
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { SelectProps } from '../Select';
3
+ declare type MenuItemOption = {
4
+ value?: string | number;
5
+ children?: string | ReactNode;
6
+ emptyLabel?: string | ReactNode;
7
+ };
8
+ export declare type Option = {
9
+ optionType: 'root' | 'var' | 'container';
10
+ children?: string | ReactNode;
11
+ value?: string | number;
12
+ };
13
+ export declare type MenuGroups = {
14
+ optionType: 'container' | 'root' | 'var';
15
+ groupTitle: string;
16
+ options: MenuItemOption[];
17
+ };
18
+ interface VarSelectProps extends SelectProps {
19
+ /**
20
+ * Data structure required by VarSelect
21
+ */
22
+ groups?: MenuGroups[];
23
+ options?: Option[];
24
+ }
25
+ declare const VarSelect: React.ForwardRefExoticComponent<Pick<VarSelectProps, "classes" | "disabled" | "value" | "onChange" | "error" | "multiline" | "fullWidth" | "input" | "children" | "onKeyUp" | "onKeyDown" | "onBlur" | "onFocus" | "defaultValue" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "autoComplete" | "autoFocus" | "endAdornment" | "inputComponent" | "inputProps" | "inputRef" | "margin" | "name" | "readOnly" | "required" | "renderSuffix" | "rows" | "rowsMax" | "rowsMin" | "maxRows" | "minRows" | "startAdornment" | "type" | "innerRef" | "disableUnderline" | "groups" | "options" | "autoWidth" | "displayEmpty" | "IconComponent" | "label" | "labelId" | "labelWidth" | "MenuProps" | "multiple" | "native" | "onClose" | "onOpen" | "open" | "renderValue" | "SelectDisplayProps" | "variant"> & React.RefAttributes<HTMLDivElement>>;
26
+ export default VarSelect;
File without changes
@@ -17,7 +17,7 @@ export { default as FormControlLabel } from './FormControlLabel';
17
17
  export { default as FormGroup } from './FormGroup';
18
18
  export { default as FormHelperText } from './FormHelperText';
19
19
  export { default as FormLabel } from './FormLabel';
20
- export { default as GroupSelect } from './GroupSelect';
20
+ export { default as VarSelect } from './VarSelect';
21
21
  export { default as IconButton } from './IconButton';
22
22
  export { default as Link } from './Link';
23
23
  export { default as LoadingButton } from './LoadingButton';
@@ -166,62 +166,86 @@ styles$5.createTheme({
166
166
  h1: {
167
167
  fontSize: '2rem',
168
168
  fontWeight: 500,
169
- lineHeight: 1.6
169
+ lineHeight: 1.6,
170
+ letterSpacing: 0,
171
+ textTransform: 'none'
170
172
  },
171
173
  h2: {
172
174
  fontSize: '1.75rem',
173
175
  fontWeight: 500,
174
- lineHeight: 1.6
176
+ lineHeight: 1.6,
177
+ letterSpacing: 0,
178
+ textTransform: 'none'
175
179
  },
176
180
  h3: {
177
181
  fontSize: '1.5rem',
178
182
  fontWeight: 500,
179
- lineHeight: 1.6
183
+ lineHeight: 1.6,
184
+ letterSpacing: 0,
185
+ textTransform: 'none'
180
186
  },
181
187
  h4: {
182
188
  fontSize: '1.25rem',
183
189
  fontWeight: 500,
184
- lineHeight: 1.6
190
+ lineHeight: 1.6,
191
+ letterSpacing: 0,
192
+ textTransform: 'none'
185
193
  },
186
194
  h5: {
187
195
  fontSize: '1.125rem',
188
196
  fontWeight: 500,
189
- lineHeight: 1.6
197
+ lineHeight: 1.6,
198
+ letterSpacing: 0,
199
+ textTransform: 'none'
190
200
  },
191
201
  h6: {
192
202
  fontSize: '1rem',
193
203
  fontWeight: 500,
194
- lineHeight: 1.6
204
+ lineHeight: 1.6,
205
+ letterSpacing: 0,
206
+ textTransform: 'none'
195
207
  },
196
208
  subtitle1: {
197
209
  fontSize: '0.875rem',
198
210
  fontWeight: 500,
199
- lineHeight: 1.6
211
+ lineHeight: 1.6,
212
+ letterSpacing: 0,
213
+ textTransform: 'none'
200
214
  },
201
215
  body1: {
202
216
  fontSize: '1rem',
203
217
  fontWeight: 400,
204
- lineHeight: 1.6
218
+ lineHeight: 1.6,
219
+ letterSpacing: 0,
220
+ textTransform: 'none'
205
221
  },
206
222
  body2: {
207
223
  fontSize: '0.875rem',
208
224
  fontWeight: 400,
209
- lineHeight: 1.6
225
+ lineHeight: 1.6,
226
+ letterSpacing: 0,
227
+ textTransform: 'none'
210
228
  },
211
229
  button: {
212
230
  fontSize: '0.875rem',
213
231
  fontWeight: 500,
214
- lineHeight: 1.6
232
+ lineHeight: 1.6,
233
+ letterSpacing: 0,
234
+ textTransform: 'none'
215
235
  },
216
236
  caption: {
217
237
  fontSize: '0.875rem',
218
238
  fontWeight: 500,
219
- lineHeight: 1.6
239
+ lineHeight: 1.6,
240
+ letterSpacing: 0,
241
+ textTransform: 'none'
220
242
  },
221
243
  overline: {
222
244
  fontSize: '0.75rem',
223
245
  fontWeight: 500,
224
- lineHeight: 1.6
246
+ lineHeight: 1.6,
247
+ letterSpacing: 0,
248
+ textTransform: 'none'
225
249
  }
226
250
  }
227
251
  });
@@ -1099,11 +1123,13 @@ Typography.displayName = 'Typography';
1099
1123
 
1100
1124
  var useSelectStyle =
1101
1125
  /*#__PURE__*/
1102
- styles$5.makeStyles(function () {
1126
+ styles$5.makeStyles(function (theme) {
1103
1127
  return {
1104
1128
  select: {
1105
1129
  padding: '5px 8px',
1106
- display: 'inline-flex'
1130
+ display: 'inline-flex',
1131
+ backgroundColor: theme.palette.common.white,
1132
+ height: '30px'
1107
1133
  }
1108
1134
  };
1109
1135
  });
@@ -1160,7 +1186,7 @@ function _templateObject() {
1160
1186
 
1161
1187
  return data;
1162
1188
  }
1163
- var GroupSelect =
1189
+ var VarSelect =
1164
1190
  /*#__PURE__*/
1165
1191
  React.forwardRef(function (props, ref) {
1166
1192
  var theme = useMUITheme();
@@ -1168,13 +1194,14 @@ React.forwardRef(function (props, ref) {
1168
1194
  var selectStyle = useSelectStyle();
1169
1195
 
1170
1196
  var groups = props.groups,
1197
+ options = props.options,
1171
1198
  value = props.value,
1172
1199
  onChange = props.onChange,
1173
1200
  _props$variant = props.variant,
1174
1201
  variant = _props$variant === void 0 ? 'outlined' : _props$variant,
1175
1202
  onOpen = props.onOpen,
1176
1203
  onClose = props.onClose,
1177
- rest = _objectWithoutPropertiesLoose(props, ["groups", "value", "onChange", "variant", "onOpen", "onClose"]);
1204
+ rest = _objectWithoutPropertiesLoose(props, ["groups", "options", "value", "onChange", "variant", "onOpen", "onClose"]);
1178
1205
 
1179
1206
  return React__default.createElement(Select, Object.assign({}, rest, {
1180
1207
  ref: ref,
@@ -1186,7 +1213,7 @@ React.forwardRef(function (props, ref) {
1186
1213
  displayEmpty: true,
1187
1214
  fullWidth: true,
1188
1215
  classes: selectStyle
1189
- }), groups.map(function (group) {
1216
+ }), groups && groups.map(function (group) {
1190
1217
  return [React__default.createElement(ListSubheader, {
1191
1218
  style: {
1192
1219
  pointerEvents: 'none'
@@ -1211,9 +1238,17 @@ React.forwardRef(function (props, ref) {
1211
1238
  className: emotion.cx(customOptionStyle.root, customOptionStyle[group.optionType])
1212
1239
  }, opt.children));
1213
1240
  })];
1241
+ }), options && options.map(function (opt) {
1242
+ return React__default.createElement(MenuItem, {
1243
+ className: customOptionStyle.container,
1244
+ value: opt.value,
1245
+ key: opt.value
1246
+ }, React__default.createElement("div", {
1247
+ className: emotion.cx(customOptionStyle.root, customOptionStyle[opt.optionType])
1248
+ }, opt.children));
1214
1249
  }));
1215
1250
  });
1216
- GroupSelect.displayName = 'GroupSelect';
1251
+ VarSelect.displayName = 'VarSelect';
1217
1252
 
1218
1253
  var IconButton =
1219
1254
  /*#__PURE__*/
@@ -1334,9 +1369,15 @@ ToggleButtonGroup.displayName = 'ToggleButtonGroup';
1334
1369
  var Tooltip =
1335
1370
  /*#__PURE__*/
1336
1371
  React.forwardRef(function (props, ref) {
1337
- return React__default.createElement(MUITooltip, Object.assign({}, props, {
1338
- ref: ref
1339
- }), props.children);
1372
+ var children = props.children,
1373
+ _props$enterTouchDela = props.enterTouchDelay,
1374
+ enterTouchDelay = _props$enterTouchDela === void 0 ? 0 : _props$enterTouchDela,
1375
+ restProps = _objectWithoutPropertiesLoose(props, ["children", "enterTouchDelay"]);
1376
+
1377
+ return React__default.createElement(MUITooltip, Object.assign({}, restProps, {
1378
+ ref: ref,
1379
+ enterTouchDelay: enterTouchDelay
1380
+ }), children);
1340
1381
  });
1341
1382
  Tooltip.displayName = 'Tooltip';
1342
1383
 
@@ -1365,7 +1406,7 @@ var index = {
1365
1406
  FormGroup: FormGroup,
1366
1407
  FormHelperText: FormHelperText,
1367
1408
  FormLabel: FormLabel,
1368
- GroupSelect: GroupSelect,
1409
+ VarSelect: VarSelect,
1369
1410
  IconButton: IconButton,
1370
1411
  Link: Link,
1371
1412
  LoadingButton: LoadingButton,
@@ -2485,7 +2526,7 @@ var StyledSubheader =
2485
2526
  /*#__PURE__*/
2486
2527
  styles$5.withStyles(subheaderStyles)(MuiListSubheader$1);
2487
2528
 
2488
- var GroupSelect$1 = function GroupSelect(props) {
2529
+ var GroupSelect = function GroupSelect(props) {
2489
2530
  var groups = props.groups,
2490
2531
  value = props.value,
2491
2532
  onChange = props.onChange,
@@ -5718,7 +5759,7 @@ exports.DatePicker = DatePicker;
5718
5759
  exports.Divider = Divider;
5719
5760
  exports.EditLight = EditLight;
5720
5761
  exports.EditableTable = EditableTable;
5721
- exports.GroupSelect = GroupSelect$1;
5762
+ exports.GroupSelect = GroupSelect;
5722
5763
  exports.Icon = Icon$1;
5723
5764
  exports.InputSlider = InputSlider;
5724
5765
  exports.KeyboardDatePicker = KeyboardDatePicker;