@rango-dev/ui 0.1.10-next.87 → 0.1.10-next.89

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/ui.esm.js CHANGED
@@ -1307,7 +1307,7 @@ CopyIcon.toString = function () {
1307
1307
  return '._icon';
1308
1308
  };
1309
1309
 
1310
- var _excluded$A = ["children"];
1310
+ var _excluded$A = ["children", "className"];
1311
1311
  var TypographyContainer = /*#__PURE__*/styled('span', {
1312
1312
  margin: 0,
1313
1313
  color: '$foreground',
@@ -1475,9 +1475,10 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
1475
1475
  });
1476
1476
  function Typography(_ref) {
1477
1477
  var children = _ref.children,
1478
+ className = _ref.className,
1478
1479
  props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
1479
1480
  return React__default.createElement(TypographyContainer, Object.assign({
1480
- className: "_typography"
1481
+ className: "_typography _text " + className
1481
1482
  }, props), children);
1482
1483
  }
1483
1484
  Typography.toString = function () {
@@ -2218,7 +2219,8 @@ function Button(_ref) {
2218
2219
  align: align,
2219
2220
  ml: !!prefix,
2220
2221
  mr: !!suffix && !loading,
2221
- flexContent: flexContent
2222
+ flexContent: flexContent,
2223
+ className: "_text"
2222
2224
  }, children), loading && React__default.createElement(Spinner, {
2223
2225
  size: 16,
2224
2226
  color: props.type
@@ -2228,7 +2230,7 @@ function Button(_ref) {
2228
2230
  var FilledCircle = /*#__PURE__*/styled('span', {
2229
2231
  width: '10px',
2230
2232
  height: '10px',
2231
- backgroundColor: '$primary500',
2233
+ backgroundColor: '$primary',
2232
2234
  borderRadius: '99999px'
2233
2235
  });
2234
2236
 
@@ -2297,7 +2299,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
2297
2299
  color: '$foreground',
2298
2300
  transition: 'border-color ease .3s',
2299
2301
  '&:focus-within': {
2300
- borderColor: '$primary500'
2302
+ borderColor: '$primary'
2301
2303
  },
2302
2304
  variants: {
2303
2305
  size: {
@@ -2340,7 +2342,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
2340
2342
  }
2341
2343
  });
2342
2344
  var Input = /*#__PURE__*/styled('input', {
2343
- color: '$text',
2345
+ color: '$foreground',
2344
2346
  paddingLeft: '$16',
2345
2347
  paddingRight: '$16',
2346
2348
  flexGrow: 1,
@@ -2359,6 +2361,7 @@ var Input = /*#__PURE__*/styled('input', {
2359
2361
  var Label = /*#__PURE__*/styled('label', {
2360
2362
  display: 'inline-block',
2361
2363
  fontSize: '$14',
2364
+ color: '$foreground',
2362
2365
  marginBottom: '$4'
2363
2366
  });
2364
2367
  var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
@@ -2368,15 +2371,20 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2368
2371
  size = props.size,
2369
2372
  style = props.style,
2370
2373
  inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$C);
2371
- return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({}, inputAttributes.id && {
2374
+ return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
2375
+ className: "_text"
2376
+ }, inputAttributes.id && {
2372
2377
  htmlFor: inputAttributes.id
2373
2378
  }), label), React__default.createElement(InputContainer, {
2374
2379
  disabled: inputAttributes.disabled,
2375
2380
  prefix: !!prefix,
2376
2381
  suffix: !!suffix,
2377
2382
  size: size,
2378
- style: style
2379
- }, prefix || null, React__default.createElement(Input, Object.assign({}, inputAttributes, {
2383
+ style: style,
2384
+ className: "_text"
2385
+ }, prefix || null, React__default.createElement(Input, Object.assign({
2386
+ className: "_text"
2387
+ }, inputAttributes, {
2380
2388
  spellCheck: false,
2381
2389
  ref: ref
2382
2390
  })), suffix || null));
@@ -2566,7 +2574,7 @@ var CheckboxRoot = /*#__PURE__*/styled(Root, {
2566
2574
  width: 20,
2567
2575
  padding: 0,
2568
2576
  height: 20,
2569
- border: '1px solid',
2577
+ border: '1px solid $foreground',
2570
2578
  display: 'flex',
2571
2579
  alignItems: 'center',
2572
2580
  justifyContent: 'center',
@@ -2574,7 +2582,7 @@ var CheckboxRoot = /*#__PURE__*/styled(Root, {
2574
2582
  backgroundColor: '$neutral-100'
2575
2583
  });
2576
2584
  var Label$1 = /*#__PURE__*/styled('label', {
2577
- color: '$text',
2585
+ color: '$foreground',
2578
2586
  fontSize: '$m',
2579
2587
  marginLeft: '$8'
2580
2588
  });
@@ -2587,8 +2595,9 @@ function Checkbox(_ref) {
2587
2595
  }, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
2588
2596
  size: 20
2589
2597
  }))), React__default.createElement(Label$1, {
2598
+ className: "_text",
2590
2599
  htmlFor: id
2591
- }, label, " "));
2600
+ }, label));
2592
2601
  }
