@stokr/components-library 2.3.65-beta.1 → 2.3.65-beta.3

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.
@@ -10,7 +10,6 @@ var _AuthContext = require("../../context/AuthContext");
10
10
  var _ComponentWrapper = _interopRequireDefault(require("../ComponentWrapper/ComponentWrapper.styles"));
11
11
  var _Switch = _interopRequireDefault(require("../Switch/Switch"));
12
12
  var _Text = _interopRequireDefault(require("../Text/Text.styles"));
13
- var _Button = _interopRequireDefault(require("../Button/Button.styles"));
14
13
  var _loginWithOtpFlow = _interopRequireDefault(require("./login-with-otp-flow"));
15
14
  var _enable2faFlow = _interopRequireDefault(require("./enable-2fa-flow"));
16
15
  var _disable2faFlow = _interopRequireDefault(require("./disable-2fa-flow"));
@@ -18,7 +17,7 @@ var _colors = _interopRequireDefault(require("../../styles/colors"));
18
17
  var _InfoIcon = _interopRequireDefault(require("../InfoIcon/InfoIcon"));
19
18
  var _Modal = require("../Modal/Modal");
20
19
  var _Sucess2FA = _interopRequireDefault(require("./Sucess2FA"));
21
- const _excluded = ["onRequiresRecentLoginError", "open2faflow", "onLoginAgainClick", "openDisable2faflow"];
20
+ const _excluded = ["onRequiresRecentLoginError", "open2faflow", "onLoginAgainClick", "openDisable2faflow", "title", "subtitle", "showSwitch", "customComponent"];
22
21
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
23
22
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
24
23
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -33,7 +32,11 @@ const Main2FAFlow = _ref => {
33
32
  onRequiresRecentLoginError,
34
33
  open2faflow,
35
34
  onLoginAgainClick,
36
- openDisable2faflow
35
+ openDisable2faflow,
36
+ title = 'SET UP YOUR LOG IN TWO FACTOR AUTHENTICATION',
37
+ subtitle = 'Protect your account with an additional layer of security to log in',
38
+ showSwitch = true,
39
+ customComponent
37
40
  } = _ref,
38
41
  props = _objectWithoutProperties(_ref, _excluded);
39
42
  const {
@@ -58,6 +61,7 @@ const Main2FAFlow = _ref => {
58
61
  checkMfaEnrollment();
59
62
  generateTotp();
60
63
  }
64
+ // eslint-disable-next-line react-hooks/exhaustive-deps
61
65
  }, [user, userMfaEnrollment]);
62
66
 
63
67
  //remove succes message after 5 seconds
@@ -70,7 +74,7 @@ const Main2FAFlow = _ref => {
70
74
  }, [successMessage]);
