@sinco/react 1.2.0 → 1.2.2-rc.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.
package/index.esm.js CHANGED
@@ -6242,6 +6242,9 @@ var components = {
6242
6242
  }
6243
6243
  },
6244
6244
  MuiChip: {
6245
+ defaultProps: {
6246
+ color: "primary"
6247
+ },
6245
6248
  styleOverrides: {
6246
6249
  sizeSmall: {
6247
6250
  height: 16
@@ -6268,6 +6271,69 @@ var components = {
6268
6271
  ".MuiChip-deleteIconMedium": {
6269
6272
  height: 20,
6270
6273
  width: 20
6274
+ },
6275
+ color: "#101840de",
6276
+ ".MuiChip-deleteIcon": {
6277
+ color: "#1018408a",
6278
+ "&:hover": {
6279
+ color: "#1018408a"
6280
+ }
6281
+ }
6282
+ },
6283
+ filled: {
6284
+ "&.MuiChip-filledPrimary": {
6285
+ backgroundColor: "#BCD0E3",
6286
+ "&:hover": {
6287
+ backgroundColor: "#BCD0E3 !important",
6288
+ "&.MuiChip-clickableColorPrimary": {
6289
+ backgroundColor: "#8FB1D0 !important"
6290
+ }
6291
+ }
6292
+ },
6293
+ "&.MuiChip-filledSecondary": {
6294
+ backgroundColor: "#B3EBF2",
6295
+ "&:hover": {
6296
+ backgroundColor: "#B3EBF2 !important",
6297
+ "&.MuiChip-clickableColorSecondary": {
6298
+ backgroundColor: "#80DEEA !important"
6299
+ }
6300
+ }
6301
+ },
6302
+ "&.MuiChip-filledError": {
6303
+ backgroundColor: "#F1C7C7",
6304
+ "&:hover": {
6305
+ backgroundColor: "#F1C7C7 !important",
6306
+ "&.MuiChip-clickableColorError": {
6307
+ backgroundColor: "#E8A1A1 !important"
6308
+ }
6309
+ }
6310
+ },
6311
+ "&.MuiChip-filledSuccess": {
6312
+ backgroundColor: "#DDEFC4",
6313
+ "&:hover": {
6314
+ backgroundColor: "#DDEFC4 !important",
6315
+ "&.MuiChip-clickableColorSuccess": {
6316
+ backgroundColor: "#C7E49D !important"
6317
+ }
6318
+ }
6319
+ },
6320
+ "&.MuiChip-filledInfo": {
6321
+ backgroundColor: "#C0E2EE",
6322
+ "&:hover": {
6323
+ backgroundColor: "#C0E2EE !important",
6324
+ "&.MuiChip-clickableColorInfo": {
6325
+ backgroundColor: "#96CFE2 !important"
6326
+ }
6327
+ }
6328
+ },
6329
+ "&.MuiChip-filledWarning": {
6330
+ backgroundColor: "#FEDAB3",
6331
+ "&:hover": {
6332
+ backgroundColor: "#FEDAB3 !important",
6333
+ "&.MuiChip-clickableColorWarning": {
6334
+ backgroundColor: "#FDC280 !important"
6335
+ }
6336
+ }
6271
6337
  }
6272
6338
  }
6273
6339
  }
@@ -6674,7 +6740,7 @@ var components = {
6674
6740
  },
6675
6741
  dense: {
6676
6742
  ".MuiListItem-dense": {
6677
- padding: "0.25px 12px 0.25px 16px"
6743
+ // padding: "0.25px 12px 0.25px 16px",
6678
6744
  }
6679
6745
  }
6680
6746
  }
@@ -14181,7 +14247,7 @@ var DrawerComponent = function DrawerComponent(_ref) {
14181
14247
  var FooterAction = function FooterAction(_ref) {
14182
14248
  var leftContent = _ref.leftContent,
14183
14249
  rightContent = _ref.rightContent,
14184
- labelChangeCounter = _ref.labelChangeCounter;
14250
+ children = _ref.children;
14185
14251
  return React__default.createElement(AppBar$1, {
14186
14252
  position: "fixed",
14187
14253
  color: "inherit",
@@ -14196,7 +14262,7 @@ var FooterAction = function FooterAction(_ref) {
14196
14262
  }
14197
14263
  }, leftContent, React__default.createElement(Box$2, {
14198
14264
  flexGrow: 1
14199
- }), React__default.createElement(Box$2, null, labelChangeCounter), rightContent));
14265
+ }), React__default.createElement(Box$2, null, children), rightContent));
14200
14266
  };
14201
14267
 
