@janiscommerce/ui-web 0.30.0 → 0.31.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/CHANGELOG.md CHANGED
@@ -7,11 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- <<<<<<< HEAD
10
+ ## [0.31.0] - 2025-03-14
11
+
12
+ ### Added
13
+
14
+ - Full loader component
15
+ - Spinner loader component
16
+
11
17
  ## [0.30.0] - 2025-03-06
12
- =======
13
- ## [0.30.0] - 2025-02-26
14
- >>>>>>> 91ba7c2d8e55838f6f56bc165ea011472e05dc62
15
18
 
16
19
  ### Added
17
20
 
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useState, useEffect, useRef, PureComponent, useMemo, useCallback, useLayoutEffect, createContext } from 'react';
3
- import styled$g, { css } from 'styled-components';
3
+ import styled$g, { css, keyframes } from 'styled-components';
4
4
  import * as ReactDOM from 'react-dom';
5
5
  import ReactDOM__default from 'react-dom';
6
6
 
@@ -5621,7 +5621,7 @@ $$7({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
5621
5621
  });
5622
5622
 
5623
5623
  var _templateObject$4;
5624
- var styles = {
5624
+ var styles$2 = {
5625
5625
  Svg: styled$g.svg.withConfig({
5626
5626
  displayName: "styles__Svg",
5627
5627
  componentId: "sc-jf3e5i-0"
@@ -5645,7 +5645,7 @@ var styles = {
5645
5645
  Item: styled$g.div.withConfig({
5646
5646
  displayName: "styles__Item",
5647
5647
  componentId: "sc-jf3e5i-3"
5648
- })(["padding:5px;border:1px dashed #ccc;cursor:default;display:grid;justify-items:center;justify-content:center;grid-row-gap:5px;", ";& ", "{", ";}&:hover{color:", ";}&:hover ", "{fill:", ";}"], mixins.transition('color'), styles.Svg, mixins.transition('fill'), palette.blue, styles.Svg, palette.blue),
5648
+ })(["padding:5px;border:1px dashed #ccc;cursor:default;display:grid;justify-items:center;justify-content:center;grid-row-gap:5px;", ";& ", "{", ";}&:hover{color:", ";}&:hover ", "{fill:", ";}"], mixins.transition('color'), styles$2.Svg, mixins.transition('fill'), palette.blue, styles$2.Svg, palette.blue),
5649
5649
  SearchInput: styled$g.input.withConfig({
5650
5650
  displayName: "styles__SearchInput",
5651
5651
  componentId: "sc-jf3e5i-4"
@@ -7072,7 +7072,7 @@ var Icon = function Icon(_ref) {
7072
7072
  var color = _ref.color,
7073
7073
  name = _ref.name,
7074
7074
  sizeProp = _ref.size,
7075
- styles$1 = _ref.styles,
7075
+ styles = _ref.styles,
7076
7076
  pathStyles = _ref.pathStyles,
7077
7077
  width = _ref.width,
7078
7078
  height = _ref.height,
@@ -7085,14 +7085,14 @@ var Icon = function Icon(_ref) {
7085
7085
  defaultSize = _icons$name.size;
7086
7086
  var size = sizeProp || defaultSize;
7087
7087
  if (!path) return null;
7088
- return /*#__PURE__*/React__default.createElement(styles.Svg, _extends$1({
7088
+ return /*#__PURE__*/React__default.createElement(styles$2.Svg, _extends$1({
7089
7089
  width: width || size,
7090
7090
  height: height || size,
7091
- styles: styles$1,
7091
+ styles: styles,
7092
7092
  color: color,
7093
7093
  viewBox: viewBox,
7094
7094
  size: size
7095
- }, props), /*#__PURE__*/React__default.createElement(styles.Path, {
7095
+ }, props), /*#__PURE__*/React__default.createElement(styles$2.Path, {
7096
7096
  d: path,
7097
7097
  styles: pathStyles
7098
7098
  }));
@@ -35492,5 +35492,104 @@ var Map$1 = function Map(_ref) {
35492
35492
  }));
35493
35493
  };
35494
35494
 
35495
- export { Avatar, AvatarGroup$1 as AvatarGroup, Button, Checkbox, Chip, ClickAwayListener, Color, ColorPicker, Drawer, ErrorBoundary, HTML, Icon, Image, Input, Link, Map$1 as Map, QRCode, Skeleton, Switch, Textarea, icons, palette };
35495
+ var rotate = keyframes(["to{transform:rotate(360deg);}"]);
35496
+ var Spinner$1 = styled$g.div.withConfig({
35497
+ displayName: "styles__Spinner",
35498
+ componentId: "sc-1e490ps-0"
35499
+ })(["", ""], function (_ref) {
35500
+ var color = _ref.color,
35501
+ duration = _ref.duration,
35502
+ size = _ref.size,
35503
+ thickness = _ref.thickness,
35504
+ backSpinnerColor = _ref.backSpinnerColor;
35505
+ return css(["width:", "px;height:", "px;border-radius:50%;background-color:transparent;border-top:", "px solid ", ";border-right:", "px solid ", ";border-bottom:", "px solid ", ";border-left:", "px solid ", ";animation:", " ", "s linear infinite;position:absolute;"], size, size, thickness, getColor(color), thickness, getColor(color), thickness, getColor(color), thickness, getColor(backSpinnerColor), rotate, duration);
35506
+ });
35507
+ var SpinnerWrapper = styled$g.div.withConfig({
35508
+ displayName: "styles__SpinnerWrapper",
35509
+ componentId: "sc-1e490ps-1"
35510
+ })(["position:relative;display:flex;justify-content:center;align-items:center;width:", "px;height:", "px;"], function (_ref2) {
35511
+ var size = _ref2.size;
35512
+ return size;
35513
+ }, function (_ref3) {
35514
+ var size = _ref3.size;
35515
+ return size;
35516
+ });
35517
+ var CenterContent = styled$g.div.withConfig({
35518
+ displayName: "styles__CenterContent",
35519
+ componentId: "sc-1e490ps-2"
35520
+ })(["position:absolute;display:flex;justify-content:center;align-items:center;"]);
35521
+ var styles$1 = {
35522
+ Spinner: Spinner$1,
35523
+ CenterContent: CenterContent,
35524
+ SpinnerWrapper: SpinnerWrapper
35525
+ };
35526
+
35527
+ var Spinner = function Spinner(_ref) {
35528
+ var _ref$config = _ref.config,
35529
+ config = _ref$config === void 0 ? {} : _ref$config,
35530
+ children = _ref.children;
35531
+ var _config$color = config.color,
35532
+ color = _config$color === void 0 ? 'blue' : _config$color,
35533
+ _config$duration = config.duration,
35534
+ duration = _config$duration === void 0 ? 4 : _config$duration,
35535
+ _config$size = config.size,
35536
+ size = _config$size === void 0 ? 115 : _config$size,
35537
+ _config$thickness = config.thickness,
35538
+ thickness = _config$thickness === void 0 ? 8 : _config$thickness,
35539
+ _config$backSpinnerCo = config.backSpinnerColor,
35540
+ backSpinnerColor = _config$backSpinnerCo === void 0 ? 'grey' : _config$backSpinnerCo;
35541
+ return /*#__PURE__*/React__default.createElement(styles$1.SpinnerWrapper, {
35542
+ size: size
35543
+ }, /*#__PURE__*/React__default.createElement(styles$1.Spinner, {
35544
+ color: color,
35545
+ duration: duration,
35546
+ size: size,
35547
+ thickness: thickness,
35548
+ backSpinnerColor: backSpinnerColor
35549
+ }), children && /*#__PURE__*/React__default.createElement(styles$1.CenterContent, null, children));
35550
+ };
35551
+
35552
+ var show = keyframes(["0%{opacity:0;}to{opacity:1;}"]);
35553
+ var Container = styled$g.section.withConfig({
35554
+ displayName: "styles__Container",
35555
+ componentId: "sc-19kt9g-0"
35556
+ })(["display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;position:fixed;top:0;left:0;background:", ";", ";z-index:100;animation:", " 0.2s ease-in;"], function (_ref) {
35557
+ var backgroundColor = _ref.backgroundColor;
35558
+ return backgroundColor;
35559
+ }, function (_ref2) {
35560
+ var effect = _ref2.effect;
35561
+ return effect && css(effect);
35562
+ }, show);
35563
+ var LoaderContainer = styled$g.div.withConfig({
35564
+ displayName: "styles__LoaderContainer",
35565
+ componentId: "sc-19kt9g-1"
35566
+ })(["position:relative;display:flex;justify-content:center;align-items:center;width:115px;height:115px;"]);
35567
+ var styles = {
35568
+ Container: Container,
35569
+ LoaderContainer: LoaderContainer
35570
+ };
35571
+
35572
+ var FullLoader = function FullLoader(_ref) {
35573
+ var children = _ref.children,
35574
+ _ref$backgroundColor = _ref.backgroundColor,
35575
+ backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor,
35576
+ _ref$spinnerConfig = _ref.spinnerConfig,
35577
+ spinnerConfig = _ref$spinnerConfig === void 0 ? {} : _ref$spinnerConfig,
35578
+ _ref$effect = _ref.effect,
35579
+ effect = _ref$effect === void 0 ? {} : _ref$effect;
35580
+ var defaultSpinnerConfig = {
35581
+ color: 'blue',
35582
+ duration: 4,
35583
+ size: 115,
35584
+ thickness: 8
35585
+ };
35586
+ return /*#__PURE__*/React__default.createElement(styles.Container, {
35587
+ effect: effect,
35588
+ backgroundColor: backgroundColor
35589
+ }, /*#__PURE__*/React__default.createElement(styles.LoaderContainer, null, children || /*#__PURE__*/React__default.createElement(Spinner, {
35590
+ config: _objectSpread2(_objectSpread2({}, defaultSpinnerConfig), spinnerConfig)
35591
+ })));
35592
+ };
35593
+
35594
+ export { Avatar, AvatarGroup$1 as AvatarGroup, Button, Checkbox, Chip, ClickAwayListener, Color, ColorPicker, Drawer, ErrorBoundary, FullLoader, HTML, Icon, Image, Input, Link, Map$1 as Map, QRCode, Skeleton, Spinner, Switch, Textarea, icons, palette };
35496
35595
  //# sourceMappingURL=index.esm.js.map