71
75
  const generateTotp = async () => {
72
76
  try {
73
- const response = await generateTotpSecret(user);
77
+ const response = await generateTotpSecret();
74
78
  settotpData(response);
75
79
  } catch (error) {
76
80
  if (error.code === 'auth/requires-recent-login' || error.code === 'auth/unsupported-first-factor') {
@@ -79,7 +83,7 @@ const Main2FAFlow = _ref => {
79
83
  }
80
84
  };
81
85
  const switchOpenFlow = (prevFlowId, nextFlowId) => {
82
- setIsFlowOpen(_objectSpread(_objectSpread({}, isFlowopen), {}, {
86
+ setIsFlowOpen(prev => _objectSpread(_objectSpread({}, prev), {}, {
83
87
  [prevFlowId]: false,
84
88
  [nextFlowId]: true
85
89
  }));
@@ -102,10 +106,25 @@ const Main2FAFlow = _ref => {
102
106
  });
103
107
  onRequiresRecentLoginError && onRequiresRecentLoginError();
104
108
  };
109
+
110
+ // Expose flow control functions for customComponent
111
+ const flowActions = {
112
+ openEnable2FA: () => switchOpenFlow('disable2fa', 'enable2fa'),
113
+ openDisable2FA: () => switchOpenFlow('enable2fa', 'disable2fa'),
114
+ closeFlows: () => {
115
+ setIsFlowOpen({
116
+ enable2fa: false,
117
+ disable2fa: false,
118
+ requiresRecentLogin: false
119
+ });
120
+ },
121
+ is2FAEnabled,
122
+ isFlowOpen: isFlowopen
123
+ };
105
124
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
106
125
  alignVertically: true,
107
126
  noPaddingHorizontal: true
108
- }, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("h5", null, "SET UP YOUR LOG IN TWO FACTOR AUTHENTICATION"))), /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("p", null, "Protect your account with an additional layer of security to log in")), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
127
+ }, /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("h5", null, title))), /*#__PURE__*/_react.default.createElement(_Text.default, null, /*#__PURE__*/_react.default.createElement("p", null, subtitle)), showSwitch && /*#__PURE__*/_react.default.createElement(_ComponentWrapper.default, {
109
128
  noPaddingHorizontal: true
110
129
  }, /*#__PURE__*/_react.default.createElement(_InfoIcon.default, {
111
130
  position: 'top',
@@ -146,7 +165,9 @@ const Main2FAFlow = _ref => {
146
165
  bottom: 0,
147
166
  left: 0
148
167
  }
149
- }, /*#__PURE__*/_react.default.createElement("p", null, successMessage))), isFlowopen.enable2fa && /*#__PURE__*/_react.default.createElement(_enable2faFlow.default, {
168
+ }, /*#__PURE__*/_react.default.createElement("p", null, successMessage))), customComponent && (typeof customComponent === 'function' ? customComponent(flowActions) : /*#__PURE__*/_react.default.isValidElement(customComponent) ? /*#__PURE__*/_react.default.cloneElement(customComponent, {
169
+ flowActions
170
+ }) : customComponent), isFlowopen.enable2fa && /*#__PURE__*/_react.default.createElement(_enable2faFlow.default, {
150
171
  showFlow: isFlowopen.enable2fa,
151
172
  setShowFlow: value => setIsFlowOpen(_objectSpread(_objectSpread({}, isFlowopen), {}, {
152
173
  enable2fa: value
@@ -3,31 +3,160 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.MainFlow = void 0;
7
- var _react = _interopRequireDefault(require("react"));
6
+ exports.default = exports.WithoutSwitch = exports.WithCustomComponentFunction = exports.WithCustomComponent = exports.PreOpenedEnableFlow = exports.PreOpenedDisableFlow = exports.Default = exports.CustomTitles = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactRouterDom = require("react-router-dom");
9
9
  var _global = _interopRequireDefault(require("../../styles/global"));
10
10
  var _mainFlow = _interopRequireDefault(require("./main-flow"));
11
11
  var _AuthContext = require("../../context/AuthContext");
12
+ var _Button = _interopRequireDefault(require("../Button/Button.styles"));
13
+ var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
12
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
16
  var _default = exports.default = {
14
- title: 'Components Library/2FA',
17
+ title: 'Components Library/2FA/Main2FAFlow',
15
18
  component: _mainFlow.default,
16
19
  argTypes: {
17
- showFlow: {
18
- type: 'boolean',
20
+ title: {
21
+ control: 'text',
22
+ description: 'Title text for the 2FA section'
23
+ },
24
+ subtitle: {
25
+ control: 'text',
26
+ description: 'Subtitle text for the 2FA section'
27
+ },
28
+ showSwitch: {
29
+ control: 'boolean',
30
+ description: 'Show/hide the toggle switch',
19
31
  defaultValue: true
20
32
  },
21
- setShowFlow: {},
22
- setShowPending: {},
23
- withSuccessPage: {
24
- type: 'boolean',
25
- defaultValue: false
33
+ open2faflow: {
34
+ control: 'boolean',
35
+ description: 'Open enable 2FA flow on mount'
36
+ },
37
+ openDisable2faflow: {
38
+ control: 'boolean',
39
+ description: 'Open disable 2FA flow on mount'
40
+ },
41
+ onRequiresRecentLoginError: {
42
+ action: 'requiresRecentLogin',
43
+ description: 'Callback when recent login is required'
44
+ },
45
+ onLoginAgainClick: {
46
+ action: 'loginAgain',
47
+ description: 'Callback when user clicks login again'
48
+ }
49
+ },
50
+ decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, null, /*#__PURE__*/_react.default.createElement(_AuthContext.AuthProvider, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(Story, null))))]
51
+ };
52
+ const Template = args => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_mainFlow.default, args));
53
+
54
+ // Default example
55
+ const Default = exports.Default = Template.bind({});
56
+ Default.args = {};
57
+
58
+ // With custom component as React element
59
+ const WithCustomComponent = () => {
60
+ const CustomButtonGroup = _ref => {
61
+ var _flowActions$isFlowOp, _flowActions$isFlowOp2;
62
+ let {
63
+ flowActions
64
+ } = _ref;
65
+ if (!flowActions) return null;
66
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, {
67
+ noPaddingHorizontal: true,
68
+ style: {
69
+ marginTop: '16px'
70
+ }
71
+ }, /*#__PURE__*/_react.default.createElement("div", {
72
+ style: {
73
+ display: 'flex',
74
+ gap: '12px',
75
+ flexWrap: 'wrap'
76
+ }
77
+ }, /*#__PURE__*/_react.default.createElement(_Button.default, {
78
+ onClick: flowActions.openEnable2FA,
79
+ disabled: flowActions.is2FAEnabled
80
+ }, "Enable 2FA"), /*#__PURE__*/_react.default.createElement(_Button.default, {
81
+ onClick: flowActions.openDisable2FA,
82
+ disabled: !flowActions.is2FAEnabled,
83
+ secondary: true
84
+ }, "Disable 2FA"), /*#__PURE__*/_react.default.createElement(_Button.default, {
85
+ onClick: flowActions.closeFlows,
86
+ outline: true
87
+ }, "Close All Flows")), /*#__PURE__*/_react.default.createElement("div", {
88
+ style: {
89
+ marginTop: '12px',
90
+ fontSize: '12px',
91
+ color: '#666'
92
+ }
93
+ }, /*#__PURE__*/_react.default.createElement("p", null, "Status: ", flowActions.is2FAEnabled ? 'Enabled' : 'Disabled', /*#__PURE__*/_react.default.createElement("br", null), "Enable Flow Open: ", (_flowActions$isFlowOp = flowActions.isFlowOpen) !== null && _flowActions$isFlowOp !== void 0 && _flowActions$isFlowOp.enable2fa ? 'Yes' : 'No', /*#__PURE__*/_react.default.createElement("br", null), "Disable Flow Open:", ' ', (_flowActions$isFlowOp2 = flowActions.isFlowOpen) !== null && _flowActions$isFlowOp2 !== void 0 && _flowActions$isFlowOp2.disable2fa ? 'Yes' : 'No')));
94
+ };
95
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_mainFlow.default, {
96
+ customComponent: /*#__PURE__*/_react.default.createElement(CustomButtonGroup, null)
97
+ }));
98
+ };
99
+
100
+ // With custom component as render function
101
+ exports.WithCustomComponent = WithCustomComponent;
102
+ const WithCustomComponentFunction = () => {
103
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_mainFlow.default, {
104
+ customComponent: flowActions => {
105
+ if (!flowActions) return null;
106
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, {
107
+ noPaddingHorizontal: true,
108
+ style: {
109
+ marginTop: '16px'
110
+ }
111
+ }, /*#__PURE__*/_react.default.createElement("div", {
112
+ style: {
113
+ display: 'flex',
114
+ gap: '12px',
115
+ flexWrap: 'wrap'
116
+ }
117
+ }, /*#__PURE__*/_react.default.createElement(_Button.default, {
118
+ onClick: flowActions.openEnable2FA,
119
+ disabled: flowActions.is2FAEnabled
120
+ }, "Enable 2FA"), /*#__PURE__*/_react.default.createElement(_Button.default, {
121
+ onClick: flowActions.openDisable2FA,
122
+ disabled: !flowActions.is2FAEnabled,
123
+ secondary: true
124
+ }, "Disable 2FA"), /*#__PURE__*/_react.default.createElement(_Button.default, {
125
+ onClick: flowActions.closeFlows,
126
+ outline: true
127
+ }, "Close All Flows")), /*#__PURE__*/_react.default.createElement("div", {
128
+ style: {
129
+ marginTop: '12px',
130
+ fontSize: '12px',
131
+ color: '#666'
132
+ }
133
+ }, /*#__PURE__*/_react.default.createElement("p", null, "Status: ", flowActions.is2FAEnabled ? 'Enabled' : 'Disabled')));
26
134
  }
27
- }
135
+ }));
28
136
  };