2593
2602
 
2594
2603
  var ChipCointainer = /*#__PURE__*/styled('div', {
@@ -2673,6 +2682,9 @@ function Modal(props) {
2673
2682
  var handleBackDropClick = function handleBackDropClick(event) {
2674
2683
  if (event.target === event.currentTarget) onClose();
2675
2684
  };
2685
+ useEffect(function () {
2686
+ if (open) document.body.style.overflow = 'hidden';else document.body.style.overflow = 'unset';
2687
+ }, [open]);
2676
2688
  return React__default.createElement(React__default.Fragment, null, open && createPortal(React__default.createElement(BackDrop, {
2677
2689
  onClick: handleBackDropClick
2678
2690
  }, React__default.createElement(ModalContainer, {
@@ -2696,7 +2708,6 @@ var WalletState;
2696
2708
  })(WalletState || (WalletState = {}));
2697
2709
 
2698
2710
  var StateIconContainer = /*#__PURE__*/styled('span', {
2699
- width: '$28',
2700
2711
  display: 'flex',
2701
2712
  justifyContent: 'center',
2702
2713
  alignItems: 'center'
@@ -2895,7 +2906,7 @@ var StyledSwitchThumb = /*#__PURE__*/styled(Thumb, {
2895
2906
  willChange: 'transform',
2896
2907
  '&[data-state="checked"]': {
2897
2908
  transform: 'translateX(20px)',
2898
- backgroundColor: '$primary500'
2909
+ backgroundColor: '$primary'
2899
2910
  }
2900
2911
  });
2901
2912
  function Switch(props) {
@@ -3213,17 +3224,18 @@ var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
3213
3224
  });
3214
3225
  var Label$2 = /*#__PURE__*/styled('label', {
3215
3226
  paddingLeft: '$8',
3216
- cursor: 'pointer'
3227
+ cursor: 'pointer',
3228
+ color: '$foreground'
3217
3229
  });
3218
3230
  function Radio(props) {
3219
- var defaultValue = props.defaultValue,
3231
+ var value = props.value,
3220
3232
  onChange = props.onChange,
3221
3233
  _props$direction = props.direction,
3222
3234
  direction = _props$direction === void 0 ? 'vertical' : _props$direction,
3223
3235
  style = props.style;
3224
3236
  return React__default.createElement(Container$3, null, React__default.createElement(StyledRoot, {
3225
3237
  onValueChange: onChange,
3226
- defaultValue: defaultValue,
3238
+ value: value,
3227
3239
  direction: direction,
3228
3240
  style: style
3229
3241
  }, props.options.map(function (option, index) {
@@ -3233,6 +3245,7 @@ function Radio(props) {
3233
3245
  value: option.value,
3234
3246
  id: option.value
3235
3247
  }, React__default.createElement(StyledIndicator, null)), React__default.createElement(Label$2, {
3248
+ className: "_text",
3236
3249
  htmlFor: option.value
3237
3250
  }, React__default.createElement(Typography, {
3238
3251
  variant: "body2"
@@ -3332,7 +3345,7 @@ function Settings(props) {
3332
3345
  }))), React__default.createElement(ThemesContainer, null, React__default.createElement(Title, {
3333
3346
  variant: "body2"
3334
3347
  }, "Theme"), React__default.createElement(Radio, {
3335
- defaultValue: selectedTheme,
3348
+ value: selectedTheme,
3336
3349
  options: [{
3337
3350
  value: 'dark',
3338
3351
  label: 'Dark'
@@ -3834,6 +3847,12 @@ var Popover = /*#__PURE__*/styled('div', {
3834
3847
  }
3835
3848
  }
3836
3849
  });
3850
+ var Label$3 = /*#__PURE__*/styled('label', {
3851
+ display: 'inline-block',
3852
+ fontSize: '$14',
3853
+ marginBottom: '$4',
3854
+ color: '$foreground'
3855
+ });
3837
3856
  function ColorPicker(_ref) {
3838
3857
  var color = _ref.color,
3839
3858
  onChangeColor = _ref.onChangeColor,
@@ -3842,9 +3861,8 @@ function ColorPicker(_ref) {
3842
3861
  var _useState = useState(false),
3843
3862
  displayColorPicker = _useState[0],
3844
3863
  setDisplayColorPicker = _useState[1];
3845
- return React__default.createElement(Container$5, null, React__default.createElement(Typography, {
3846
- mb: 4,
3847
- variant: "body2"
3864
+ return React__default.createElement(Container$5, null, React__default.createElement(Label$3, {
3865
+ className: "_text"
3848
3866
  }, label), React__default.createElement(Button, {
3849
3867
  variant: "outlined",
3850
3868
  prefix: React__default.createElement(Color, {