period-ui 0.13.0 → 0.13.2
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/components/molecules/text-field/text-field.d.ts.map +1 -1
- package/dist/components/molecules/text-field/text-field.js +1 -1
- package/dist/components/molecules/text-field/text-field.js.map +1 -1
- package/dist/components/organisms/payment-card-fields/payment-card-fields.d.ts.map +1 -1
- package/dist/components/organisms/payment-card-fields/payment-card-fields.js +4 -1
- package/dist/components/organisms/payment-card-fields/payment-card-fields.js.map +1 -1
- package/dist/components/organisms/product-selector/components/index.d.ts +1 -0
- package/dist/components/organisms/product-selector/components/index.d.ts.map +1 -1
- package/dist/components/organisms/product-selector/components/index.js +1 -0
- package/dist/components/organisms/product-selector/components/index.js.map +1 -1
- package/dist/components/organisms/product-selector/components/product-selector-option-content.d.ts.map +1 -1
- package/dist/components/organisms/product-selector/components/product-selector-option-content.js +2 -1
- package/dist/components/organisms/product-selector/components/product-selector-option-content.js.map +1 -1
- package/dist/components/organisms/product-selector/components/product-selector-thumbnail.d.ts +6 -0
- package/dist/components/organisms/product-selector/components/product-selector-thumbnail.d.ts.map +1 -0
- package/dist/components/organisms/product-selector/components/product-selector-thumbnail.js +12 -0
- package/dist/components/organisms/product-selector/components/product-selector-thumbnail.js.map +1 -0
- package/dist/index.mjs +1432 -1420
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,KAAK,KAAK,GAAG,IAAI,CACf,cAAc,CAAC,OAAO,CAAC,EACvB,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,WAAW,CAC9C,GAAG;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,SAAS;iBAXP,OAAO;iBACP,OAAO;qBACH,OAAO;WACjB,MAAM;kBACC,WAAW;qBACR,SAAS;sBACR,SAAS;gBACf,MAAM;qBACD,MAAM;
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,KAAK,KAAK,GAAG,IAAI,CACf,cAAc,CAAC,OAAO,CAAC,EACvB,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,WAAW,CAC9C,GAAG;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,SAAS;iBAXP,OAAO;iBACP,OAAO;qBACH,OAAO;WACjB,MAAM;kBACC,WAAW;qBACR,SAAS;sBACR,SAAS;gBACf,MAAM;qBACD,MAAM;oDAgDvB,CAAC;AAEH,YAAY,EAAE,KAAK,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -8,6 +8,6 @@ const text_field_input_1 = require("./components/text-field-input");
|
|
|
8
8
|
exports.TextField = (0, react_1.forwardRef)(function TextField({ isRequired, isDisabled, isErrorVisible, mask, maskOptions, leadingElement, trailingElement, className, inputClassName, ...rest }, ref) {
|
|
9
9
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex items-center w-full', 'border border-gray-04 rounded-lg bg-white', 'focus-within:ring-1', isErrorVisible
|
|
10
10
|
? 'border-red-01 focus-within:border-red-01 focus-within:ring-red-01'
|
|
11
|
-
: 'hover:border-blue-02 focus-within:border-blue-01 focus-within:hover:border-blue-01 focus-within:ring-blue-01', className), children: [leadingElement && (0, jsx_runtime_1.jsx)("div", { className: "flex-shrink-0 pl-4 text-gray-01", children: leadingElement }), (0, jsx_runtime_1.jsx)(text_field_input_1.TextFieldInput, { ref: ref, mask: mask, maskOptions: maskOptions, isRequired: isRequired, isDisabled: isDisabled, "aria-invalid": isErrorVisible || undefined, className: (0, tailwind_utils_1.tailwind)(leadingElement ? '
|
|
11
|
+
: 'hover:border-blue-02 focus-within:border-blue-01 focus-within:hover:border-blue-01 focus-within:ring-blue-01', className), children: [leadingElement && ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-shrink-0 items-center pl-4 text-gray-01", children: leadingElement })), (0, jsx_runtime_1.jsx)(text_field_input_1.TextFieldInput, { ref: ref, mask: mask, maskOptions: maskOptions, isRequired: isRequired, isDisabled: isDisabled, "aria-invalid": isErrorVisible || undefined, className: (0, tailwind_utils_1.tailwind)(leadingElement ? 'pl-2 pr-4' : 'px-4', inputClassName), ...rest }), trailingElement && (0, jsx_runtime_1.jsx)("div", { className: "flex-shrink-0 pr-4 text-gray-01", children: trailingElement })] }));
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=text-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":";;;;AAAA,iCAA4E;AAE5E,kEAAyD;AACzD,oEAA+D;AAiBlD,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAC,SAAS,SAAS,CACpD,EACE,UAAU,EACV,UAAU,EACV,cAAc,EACd,IAAI,EACJ,WAAW,EACX,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,EACd,GAAG,IAAI,EACD,EACR,GAAmC;IAEnC,OAAO,CACL,iCACE,SAAS,EAAE,IAAA,yBAAQ,EACjB,0BAA0B,EAC1B,2CAA2C,EAC3C,qBAAqB,EACrB,cAAc;YACZ,CAAC,CAAC,mEAAmE;YACrE,CAAC,CAAC,8GAA8G,EAClH,SAAS,CACV,aAEA,cAAc,IAAI,gCAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":";;;;AAAA,iCAA4E;AAE5E,kEAAyD;AACzD,oEAA+D;AAiBlD,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAC,SAAS,SAAS,CACpD,EACE,UAAU,EACV,UAAU,EACV,cAAc,EACd,IAAI,EACJ,WAAW,EACX,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,EACd,GAAG,IAAI,EACD,EACR,GAAmC;IAEnC,OAAO,CACL,iCACE,SAAS,EAAE,IAAA,yBAAQ,EACjB,0BAA0B,EAC1B,2CAA2C,EAC3C,qBAAqB,EACrB,cAAc;YACZ,CAAC,CAAC,mEAAmE;YACrE,CAAC,CAAC,8GAA8G,EAClH,SAAS,CACV,aAEA,cAAc,IAAI,CACjB,gCAAK,SAAS,EAAC,mDAAmD,YAAE,cAAc,GAAO,CAC1F,EAED,uBAAC,iCAAc,IACb,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,kBACR,cAAc,IAAI,SAAS,EACzC,SAAS,EAAE,IAAA,yBAAQ,EAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,cAAc,CAAC,KACtE,IAAI,GACR,EAED,eAAe,IAAI,gCAAK,SAAS,EAAC,iCAAiC,YAAE,eAAe,GAAO,IACxF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-card-fields.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/payment-card-fields/payment-card-fields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAwB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"payment-card-fields.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/payment-card-fields/payment-card-fields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAwB,MAAM,qBAAqB,CAAC;AAUvF,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EAEvB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAGrC,KAAK,KAAK,CAAC,cAAc,SAAS,qBAAqB,IAAI;IACzD,SAAS,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC3C,eAAe,EAAE,uBAAuB,CAAC;IACzC,eAAe,EAAE,uBAAuB,CAAC;IACzC,mBAAmB,EAAE,uBAAuB,CAAC;IAC7C,QAAQ,EAAE,0BAA0B,CAAC;IACrC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,cAAc,SAAS,qBAAqB,EAAE,EAClF,SAAS,EACT,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,UAAkB,EAClB,UAAkB,EAClB,kBAAkB,GACnB,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,OAAO,CAiGrC;AAED,YAAY,EAAE,KAAK,IAAI,0BAA0B,EAAE,CAAC"}
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const components_1 = require("../../../components");
|
|
6
6
|
const containers_1 = require("../../../containers");
|
|
7
7
|
const tailwind_utils_1 = require("../../../utils/tailwind-utils");
|
|
8
|
+
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
8
9
|
const payment_card_field_control_1 = require("./components/payment-card-field-control");
|
|
9
10
|
const payment_card_fields_constants_1 = require("./payment-card-fields-constants");
|
|
10
11
|
const payment_card_fields_styles_1 = require("./payment-card-fields-styles");
|
|
@@ -15,12 +16,14 @@ function FormPaymentCardFields({ formProps, nameOnCardField, cardNumberField, ex
|
|
|
15
16
|
formProps,
|
|
16
17
|
storedCard,
|
|
17
18
|
});
|
|
19
|
+
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
20
|
+
const fieldIconSize = isMobile ? components_1.IconSize.LG : components_1.IconSize.XL;
|
|
18
21
|
const sharedControlProps = {
|
|
19
22
|
formProps,
|
|
20
23
|
isRequired,
|
|
21
24
|
isDisabled,
|
|
22
25
|
isShowingStoredCard: storedCardState.isShowing,
|
|
23
26
|
};
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)(payment_card_fields_styles_1.PAYMENT_CARD_FIELDS_CONTAINER_CLASS_NAME, containerClassName), children: [(0, jsx_runtime_1.jsx)(payment_card_field_control_1.PaymentCardFieldControl, { ...sharedControlProps, fieldName: payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD, inputWidth: containers_1.FormInputWidth.THREE_COLUMN, content: nameOnCardField, displayValue: displayValues[payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD], autoComplete: "cc-name", inputMode: "text", maxLength: payment_card_fields_constants_1.CARDHOLDER_NAME_MAX_LENGTH, inputRef: entry.registerInput(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD), onReplaceStoredCard: (insertedText) => storedCardState.replace(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD, insertedText), onValueChange: (value) => entry.handleValueChange(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD, value), onBlur: () => entry.handleBlur(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD) }), (0, jsx_runtime_1.jsx)(payment_card_field_control_1.PaymentCardFieldControl, { ...sharedControlProps, fieldName: payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER, inputWidth: containers_1.FormInputWidth.THREE_COLUMN, content: cardNumberField, displayValue: displayValues[payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER], autoComplete: "cc-number", inputMode: "numeric", maskOptions: cardNumber.maskOptions, leadingElement: (0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: cardNumber.brandIcon, size:
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)(payment_card_fields_styles_1.PAYMENT_CARD_FIELDS_CONTAINER_CLASS_NAME, containerClassName), children: [(0, jsx_runtime_1.jsx)(payment_card_field_control_1.PaymentCardFieldControl, { ...sharedControlProps, fieldName: payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD, inputWidth: containers_1.FormInputWidth.THREE_COLUMN, content: nameOnCardField, displayValue: displayValues[payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD], autoComplete: "cc-name", inputMode: "text", maxLength: payment_card_fields_constants_1.CARDHOLDER_NAME_MAX_LENGTH, inputRef: entry.registerInput(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD), onReplaceStoredCard: (insertedText) => storedCardState.replace(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD, insertedText), onValueChange: (value) => entry.handleValueChange(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD, value), onBlur: () => entry.handleBlur(payment_card_fields_types_1.PaymentCardFieldName.NAME_ON_CARD) }), (0, jsx_runtime_1.jsx)(payment_card_field_control_1.PaymentCardFieldControl, { ...sharedControlProps, fieldName: payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER, inputWidth: containers_1.FormInputWidth.THREE_COLUMN, content: cardNumberField, displayValue: displayValues[payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER], autoComplete: "cc-number", inputMode: "numeric", maskOptions: cardNumber.maskOptions, leadingElement: (0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: cardNumber.brandIcon, size: fieldIconSize }), inputRef: entry.registerInput(payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER), onReplaceStoredCard: (insertedText) => storedCardState.replace(payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER, insertedText), onValueChange: (value) => entry.handleValueChange(payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER, value), onBlur: () => entry.handleBlur(payment_card_fields_types_1.PaymentCardFieldName.CARD_NUMBER) }), (0, jsx_runtime_1.jsx)(payment_card_field_control_1.PaymentCardFieldControl, { ...sharedControlProps, fieldName: payment_card_fields_types_1.PaymentCardFieldName.EXPIRATION_DATE, inputWidth: containers_1.FormInputWidth.ONE_COLUMN, content: expirationDateField, displayValue: displayValues[payment_card_fields_types_1.PaymentCardFieldName.EXPIRATION_DATE], autoComplete: "cc-exp", inputMode: "numeric", maskOptions: payment_card_fields_constants_1.EXPIRATION_DATE_MASK_OPTIONS, inputRef: entry.registerInput(payment_card_fields_types_1.PaymentCardFieldName.EXPIRATION_DATE), onReplaceStoredCard: (insertedText) => storedCardState.replace(payment_card_fields_types_1.PaymentCardFieldName.EXPIRATION_DATE, insertedText), onValueChange: (value) => entry.handleValueChange(payment_card_fields_types_1.PaymentCardFieldName.EXPIRATION_DATE, value), onBlur: () => entry.handleBlur(payment_card_fields_types_1.PaymentCardFieldName.EXPIRATION_DATE) }), (0, jsx_runtime_1.jsx)(payment_card_field_control_1.PaymentCardFieldControl, { ...sharedControlProps, fieldName: payment_card_fields_types_1.PaymentCardFieldName.CVV, inputWidth: containers_1.FormInputWidth.ONE_COLUMN, content: cvvField, displayValue: displayValues[payment_card_fields_types_1.PaymentCardFieldName.CVV], autoComplete: "cc-csc", inputMode: "numeric", maskOptions: cvv.maskOptions, leadingElement: (0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.LOCK, size: fieldIconSize }), inputRef: entry.registerInput(payment_card_fields_types_1.PaymentCardFieldName.CVV), onReplaceStoredCard: (insertedText) => storedCardState.replace(payment_card_fields_types_1.PaymentCardFieldName.CVV, insertedText), onValueChange: (value) => entry.handleValueChange(payment_card_fields_types_1.PaymentCardFieldName.CVV, value), onBlur: () => entry.handleBlur(payment_card_fields_types_1.PaymentCardFieldName.CVV) })] }));
|
|
25
28
|
}
|
|
26
29
|
//# sourceMappingURL=payment-card-fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-card-fields.js","sourceRoot":"","sources":["../../../../src/components/organisms/payment-card-fields/payment-card-fields.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"payment-card-fields.js","sourceRoot":"","sources":["../../../../src/components/organisms/payment-card-fields/payment-card-fields.tsx"],"names":[],"mappings":";;AA+BA,sDA2GC;;AA1ID,oDAAuF;AACvF,oDAAqD;AACrD,kEAAyD;AACzD,oFAA6E;AAC7E,wFAAkF;AAClF,mFAGyC;AACzC,6EAAwF;AACxF,2EAMqC;AACrC,uEAAiE;AAcjE,SAAgB,qBAAqB,CAA+C,EAClF,SAAS,EACT,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,kBAAkB,GACI;IACtB,MAAM,E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,iBAAiB,CAAC,gDAAoB,CAAC,eAAe,EAAE,KAAK,CAAC,EAEtE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,gDAAoB,CAAC,eAAe,CAAC,GACpE,EAEF,uBAAC,oDAAuB,OAClB,kBAAkB,EACtB,SAAS,EAAE,gDAAoB,CAAC,GAAG,EACnC,UAAU,EAAE,2BAAc,CAAC,UAAU,EACrC,OAAO,EAAE,QAAQ,EACjB,YAAY,EAAE,aAAa,CAAC,gDAAoB,CAAC,GAAG,CAAC,EACrD,YAAY,EAAC,QAAQ,EACrB,SAAS,EAAC,SAAS,EACnB,WAAW,EAAE,GAAG,CAAC,WAAW,EAC5B,cAAc,EAAE,uBAAC,sBAAS,IAAC,IAAI,EAAE,uBAAU,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,GAAI,EACzE,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,gDAAoB,CAAC,GAAG,CAAC,EACvD,mBAAmB,EAAE,CAAC,YAAY,EAAE,EAAE,CACpC,eAAe,CAAC,OAAO,CAAC,gDAAoB,CAAC,GAAG,EAAE,YAAY,CAAC,EAEjE,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,gDAAoB,CAAC,GAAG,EAAE,KAAK,CAAC,EAClF,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,gDAAoB,CAAC,GAAG,CAAC,GACxD,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./product-selector-option-content"), exports);
|
|
18
|
+
__exportStar(require("./product-selector-thumbnail"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,+DAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-selector-option-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-selector-option-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAwCvE"}
|
package/dist/components/organisms/product-selector/components/product-selector-option-content.js
CHANGED
|
@@ -4,9 +4,10 @@ exports.ProductSelectorOptionContent = ProductSelectorOptionContent;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const components_1 = require("../../../../components");
|
|
6
6
|
const tailwind_utils_1 = require("../../../../utils/tailwind-utils");
|
|
7
|
+
const product_selector_thumbnail_1 = require("./product-selector-thumbnail");
|
|
7
8
|
function ProductSelectorOptionContent({ option, isActive }) {
|
|
8
9
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-row items-center gap-2 p-4 cursor-pointer bg-white', {
|
|
9
10
|
'bg-gray-05': isActive,
|
|
10
|
-
}), children: [(0, jsx_runtime_1.jsx)(
|
|
11
|
+
}), children: [(0, jsx_runtime_1.jsx)(product_selector_thumbnail_1.ProductSelectorThumbnail, { imageUrl: option.imageUrl }), (0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-1 flex-row items-center justify-between gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-col", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "line-clamp-2", children: option.name }), option.code && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "truncate", children: option.code }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-shrink-0 flex-col items-end", children: [(0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "whitespace-nowrap", children: option.priceLabel }), option.stockLabel && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.HELPER, color: components_1.TextColors.BLACK_02, className: "whitespace-nowrap", children: option.stockLabel }))] })] })] }));
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=product-selector-option-content.js.map
|
package/dist/components/organisms/product-selector/components/product-selector-option-content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-selector-option-content.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"product-selector-option-content.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-option-content.tsx"],"names":[],"mappings":";;AAUA,oEAwCC;;AAlDD,uDAAuE;AACvE,qEAA4D;AAE5D,6EAAwE;AAOxE,SAAgB,4BAA4B,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAS;IACtE,OAAO,CACL,iCACE,SAAS,EAAE,IAAA,yBAAQ,EAAC,8DAA8D,EAAE;YAClF,YAAY,EAAE,QAAQ;SACvB,CAAC,aAEF,uBAAC,qDAAwB,IAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAI,EAEvD,iCAAK,SAAS,EAAC,iEAAiE,aAC9E,iCAAK,SAAS,EAAC,uBAAuB,aACpC,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,SAAS,EAAC,cAAc,YACtD,MAAM,CAAC,IAAI,GACP,EAEN,MAAM,CAAC,IAAI,IAAI,CACd,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,MAAM,EAAE,KAAK,EAAE,uBAAU,CAAC,QAAQ,EAAE,SAAS,EAAC,UAAU,YAChF,MAAM,CAAC,IAAI,GACP,CACR,IACG,EAEN,iCAAK,SAAS,EAAC,uCAAuC,aACpD,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,SAAS,EAAC,mBAAmB,YAC3D,MAAM,CAAC,UAAU,GACb,EAEN,MAAM,CAAC,UAAU,IAAI,CACpB,uBAAC,iBAAI,IACH,OAAO,EAAE,wBAAW,CAAC,MAAM,EAC3B,KAAK,EAAE,uBAAU,CAAC,QAAQ,EAC1B,SAAS,EAAC,mBAAmB,YAE5B,MAAM,CAAC,UAAU,GACb,CACR,IACG,IACF,IACF,CACP,CAAC;AACJ,CAAC"}
|
package/dist/components/organisms/product-selector/components/product-selector-thumbnail.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-selector-thumbnail.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-thumbnail.tsx"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAkB3D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductSelectorThumbnail = ProductSelectorThumbnail;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const components_1 = require("../../../../components");
|
|
7
|
+
function ProductSelectorThumbnail({ imageUrl }) {
|
|
8
|
+
const [failedImageUrl, setFailedImageUrl] = (0, react_1.useState)();
|
|
9
|
+
const isImageAvailable = Boolean(imageUrl) && imageUrl !== failedImageUrl;
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center overflow-hidden rounded border border-gray-04 bg-gray-05", children: isImageAvailable ? ((0, jsx_runtime_1.jsx)("img", { src: imageUrl, alt: "", className: "h-full w-full object-cover", onError: () => setFailedImageUrl(imageUrl) })) : ((0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.IMAGE, size: components_1.IconSize.XL, color: components_1.IconColor.GRAY_03 })) }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=product-selector-thumbnail.js.map
|
package/dist/components/organisms/product-selector/components/product-selector-thumbnail.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-selector-thumbnail.js","sourceRoot":"","sources":["../../../../../src/components/organisms/product-selector/components/product-selector-thumbnail.tsx"],"names":[],"mappings":";;AAOA,4DAkBC;;AAzBD,iCAAiC;AACjC,uDAAoF;AAMpF,SAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAS;IAC1D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,GAAU,CAAC;IAC/D,MAAM,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,cAAc,CAAC;IAE1E,OAAO,CACL,gCAAK,SAAS,EAAC,mHAAmH,YAC/H,gBAAgB,CAAC,CAAC,CAAC,CAClB,gCACE,GAAG,EAAE,QAAQ,EACb,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,4BAA4B,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAC1C,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,sBAAS,IAAC,IAAI,EAAE,uBAAU,CAAC,KAAK,EAAE,IAAI,EAAE,qBAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,sBAAS,CAAC,OAAO,GAAI,CACnF,GACG,CACP,CAAC;AACJ,CAAC"}
|