@stokr/components-library 2.3.65-beta.2 → 2.3.65-beta.4

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.
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.WithTooltips = exports.WithHoverColor = exports.UsingChildren = exports.TableUniformity = exports.Default = exports.CustomIcon = exports.Clickable = exports.AllVariants = exports.AllStatesInRow = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _StatusTag = _interopRequireDefault(require("./StatusTag"));
9
+ var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
+ var _Icon = require("../Icon/Icon.style");
11
+ var _colors = _interopRequireDefault(require("../../styles/colors"));
12
+ var _global = _interopRequireDefault(require("../../styles/global"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ var _default = exports.default = {
15
+ title: 'Components Library/StatusTag',
16
+ component: _StatusTag.default,
17
+ decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(Story, null))],
18
+ argTypes: {
19
+ variant: {
20
+ control: {
21
+ type: 'select'
22
+ },
23
+ options: ['pending', 'initiated', 'confirmed', 'declined', 'paid', null],
24
+ description: 'Built-in variant (uses default icon and colors)'
25
+ },
26
+ text: {
27
+ control: 'text',
28
+ description: 'Text to display next to the icon'
29
+ },
30
+ icon: {
31
+ control: false,
32
+ description: 'Custom icon component (overrides variant icon)'
33
+ },
34
+ tooltip: {
35
+ control: 'text',
36
+ description: 'Tooltip text (uses InfoIcon)'
37
+ },
38
+ iconColor: {
39
+ control: 'color',
40
+ description: 'Default icon color (defaults to grey)'
41
+ },
42
+ hoverColor: {
43
+ control: 'color',
44
+ description: 'Icon color on hover'
45
+ },
46
+ disableHoverColor: {
47
+ control: 'boolean',
48
+ description: 'Disable hover color change (for pre-colored icons)',
49
+ defaultValue: false
50
+ },
51
+ minWidth: {
52
+ control: 'text',
53
+ description: 'Minimum width (for table uniformity)'
54
+ },
55
+ onClick: {
56
+ action: 'clicked',
57
+ description: 'Click handler'
58
+ }
59
+ }
60
+ }; // Default example
61
+ const Default = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
62
+ variant: "pending",
63
+ text: "Pending"
64
+ }));
65
+
66
+ // All variants
67
+ exports.Default = Default;
68
+ const AllVariants = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
69
+ style: {
70
+ display: 'flex',
71
+ flexDirection: 'column',
72
+ gap: '16px'
73
+ }
74
+ }, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
75
+ variant: "pending",
76
+ text: "Pending"
77
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
78
+ variant: "initiated",
79
+ text: "Initiated"
80
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
81
+ variant: "confirmed",
82
+ text: "Confirmed"
83
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
84
+ variant: "declined",
85
+ text: "Declined"
86
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
87
+ variant: "paid",
88
+ text: "Paid"
89
+ })));
90
+
91
+ // Using children instead of text prop
92
+ exports.AllVariants = AllVariants;
93
+ const UsingChildren = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
94
+ style: {
95
+ display: 'flex',
96
+ flexDirection: 'column',
97
+ gap: '16px'
98
+ }
99
+ }, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
100
+ variant: "pending"
101
+ }, "Pending"), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
102
+ variant: "initiated"
103
+ }, "Initiated"), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
104
+ variant: "paid"
105
+ }, "Paid")));
106
+
107
+ // With hover color change
108
+ exports.UsingChildren = UsingChildren;
109
+ const WithHoverColor = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
110
+ style: {
111
+ display: 'flex',
112
+ flexDirection: 'column',
113
+ gap: '16px'
114
+ }
115
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
116
+ style: {
117
+ marginBottom: '8px',
118
+ fontSize: '14px'
119
+ }
120
+ }, "Pending (hover to see color change)"), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
121
+ variant: "pending",
122
+ text: "Pending"
123
+ })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
124
+ style: {
125
+ marginBottom: '8px',
126
+ fontSize: '14px'
127
+ }
128
+ }, "Custom hover color"), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
129
+ variant: "pending",
130
+ text: "Custom Hover",
131
+ hoverColor: _colors.default.blue
132
+ }))));
133
+
134
+ // Custom icon
135
+ exports.WithHoverColor = WithHoverColor;
136
+ const CustomIcon = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
137
+ style: {
138
+ display: 'flex',
139
+ flexDirection: 'column',
140
+ gap: '16px'
141
+ }
142
+ }, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
143
+ icon: /*#__PURE__*/_react.default.createElement(_Icon.Icon, {
144
+ icon: _Icon.iconsMap.check,
145
+ size: 12
146
+ }),
147
+ text: "Custom Icon",
148
+ hoverColor: _colors.default.freshGreen
149
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
150
+ icon: /*#__PURE__*/_react.default.createElement(_Icon.Icon, {
151
+ icon: _Icon.iconsMap.warning,
152
+ size: 12
153
+ }),
154
+ text: "Warning",
155
+ hoverColor: _colors.default.warningOrange
156
+ })));
157
+
158
+ // With tooltips
159
+ exports.CustomIcon = CustomIcon;
160
+ const WithTooltips = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
161
+ style: {
162
+ display: 'flex',
163
+ flexDirection: 'column',
164
+ gap: '16px'
165
+ }
166
+ }, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
167
+ variant: "pending",
168
+ text: "Pending",
169
+ tooltip: "This transaction is awaiting confirmation"
170
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
171
+ variant: "initiated",
172
+ text: "Initiated",
173
+ tooltip: "Transaction has been initiated and is in progress"
174
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
175
+ variant: "paid",
176
+ text: "Paid",
177
+ tooltip: "Payment has been successfully completed"
178
+ })));
179
+
180
+ // Table uniformity
181
+ exports.WithTooltips = WithTooltips;
182
+ const TableUniformity = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
183
+ style: {
184
+ display: 'flex',
185
+ flexDirection: 'column',
186
+ gap: '8px'
187
+ }
188
+ }, /*#__PURE__*/_react.default.createElement("h4", {
189
+ style: {
190
+ marginBottom: '8px',
191
+ fontSize: '14px'
192
+ }
193
+ }, "All tags with same minWidth (for table columns)"), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
194
+ variant: "pending",
195
+ text: "Pending",
196
+ minWidth: "120px",
197
+ center: true
198
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
199
+ variant: "initiated",
200
+ text: "Initiated",
201
+ minWidth: "120px",
202
+ center: true
203
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
204
+ variant: "confirmed",
205
+ text: "Confirmed",
206
+ minWidth: "120px",
207
+ center: true
208
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
209
+ variant: "declined",
210
+ text: "Declined",
211
+ minWidth: "120px",
212
+ center: true
213
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
214
+ variant: "paid",
215
+ text: "Paid",
216
+ minWidth: "120px",
217
+ center: true
218
+ })));
219
+
220
+ // Clickable
221
+ exports.TableUniformity = TableUniformity;
222
+ const Clickable = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
223
+ style: {
224
+ display: 'flex',
225
+ flexDirection: 'column',
226
+ gap: '16px'
227
+ }
228
+ }, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
229
+ variant: "pending",
230
+ text: "Clickable Pending",
231
+ onClick: () => alert('Clicked!')
232
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
233
+ variant: "paid",
234
+ text: "Clickable Paid",
235
+ onClick: () => alert('Paid clicked!')
236
+ })));
237
+
238
+ // All states in a row
239
+ exports.Clickable = Clickable;
240
+ const AllStatesInRow = () => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
241
+ style: {
242
+ display: 'flex',
243
+ flexWrap: 'wrap',
244
+ gap: '12px'
245
+ }
246
+ }, /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
247
+ variant: "pending",
248
+ text: "Pending"
249
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
250
+ variant: "initiated",
251
+ text: "Initiated"
252
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
253
+ variant: "confirmed",
254
+ text: "Confirmed"
255
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
256
+ variant: "declined",
257
+ text: "Declined"
258
+ }), /*#__PURE__*/_react.default.createElement(_StatusTag.default, {
259
+ variant: "paid",
260
+ text: "Paid"
261
+ })));
262
+ exports.AllStatesInRow = AllStatesInRow;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StatusText = exports.StatusTagWrapper = exports.StatusTagContainer = exports.PaidIconWrapper = exports.IconWrapper = exports.DeclinedIconWrapper = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ var _colors = _interopRequireDefault(require("../../styles/colors"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const StatusTagContainer = exports.StatusTagContainer = _styledComponents.default.div.withConfig({
11
+ displayName: "StatusTagstyles__StatusTagContainer",
12
+ componentId: "sc-24azs1-0"
13
+ })(["display:inline-flex;cursor:", ";transition:opacity 0.2s ease;&:hover{opacity:", ";}"], props => props.hasClick ? 'pointer' : 'default', props => props.hasClick ? 0.8 : 1);
14
+ const StatusTagWrapper = exports.StatusTagWrapper = _styledComponents.default.div.withConfig({
15
+ displayName: "StatusTagstyles__StatusTagWrapper",
16
+ componentId: "sc-24azs1-1"
17
+ })(["display:flex;align-items:center;gap:6px;padding:6px 10px;background-color:transparent;border:1px solid ", ";border-radius:4px;white-space:nowrap;min-width:", ";justify-content:", ";"], _colors.default.lightGrey, props => props.minWidth || 'auto', props => props.center ? 'center' : 'flex-start');
18
+ const IconWrapper = exports.IconWrapper = _styledComponents.default.div.withConfig({
19
+ displayName: "StatusTagstyles__IconWrapper",
20
+ componentId: "sc-24azs1-2"
21
+ })(["display:flex;align-items:center;justify-content:center;flex-shrink:0;width:12px;height:12px;color:", ";transition:color 0.2s ease;svg{width:100%;height:100%;display:block;}", " ", ""], props => props.iconColor || _colors.default.grey2, props => !props.isCustomIcon && "\n svg path,\n svg circle,\n svg rect,\n svg line {\n ".concat(!props.disableHoverColor ? "fill: currentColor;" : '', "\n }\n "), props => !props.disableHoverColor && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n color: ").concat(props.hoverColor, ";\n }\n "));
22
+ const StatusText = exports.StatusText = _styledComponents.default.span.withConfig({
23
+ displayName: "StatusTagstyles__StatusText",
24
+ componentId: "sc-24azs1-3"
25
+ })(["font-size:12px;font-weight:600;line-height:18px;color:", ";letter-spacing:0.6px;"], _colors.default.black);
26
+
27
+ // Paid icon wrapper (check + green circle)
28
+ const PaidIconWrapper = exports.PaidIconWrapper = _styledComponents.default.div.withConfig({
29
+ displayName: "StatusTagstyles__PaidIconWrapper",
30
+ componentId: "sc-24azs1-4"
31
+ })(["width:12px;height:12px;border-radius:50%;background-color:", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color 0.2s ease;svg{width:8px;height:8px;}svg path{stroke:", ";}", ""], props => props.iconColor || _colors.default.grey2, _colors.default.white, props => !props.disableHoverColor && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n background-color: ").concat(props.hoverColor, ";\n }\n "));
32
+
33
+ // Declined icon wrapper (cross + red circle)
34
+ const DeclinedIconWrapper = exports.DeclinedIconWrapper = _styledComponents.default.div.withConfig({
35
+ displayName: "StatusTagstyles__DeclinedIconWrapper",
36
+ componentId: "sc-24azs1-5"
37
+ })(["width:12px;height:12px;border-radius:50%;background-color:", ";display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color 0.2s ease;svg{width:6px;height:6px;}svg path{stroke:", ";}", ""], props => props.iconColor || _colors.default.grey2, _colors.default.white, props => !props.disableHoverColor && props.hoverColor && "\n ".concat(StatusTagContainer, ":hover & {\n background-color: ").concat(props.hoverColor, ";\n }\n "));
package/dist/index.js CHANGED
@@ -608,6 +608,17 @@ Object.keys(_NewVentureModal).forEach(function (key) {
608
608
  }
609
609
  });
610
610
  });
