@asdp/ferryui 0.1.12 → 0.1.13
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/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +53 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -211,6 +211,18 @@ interface CardPromoProps {
|
|
|
211
211
|
* Click handler for the card
|
|
212
212
|
*/
|
|
213
213
|
onClick?: () => void;
|
|
214
|
+
/**
|
|
215
|
+
* Show Button
|
|
216
|
+
*/
|
|
217
|
+
showButton?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Button Text
|
|
220
|
+
*/
|
|
221
|
+
buttonText?: string;
|
|
222
|
+
/**
|
|
223
|
+
* custom className
|
|
224
|
+
*/
|
|
225
|
+
className?: string;
|
|
214
226
|
}
|
|
215
227
|
declare const CardPromo: React$1.FC<CardPromoProps>;
|
|
216
228
|
|
package/dist/index.d.ts
CHANGED
|
@@ -211,6 +211,18 @@ interface CardPromoProps {
|
|
|
211
211
|
* Click handler for the card
|
|
212
212
|
*/
|
|
213
213
|
onClick?: () => void;
|
|
214
|
+
/**
|
|
215
|
+
* Show Button
|
|
216
|
+
*/
|
|
217
|
+
showButton?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Button Text
|
|
220
|
+
*/
|
|
221
|
+
buttonText?: string;
|
|
222
|
+
/**
|
|
223
|
+
* custom className
|
|
224
|
+
*/
|
|
225
|
+
className?: string;
|
|
214
226
|
}
|
|
215
227
|
declare const CardPromo: React$1.FC<CardPromoProps>;
|
|
216
228
|
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var reactComponents = require('@fluentui/react-components');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React2 = require('react');
|
|
6
|
+
var reactGridSystem = require('react-grid-system');
|
|
6
7
|
var react = require('@iconify/react');
|
|
7
8
|
var reactHookForm = require('react-hook-form');
|
|
8
9
|
var PhoneInputComponent = require('react-phone-input-2');
|
|
@@ -305,7 +306,6 @@ var useStyles3 = reactComponents.makeStyles({
|
|
|
305
306
|
info: {
|
|
306
307
|
display: "flex",
|
|
307
308
|
flexDirection: "column",
|
|
308
|
-
padding: reactComponents.tokens.spacingHorizontalM,
|
|
309
309
|
width: "100%",
|
|
310
310
|
alignContent: "center",
|
|
311
311
|
justifyContent: "space-between",
|
|
@@ -322,6 +322,22 @@ var useStyles3 = reactComponents.makeStyles({
|
|
|
322
322
|
padding: reactComponents.tokens.spacingVerticalSNudge,
|
|
323
323
|
gap: reactComponents.tokens.spacingVerticalXS
|
|
324
324
|
}
|
|
325
|
+
},
|
|
326
|
+
infoWrapper: {
|
|
327
|
+
padding: reactComponents.tokens.spacingHorizontalM
|
|
328
|
+
},
|
|
329
|
+
buttonWrapper: {
|
|
330
|
+
display: "flex",
|
|
331
|
+
justifyContent: "center",
|
|
332
|
+
alignItems: "center"
|
|
333
|
+
},
|
|
334
|
+
title: {
|
|
335
|
+
lineClamp: 2,
|
|
336
|
+
overflow: "hidden",
|
|
337
|
+
textOverflow: "ellipsis",
|
|
338
|
+
display: "-webkit-box",
|
|
339
|
+
WebkitLineClamp: 2,
|
|
340
|
+
WebkitBoxOrient: "vertical"
|
|
325
341
|
}
|
|
326
342
|
});
|
|
327
343
|
var CardPromo = ({
|
|
@@ -331,7 +347,10 @@ var CardPromo = ({
|
|
|
331
347
|
imageAlt = "Promo image",
|
|
332
348
|
index = 0,
|
|
333
349
|
totalCards,
|
|
334
|
-
onClick
|
|
350
|
+
onClick,
|
|
351
|
+
showButton = false,
|
|
352
|
+
buttonText = "Lihat Detail",
|
|
353
|
+
className
|
|
335
354
|
}) => {
|
|
336
355
|
const classes = useStyles3();
|
|
337
356
|
const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
|
|
@@ -339,7 +358,7 @@ var CardPromo = ({
|
|
|
339
358
|
reactComponents.CarouselCard,
|
|
340
359
|
{
|
|
341
360
|
autoSize: true,
|
|
342
|
-
className: classes.actionCard,
|
|
361
|
+
className: reactComponents.mergeClasses(classes.actionCard, className),
|
|
343
362
|
"aria-label": ariaLabel,
|
|
344
363
|
onClick,
|
|
345
364
|
style: { cursor: onClick ? "pointer" : "default" },
|
|
@@ -353,9 +372,22 @@ var CardPromo = ({
|
|
|
353
372
|
alt: imageAlt
|
|
354
373
|
}
|
|
355
374
|
) }),
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
357
|
-
/* @__PURE__ */ jsxRuntime.
|
|
358
|
-
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: classes.infoWrapper, children: [
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { className: classes.info, xs: 12, sm: 12, md: 12, lg: showButton ? 8 : 12, xl: showButton ? 8 : 12, xxl: showButton ? 8 : 12, xxxl: showButton ? 8 : 12, children: [
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: classes.title, children: title }),
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: classes.title, children: description })
|
|
379
|
+
] }),
|
|
380
|
+
showButton && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { className: classes.buttonWrapper, xs: 12, sm: 12, md: 12, lg: showButton ? 4 : 0, xl: showButton ? 4 : 0, xxl: showButton ? 4 : 0, xxxl: showButton ? 4 : 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
381
|
+
reactComponents.Button,
|
|
382
|
+
{
|
|
383
|
+
appearance: "primary",
|
|
384
|
+
size: "small",
|
|
385
|
+
onClick,
|
|
386
|
+
style: { cursor: onClick ? "pointer" : "default" },
|
|
387
|
+
shape: "circular",
|
|
388
|
+
children: buttonText
|
|
389
|
+
}
|
|
390
|
+
) })
|
|
359
391
|
] })
|
|
360
392
|
]
|
|
361
393
|
}
|
|
@@ -2176,8 +2208,21 @@ function InputDynamic({
|
|
|
2176
2208
|
onChange: (_, data) => field.onChange(data.checked)
|
|
2177
2209
|
}
|
|
2178
2210
|
) });
|
|
2179
|
-
case "date":
|
|
2180
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2211
|
+
case "date": {
|
|
2212
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2213
|
+
DatePickerInput_default,
|
|
2214
|
+
{
|
|
2215
|
+
field,
|
|
2216
|
+
placeholder,
|
|
2217
|
+
disabled,
|
|
2218
|
+
appearance: error ? "outline" : appearance,
|
|
2219
|
+
size,
|
|
2220
|
+
onClick,
|
|
2221
|
+
style: inputStyle,
|
|
2222
|
+
max: max ? String(max) : void 0
|
|
2223
|
+
}
|
|
2224
|
+
);
|
|
2225
|
+
}
|
|
2181
2226
|
case "radio":
|
|
2182
2227
|
return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.RadioGroup, { ...field, disabled, layout: layout ?? "vertical", children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2183
2228
|
reactComponents.Radio,
|