@councilbox/councilbox-ui 0.6.0 → 0.6.1

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.
@@ -1,59 +1,59 @@
1
- import { Meta } from '@storybook/addon-docs';
2
-
3
- <Meta title="ui-councilbox" />
4
-
5
- <style>{`
6
- #docs-root{
7
- overflow-x: auto;
8
- height: 100%;
9
- }
10
- a.noStyles{
11
- color: black;
12
- }
13
- a.noStyles:hover{
14
- border-bottom: 1px solid black;
15
- }
16
- `}</style>
17
-
18
-
19
- # Librería de componentes ui-councilbox v0.5.4
20
-
21
- <h2>Componentes:</h2>
22
- <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
23
- <div><a class='noStyles' href='/story/components-alert--default'>Alert</a></div>
24
- <div><a class='noStyles' href='/story/components-avatar--default'>Avatar</a></div>
25
- <div><a class='noStyles' href='/story/components-buttonbasic--default'>ButtonBasic</a></div>
26
- <div><a class='noStyles' href='/story/components-checkbox--default'>Checkbox</a></div>
27
- <div><a class='noStyles' href='/story/components-drawerpanel--design-drawer-panel-template'>DrawerPanel</a></div>
28
- <div><a class='noStyles' href='/story/components-dragdrop--default'>DragDrop</a></div>
29
- <div><a class='noStyles' href='/story/components-dropdown--design-drop-down-template'>DropDown</a></div>
30
- <div><a class='noStyles' href='/story/components-enhancedtable--design-template-enhanced-table'>EnhanceTable</a></div>
31
- <div><a class='noStyles' href='/story/components-fabbutton'>FabButton</a></div>
32
- <div><a class='noStyles' href='/story/components-grid--design-grids'>Grid</a></div>
33
- <div><a class='noStyles' href='/story/components-header--header-all-buttons'>Header</a></div>
34
- <div><a class='noStyles' href='/story/components-iconbutton--design-icon-button-template'>IconButton</a></div>
35
- <div><a class='noStyles' href='/story/components-iconbuttonsquare--design-icon-button-square-template'>IconButtonSquare</a></div>
36
- <div><a class='noStyles' href='/story/components-input-autocomplete--default'>InputAutocomplete</a></div>
37
- <div><a class='noStyles' href='/story/components-input-password--default'>InputPassword</a></div>
38
- <div><a class='noStyles' href='/story/components-inputtext--default'>InputText</a></div>
39
- <div><a class='noStyles' href='/story/components-inputtextarea--design-input-text-area-template'>InputTextArea</a></div>
40
- <div><a class='noStyles' href='/story/components-loadingsection--default'>LoadingSection</a></div>
41
- <div><a class='noStyles' href='/story/components-menuitem--default'>MenuItem</a></div>
42
- <div><a class='noStyles' href='/story/components-menulateralleft--design-menu-lateral-left-template'>MenuLateralLeft</a></div>
43
- <div><a class='noStyles' href='/story/components-menulateralright--design-menu-lateral-right-template'>MenuLateralRight</a></div>
44
- <div><a class='noStyles' href='/story/components-modal--default'>Modal</a></div>
45
- <div><a class='noStyles' href='/story/components-paginationfooter--design-template-pagination-footer'>PaginationFooter</a></div>
46
- <div><a class='noStyles' href='/story/components-radio--default'>Radio</a></div>
47
- <div><a class='noStyles' href='/story/components-scrollbar--design-scrollbar-template'>Scrollbar</a></div>
48
- <div><a class='noStyles' href='/story/components-selectinput--default'>SelectInput</a></div>
49
- <div><a class='noStyles' href='/story/components-spacing--default'>Spacing</a></div>
50
- <div><a class='noStyles' href='/story/components-stars--design-stars-template'>Stars</a></div>
51
- <div><a class='noStyles' href='/story/components-stepper--design-stepper-template'>Stepper</a></div>
52
- <div><a class='noStyles' href='/story/components-table--design-template-table'>Table</a></div>
53
- <div><a class='noStyles' href='/story/components-tabs--design-tabs-template'>Tabs</a></div>
54
- <div><a class='noStyles' href='/story/components-tag--design-tag-template'>Tag</a></div>
55
- <div><a class='noStyles' href='/story/components-toggle--default'>Toggle</a></div>
56
- <div><a class='noStyles' href='/story/components-typography--default'>Typography</a></div>
57
-
58
- <h2>Fuentes:</h2>
59
- <div><a class='noStyles' href='/story/fonts-iconfont--default'>Iconfont</a></div>
1
+ import { Meta } from '@storybook/addon-docs';
2
+
3
+ <Meta title="ui-councilbox" />
4
+
5
+ <style>{`
6
+ #docs-root{
7
+ overflow-x: auto;
8
+ height: 100%;
9
+ }
10
+ a.noStyles{
11
+ color: black;
12
+ }
13
+ a.noStyles:hover{
14
+ border-bottom: 1px solid black;
15
+ }
16
+ `}</style>
17
+
18
+
19
+ # Librería de componentes ui-councilbox v0.6.1
20
+
21
+ <h2>Componentes:</h2>
22
+ <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
23
+ <div><a class='noStyles' href='/story/components-alert--default'>Alert</a></div>
24
+ <div><a class='noStyles' href='/story/components-avatar--default'>Avatar</a></div>
25
+ <div><a class='noStyles' href='/story/components-buttonbasic--default'>ButtonBasic</a></div>
26
+ <div><a class='noStyles' href='/story/components-checkbox--default'>Checkbox</a></div>
27
+ <div><a class='noStyles' href='/story/components-drawerpanel--design-drawer-panel-template'>DrawerPanel</a></div>
28
+ <div><a class='noStyles' href='/story/components-dragdrop--default'>DragDrop</a></div>
29
+ <div><a class='noStyles' href='/story/components-dropdown--design-drop-down-template'>DropDown</a></div>
30
+ <div><a class='noStyles' href='/story/components-enhancedtable--design-template-enhanced-table'>EnhanceTable</a></div>
31
+ <div><a class='noStyles' href='/story/components-fabbutton'>FabButton</a></div>
32
+ <div><a class='noStyles' href='/story/components-grid--design-grids'>Grid</a></div>
33
+ <div><a class='noStyles' href='/story/components-header--header-all-buttons'>Header</a></div>
34
+ <div><a class='noStyles' href='/story/components-iconbutton--design-icon-button-template'>IconButton</a></div>
35
+ <div><a class='noStyles' href='/story/components-iconbuttonsquare--design-icon-button-square-template'>IconButtonSquare</a></div>
36
+ <div><a class='noStyles' href='/story/components-input-autocomplete--default'>InputAutocomplete</a></div>
37
+ <div><a class='noStyles' href='/story/components-input-password--default'>InputPassword</a></div>
38
+ <div><a class='noStyles' href='/story/components-inputtext--default'>InputText</a></div>
39
+ <div><a class='noStyles' href='/story/components-inputtextarea--design-input-text-area-template'>InputTextArea</a></div>
40
+ <div><a class='noStyles' href='/story/components-loadingsection--default'>LoadingSection</a></div>
41
+ <div><a class='noStyles' href='/story/components-menuitem--default'>MenuItem</a></div>
42
+ <div><a class='noStyles' href='/story/components-menulateralleft--design-menu-lateral-left-template'>MenuLateralLeft</a></div>
43
+ <div><a class='noStyles' href='/story/components-menulateralright--design-menu-lateral-right-template'>MenuLateralRight</a></div>
44
+ <div><a class='noStyles' href='/story/components-modal--default'>Modal</a></div>
45
+ <div><a class='noStyles' href='/story/components-paginationfooter--design-template-pagination-footer'>PaginationFooter</a></div>
46
+ <div><a class='noStyles' href='/story/components-radio--default'>Radio</a></div>
47
+ <div><a class='noStyles' href='/story/components-scrollbar--design-scrollbar-template'>Scrollbar</a></div>
48
+ <div><a class='noStyles' href='/story/components-selectinput--default'>SelectInput</a></div>
49
+ <div><a class='noStyles' href='/story/components-spacing--default'>Spacing</a></div>
50
+ <div><a class='noStyles' href='/story/components-stars--design-stars-template'>Stars</a></div>
51
+ <div><a class='noStyles' href='/story/components-stepper--design-stepper-template'>Stepper</a></div>
52
+ <div><a class='noStyles' href='/story/components-table--design-template-table'>Table</a></div>
53
+ <div><a class='noStyles' href='/story/components-tabs--design-tabs-template'>Tabs</a></div>
54
+ <div><a class='noStyles' href='/story/components-tag--design-tag-template'>Tag</a></div>
55
+ <div><a class='noStyles' href='/story/components-toggle--default'>Toggle</a></div>
56
+ <div><a class='noStyles' href='/story/components-typography--default'>Typography</a></div>
57
+
58
+ <h2>Fuentes:</h2>
59
+ <div><a class='noStyles' href='/story/fonts-iconfont--default'>Iconfont</a></div>
@@ -25,7 +25,11 @@ a.noStyles:hover{
25
25
  <div>Fix zIndex label InputText y SelectInput</div>
26
26
  </div>
27
27
 
28
- <h2>v0.5.4</h2>
28
+ <h2>v0.6.1</h2>
29
+ <div>Fix estilos Stepper</div>
30
+ <div>Add prop freeNavigation Stepper</div>
31
+
32
+ <h2>v0.6.0</h2>
29
33
  <div>Fix zIndex label InputText y SelectInput</div>
30
34
  <div>Añadido padding y cambios para que se ajuste mejor al diseño Stepper </div>
31
35
  <div>Añadido tooltip Stepper </div>
@@ -29,7 +29,7 @@ var DesignStepper = function DesignStepper() {
29
29
  state = _React$useState2[0],
30
30
  setState = _React$useState2[1];
31
31
 
32
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Stepper.default, {
32
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Stepper.default, {
33
33
  onClick: setState,
34
34
  items: [{
35
35
  text: 'Detalles',
@@ -57,8 +57,38 @@ var DesignStepper = function DesignStepper() {
57
57
  icon: 'ri-file-text-line'
58
58
  }],
59
59
  active: state
60
- }));
60
+ })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Stepper.default, {
61
+ onClick: setState,
62
+ freeNavigation: false,
63
+ items: [{
64
+ text: 'Detalles',
65
+ name: 'Detalles',
66
+ icon: 'ri-file-list-2-line'
67
+ }, {
68
+ text: 'Participantes',
69
+ name: 'Participantes',
70
+ icon: 'ri-user-3-line'
71
+ }, {
72
+ text: 'Consentimientos',
73
+ name: 'Consentimientos',
74
+ icon: 'ri-clipboard-line'
75
+ }, {
76
+ text: 'Documentacion',
77
+ name: 'Documentacion',
78
+ icon: 'ri-folder-3-line'
79
+ }, {
80
+ text: 'Configuracion',
81
+ name: 'Configuracion',
82
+ icon: 'ri-settings-4-line'
83
+ }, {
84
+ text: 'Revisar',
85
+ name: 'Revisar',
86
+ icon: 'ri-file-text-line'
87
+ }],
88
+ active: state
89
+ })));
61
90
  };