29
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.BrowserRouter, null, /*#__PURE__*/_react.default.createElement(_AuthContext.AuthProvider, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_mainFlow.default, args), /*#__PURE__*/_react.default.createElement("p", null, "some text"))));
30
- const MainFlow = exports.MainFlow = Template.bind({});
31
- MainFlow.args = {
32
- //open2faflow: true,
137
+
138
+ // Without switch
139
+ exports.WithCustomComponentFunction = WithCustomComponentFunction;
140
+ const WithoutSwitch = exports.WithoutSwitch = Template.bind({});
141
+ WithoutSwitch.args = {
142
+ showSwitch: false
143
+ };
144
+
145
+ // Custom titles
146
+ const CustomTitles = exports.CustomTitles = Template.bind({});
147
+ CustomTitles.args = {
148
+ title: 'Two-Factor Authentication',
149
+ subtitle: 'Add an extra layer of security to your account'
150
+ };
151
+
152
+ // Pre-opened enable flow
153
+ const PreOpenedEnableFlow = exports.PreOpenedEnableFlow = Template.bind({});
154
+ PreOpenedEnableFlow.args = {
155
+ open2faflow: true
156
+ };
157
+
158
+ // Pre-opened disable flow
159
+ const PreOpenedDisableFlow = exports.PreOpenedDisableFlow = Template.bind({});
160
+ PreOpenedDisableFlow.args = {
161
+ openDisable2faflow: true
33
162
  };
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.SearchInput = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _SearchInput = require("./SearchInput.styles");
9
+ var _searchIcon = require("../../static/images/search-icon.svg");
10
+ const _excluded = ["value", "onChange", "placeholder", "icon", "showIcon", "disabled", "onFocus", "onBlur", "className", "containerStyle", "inputStyle", "iconStyle", "id", "name", "aria-label", "aria-describedby"];
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
13
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
15
+ const SearchInput = _ref => {
16
+ let {
17
+ value = '',
18
+ onChange,
19
+ placeholder = 'Search',
20
+ icon,
21
+ showIcon = true,
22
+ disabled = false,
23
+ onFocus,
24
+ onBlur,
25
+ className,
26
+ containerStyle,
27
+ inputStyle,
28
+ iconStyle,
29
+ id,
30
+ name,
31
+ 'aria-label': ariaLabel,
32
+ 'aria-describedby': ariaDescribedBy
33
+ } = _ref,
34
+ props = _objectWithoutProperties(_ref, _excluded);
35
+ const handleChange = e => {
36
+ if (onChange) {
37
+ onChange(e.target.value, e);
38
+ }
39
+ };
40
+ const handleFocus = e => {
41
+ if (onFocus) {
42
+ onFocus(e);
43
+ }
44
+ };
45
+ const handleBlur = e => {
46
+ if (onBlur) {
47
+ onBlur(e);
48
+ }
49
+ };
50
+ const inputId = id || "search-input-".concat(Math.random().toString(36).substr(2, 9));
51
+ const inputName = name || inputId;
52
+ return /*#__PURE__*/_react.default.createElement(_SearchInput.SearchInputContainer, {
53
+ className: className,
54
+ style: containerStyle
55
+ }, /*#__PURE__*/_react.default.createElement(_SearchInput.SearchInputWrapper, {
56
+ disabled: disabled
57
+ }, showIcon && /*#__PURE__*/_react.default.createElement(_SearchInput.SearchIconWrapper, {
58
+ style: iconStyle
59
+ }, icon || /*#__PURE__*/_react.default.createElement(_searchIcon.ReactComponent, null)), /*#__PURE__*/_react.default.createElement(_SearchInput.SearchInputField, _extends({
60
+ id: inputId,
61
+ name: inputName,
62
+ type: "search",
63
+ value: value,
64
+ onChange: handleChange,
65
+ onFocus: handleFocus,
66
+ onBlur: handleBlur,
67
+ placeholder: placeholder,
68
+ disabled: disabled,
69
+ "aria-label": ariaLabel || placeholder,
70
+ "aria-describedby": ariaDescribedBy,
71
+ style: inputStyle
72
+ }, props))));
73
+ };
74
+ exports.SearchInput = SearchInput;
75
+ var _default = exports.default = SearchInput;
@@ -0,0 +1,304 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.WithoutIcon = exports.WithInitialValue = exports.WithCustomIcon = exports.LongText = exports.Disabled = exports.DifferentWidths = exports.Default = exports.CustomStyling = exports.CustomPlaceholder = exports.AllStates = exports.AccessibilityExample = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _SearchInput = _interopRequireDefault(require("./SearchInput"));
9
+ var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
+ var _colors = _interopRequireDefault(require("../../styles/colors"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
14
+ var _default = exports.default = {
15
+ title: 'Components Library/Inputs/SearchInput',
16
+ component: _SearchInput.default,
17
+ argTypes: {
18
+ value: {
19
+ control: 'text',
20
+ description: 'The search input value (controlled)'
21
+ },
22
+ onChange: {
23
+ action: 'changed',
24
+ description: 'Callback fired when the value changes'
25
+ },
26
+ placeholder: {
27
+ control: 'text',
28
+ description: 'Placeholder text',
29
+ defaultValue: 'Search'
30
+ },
31
+ showIcon: {
32
+ control: 'boolean',
33
+ description: 'Show/hide the search icon',
34
+ defaultValue: true
35
+ },
36
+ disabled: {
37
+ control: 'boolean',
38
+ description: 'Disable the input',
39
+ defaultValue: false
40
+ },
41
+ icon: {
42
+ control: false,
43
+ description: 'Custom icon component (React node)'
44
+ },
45
+ onFocus: {
46
+ action: 'focused',
47
+ description: 'Callback fired when input receives focus'
48
+ },
49
+ onBlur: {
50
+ action: 'blurred',
51
+ description: 'Callback fired when input loses focus'
52
+ }
53
+ }
54
+ }; // Controlled component wrapper for stories
55
+ const ControlledSearchInput = args => {
56
+ const [value, setValue] = (0, _react.useState)(args.value || '');
57
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_SearchInput.default, _extends({}, args, {
58
+ value: value,
59
+ onChange: (newValue, e) => {
60
+ var _args$onChange;
61
+ setValue(newValue);
62
+ (_args$onChange = args.onChange) === null || _args$onChange === void 0 || _args$onChange.call(args, newValue, e);
63
+ }
64
+ })), /*#__PURE__*/_react.default.createElement("div", {
65
+ style: {
66
+ marginTop: '12px',
67
+ fontSize: '12px',
68
+ color: _colors.default.grey2
69
+ }
70
+ }, "Current value: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(empty)')));
71
+ };
72
+
73
+ // Default example
74
+ const Default = exports.Default = ControlledSearchInput.bind({});
75
+ Default.args = {
76
+ placeholder: 'Search'
77
+ };
78
+
79
+ // Without icon
80
+ const WithoutIcon = exports.WithoutIcon = ControlledSearchInput.bind({});
81
+ WithoutIcon.args = {
82
+ placeholder: 'Search',
83
+ showIcon: false
84
+ };
85
+
86
+ // With custom placeholder
87
+ const CustomPlaceholder = exports.CustomPlaceholder = ControlledSearchInput.bind({});
88
+ CustomPlaceholder.args = {
89
+ placeholder: 'Search users, projects, or tags...'
90
+ };
91
+
92
+ // Disabled state
93
+ const Disabled = exports.Disabled = ControlledSearchInput.bind({});
94
+ Disabled.args = {
95
+ placeholder: 'Search',
96
+ value: 'Sample search text',
97
+ disabled: true
98
+ };
99
+
100
+ // With initial value
101
+ const WithInitialValue = exports.WithInitialValue = ControlledSearchInput.bind({});
102
+ WithInitialValue.args = {
103
+ placeholder: 'Search',
104
+ value: 'Initial search term'
105
+ };
106
+
107
+ // Custom icon example
108
+ const WithCustomIcon = () => {
109
+ const [value, setValue] = (0, _react.useState)('');
110
+ const CustomIcon = () => /*#__PURE__*/_react.default.createElement("svg", {
111
+ width: "20",
112
+ height: "20",
113
+ viewBox: "0 0 20 20",
114
+ fill: "none",
115
+ xmlns: "http://www.w3.org/2000/svg"
116
+ }, /*#__PURE__*/_react.default.createElement("circle", {
117
+ cx: "9",
118
+ cy: "9",
119
+ r: "6",
120
+ stroke: "currentColor",
121
+ strokeWidth: "2"
122
+ }), /*#__PURE__*/_react.default.createElement("path", {
123
+ d: "M15 15L12 12",
124
+ stroke: "currentColor",
125
+ strokeWidth: "2"
126
+ }));
127
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
128
+ value: value,
129
+ onChange: setValue,
130
+ placeholder: "Search with custom icon",
131
+ icon: /*#__PURE__*/_react.default.createElement(CustomIcon, null)
132
+ }), /*#__PURE__*/_react.default.createElement("div", {
133
+ style: {
134
+ marginTop: '12px',
135
+ fontSize: '12px',
136
+ color: _colors.default.grey2
137
+ }
138
+ }, "Current value: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(empty)')));
139
+ };
140
+
141
+ // Different widths
142
+ exports.WithCustomIcon = WithCustomIcon;
143
+ const DifferentWidths = () => {
144
+ const [value1, setValue1] = (0, _react.useState)('');
145
+ const [value2, setValue2] = (0, _react.useState)('');
146
+ const [value3, setValue3] = (0, _react.useState)('');
147
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
148
+ style: {
149
+ marginBottom: '16px'
150
+ }
151
+ }, /*#__PURE__*/_react.default.createElement("h4", {
152
+ style: {
153
+ marginBottom: '8px',
154
+ fontSize: '14px'
155
+ }
156
+ }, "Full width"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
157
+ value: value1,
158
+ onChange: setValue1,
159
+ placeholder: "Search (full width)"
160
+ })), /*#__PURE__*/_react.default.createElement("div", {
161
+ style: {
162
+ marginBottom: '16px',
163
+ maxWidth: '400px'
164
+ }
165
+ }, /*#__PURE__*/_react.default.createElement("h4", {
166
+ style: {
167
+ marginBottom: '8px',
168
+ fontSize: '14px'
169
+ }
170
+ }, "Max width 400px"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
171
+ value: value2,
172
+ onChange: setValue2,
173
+ placeholder: "Search (400px max)"
174
+ })), /*#__PURE__*/_react.default.createElement("div", {
175
+ style: {
176
+ marginBottom: '16px',
177
+ maxWidth: '200px'
178
+ }
179
+ }, /*#__PURE__*/_react.default.createElement("h4", {
180
+ style: {
181
+ marginBottom: '8px',
182
+ fontSize: '14px'
183
+ }
184
+ }, "Max width 200px"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
185
+ value: value3,
186
+ onChange: setValue3,
187
+ placeholder: "Search (200px max)"
188
+ })));
189
+ };
190
+
191
+ // Long text example
192
+ exports.DifferentWidths = DifferentWidths;
193
+ const LongText = exports.LongText = ControlledSearchInput.bind({});
194
+ LongText.args = {
195
+ placeholder: 'Search',
196
+ value: 'This is a very long search query that might overflow the input field'
197
+ };
198
+
199
+ // All states
200
+ const AllStates = () => {
201
+ const [value1, setValue1] = (0, _react.useState)('');
202
+ const [value2, setValue2] = (0, _react.useState)('');
203
+ const [value3, setValue3] = (0, _react.useState)('Sample text');
204
+ const [value4, setValue4] = (0, _react.useState)('Disabled with text');
205
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement("div", {
206
+ style: {
207
+ marginBottom: '24px'
208
+ }
209
+ }, /*#__PURE__*/_react.default.createElement("h4", {
210
+ style: {
211
+ marginBottom: '8px',
212
+ fontSize: '14px'
213
+ }
214
+ }, "Empty (default)"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
215
+ value: value1,
216
+ onChange: setValue1,
217
+ placeholder: "Search"
218
+ })), /*#__PURE__*/_react.default.createElement("div", {
219
+ style: {
220
+ marginBottom: '24px'
221
+ }
222
+ }, /*#__PURE__*/_react.default.createElement("h4", {
223
+ style: {
224
+ marginBottom: '8px',
225
+ fontSize: '14px'
226
+ }
227
+ }, "Without icon"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
228
+ value: value2,
229
+ onChange: setValue2,
230
+ placeholder: "Search",
231
+ showIcon: false
232
+ })), /*#__PURE__*/_react.default.createElement("div", {
233
+ style: {
234
+ marginBottom: '24px'
235
+ }
236
+ }, /*#__PURE__*/_react.default.createElement("h4", {
237
+ style: {
238
+ marginBottom: '8px',
239
+ fontSize: '14px'
240
+ }
241
+ }, "With value"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
242
+ value: value3,
243
+ onChange: setValue3,
244
+ placeholder: "Search"
245
+ })), /*#__PURE__*/_react.default.createElement("div", {
246
+ style: {
247
+ marginBottom: '24px'
248
+ }
249
+ }, /*#__PURE__*/_react.default.createElement("h4", {
250
+ style: {
251
+ marginBottom: '8px',
252
+ fontSize: '14px'
253
+ }
254
+ }, "Disabled"), /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
255
+ value: value4,
256
+ onChange: setValue4,
257
+ placeholder: "Search",
258
+ disabled: true
259
+ })));
260
+ };
261
+
262
+ // Accessibility example
263
+ exports.AllStates = AllStates;
264
+ const AccessibilityExample = exports.AccessibilityExample = ControlledSearchInput.bind({});
265
+ AccessibilityExample.args = {
266
+ placeholder: 'Search',
267
+ 'aria-label': 'Search for products',
268
+ 'aria-describedby': 'search-help-text'
269
+ };
270
+ AccessibilityExample.decorators = [Story => /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null), /*#__PURE__*/_react.default.createElement("div", {
271
+ id: "search-help-text",
272
+ style: {
273
+ marginTop: '8px',
274
+ fontSize: '12px',
275
+ color: _colors.default.grey2
276
+ }
277
+ }, "Use this search to find products by name, category, or description."))];
278
+
279
+ // Custom styling
280
+ const CustomStyling = () => {
281
+ const [value, setValue] = (0, _react.useState)('');
282
+ return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_SearchInput.default, {
283
+ value: value,
284
+ onChange: setValue,
285
+ placeholder: "Search with custom styling",
286
+ containerStyle: {
287
+ maxWidth: '500px',
288
+ margin: '0 auto'
289
+ },
290
+ inputStyle: {
291
+ fontSize: '16px'
292
+ },
293
+ iconStyle: {
294
+ color: _colors.default.blue
295
+ }
296
+ }), /*#__PURE__*/_react.default.createElement("div", {
297
+ style: {
298
+ marginTop: '12px',
299
+ fontSize: '12px',
300
+ color: _colors.default.grey2
301
+ }
302
+ }, "Current value: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(empty)')));
303
+ };
304
+ exports.CustomStyling = CustomStyling;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SearchInputWrapper = exports.SearchInputField = exports.SearchInputContainer = exports.SearchIconWrapper = 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 SearchInputContainer = exports.SearchInputContainer = _styledComponents.default.div.withConfig({
11
+ displayName: "SearchInputstyles__SearchInputContainer",
12
+ componentId: "sc-dcxztv-0"
13
+ })(["width:100%;display:flex;"]);
14
+ const SearchInputWrapper = exports.SearchInputWrapper = _styledComponents.default.div.withConfig({
15
+ displayName: "SearchInputstyles__SearchInputWrapper",
16
+ componentId: "sc-dcxztv-1"
17
+ })(["position:relative;display:flex;align-items:center;width:100%;background-color:", ";border-radius:8px;padding:0 16px;min-height:40px;transition:background-color 0.2s ease;", " &:focus-within{background-color:", ";box-shadow:0 0 0 2px ", ";}"], _colors.default.grey3, props => props.disabled && "\n opacity: 0.6;\n cursor: not-allowed;\n ", _colors.default.white, _colors.default.lightGrey);
18
+ const SearchIconWrapper = exports.SearchIconWrapper = _styledComponents.default.div.withConfig({
19
+ displayName: "SearchInputstyles__SearchIconWrapper",
20
+ componentId: "sc-dcxztv-2"
21
+ })(["display:flex;align-items:center;justify-content:center;margin-right:12px;color:", ";flex-shrink:0;width:16px;height:16px;svg{width:100%;height:100%;}", ":focus-within &{color:", ";}"], _colors.default.grey2, SearchInputWrapper, _colors.default.black);
22
+ const SearchInputField = exports.SearchInputField = _styledComponents.default.input.withConfig({
23
+ displayName: "SearchInputstyles__SearchInputField",
24
+ componentId: "sc-dcxztv-3"
25
+ })(["flex:1;border:none;outline:none;background:transparent;font-size:14px;font-weight:400;line-height:18px;color:", ";width:100%;min-width:0;letter-spacing:0.6px;&::placeholder{color:", ";opacity:1;}&:disabled{cursor:not-allowed;opacity:0.6;}&::-webkit-search-decoration,&::-webkit-search-cancel-button,&::-webkit-search-results-button,&::-webkit-search-results-decoration{-webkit-appearance:none;}"], _colors.default.black, _colors.default.grey2);
@@ -8,8 +8,8 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _Icon = require("../Icon/Icon.style");
9
9
  var _InfoIcon = require("../InfoIcon/InfoIcon");
