@licklist/design 0.78.5-dev.21 → 0.78.5-dev.24
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/dist/CustomDatePicker/CustomDatePicker.d.ts.map +1 -1
- package/dist/customRadioButton/RadioButton.d.ts +11 -0
- package/dist/customRadioButton/RadioButton.d.ts.map +1 -0
- package/dist/customRadioButton/RadioButton.js +93 -0
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts +2 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +2 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +2 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/sales/guest-profile/profile/Profile.d.ts.map +1 -1
- package/dist/sales/guest-profile/profile/Profile.js +2 -1
- package/package.json +1 -1
- package/src/CustomDatePicker/CustomDatePicker.tsx +6 -0
- package/src/customRadioButton/RadioButton.tsx +84 -0
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -0
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +3 -1
- package/src/index.ts +1 -0
- package/src/sales/guest-profile/profile/Profile.tsx +2 -5
- package/yarn.lock +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../src/CustomDatePicker/CustomDatePicker.tsx"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,KAAK,EACL,OAAc,EACd,QAAe,EAChB,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../src/CustomDatePicker/CustomDatePicker.tsx"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,KAAK,EACL,OAAc,EACd,QAAe,EAChB,EAAE,qBAAqB,2CA8OvB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface RadioButtonProps {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const RadioButton: React.FC<RadioButtonProps>;
|
|
10
|
+
export default RadioButton;
|
|
11
|
+
//# sourceMappingURL=RadioButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../src/customRadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuE3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
|
|
4
|
+
var RadioButton = function(param) {
|
|
5
|
+
var name = param.name, value = param.value, checked = param.checked, onChange = param.onChange, label = param.label;
|
|
6
|
+
// Generate a stable id so label could be connected if needed
|
|
7
|
+
var id = "".concat(name, "-").concat(value);
|
|
8
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
9
|
+
className: "tw-flex tw-items-center tw-space-x-3",
|
|
10
|
+
style: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
gap: 12
|
|
14
|
+
},
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ jsxs("div", {
|
|
17
|
+
className: "tw-relative tw-cursor-pointer",
|
|
18
|
+
style: {
|
|
19
|
+
position: 'relative',
|
|
20
|
+
cursor: 'pointer'
|
|
21
|
+
},
|
|
22
|
+
onClick: function() {
|
|
23
|
+
return onChange(value);
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ jsx("input", {
|
|
27
|
+
id: id,
|
|
28
|
+
type: "radio",
|
|
29
|
+
name: name,
|
|
30
|
+
value: value,
|
|
31
|
+
checked: checked,
|
|
32
|
+
onChange: function() {
|
|
33
|
+
return onChange(value);
|
|
34
|
+
},
|
|
35
|
+
className: "tw-sr-only",
|
|
36
|
+
style: {
|
|
37
|
+
position: 'absolute',
|
|
38
|
+
opacity: 0,
|
|
39
|
+
pointerEvents: 'none',
|
|
40
|
+
width: 0,
|
|
41
|
+
height: 0
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ jsx("div", {
|
|
45
|
+
className: "tw-w-[47px] tw-h-[47px] tw-border-[3px] tw-border-black tw-rounded-full tw-bg-white tw-flex tw-items-center tw-justify-center tw-transition-all tw-duration-200 hover:tw-shadow-sm",
|
|
46
|
+
style: {
|
|
47
|
+
width: 52,
|
|
48
|
+
height: 52,
|
|
49
|
+
borderWidth: 3,
|
|
50
|
+
borderStyle: 'solid',
|
|
51
|
+
borderColor: '#000',
|
|
52
|
+
borderRadius: 9999,
|
|
53
|
+
background: '#fff',
|
|
54
|
+
display: 'flex',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
transition: 'all 200ms'
|
|
58
|
+
},
|
|
59
|
+
children: checked && /*#__PURE__*/ jsx("div", {
|
|
60
|
+
className: "tw-w-[30px] tw-h-[30px] tw-bg-slate-900 tw-rounded-full",
|
|
61
|
+
style: {
|
|
62
|
+
width: 30,
|
|
63
|
+
height: 30,
|
|
64
|
+
background: '#0f172a',
|
|
65
|
+
borderRadius: 9999
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
label && /*#__PURE__*/ jsx("label", {
|
|
72
|
+
htmlFor: id,
|
|
73
|
+
className: "tw-cursor-pointer tw-text-gray-700 tw-select-none tw-flex tw-items-center tw-leading-none",
|
|
74
|
+
style: {
|
|
75
|
+
cursor: 'pointer',
|
|
76
|
+
color: '#374151',
|
|
77
|
+
userSelect: 'none',
|
|
78
|
+
display: 'inline-flex',
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
lineHeight: 1,
|
|
81
|
+
position: 'relative',
|
|
82
|
+
top: 5
|
|
83
|
+
},
|
|
84
|
+
onClick: function() {
|
|
85
|
+
return onChange(value);
|
|
86
|
+
},
|
|
87
|
+
children: label
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { RadioButton as default };
|
|
@@ -6,7 +6,8 @@ interface CategoryProductProps {
|
|
|
6
6
|
canExpandDescription?: boolean;
|
|
7
7
|
productsWithErrors?: QuantityCheckProductInfo[];
|
|
8
8
|
soldOutProducts?: QuantityCheckProductInfo[];
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare const CategoryProduct: ({ product, category, canExpandDescription, productsWithErrors, soldOutProducts, }: CategoryProductProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const CategoryProduct: ({ product, category, canExpandDescription, productsWithErrors, soldOutProducts, disabled }: CategoryProductProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=CategoryProduct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAQ5D,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAQ5D,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,eAAe,+FAOzB,oBAAoB,4CAqPtB,CAAA"}
|
|
@@ -110,7 +110,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
110
110
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
111
111
|
}
|
|
112
112
|
var CategoryProduct = function(param) {
|
|
113
|
-
var product = param.product, category = param.category, _param_canExpandDescription = param.canExpandDescription, canExpandDescription = _param_canExpandDescription === void 0 ? true : _param_canExpandDescription, productsWithErrors = param.productsWithErrors, soldOutProducts = param.soldOutProducts;
|
|
113
|
+
var product = param.product, category = param.category, _param_canExpandDescription = param.canExpandDescription, canExpandDescription = _param_canExpandDescription === void 0 ? true : _param_canExpandDescription, productsWithErrors = param.productsWithErrors, soldOutProducts = param.soldOutProducts, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled;
|
|
114
114
|
var formatNumber = useIntl().formatNumber;
|
|
115
115
|
var t = useTranslation([
|
|
116
116
|
'Design',
|
|
@@ -256,6 +256,7 @@ var CategoryProduct = function(param) {
|
|
|
256
256
|
onChange: onChange,
|
|
257
257
|
productInfo: productInfo,
|
|
258
258
|
refCallback: ref,
|
|
259
|
+
disabled: disabled,
|
|
259
260
|
clearErrors: clearErrors,
|
|
260
261
|
product: _object_spread_props(_object_spread({}, product), {
|
|
261
262
|
isSoldOut: (product === null || product === void 0 ? void 0 : product.isSoldOut) || checkIfSoldOutProduct()
|
|
@@ -21,7 +21,8 @@ interface ProductQuantityInputProps {
|
|
|
21
21
|
refCallback: RefCallBack;
|
|
22
22
|
invalid: boolean;
|
|
23
23
|
productInfo: FormOrderItem;
|
|
24
|
+
disabled?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export declare const ProductQuantityInput: ({ product, category, onChange: _onChange, clearErrors, refCallback, productInfo, invalid, }: ProductQuantityInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const ProductQuantityInput: ({ product, category, onChange: _onChange, clearErrors, refCallback, productInfo, invalid, disabled }: ProductQuantityInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
export {};
|
|
27
28
|
//# sourceMappingURL=ProductQuantityInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,oBAAoB,yGAS9B,yBAAyB,4CAoH3B,CAAA"}
|
|
@@ -54,7 +54,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
54
54
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
55
55
|
}
|
|
56
56
|
var ProductQuantityInput = function(param) {
|
|
57
|
-
var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid;
|
|
57
|
+
var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled;
|
|
58
58
|
var t = useTranslation('Design').t;
|
|
59
59
|
var _useState = _sliced_to_array(useState(false), 2), open = _useState[0], handleOpenModal = _useState[1];
|
|
60
60
|
var onChange = function(quantity) {
|
|
@@ -100,7 +100,7 @@ var ProductQuantityInput = function(param) {
|
|
|
100
100
|
children: [
|
|
101
101
|
/*#__PURE__*/ jsx(Button, {
|
|
102
102
|
ref: refCallback,
|
|
103
|
-
disabled: product.isSoldOut,
|
|
103
|
+
disabled: product.isSoldOut || disabled,
|
|
104
104
|
className: clsx("iframe-event__".concat((productInfo === null || productInfo === void 0 ? void 0 : productInfo.quantity) ? 'unselect-product' : 'select-product'), invalid && 'error'),
|
|
105
105
|
onClick: function() {
|
|
106
106
|
return handleOpenModal(true);
|
package/dist/index.d.ts
CHANGED
|
@@ -43,4 +43,5 @@ export * from './availability-indicator';
|
|
|
43
43
|
export * from './number-of-people-input';
|
|
44
44
|
export * from './fullscreen-loader';
|
|
45
45
|
export * from './pages';
|
|
46
|
+
export { default as RadioButton } from './customRadioButton/RadioButton';
|
|
46
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 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,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iCAAiC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -205,6 +205,7 @@ export { useFullscreenLoader } from './fullscreen-loader/useFullscreenLoader.js'
|
|
|
205
205
|
export { FullscreenLoaderContext } from './fullscreen-loader/context.js';
|
|
206
206
|
export { PrivacyComponent } from './pages/PrivacyComponent.js';
|
|
207
207
|
export { TermsComponent } from './pages/TermsComponent.js';
|
|
208
|
+
export { default as RadioButton } from './customRadioButton/RadioButton.js';
|
|
208
209
|
export { default as CountrySelect } from './static/CountrySelect.js';
|
|
209
210
|
export { default as FormCard } from './static/FormCard.js';
|
|
210
211
|
export { default as Image } from './static/Image.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/sales/guest-profile/profile/Profile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAO5E,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAGrB,CAAA;AAED,eAAO,MAAM,OAAO,aAAc,YAAY,
|
|
1
|
+
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/sales/guest-profile/profile/Profile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAO5E,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAGrB,CAAA;AAED,eAAO,MAAM,OAAO,aAAc,YAAY,4CA6C7C,CAAA"}
|
|
@@ -10,7 +10,8 @@ var Profile = function(param) {
|
|
|
10
10
|
if (!user) {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
|
-
var firstName = user.firstName, lastName = user.lastName,
|
|
13
|
+
var firstName = user.firstName, lastName = user.lastName, userDetail = user.userDetail;
|
|
14
|
+
var gender = userDetail === null || userDetail === void 0 ? void 0 : userDetail.gender;
|
|
14
15
|
return /*#__PURE__*/ jsx("div", {
|
|
15
16
|
className: "profile",
|
|
16
17
|
children: /*#__PURE__*/ jsxs("div", {
|
package/package.json
CHANGED
|
@@ -142,6 +142,8 @@ export function CustomDatePicker({
|
|
|
142
142
|
placeholder="DD"
|
|
143
143
|
maxLength={2}
|
|
144
144
|
error={!!displayError}
|
|
145
|
+
classNames={{ input: 'tw-placeholder-[#626A90]' }}
|
|
146
|
+
styles={{ input: { '&::placeholder': { color: '#626A90' } } }}
|
|
145
147
|
onChange={(e) => {
|
|
146
148
|
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
147
149
|
field.onChange(value)
|
|
@@ -175,6 +177,8 @@ export function CustomDatePicker({
|
|
|
175
177
|
placeholder="MM"
|
|
176
178
|
maxLength={2}
|
|
177
179
|
error={!!displayError}
|
|
180
|
+
classNames={{ input: 'tw-placeholder-[#626A90]' }}
|
|
181
|
+
styles={{ input: { '&::placeholder': { color: '#626A90' } } }}
|
|
178
182
|
onChange={(e) => {
|
|
179
183
|
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
180
184
|
field.onChange(value)
|
|
@@ -208,6 +212,8 @@ export function CustomDatePicker({
|
|
|
208
212
|
placeholder="YYYY"
|
|
209
213
|
maxLength={4}
|
|
210
214
|
error={!!displayError}
|
|
215
|
+
classNames={{ input: 'tw-placeholder-[#626A90]' }}
|
|
216
|
+
styles={{ input: { '&::placeholder': { color: '#626A90' } } }}
|
|
211
217
|
onChange={(e) => {
|
|
212
218
|
const value = e.target.value.replace(/[^0-9]/g, '')
|
|
213
219
|
field.onChange(value)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RadioButtonProps {
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const RadioButton: React.FC<RadioButtonProps> = ({
|
|
12
|
+
name,
|
|
13
|
+
value,
|
|
14
|
+
checked,
|
|
15
|
+
onChange,
|
|
16
|
+
label
|
|
17
|
+
}) => {
|
|
18
|
+
// Generate a stable id so label could be connected if needed
|
|
19
|
+
const id = `${name}-${value}`;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
className="tw-flex tw-items-center tw-space-x-3"
|
|
24
|
+
style={{ display: 'flex', alignItems: 'center', gap: 12 }}
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
className="tw-relative tw-cursor-pointer"
|
|
28
|
+
style={{ position: 'relative', cursor: 'pointer' }}
|
|
29
|
+
onClick={() => onChange(value)}
|
|
30
|
+
>
|
|
31
|
+
{/* Hidden native radio input for accessibility */}
|
|
32
|
+
<input
|
|
33
|
+
id={id}
|
|
34
|
+
type="radio"
|
|
35
|
+
name={name}
|
|
36
|
+
value={value}
|
|
37
|
+
checked={checked}
|
|
38
|
+
onChange={() => onChange(value)}
|
|
39
|
+
className="tw-sr-only"
|
|
40
|
+
style={{ position: 'absolute', opacity: 0, pointerEvents: 'none', width: 0, height: 0 }}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
{/* Custom radio button circle */}
|
|
44
|
+
<div
|
|
45
|
+
className="tw-w-[47px] tw-h-[47px] tw-border-[3px] tw-border-black tw-rounded-full tw-bg-white tw-flex tw-items-center tw-justify-center tw-transition-all tw-duration-200 hover:tw-shadow-sm"
|
|
46
|
+
style={{
|
|
47
|
+
width: 52,
|
|
48
|
+
height: 52,
|
|
49
|
+
borderWidth: 3,
|
|
50
|
+
borderStyle: 'solid',
|
|
51
|
+
borderColor: '#000',
|
|
52
|
+
borderRadius: 9999,
|
|
53
|
+
background: '#fff',
|
|
54
|
+
display: 'flex',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
transition: 'all 200ms',
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
{/* Inner filled circle when selected */}
|
|
61
|
+
{checked && (
|
|
62
|
+
<div
|
|
63
|
+
className="tw-w-[30px] tw-h-[30px] tw-bg-slate-900 tw-rounded-full"
|
|
64
|
+
style={{ width: 30, height: 30, background: '#0f172a', borderRadius: 9999 }}
|
|
65
|
+
/>
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{label && (
|
|
71
|
+
<label
|
|
72
|
+
htmlFor={id}
|
|
73
|
+
className="tw-cursor-pointer tw-text-gray-700 tw-select-none tw-flex tw-items-center tw-leading-none"
|
|
74
|
+
style={{ cursor: 'pointer', color: '#374151', userSelect: 'none', display: 'inline-flex', alignItems: 'center', lineHeight: 1, position: 'relative', top: 5 }}
|
|
75
|
+
onClick={() => onChange(value)}
|
|
76
|
+
>
|
|
77
|
+
{label}
|
|
78
|
+
</label>
|
|
79
|
+
)}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default RadioButton;
|
|
@@ -23,6 +23,7 @@ interface CategoryProductProps {
|
|
|
23
23
|
canExpandDescription?: boolean
|
|
24
24
|
productsWithErrors?: QuantityCheckProductInfo[]
|
|
25
25
|
soldOutProducts?: QuantityCheckProductInfo[]
|
|
26
|
+
disabled?: boolean
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export const CategoryProduct = ({
|
|
@@ -31,6 +32,7 @@ export const CategoryProduct = ({
|
|
|
31
32
|
canExpandDescription = true,
|
|
32
33
|
productsWithErrors,
|
|
33
34
|
soldOutProducts,
|
|
35
|
+
disabled =false
|
|
34
36
|
}: CategoryProductProps) => {
|
|
35
37
|
const { formatNumber } = useIntl()
|
|
36
38
|
const { t } = useTranslation(['Design', 'Validation'])
|
|
@@ -196,6 +198,7 @@ export const CategoryProduct = ({
|
|
|
196
198
|
onChange={onChange}
|
|
197
199
|
productInfo={productInfo}
|
|
198
200
|
refCallback={ref}
|
|
201
|
+
disabled={disabled}
|
|
199
202
|
clearErrors={clearErrors}
|
|
200
203
|
product={{
|
|
201
204
|
...product,
|
|
@@ -34,6 +34,7 @@ interface ProductQuantityInputProps {
|
|
|
34
34
|
refCallback: RefCallBack
|
|
35
35
|
invalid: boolean
|
|
36
36
|
productInfo: FormOrderItem
|
|
37
|
+
disabled?: boolean
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export const ProductQuantityInput = ({
|
|
@@ -44,6 +45,7 @@ export const ProductQuantityInput = ({
|
|
|
44
45
|
refCallback,
|
|
45
46
|
productInfo,
|
|
46
47
|
invalid,
|
|
48
|
+
disabled = false
|
|
47
49
|
}: ProductQuantityInputProps) => {
|
|
48
50
|
const { t } = useTranslation('Design')
|
|
49
51
|
const [open, handleOpenModal] = useState(false)
|
|
@@ -97,7 +99,7 @@ export const ProductQuantityInput = ({
|
|
|
97
99
|
<>
|
|
98
100
|
<Button
|
|
99
101
|
ref={refCallback}
|
|
100
|
-
disabled={product.isSoldOut}
|
|
102
|
+
disabled={product.isSoldOut || disabled}
|
|
101
103
|
className={clsx(
|
|
102
104
|
`iframe-event__${
|
|
103
105
|
productInfo?.quantity ? 'unselect-product' : 'select-product'
|
package/src/index.ts
CHANGED
|
@@ -16,11 +16,8 @@ export const Profile = ({ user }: ProfileProps) => {
|
|
|
16
16
|
return null
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
lastName,
|
|
22
|
-
userDetail: { gender },
|
|
23
|
-
} = user
|
|
19
|
+
const { firstName, lastName, userDetail } = user
|
|
20
|
+
const gender = userDetail?.gender
|
|
24
21
|
|
|
25
22
|
return (
|
|
26
23
|
<div className='profile'>
|
package/yarn.lock
CHANGED
|
@@ -7485,11 +7485,11 @@ __metadata:
|
|
|
7485
7485
|
linkType: hard
|
|
7486
7486
|
|
|
7487
7487
|
"baseline-browser-mapping@npm:^2.8.3":
|
|
7488
|
-
version: 2.8.
|
|
7489
|
-
resolution: "baseline-browser-mapping@npm:2.8.
|
|
7488
|
+
version: 2.8.7
|
|
7489
|
+
resolution: "baseline-browser-mapping@npm:2.8.7"
|
|
7490
7490
|
bin:
|
|
7491
7491
|
baseline-browser-mapping: dist/cli.js
|
|
7492
|
-
checksum: 10c0/
|
|
7492
|
+
checksum: 10c0/9d0929dbec02e065bf67e974f70023c0a5897755dc936ea11ab9383015eddfd32a032db9636cfbf214b767a7145d7674a4c071bba43d99a631cb793f0f4c2bab
|
|
7493
7493
|
languageName: node
|
|
7494
7494
|
linkType: hard
|
|
7495
7495
|
|
|
@@ -9885,9 +9885,9 @@ __metadata:
|
|
|
9885
9885
|
linkType: hard
|
|
9886
9886
|
|
|
9887
9887
|
"electron-to-chromium@npm:^1.3.564, electron-to-chromium@npm:^1.5.218":
|
|
9888
|
-
version: 1.5.
|
|
9889
|
-
resolution: "electron-to-chromium@npm:1.5.
|
|
9890
|
-
checksum: 10c0/
|
|
9888
|
+
version: 1.5.224
|
|
9889
|
+
resolution: "electron-to-chromium@npm:1.5.224"
|
|
9890
|
+
checksum: 10c0/09e00381cfce7660eba265c9aa3afa2e9ff04ecd47d50f9673477c35bc35b2a206b3e75dd767106420b9c8b801f3d044f99b20e064ba4a48f0a989c3c8e13291
|
|
9891
9891
|
languageName: node
|
|
9892
9892
|
linkType: hard
|
|
9893
9893
|
|