62
91
 
92
+ DesignStepper.displayName = "DesignStepper";
63
93
  var _default = DesignStepper;
64
94
  exports.default = _default;
@@ -19,7 +19,6 @@
19
19
  align-items: center;
20
20
  transition: .3s;
21
21
  width: calc( 100% - 2rem );
22
- justify-content: center;
23
22
  }
24
23
 
25
24
  .cbx-stepper-item-contentText:last-child {
@@ -30,9 +29,10 @@
30
29
  padding-left: 0;
31
30
  padding-right: 0;
32
31
  padding: 0.5rem 0rem 0.5rem 0rem;
32
+ justify-content: center;
33
33
  }
34
34
 
35
- .cbx-stepper-item-contentText:hover {
35
+ .cbx-stepper-item-contentText-hover:hover {
36
36
  background: var(--gray1);
37
37
  border-radius: 0.25rem;
38
38
  }
@@ -46,8 +46,8 @@
46
46
  transition: .3s
47
47
  }
48
48
 
49
- .cbx-stepper-item-contentText:hover i,
50
- .cbx-stepper-item-contentText:hover p {
49
+ .cbx-stepper-item-contentText-hover:hover i,
50
+ .cbx-stepper-item-contentText-hover:hover p {
51
51
  color: var(--primary)
52
52
  }
53
53
 
@@ -19,7 +19,7 @@ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
19
19
 
20
20
  var _useWindowSize2 = _interopRequireDefault(require("../../HOCs/useWindowSize"));
21
21
 
22
- var _excluded = ["items", "active", "onClick"];
22
+ var _excluded = ["items", "active", "onClick", "freeNavigation"];
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
@@ -33,6 +33,8 @@ var Stepper = function Stepper(_ref) {
33
33
  var items = _ref.items,
34
34
  active = _ref.active,
35
35
  _onClick = _ref.onClick,
36
+ _ref$freeNavigation = _ref.freeNavigation,
37
+ freeNavigation = _ref$freeNavigation === void 0 ? true : _ref$freeNavigation,
36
38
  props = _objectWithoutProperties(_ref, _excluded);
37
39
 
38
40
  var _useWindowSize = (0, _useWindowSize2.default)(),
@@ -43,18 +45,19 @@ var Stepper = function Stepper(_ref) {
43
45
  }, props), items.map(function (item, index) {
44
46
  return /*#__PURE__*/_react.default.createElement("div", {
45
47
  onClick: function onClick() {
46
- return _onClick(item.name);
48
+ return freeNavigation && _onClick(item.name);
47
49
  },
48
50
  key: index,
49
51
  className: "cbx-stepper-item",
50
52
  style: {
51
53
  flex: items.length - 1 !== index && '1 1',
52
- maxWidth: "".concat('100' / (items.length - 1), "%")
54
+ maxWidth: "".concat('100' / (items.length - 1), "%"),
55
+ cursor: freeNavigation ? 'pointer' : 'inherit'
53
56
  }
54
57
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
55
58
  title: item.name || ''
56
59
  }, /*#__PURE__*/_react.default.createElement("div", {
57
- className: "".concat(innerWidth < 427 ? 'cbx-stepper-item-contentText cbx-stepper-item-contentText-mobile' : 'cbx-stepper-item-contentText'),
60
+ className: "".concat(innerWidth < 427 ? "cbx-stepper-item-contentText ".concat(freeNavigation && 'cbx-stepper-item-contentText-hover', " cbx-stepper-item-contentText-mobile") : "cbx-stepper-item-contentText ".concat(freeNavigation && 'cbx-stepper-item-contentText-hover')),
58
61
  style: {
59
62
  color: active === item.name || items.slice(index + 1).some(function (i) {
60
63
  return i.name === active;
@@ -78,12 +81,12 @@ var Stepper = function Stepper(_ref) {
78
81
 
79
82
  Stepper.displayName = "Stepper";
80
83
  Stepper.propTypes = {
81
- items: _propTypes.default.node,
84
+ items: _propTypes.default.array,
82
85
  active: _propTypes.default.node,
83
86
  onClick: _propTypes.default.func
84
87
  };
85
88
  Stepper.defaultProps = {
86
- items: {},
89
+ items: [],
87
90
  active: undefined,
88
91
  onClick: undefined
89
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",