10
10
  var _Timeline = require("./Timeline.styles");
11
- var _crossIcon = require("static/images/cross-icon.svg");
12
- var _checkIcon = require("static/images/check-icon.svg");
11
+ var _crossIcon = require("../../static/images/cross-icon.svg");
12
+ var _checkIcon = require("../../static/images/check-icon.svg");
13
13
  var _moment = _interopRequireDefault(require("moment"));
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  const TimelineStep = _ref => {
@@ -0,0 +1,260 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.SvgFile = exports.Small = exports.OnDifferentBackgrounds = exports.Medium = exports.LogoSvgComponent = exports.Large = exports.Default = exports.AllVersions = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _Logo = require("./Logo");
9
+ var _LogoSvg = _interopRequireDefault(require("../SvgIcons/LogoSvg"));
10
+ var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
11
+ var _global = _interopRequireDefault(require("../../styles/global"));
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+ var _logo = _interopRequireDefault(require("../../static/images/logo.svg"));
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ // Import the SVG file as an image
16
+
17
+ const ComparisonContainer = _styledComponents.default.div.withConfig({
18
+ displayName: "Logostories__ComparisonContainer",
19
+ componentId: "sc-e8wyjz-0"
20
+ })(["display:flex;flex-direction:column;gap:32px;padding:24px;"]);
21
+ const LogoSection = _styledComponents.default.div.withConfig({
22
+ displayName: "Logostories__LogoSection",
23
+ componentId: "sc-e8wyjz-1"
24
+ })(["display:flex;flex-direction:column;gap:16px;padding:20px;border:1px solid #e1e1e1;border-radius:8px;background-color:#f8f8f8;"]);
25
+ const LogoTitle = _styledComponents.default.h3.withConfig({
26
+ displayName: "Logostories__LogoTitle",
27
+ componentId: "sc-e8wyjz-2"
28
+ })(["font-size:18px;font-weight:600;margin:0 0 8px 0;color:#202020;"]);
29
+ const LogoDescription = _styledComponents.default.p.withConfig({
30
+ displayName: "Logostories__LogoDescription",
31
+ componentId: "sc-e8wyjz-3"
32
+ })(["font-size:14px;color:#666;margin:0 0 16px 0;"]);
33
+ const LogoDisplay = _styledComponents.default.div.withConfig({
34
+ displayName: "Logostories__LogoDisplay",
35
+ componentId: "sc-e8wyjz-4"
36
+ })(["display:flex;align-items:center;gap:24px;padding:16px;background-color:white;border-radius:4px;min-height:60px;"]);
37
+ const SizeLabel = _styledComponents.default.span.withConfig({
38
+ displayName: "Logostories__SizeLabel",
39
+ componentId: "sc-e8wyjz-5"
40
+ })(["font-size:12px;color:#999;min-width:100px;"]);
41
+ var _default = exports.default = {
42
+ title: 'Components Library/Logo',
43
+ component: _Logo.Logo,
44
+ argTypes: {
45
+ width: {
46
+ control: 'number',
47
+ description: 'Width of the logo in pixels'
48
+ },
49
+ height: {
50
+ control: 'number',
51
+ description: 'Height of the logo in pixels'
52
+ }
53
+ },
54
+ decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))]
55
+ }; // Logo.jsx component template
56
+ const LogoTemplate = args => /*#__PURE__*/_react.default.createElement(_Logo.Logo, args);
57
+
58
+ // Comparison view showing all versions
59
+ const AllVersions = () => /*#__PURE__*/_react.default.createElement(ComparisonContainer, null, /*#__PURE__*/_react.default.createElement(LogoSection, null, /*#__PURE__*/_react.default.createElement(LogoTitle, null, "Logo.jsx (Class Component)"), /*#__PURE__*/_react.default.createElement(LogoDescription, null, "Class component with customizable width and height props. Default: 70x17"), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Default (70x17):"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, null)), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Custom (100x24):"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
60
+ width: 100,
61
+ height: 24
62
+ })), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Small (50x12):"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
63
+ width: 50,
64
+ height: 12
65
+ })), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Large (140x34):"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
66
+ width: 140,
67
+ height: 34
68
+ }))), /*#__PURE__*/_react.default.createElement(LogoSection, null, /*#__PURE__*/_react.default.createElement(LogoTitle, null, "LogoSvg.js (Functional Component)"), /*#__PURE__*/_react.default.createElement(LogoDescription, null, "Functional component with fixed size: 66px x 16px"), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Fixed Size:"), /*#__PURE__*/_react.default.createElement(_LogoSvg.default, null))), /*#__PURE__*/_react.default.createElement(LogoSection, null, /*#__PURE__*/_react.default.createElement(LogoTitle, null, "logo.svg (Image File)"), /*#__PURE__*/_react.default.createElement(LogoDescription, null, "SVG file imported as an image. Can be used with img tag or as background"), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "As img tag:"), /*#__PURE__*/_react.default.createElement("img", {
69
+ src: _logo.default,
70
+ alt: "STOKR Logo",
71
+ style: {
72
+ height: '17px'
73
+ }
74
+ })), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Larger size:"), /*#__PURE__*/_react.default.createElement("img", {
75
+ src: _logo.default,
76
+ alt: "STOKR Logo",
77
+ style: {
78
+ height: '34px'
79
+ }
80
+ })), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "As background:"), /*#__PURE__*/_react.default.createElement("div", {
81
+ style: {
82
+ width: '70px',
83
+ height: '17px',
84
+ backgroundImage: "url(".concat(_logo.default, ")"),
85
+ backgroundSize: 'contain',
86
+ backgroundRepeat: 'no-repeat',
87
+ backgroundPosition: 'center'
88
+ }
89
+ }))), /*#__PURE__*/_react.default.createElement(LogoSection, null, /*#__PURE__*/_react.default.createElement(LogoTitle, null, "Side by Side Comparison"), /*#__PURE__*/_react.default.createElement(LogoDescription, null, "All three versions at similar sizes for direct comparison"), /*#__PURE__*/_react.default.createElement(LogoDisplay, null, /*#__PURE__*/_react.default.createElement("div", {
90
+ style: {
91
+ display: 'flex',
92
+ flexDirection: 'column',
93
+ gap: '16px'
94
+ }
95
+ }, /*#__PURE__*/_react.default.createElement("div", {
96
+ style: {
97
+ display: 'flex',
98
+ alignItems: 'center',
99
+ gap: '16px'
100
+ }
101
+ }, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "Logo.jsx:"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
102
+ width: 70,
103
+ height: 17
104
+ })), /*#__PURE__*/_react.default.createElement("div", {
105
+ style: {
106
+ display: 'flex',
107
+ alignItems: 'center',
108
+ gap: '16px'
109
+ }
110
+ }, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "LogoSvg.js:"), /*#__PURE__*/_react.default.createElement(_LogoSvg.default, null)), /*#__PURE__*/_react.default.createElement("div", {
111
+ style: {
112
+ display: 'flex',
113
+ alignItems: 'center',
114
+ gap: '16px'
115
+ }
116
+ }, /*#__PURE__*/_react.default.createElement(SizeLabel, null, "logo.svg:"), /*#__PURE__*/_react.default.createElement("img", {
117
+ src: _logo.default,
118
+ alt: "STOKR Logo",
119
+ style: {
120
+ height: '17px'
121
+ }
122
+ }))))));
123
+
124
+ // Default Logo.jsx
125
+ exports.AllVersions = AllVersions;
126
+ const Default = exports.Default = LogoTemplate.bind({});
127
+ Default.args = {
128
+ width: 70,
129
+ height: 17
130
+ };
131
+
132
+ // Small size
133
+ const Small = exports.Small = LogoTemplate.bind({});
134
+ Small.args = {
135
+ width: 50,
136
+ height: 12
137
+ };
138
+
139
+ // Medium size
140
+ const Medium = exports.Medium = LogoTemplate.bind({});
141
+ Medium.args = {
142
+ width: 100,
143
+ height: 24
144
+ };
145
+
146
+ // Large size
147
+ const Large = exports.Large = LogoTemplate.bind({});
148
+ Large.args = {
149
+ width: 140,
150
+ height: 34
151
+ };
152
+
153
+ // LogoSvg component
154
+ const LogoSvgComponent = () => /*#__PURE__*/_react.default.createElement("div", {
155
+ style: {
156
+ padding: '20px'
157
+ }
158
+ }, /*#__PURE__*/_react.default.createElement(_LogoSvg.default, null));
159
+
160
+ // SVG file as image
161
+ exports.LogoSvgComponent = LogoSvgComponent;
162
+ const SvgFile = () => /*#__PURE__*/_react.default.createElement("div", {
163
+ style: {
164
+ padding: '20px',
165
+ display: 'flex',
166
+ flexDirection: 'column',
167
+ gap: '16px'
168
+ }
169
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", {
170
+ style: {
171
+ marginBottom: '8px',
172
+ fontSize: '14px',
173
+ color: '#666'
174
+ }
175
+ }, "Default size:"), /*#__PURE__*/_react.default.createElement("img", {
176
+ src: _logo.default,
177
+ alt: "STOKR Logo"
178
+ })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", {
179
+ style: {
180
+ marginBottom: '8px',
181
+ fontSize: '14px',
182
+ color: '#666'
183
+ }
184
+ }, "Custom height (34px):"), /*#__PURE__*/_react.default.createElement("img", {
185
+ src: _logo.default,
186
+ alt: "STOKR Logo",
187
+ style: {
188
+ height: '34px'
189
+ }
190
+ })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", {
191
+ style: {
192
+ marginBottom: '8px',
193
+ fontSize: '14px',
194
+ color: '#666'
195
+ }
196
+ }, "Custom height (50px):"), /*#__PURE__*/_react.default.createElement("img", {
197
+ src: _logo.default,
198
+ alt: "STOKR Logo",
199
+ style: {
200
+ height: '50px'
201
+ }
202
+ })));
203
+
204
+ // Different backgrounds for testing visibility
205
+ exports.SvgFile = SvgFile;
206
+ const OnDifferentBackgrounds = () => /*#__PURE__*/_react.default.createElement("div", {
207
+ style: {
208
+ display: 'flex',
209
+ flexDirection: 'column',
210
+ gap: '24px',
211
+ padding: '20px'
212
+ }
213
+ }, /*#__PURE__*/_react.default.createElement("div", {
214
+ style: {
215
+ padding: '20px',
216
+ backgroundColor: '#ffffff',
217
+ borderRadius: '8px'
218
+ }
219
+ }, /*#__PURE__*/_react.default.createElement("p", {
220
+ style: {
221
+ marginBottom: '12px',
222
+ fontSize: '14px',
223
+ fontWeight: '600'
224
+ }
225
+ }, "White Background:"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
226
+ width: 70,
227
+ height: 17
228
+ })), /*#__PURE__*/_react.default.createElement("div", {
229
+ style: {
230
+ padding: '20px',
231
+ backgroundColor: '#f8f8f8',
232
+ borderRadius: '8px'
233
+ }
234
+ }, /*#__PURE__*/_react.default.createElement("p", {
235
+ style: {
236
+ marginBottom: '12px',
237
+ fontSize: '14px',
238
+ fontWeight: '600'
239
+ }
240
+ }, "Light Grey Background:"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
241
+ width: 70,
242
+ height: 17
243
+ })), /*#__PURE__*/_react.default.createElement("div", {
244
+ style: {
245
+ padding: '20px',
246
+ backgroundColor: '#202020',
247
+ borderRadius: '8px'
248
+ }
249
+ }, /*#__PURE__*/_react.default.createElement("p", {
250
+ style: {
251
+ marginBottom: '12px',
252
+ fontSize: '14px',
253
+ fontWeight: '600',
254
+ color: 'white'
255
+ }
256
+ }, "Dark Background (Logo should be visible):"), /*#__PURE__*/_react.default.createElement(_Logo.Logo, {
257
+ width: 70,
258
+ height: 17
259
+ })));
260
+ exports.OnDifferentBackgrounds = OnDifferentBackgrounds;
@@ -3,7 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.walletTypes = exports.platformURL = exports.platformDomain = exports.emailRegex = exports.UserTypes = exports.USInvestorAcreditationStatuses = exports.ProjectTypes = exports.ProjectStatus = exports.ProjectStates = exports.ProfessionalInvestorStatuses = void 0;
6
+ exports.walletTypes = exports.transactionTypeDisplayNames = exports.platformURL = exports.platformDomain = exports.emailRegex = exports.UserTypes = exports.USInvestorAcreditationStatuses = exports.TransactionTypes = exports.ProjectTypes = exports.ProjectStatus = exports.ProjectStates = exports.ProfessionalInvestorStatuses = exports.LoanActivityTypes = void 0;
7
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
11
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
12
  const platformDomain = exports.platformDomain = process.env.REACT_APP_WEBSITE_DOMAIN;