611
+ var _SideModal = require("./components/Modal/SideModal");
612
+ Object.keys(_SideModal).forEach(function (key) {
613
+ if (key === "default" || key === "__esModule") return;
614
+ if (key in exports && exports[key] === _SideModal[key]) return;
615
+ Object.defineProperty(exports, key, {
616
+ enumerable: true,
617
+ get: function () {
618
+ return _SideModal[key];
619
+ }
620
+ });
621
+ });
611
622
  var _MultiProgressBar = require("./components/MultiProgressBar/MultiProgressBar");
612
623
  Object.keys(_MultiProgressBar).forEach(function (key) {
613
624
  if (key === "default" || key === "__esModule") return;
@@ -1443,4 +1454,15 @@ Object.keys(_TimelineStep).forEach(function (key) {
1443
1454
  return _TimelineStep[key];
1444
1455
  }
1445
1456
  });
1457
+ });
1458
+ var _StatusTag = require("./components/StatusTag/StatusTag");
1459
+ Object.keys(_StatusTag).forEach(function (key) {
1460
+ if (key === "default" || key === "__esModule") return;
1461
+ if (key in exports && exports[key] === _StatusTag[key]) return;
1462
+ Object.defineProperty(exports, key, {
1463
+ enumerable: true,
1464
+ get: function () {
1465
+ return _StatusTag[key];
1466
+ }
1467
+ });
1446
1468
  });
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.08578 1.58578C1.5 2.17157 1.5 3.11438 1.5 5V7C1.5 8.8856 1.5 9.82845 2.08578 10.4142C2.67157 11 3.61438 11 5.5 11H6.5C8.3856 11 9.32845 11 9.9142 10.4142C10.5 9.82845 10.5 8.8856 10.5 7V5C10.5 3.11438 10.5 2.17157 9.9142 1.58578C9.32845 1 8.3856 1 6.5 1H5.5C3.61438 1 2.67157 1 2.08578 1.58578ZM4 4.625C3.7929 4.625 3.625 4.79289 3.625 5C3.625 5.2071 3.7929 5.375 4 5.375H8C8.2071 5.375 8.375 5.2071 8.375 5C8.375 4.79289 8.2071 4.625 8 4.625H4ZM4 6.625C3.7929 6.625 3.625 6.7929 3.625 7C3.625 7.2071 3.7929 7.375 4 7.375H6.5C6.7071 7.375 6.875 7.2071 6.875 7C6.875 6.7929 6.7071 6.625 6.5 6.625H4Z" fill="#0050CA"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.33333 4C9.17427 4 10.6667 5.49239 10.6667 7.33333M11.1059 11.1033L14 14M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z" stroke="#9B9B9B" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_4481_24713)">
3
+ <path d="M11.9389 0.491782C11.8855 0.44493 11.8095 0.43406 11.7451 0.463943L0.103795 5.8728C0.0411228 5.90193 0.000764077 5.96446 1.07135e-05 6.03356C-0.00074265 6.10265 0.0382887 6.16604 0.100352 6.1965L3.39481 7.81329C3.45522 7.84296 3.52726 7.83625 3.58121 7.79593L6.78433 5.40188L4.26975 7.98843C4.23388 8.02534 4.21558 8.07589 4.21953 8.12719L4.46989 11.3878C4.47545 11.46 4.52389 11.5218 4.59273 11.5444C4.61113 11.5505 4.63004 11.5534 4.64873 11.5534C4.69999 11.5534 4.74986 11.5314 4.78455 11.4912L6.53314 9.46498L8.69475 10.4978C8.74168 10.5202 8.79599 10.5212 8.84367 10.5004C8.89135 10.4797 8.92765 10.4393 8.94322 10.3897L11.9918 0.680374C12.0131 0.612571 11.9923 0.538634 11.9389 0.491782Z" fill="#0050CA"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_4481_24713">
7
+ <rect width="12" height="12" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.65-beta.2",
3
+ "version": "2.3.65-beta.4",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",