@surveycake/rc 3.0.0-alpha.1 → 3.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rc.esm.js CHANGED
@@ -6,6 +6,7 @@ import { createTheme, StylesProvider, ThemeProvider as ThemeProvider$2, makeStyl
6
6
  import { ThemeProvider as ThemeProvider$1 } from 'emotion-theming';
7
7
  import MUIButton from '@material-ui/core/Button';
8
8
  import Typography$2 from '@material-ui/core/Typography';
9
+ import MUILink from '@material-ui/core/Link';
9
10
  import Cancel from '@material-ui/icons/Cancel';
10
11
  import Info from '@material-ui/icons/Info';
11
12
  import CheckCircle$2 from '@material-ui/icons/CheckCircle';
@@ -114,7 +115,7 @@ function _taggedTemplateLiteralLoose(strings, raw) {
114
115
  }
115
116
 
116
117
  function _templateObject() {
117
- var data = _taggedTemplateLiteralLoose(["\n @import url('https://fonts.googleapis.com/css?family=Noto+Sans+TC:400,500,700|Roboto:400,500,700&display=swap&subset=chinese-traditional');\n "]);
118
+ var data = _taggedTemplateLiteralLoose(["\n @import url('https://fonts.googleapis.com/css?family=Noto+Sans+TC:300,400,500,700|Roboto:400,500,700&display=swap&subset=chinese-traditional');\n "]);
118
119
 
119
120
  _templateObject = function _templateObject() {
120
121
  return data;
@@ -278,7 +279,7 @@ makeStyles$1(function (theme) {
278
279
  },
279
280
  text: {
280
281
  '& .MuiButton-label': {
281
- color: theme.palette.grey.A400
282
+ color: theme.palette.grey[600]
282
283
  },
283
284
  '&:hover': {
284
285
  backgroundColor: theme.palette.primary.light,
@@ -287,7 +288,7 @@ makeStyles$1(function (theme) {
287
288
  }
288
289
  },
289
290
  '&:disabled > .MuiButton-label': {
290
- color: theme.palette.grey.A100
291
+ color: theme.palette.grey[400]
291
292
  }
292
293
  },
293
294
  outlined: {
@@ -303,13 +304,13 @@ makeStyles$1(function (theme) {
303
304
  contained: {
304
305
  boxShadow: 'none',
305
306
  '& > .MuiButton-label': {
306
- color: theme.palette.grey.A200
307
+ color: theme.palette.grey[500]
307
308
  },
308
309
  '&:hover': {
309
310
  boxShadow: 'none',
310
- backgroundColor: theme.palette.grey[300],
311
+ backgroundColor: theme.palette.grey[100],
311
312
  '& .MuiButton-label': {
312
- color: theme.palette.grey.A400
313
+ color: theme.palette.grey[600]
313
314
  }
314
315
  },
315
316
  '&:disabled': {
@@ -330,7 +331,7 @@ makeStyles$1(function (theme) {
330
331
  }
331
332
  },
332
333
  '&:disabled': {
333
- backgroundColor: theme.palette.grey[700],
334
+ backgroundColor: theme.palette.grey[300],
334
335
  '& > .MuiButton-label': {
335
336
  color: theme.palette.common.white
336
337
  }
@@ -380,9 +381,37 @@ forwardRef(function (props, ref) {
380
381
 
381
382
  var Typography =
382
383
  /*#__PURE__*/
384
+ forwardRef(function (_ref, ref) {
385
+ var _ref$color = _ref.color,
386
+ color = _ref$color === void 0 ? 'textPrimary' : _ref$color,
387
+ rest = _objectWithoutPropertiesLoose(_ref, ["color"]);
388
+
389
+ return React.createElement(Typography$2, Object.assign({}, rest, {
390
+ ref: ref,
391
+ color: color
392
+ }));
393
+ });
394
+
395
+ var useStyles$1 =
396
+ /*#__PURE__*/
397
+ makeStyles$1(function (theme) {
398
+ return {
399
+ underlineHover: {
400
+ '&:hover': {
401
+ color: function color(props) {
402
+ return props.color && (props.color === 'primary' || props.color === 'secondary') ? theme.palette[props.color].dark : theme.palette.primary.dark;
403
+ }
404
+ }
405
+ }
406
+ };
407
+ });
408
+
409
+ var Link =
410
+ /*#__PURE__*/
383
411
  forwardRef(function (props, ref) {
384
- return React.createElement(Typography$2, Object.assign({}, props, {
385
- ref: ref
412
+ return React.createElement(MUILink, Object.assign({}, props, {
413
+ ref: ref,
414
+ classes: useStyles$1(props)
386
415
  }));
387
416
  });
388
417
 
@@ -413,6 +442,7 @@ var index$1 = {
413
442
  ThemeProvider: ThemeProvider,
414
443
  Button: Button,
415
444
  Typography: Typography,
445
+ Link: Link,
416
446
  Icon: Icon
417
447
  };
418
448
 
@@ -523,7 +553,7 @@ var styles = function styles(theme) {
523
553
  });
524
554
  };
525
555
 
526
- var useStyles$1 =
556
+ var useStyles$2 =
527
557
  /*#__PURE__*/
528
558
  makeStyles$1(styles);
529
559
  var Avatar =
@@ -540,7 +570,7 @@ forwardRef(function (_ref, ref) {
540
570
  height = _ref.height,
541
571
  restProps = _objectWithoutPropertiesLoose(_ref, ["children", "src", "alt", "size", "variant", "width", "height"]);
542
572
 
543
- var classes = useStyles$1({
573
+ var classes = useStyles$2({
544
574
  width: width,
545
575
  height: height
546
576
  });
@@ -726,7 +756,7 @@ forwardRef(function (props, ref) {
726
756
  }, props), props.children);
727
757
  });
728
758
 
729
- var useStyles$2 =
759
+ var useStyles$3 =
730
760
  /*#__PURE__*/
731
761
  makeStyles$1({
732
762
  root: {
@@ -749,7 +779,7 @@ forwardRef(function (_ref, ref) {
749
779
  className = _ref.className,
750
780
  restProps = _objectWithoutPropertiesLoose(_ref, ["children", "className"]);
751
781
 
752
- var _useStyles = useStyles$2(restProps),
782
+ var _useStyles = useStyles$3(restProps),
753
783
  root = _useStyles.root;
754
784
 
755
785
  return React.createElement(MuiCard, Object.assign({
@@ -1031,7 +1061,7 @@ function resolveThemeColorProp(theme, color) {
1031
1061
  return typeof color === 'function' ? color(theme) : resolveThemeColorByPath(theme, color);
1032
1062
  }
1033
1063
 
1034
- var useStyles$3 =
1064
+ var useStyles$4 =
1035
1065
  /*#__PURE__*/
1036
1066
  makeStyles([['typography', function (theme, _ref) {
1037
1067
  var variant = _ref[0],
@@ -1059,7 +1089,7 @@ forwardRef(function (_ref, ref) {
1059
1089
  noWrap = _ref.noWrap,
1060
1090
  props = _objectWithoutPropertiesLoose(_ref, ["children", "className", "variant", "color", "weight", "gutterBottom", "noWrap"]);
1061
1091
 
1062
- var styles = useStyles$3([Vari, color, weight, gutterBottom, noWrap]);
1092
+ var styles = useStyles$4([Vari, color, weight, gutterBottom, noWrap]);
1063
1093
  return React.createElement(Vari, Object.assign({}, props, {
1064
1094
  className: className ? cx(styles.typography, className) : styles.typography,
1065
1095
  ref: ref
@@ -1224,7 +1254,7 @@ function hexToRgba(originColor, opacity) {
1224
1254
  return "rgba(" + rgb + ", " + opacity + ")";
1225
1255
  }
1226
1256
 
1227
- var useStyles$4 =
1257
+ var useStyles$5 =
1228
1258
  /*#__PURE__*/
1229
1259
  makeStyles([['tag', function (theme, _ref) {
1230
1260
  var originColor = _ref[0],
@@ -1242,7 +1272,7 @@ var Tag = function Tag(_ref) {
1242
1272
  onClick = _ref.onClick,
1243
1273
  props = _objectWithoutPropertiesLoose(_ref, ["children", "className", "color", "variant", "onClick"]);
1244
1274
 
1245
- var styles = useStyles$4([color, variant, !!onClick]);
1275
+ var styles = useStyles$5([color, variant, !!onClick]);
1246
1276
  return React.createElement("div", Object.assign({}, props, {
1247
1277
  className: className ? cx(styles.tag, className) : styles.tag,
1248
1278
  onClick: onClick
@@ -1276,7 +1306,7 @@ forwardRef(function (_ref, ref) {
1276
1306
  }, restProps), children);
1277
1307
  });
1278
1308
 
1279
- var useStyles$5 =
1309
+ var useStyles$6 =
1280
1310
  /*#__PURE__*/
1281
1311
  makeStyles$1({
1282
1312
  root: {
@@ -1389,7 +1419,7 @@ var Select = function Select(props) {
1389
1419
  isVarItem = _props$isVarItem === void 0 ? false : _props$isVarItem,
1390
1420
  restProps = _objectWithoutPropertiesLoose(props, ["options", "value", "onChange", "variant", "multiple", "onOpen", "onClose", "height", "backgroundColor", "isVarItem"]);
1391
1421
 
1392
- var classes = useStyles$5(props);
1422
+ var classes = useStyles$6(props);
1393
1423
  var itemClasses = itemStyle(props);
1394
1424
  return React.createElement(MuiSelect, Object.assign({
1395
1425
  className: classes.root,
@@ -1715,7 +1745,7 @@ var MenuList = function MenuList(_ref) {
1715
1745
  });
1716
1746
  };
1717
1747
 
1718
- var useStyles$6 =
1748
+ var useStyles$7 =
1719
1749
  /*#__PURE__*/
1720
1750
  makeStyles$1({
1721
1751
  root: {
@@ -1740,7 +1770,7 @@ var MenuItem = function MenuItem(props) {
1740
1770
  var children = props.children,
1741
1771
  restProps = _objectWithoutPropertiesLoose(props, ["children", "backgroundColor", "color", "hoverBackgroundColor", "hoverColor"]);
1742
1772
 
1743
- var classes = useStyles$6(props);
1773
+ var classes = useStyles$7(props);
1744
1774
  return React.createElement(MuiMenuItem, Object.assign({}, restProps, {
1745
1775
  className: classes.root
1746
1776
  }), children);
@@ -1980,7 +2010,7 @@ var Pagination = function Pagination(_ref) {
1980
2010
  var index$3 = /*#__PURE__*/
1981
2011
  memo(Pagination);
1982
2012
 
1983
- var useStyles$7 =
2013
+ var useStyles$8 =
1984
2014
  /*#__PURE__*/
1985
2015
  makeStyles$1({
1986
2016
  scrollButtons: {
@@ -2010,7 +2040,7 @@ forwardRef(function (_ref, ref) {
2010
2040
  onChange = _ref.onChange,
2011
2041
  restProps = _objectWithoutPropertiesLoose(_ref, ["children", "value", "onChange"]);
2012
2042
 
2013
- var classes = useStyles$7();
2043
+ var classes = useStyles$8();
2014
2044
  return React.createElement(MuiTabs, Object.assign({
2015
2045
  ref: ref,
2016
2046
  value: value,
@@ -2021,7 +2051,7 @@ forwardRef(function (_ref, ref) {
2021
2051
  }, restProps), children);
2022
2052
  });
2023
2053
 
2024
- var useStyles$8 =
2054
+ var useStyles$9 =
2025
2055
  /*#__PURE__*/
2026
2056
  makeStyles$1(function (theme) {
2027
2057
  return createStyles({
@@ -2057,7 +2087,7 @@ forwardRef(function (_ref, ref) {
2057
2087
  value = _ref.value,
2058
2088
  restProps = _objectWithoutPropertiesLoose(_ref, ["label", "disabled", "icon", "value"]);
2059
2089
 
2060
- var classes = useStyles$8();
2090
+ var classes = useStyles$9();
2061
2091
  return React.createElement(MuiTab, Object.assign({
2062
2092
  ref: ref,
2063
2093
  classes: classes,
@@ -2085,7 +2115,7 @@ forwardRef(function (_ref, ref) {
2085
2115
  }, restProps), children);
2086
2116
  });
2087
2117
 
2088
- var useStyles$9 =
2118
+ var useStyles$a =
2089
2119
  /*#__PURE__*/
2090
2120
  makeStyles$1({
2091
2121
  root: {
@@ -2130,7 +2160,7 @@ forwardRef(function (_ref, ref) {
2130
2160
  value = _ref.value,
2131
2161
  restProps = _objectWithoutPropertiesLoose(_ref, ["disabled", "checked", "value", "classes"]);
2132
2162
 
2133
- var css = useStyles$9();
2163
+ var css = useStyles$a();
2134
2164
  return React.createElement(Radio$1, Object.assign({
2135
2165
  ref: ref,
2136
2166
  value: value,
@@ -2877,7 +2907,7 @@ var icons = {
2877
2907
  warning: ExclamationCircle
2878
2908
  };
2879
2909
 
2880
- var useStyles$a =
2910
+ var useStyles$b =
2881
2911
  /*#__PURE__*/
2882
2912
  makeStyles([['message', function (theme, _ref) {
2883
2913
  var visible = _ref[1];
@@ -2925,7 +2955,7 @@ forwardRef(function (_ref, ref) {
2925
2955
  }
2926
2956
  };
2927
2957
 
2928
- var styles = useStyles$a([type, visible]);
2958
+ var styles = useStyles$b([type, visible]);
2929
2959
  useEffect(function () {
2930
2960
  window.setTimeout(function () {
2931
2961
  return setVisible(true);
@@ -3112,7 +3142,7 @@ var semanticColors = {
3112
3142
  warning: '#fef1e1',
3113
3143
  error: '#fbd0e0'
3114
3144
  };
3115
- var useStyles$b =
3145
+ var useStyles$c =
3116
3146
  /*#__PURE__*/
3117
3147
  makeStyles$1({
3118
3148
  root: {
@@ -3214,7 +3244,7 @@ forwardRef(function (_ref, ref) {
3214
3244
  semantic = _ref.semantic,
3215
3245
  showSemanticIcon = _ref.showSemanticIcon,
3216
3246
  MessageIcon = _ref.MessageIcon;
3217
- var classes = useStyles$b({
3247
+ var classes = useStyles$c({
3218
3248
  semantic: semantic,
3219
3249
  withTitle: !!title
3220
3250
  });
@@ -3279,7 +3309,7 @@ forwardRef(function (props, ref) {
3279
3309
  }, props), props.children);
3280
3310
  });
3281
3311
 
3282
- var Link = {
3312
+ var Link$1 = {
3283
3313
  name: 'list-ul-o',
3284
3314
  definition: {
3285
3315
  viewBox: '0 0 512 512',
@@ -3431,7 +3461,7 @@ var SlidingSideMenu = function SlidingSideMenu(_ref) {
3431
3461
  }, icon) : React.createElement(StyledIconWrapper, {
3432
3462
  onClick: handleIconClick
3433
3463
  }, React.createElement(Icon$1, Object.assign({
3434
- icon: Link,
3464
+ icon: Link$1,
3435
3465
  className: cx(IconStyle, IconClassName)
3436
3466
  }, restIconProps))), React.createElement(StyledSideMenu, Object.assign({
3437
3467
  open: open,
@@ -3448,7 +3478,7 @@ var SlidingSideMenu = function SlidingSideMenu(_ref) {
3448
3478
  var index$6 = /*#__PURE__*/
3449
3479
  memo(SlidingSideMenu);
3450
3480
 
3451
- var useStyles$c =
3481
+ var useStyles$d =
3452
3482
  /*#__PURE__*/
3453
3483
  makeStyles$1({
3454
3484
  root: {
@@ -3493,7 +3523,7 @@ makeStyles$1({
3493
3523
  });
3494
3524
 
3495
3525
  var Divider = function Divider(props) {
3496
- var _useStyles = useStyles$c(props),
3526
+ var _useStyles = useStyles$d(props),
3497
3527
  root = _useStyles.root;
3498
3528
 
3499
3529
  return React.createElement(MuiDivider, Object.assign({}, props, {
@@ -4363,7 +4393,7 @@ var AngleRight$1 = {
4363
4393
  }
4364
4394
  };
4365
4395
 
4366
- var Link$1 = {
4396
+ var Link$2 = {
4367
4397
  name: 'link-o',
4368
4398
  definition: {
4369
4399
  viewBox: '0 0 512 512',
@@ -4727,5 +4757,5 @@ WordingProvider.useWording = function () {
4727
4757
  return useContext(WordingContext);
4728
4758
  };
4729
4759
 
4730
- export { AnimateHeight, ArrowRight, Avatar, Backdrop, BrowserLight, Button$1 as Button, Card, CardActionArea, CardActions, CardContent, CardHeader, MuiCheckbox as Checkbox, index$2 as Chip, DatePicker, Divider, EditLight, EditableTable, GroupSelect, Icon$1 as Icon, InputSlider, KeyboardDatePicker, ListUl as ListUlFilled, Lock as LockFilled, MenuItem, MenuList, api as Message, Modal, MuiThemeProvider, index$3 as Pagination, Paper, Popper, Portal, QuestionCircleOutline, MuiRadio as Radio, Radio as RadioGroup, Select, index$6 as SlidingSideMenu, Snackbar, index$5 as Step, index$4 as Stepper, Switch, Tab, Tabs, Tag, ToggleButtonGroup, Tooltip, Typography$1 as Typography, index$1 as V2, WordingProvider, AnalyticsLight as analyticsLight, AngleLeft as angleLeftFilled, AngleLeft$1 as angleLeftOutlined, AngleRight as angleRightFilled, AngleRight$1 as angleRightOutlined, ArrowAltLeft as arrowAltLeftFilled, BarChart as barChartFilled, BracketsCurly as bracketsCurly, CalendarAlt as calendarAltOutlined, CaretDown$1 as caretDownFilled, CaretLeft as caretLeftFilled, CaretRight as caretRightFilled, CaretUp as caretUpFilled, CheckCircle as checkCircleFilled, CheckCircle$1 as checkCircleOutlined, Check as checkFilled, Check$1 as checkOutlined, CheckSquare as checkSquareFilled, ChevronDown as chevronDownOutlined, ChevronLeft as chevronLeftFilled, ChevronRight as chevronRightFilled, Clock as clockOutlined, Code as codeOutlined, CogLight as cogLight, CommentAltLines as commentAltLinesOutlined, theme$1 as defaultTheme, EllipsisH as ellipsisHFilled, EllipsisV as ellipsisVFilled, ExclamationCircle as exclamationCircleFilled, ExclamationCircle$1 as exclamationCircleOutlined, ExclamationTriangle as exclamationTriangleFilled, ExternalLinkLight as externalLinkLight, Facebook$1 as facebookBrand, FacebookIn as facebookIn, FileAlt as fileAltOutlined, FileCertificate as fileCertificateOutlined, Filter as filterOutlined, GlobalAsia as globalAsiaOutlined, HandPointer as handPointerFilled, HandPointer$1 as handPointerOutlined, Heart as heartFilled, Heart$1 as heartOutlined, hexToRgba, InfoCircle as infoCircleFilled, InfoCircle$1 as infoCircleOutlined, LinkLight as linkLight, Link$1 as linkOutlined, Linkedin as linkedinBrand, LinkedinIn as linkedinIn, Link as listUlOutlined, LongArrowRight as longArrowRightOutlined, makeStyles, MinusLight as minusLightFilled, muiThemeForSurveyCake, PageBreak as pageBreak, PenLight as penLight, PlusCircle as plusCircleOutlined, Plus as plusFilled, PlusLight as plusLightFilled, QRCode as qrcodeOutlined, QuestionCircle as questionCircleFilled, Redo as redoOutlined, Search as searchFilled, SearchLight as searchLightOutlined, SortDown as sortDownFilled, Sort as sortFilled, SortUp as sortUpFilled, SpinnerThird as spinnerThirdOutlined, Square as squareOutlined, Star as starFilled, Star$1 as starOutlined, ThLarge as thLargeOutLined, ThumbUp as thumbUpFilled, ThumbUp$1 as thumbUpOutlined, TimesCircle as timesCircleFilled, TimesCircle$1 as timesCircleOutlined, Times as timesOutlined, TrashAltRegular as trashAltRegular, Twitter as twitterBrand, TwitterIn as twitterIn, useTheme, User as userFilled, UserPlus as userPlusFilled, UserPlus$1 as userPlusOutlined, Users as usersFilled, withMuiPickersUtilsProvider };
4760
+ export { AnimateHeight, ArrowRight, Avatar, Backdrop, BrowserLight, Button$1 as Button, Card, CardActionArea, CardActions, CardContent, CardHeader, MuiCheckbox as Checkbox, index$2 as Chip, DatePicker, Divider, EditLight, EditableTable, GroupSelect, Icon$1 as Icon, InputSlider, KeyboardDatePicker, ListUl as ListUlFilled, Lock as LockFilled, MenuItem, MenuList, api as Message, Modal, MuiThemeProvider, index$3 as Pagination, Paper, Popper, Portal, QuestionCircleOutline, MuiRadio as Radio, Radio as RadioGroup, Select, index$6 as SlidingSideMenu, Snackbar, index$5 as Step, index$4 as Stepper, Switch, Tab, Tabs, Tag, ToggleButtonGroup, Tooltip, Typography$1 as Typography, index$1 as V2, WordingProvider, AnalyticsLight as analyticsLight, AngleLeft as angleLeftFilled, AngleLeft$1 as angleLeftOutlined, AngleRight as angleRightFilled, AngleRight$1 as angleRightOutlined, ArrowAltLeft as arrowAltLeftFilled, BarChart as barChartFilled, BracketsCurly as bracketsCurly, CalendarAlt as calendarAltOutlined, CaretDown$1 as caretDownFilled, CaretLeft as caretLeftFilled, CaretRight as caretRightFilled, CaretUp as caretUpFilled, CheckCircle as checkCircleFilled, CheckCircle$1 as checkCircleOutlined, Check as checkFilled, Check$1 as checkOutlined, CheckSquare as checkSquareFilled, ChevronDown as chevronDownOutlined, ChevronLeft as chevronLeftFilled, ChevronRight as chevronRightFilled, Clock as clockOutlined, Code as codeOutlined, CogLight as cogLight, CommentAltLines as commentAltLinesOutlined, theme$1 as defaultTheme, EllipsisH as ellipsisHFilled, EllipsisV as ellipsisVFilled, ExclamationCircle as exclamationCircleFilled, ExclamationCircle$1 as exclamationCircleOutlined, ExclamationTriangle as exclamationTriangleFilled, ExternalLinkLight as externalLinkLight, Facebook$1 as facebookBrand, FacebookIn as facebookIn, FileAlt as fileAltOutlined, FileCertificate as fileCertificateOutlined, Filter as filterOutlined, GlobalAsia as globalAsiaOutlined, HandPointer as handPointerFilled, HandPointer$1 as handPointerOutlined, Heart as heartFilled, Heart$1 as heartOutlined, hexToRgba, InfoCircle as infoCircleFilled, InfoCircle$1 as infoCircleOutlined, LinkLight as linkLight, Link$2 as linkOutlined, Linkedin as linkedinBrand, LinkedinIn as linkedinIn, Link$1 as listUlOutlined, LongArrowRight as longArrowRightOutlined, makeStyles, MinusLight as minusLightFilled, muiThemeForSurveyCake, PageBreak as pageBreak, PenLight as penLight, PlusCircle as plusCircleOutlined, Plus as plusFilled, PlusLight as plusLightFilled, QRCode as qrcodeOutlined, QuestionCircle as questionCircleFilled, Redo as redoOutlined, Search as searchFilled, SearchLight as searchLightOutlined, SortDown as sortDownFilled, Sort as sortFilled, SortUp as sortUpFilled, SpinnerThird as spinnerThirdOutlined, Square as squareOutlined, Star as starFilled, Star$1 as starOutlined, ThLarge as thLargeOutLined, ThumbUp as thumbUpFilled, ThumbUp$1 as thumbUpOutlined, TimesCircle as timesCircleFilled, TimesCircle$1 as timesCircleOutlined, Times as timesOutlined, TrashAltRegular as trashAltRegular, Twitter as twitterBrand, TwitterIn as twitterIn, useTheme, User as userFilled, UserPlus as userPlusFilled, UserPlus$1 as userPlusOutlined, Users as usersFilled, withMuiPickersUtilsProvider };
4731
4761
  //# sourceMappingURL=rc.esm.js.map