8
13
  const platformURL = exports.platformURL = 'https://' + platformDomain;
9
14
  const walletTypes = exports.walletTypes = {
@@ -44,4 +49,38 @@ const USInvestorAcreditationStatuses = exports.USInvestorAcreditationStatuses =
44
49
  };
45
50
 
46
51
  // should be used for all email form validation globally
47
- const emailRegex = exports.emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i;
52
+ const emailRegex = exports.emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i;
53
+ const LoanActivityTypes = exports.LoanActivityTypes = {
54
+ PRINCIPAL_DEPOSIT: 'principal_deposit',
55
+ PRINCIPAL_RELEASE: 'principal_release',
56
+ INTEREST_PAYMENT: 'interest_payment',
57
+ COLLATERAL_DEPOSIT: 'collateral_deposit',
58
+ COLLATERAL_RELEASE: 'collateral_release',
59
+ COLLATERAL_PARTIAL_DEPOSIT: 'collateral_partial_deposit',
60
+ COLLATERAL_PARTIAL_RELEASE: 'collateral_partial_release',
61
+ LIQUIDATION: 'liquidation'
62
+ };
63
+ const TransactionTypes = exports.TransactionTypes = _objectSpread({
64
+ SUBSCRIPTION: 'subscription',
65
+ REFUND: 'refund',
66
+ REDEMPTION: 'redemption',
67
+ VENTURE_PAYOUT: 'issuer_payout',
68
+ AGGREGATION: 'aggregation'
69
+ }, LoanActivityTypes);
70
+
71
+ // Display names for transaction types (matching the spreadsheet)
72
+ const transactionTypeDisplayNames = exports.transactionTypeDisplayNames = {
73
+ [TransactionTypes.INTEREST_PAYMENT]: 'Interest',
74
+ [TransactionTypes.COLLATERAL_DEPOSIT]: 'Collateral Deposit',
75
+ [TransactionTypes.COLLATERAL_RELEASE]: 'Collateral Release',
76
+ [TransactionTypes.COLLATERAL_PARTIAL_DEPOSIT]: 'Collateral Shift (Deposit)',
77
+ [TransactionTypes.COLLATERAL_PARTIAL_RELEASE]: 'Collateral Shift (Release)',
78
+ [TransactionTypes.PRINCIPAL_DEPOSIT]: 'Principal Increase',
79
+ [TransactionTypes.PRINCIPAL_RELEASE]: 'Principal Decrease',
80
+ [TransactionTypes.LIQUIDATION]: 'Liquidation',
81
+ [TransactionTypes.REDEMPTION]: 'Redemption',
82
+ [TransactionTypes.REFUND]: 'Refund',
83
+ [TransactionTypes.AGGREGATION]: 'Aggregation',
84
+ [TransactionTypes.VENTURE_PAYOUT]: 'Issuer Payout',
85
+ [TransactionTypes.SUBSCRIPTION]: 'Issuance'
86
+ };
@@ -181,7 +181,6 @@ const useCheckboxActions = () => {
181
181
  }
182
182
  return {
183
183
  checkCheckbox: context.checkCheckbox,
184
- uncheckCheckbox: context.uncheckCheckbox,
185
184
  clearCheckboxes: context.clearCheckboxes
186
185
  };
187
186
  };
@@ -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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.65-beta.1",
3
+ "version": "2.3.65-beta.3",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",