linear-react-components-ui 1.1.20-beta.34 → 1.1.20-beta.36

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.
@@ -4,8 +4,13 @@
4
4
  .wizard-wrapper {
5
5
  .wizard-content {
6
6
  display: flex !important;
7
- flex-direction: column;
8
- .wizard-progresbar {
7
+ &:has(.wizard-progressbar[data-position="top"]) {
8
+ flex-direction: column;
9
+ }
10
+ &:has(.wizard-progressbar[data-position="left"]) {
11
+ flex-direction: row;
12
+ }
13
+ .wizard-progressbar[data-position="top"] {
9
14
  width: 100%;
10
15
  display: grid;
11
16
  grid-auto-columns: 1fr;
@@ -120,6 +125,87 @@
120
125
  }
121
126
  }
122
127
  }
128
+ .wizard-progressbar[data-position="left"] {
129
+ width: 166px;
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: 30px;
133
+ border-right: 1px solid #ccc;
134
+ padding-right: 16px;
135
+ margin-right: 10px;
136
+ > .title {
137
+ font-size: 16px;
138
+ font-weight: 600;
139
+ display: flex;
140
+ align-items: center;
141
+ gap: 10px;
142
+ position: relative;
143
+ text-align: center;
144
+
145
+ & + .title {
146
+ &:before {
147
+ content: "";
148
+ position: absolute;
149
+ top: -34px;
150
+ left: 17px;
151
+ width: 3px;
152
+ height: 100%;
153
+ background-color: #dadada;
154
+ }
155
+ }
156
+
157
+ &[data-completed="true"] {
158
+ & + .title:before {
159
+ background-color: $success-color !important;
160
+ }
161
+ > .step {
162
+ > .number {
163
+ background-color: $success-color;
164
+ border-color: $success-color;
165
+ }
166
+ }
167
+ }
168
+ &[data-disabled="true"] {
169
+ .step {
170
+ .number {
171
+ background-color: #dadada;
172
+ border-color: #dadada;
173
+ }
174
+ }
175
+ .step-title {
176
+ color: #dadada;
177
+ }
178
+ }
179
+ > .step {
180
+ display: flex;
181
+ flex-direction: column;
182
+ align-items: center;
183
+ justify-content: center;
184
+ width: 36px;
185
+ > .number {
186
+ display: flex;
187
+ align-items: center;
188
+ justify-content: center;
189
+ font-size: 20px;
190
+ font-weight: 600;
191
+ width: 36px;
192
+ height: 36px;
193
+ border-radius: 100%;
194
+ color: #fff;
195
+ background-color: $color-light-dark;
196
+ z-index: 1;
197
+ transition: all 0.2s ease-in-out;
198
+ border: 2px solid $color-light-dark;
199
+ }
200
+ }
201
+ > .step-title {
202
+ max-width: 150px;
203
+ overflow: hidden;
204
+ font-weight: 500;
205
+ color: $font-color-soft;
206
+ }
207
+ }
208
+ }
123
209
  }
124
210
  }
125
211
  }
@@ -81,6 +81,7 @@ interface WizardComponentProps extends Omit<IFormProps, 'content'> {
81
81
  title?: string;
82
82
  handlerClose?: () => void;
83
83
  controls: WizardControls;
84
+ position?: 'top' | 'left';
84
85
  }
85
86
  interface WizardStepComponentProps {
86
87
  children: React.ReactNode;
@@ -8,6 +8,6 @@ import '../../icons/helper.js';
8
8
 
9
9
  declare const WizardContext: React__default.Context<WizardControls | null>;
10
10
  declare const useWizardContext: () => WizardControls | null;
11
- declare function Wizard({ children, controls, showProgressbar, ...dialogProps }: Readonly<WizardComponentProps>): JSX.Element;
11
+ declare function Wizard({ children, controls, showProgressbar, position, ...dialogProps }: Readonly<WizardComponentProps>): JSX.Element;
12
12
 
13
13
  export { Wizard as Container, WizardContext, Wizard as default, useWizardContext };
@@ -25,7 +25,7 @@ var _progressbar = require("./progressbar");
25
25
  require("../../assets/styles/wizard.scss");
26
26
  var _step = require("./step");
27
27
  var _useWizard = require("./useWizard");
28
- const _excluded = ["children", "controls", "showProgressbar"];
28
+ const _excluded = ["children", "controls", "showProgressbar", "position"];
29
29
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
30
30
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
31
31
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -39,7 +39,8 @@ function Wizard(_ref) {
39
39
  let {
40
40
  children,
41
41
  controls,
42
- showProgressbar = true
42
+ showProgressbar = true,
43
+ position = 'top'
43
44
  } = _ref,
44
45
  dialogProps = _objectWithoutProperties(_ref, _excluded);
45
46
  const {
@@ -66,7 +67,8 @@ function Wizard(_ref) {
66
67
  wrapperClassName: "wizard-wrapper",
67
68
  contentClassName: "wizard-content"
68
69
  }, dialogProps), showProgressbar && /*#__PURE__*/_react.default.createElement(_progressbar.Progressbar, {
69
- stepsTitle: stepsTitle
70
+ stepsTitle: stepsTitle,
71
+ position: position
70
72
  }), /*#__PURE__*/_react.default.createElement("div", {
71
73
  className: "wizard-body"
72
74
  }, currentStepElement)));
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
2
 
3
- declare function Progressbar({ customClass, customStyle, stepsTitle }: Readonly<{
3
+ declare function Progressbar({ customClass, customStyle, stepsTitle, position, }: Readonly<{
4
4
  customClass?: string;
5
5
  stepsTitle: {
6
6
  title: string;
@@ -8,6 +8,7 @@ declare function Progressbar({ customClass, customStyle, stepsTitle }: Readonly<
8
8
  completed: boolean;
9
9
  }[];
10
10
  customStyle?: CSSProperties;
11
+ position?: 'top' | 'left';
11
12
  }>): JSX.Element;
12
13
 
13
14
  export { Progressbar };
@@ -11,7 +11,8 @@ function Progressbar(_ref) {
11
11
  let {
12
12
  customClass,
13
13
  customStyle,
14
- stepsTitle
14
+ stepsTitle,
15
+ position = 'top'
15
16
  } = _ref;
16
17
  const context = (0, _.useWizardContext)();
17
18
  if (!context) throw new Error('WizardProgressbar must be used within a Wizard component');
@@ -19,8 +20,9 @@ function Progressbar(_ref) {
19
20
  currentStep
20
21
  } = context;
21
22
  return /*#__PURE__*/_react.default.createElement("div", {
22
- className: `wizard-progresbar ${customClass}`,
23
- style: customStyle
23
+ className: `wizard-progressbar ${customClass}`,
24
+ style: customStyle,
25
+ "data-position": position
24
26
  }, stepsTitle.map(step => /*#__PURE__*/_react.default.createElement("div", {
25
27
  key: step.number,
26
28
  className: "title",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.20-beta.34",
3
+ "version": "1.1.20-beta.36",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",