14202
14268
  var useProgress = function useProgress(timeProgress, lote) {
@@ -14504,9 +14570,11 @@ var ProgressSinco = function ProgressSinco(_ref) {
14504
14570
  };
14505
14571
 
14506
14572
  var CardRadio = function CardRadio(_ref) {
14573
+ var _ref2;
14507
14574
  var _ref$RadioPosition = _ref.RadioPosition,
14508
14575
  RadioPosition = _ref$RadioPosition === void 0 ? 'right' : _ref$RadioPosition,
14509
- states = _ref.states,
14576
+ _ref$state = _ref.state,
14577
+ state = _ref$state === void 0 ? 'default' : _ref$state,
14510
14578
  media = _ref.media,
14511
14579
  header = _ref.header,
14512
14580
  content = _ref.content,
@@ -14517,24 +14585,24 @@ var CardRadio = function CardRadio(_ref) {
14517
14585
  value = _ref.value,
14518
14586
  onChange = _ref.onChange,
14519
14587
  checked = _ref.checked;
14520
- var _useState = useState(checked !== null && checked !== void 0 ? checked : false),
14588
+ var _useState = useState((_ref2 = checked || state === 'active') !== null && _ref2 !== void 0 ? _ref2 : false),
14521
14589
  _useState2 = _slicedToArray(_useState, 2),
14522
14590
  isChecked = _useState2[0],
14523
14591
  setIsChecked = _useState2[1];
14524
- var _useState3 = useState(states === 'active'),
14592
+ var _useState3 = useState(state === 'active'),
14525
14593
  _useState4 = _slicedToArray(_useState3, 1),
14526
14594
  isActive = _useState4[0];
14527
14595
  var handleClick = function handleClick() {
14528
- if (states === 'disabled') return;
14596
+ if (state === 'disabled') return;
14529
14597
  setIsChecked(!isChecked);
14530
14598
  onChange(value);
14531
14599
  };
14532
14600
  var getBackgroundColor = function getBackgroundColor() {
14533
- if (states === 'disabled') return '';
14534
- return isChecked ? color === 'primary' ? '#E4ECF4' : color === 'secondary' ? '#00BCD414' : '#FBFBFB' : 'transparent';
14601
+ if (state === 'disabled') return '';
14602
+ return isChecked || isActive ? color === 'primary' ? '#E4ECF4' : color === 'secondary' ? '#00BCD414' : '#FBFBFB' : 'transparent';
14535
14603
  };
14536
14604
  var getBorderColor = function getBorderColor() {
14537
- return isChecked ? color === 'primary' ? '#2063A080' : color === 'secondary' ? '#00BCD480' : '#00BCD4' : '#0000001F';
14605
+ return isChecked || isActive ? color === 'primary' ? '#2063A080' : color === 'secondary' ? '#00BCD480' : '#00BCD4' : '#0000001F';
14538
14606
  };
14539
14607
  var getHoverColor = function getHoverColor() {
14540
14608
  return color === 'primary' ? '#2063A00A' : color === 'secondary' ? '#00BCD40A' : 'FBFBFB';
@@ -14549,7 +14617,7 @@ var CardRadio = function CardRadio(_ref) {
14549
14617
  border: "solid 1px ".concat(getBorderColor()),
14550
14618
  sx: {
14551
14619
  '&:hover': {
14552
- backgroundColor: checked ? 'none' : states === 'disabled' ? 'inherit' : getHoverColor()
14620
+ backgroundColor: checked ? 'none' : state === 'disabled' ? 'inherit' : getHoverColor()
14553
14621
  },
14554
14622
  cursor: 'pointer'
14555
14623
  },
@@ -14565,16 +14633,16 @@ var CardRadio = function CardRadio(_ref) {
14565
14633
  gap: 1
14566
14634
  }, media && React__default.createElement(Stack$1, null, media), React__default.createElement(Stack$1, null, header && React__default.createElement(Typography$1, {
14567
14635
  variant: "subtitle2",
14568
- color: states === 'disabled' ? 'text.disabled' : isActive ? 'text.primary' : 'text.primary'
14569
- }, content), content && React__default.createElement(Typography$1, {
14636
+ color: state === 'disabled' ? 'text.disabled' : isActive ? 'text.primary' : 'text.primary'
14637
+ }, header), content && React__default.createElement(Typography$1, {
14570
14638
  variant: "caption",
14571
- color: states === 'disabled' ? 'text.disabled' : isActive ? 'text.secondary' : 'text.secondary'
14639
+ color: state === 'disabled' ? 'text.disabled' : isActive ? 'text.secondary' : 'text.secondary'
14572
14640
  }, content))), React__default.createElement(Stack$1, {
14573
14641
  justifyContent: topRadioPosition === true ? 'flex-start' : 'center'
14574
14642
  }, React__default.createElement(Radio$1, {
14575
- checked: isChecked,
14643
+ checked: isChecked || isChecked,
14576
14644
  color: color,
14577
- disabled: states === 'disabled'
14645
+ disabled: state === 'disabled'
14578
14646
  }))));
14579
14647
  };
14580
14648
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinco/react",
3
- "version": "1.2.0",
3
+ "version": "1.2.2-rc.0",
4
4
  "description": "package for the configuration of mui react sinco",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -1,11 +1,11 @@
1
1
  import React, { FC } from 'react';
2
2
  type RadioPosition = 'left' | 'right';
3
- type RadioStates = 'active' | 'disabled';
3
+ type Radiostate = 'active' | 'disabled' | 'default';
4
4
  type CardRadioColors = 'primary' | 'secondary';
5
5
  export interface CardRadioProps {
6
6
  RadioPosition?: RadioPosition;
7
7
  topRadioPosition?: boolean;
8
- states?: RadioStates;
8
+ state?: Radiostate;
9
9
  media?: React.ReactNode;
10
10
  header?: React.ReactNode | string;
11
11
  content?: React.ReactNode | string;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  interface FooterActionsProperties {
3
- labelChangeCounter: React.ReactNode | string;
3
+ children?: React.ReactNode | string;
4
4
  leftContent?: React.ReactNode;
5
5
  rightContent?: React.ReactNode;
6
6
  }
7
- export declare const FooterAction: ({ leftContent, rightContent, labelChangeCounter, }: FooterActionsProperties) => React.JSX.Element;
7
+ export declare const FooterAction: ({ leftContent, rightContent, children, }: FooterActionsProperties) => React.JSX.Element;
8
8
  export {};