@asdp/ferryui 0.1.12 → 0.1.14
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 +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +56 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -211,6 +211,26 @@ 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;
|
|
226
|
+
/**
|
|
227
|
+
* custom image className
|
|
228
|
+
*/
|
|
229
|
+
imageClassName?: string;
|
|
230
|
+
/**
|
|
231
|
+
* custom description className
|
|
232
|
+
*/
|
|
233
|
+
descriptionClassName?: string;
|
|
214
234
|
}
|
|
215
235
|
declare const CardPromo: React$1.FC<CardPromoProps>;
|
|
216
236
|
|
package/dist/index.d.ts
CHANGED
|
@@ -211,6 +211,26 @@ 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;
|
|
226
|
+
/**
|
|
227
|
+
* custom image className
|
|
228
|
+
*/
|
|
229
|
+
imageClassName?: string;
|
|
230
|
+
/**
|
|
231
|
+
* custom description className
|
|
232
|
+
*/
|
|
233
|
+
descriptionClassName?: string;
|
|
214
234
|
}
|
|
215
235
|
declare const CardPromo: React$1.FC<CardPromoProps>;
|
|
216
236
|
|
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,12 @@ 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,
|
|
354
|
+
imageClassName,
|
|
355
|
+
descriptionClassName
|
|
335
356
|
}) => {
|
|
336
357
|
const classes = useStyles3();
|
|
337
358
|
const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
|
|
@@ -339,12 +360,12 @@ var CardPromo = ({
|
|
|
339
360
|
reactComponents.CarouselCard,
|
|
340
361
|
{
|
|
341
362
|
autoSize: true,
|
|
342
|
-
className: classes.actionCard,
|
|
363
|
+
className: reactComponents.mergeClasses(classes.actionCard, className),
|
|
343
364
|
"aria-label": ariaLabel,
|
|
344
365
|
onClick,
|
|
345
366
|
style: { cursor: onClick ? "pointer" : "default" },
|
|
346
367
|
children: [
|
|
347
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.imageContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
368
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: reactComponents.mergeClasses(classes.imageContainer, imageClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
348
369
|
"img",
|
|
349
370
|
{
|
|
350
371
|
className: classes.image,
|
|
@@ -353,9 +374,22 @@ var CardPromo = ({
|
|
|
353
374
|
alt: imageAlt
|
|
354
375
|
}
|
|
355
376
|
) }),
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
357
|
-
/* @__PURE__ */ jsxRuntime.
|
|
358
|
-
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { className: classes.infoWrapper, children: [
|
|
378
|
+
/* @__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: [
|
|
379
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: classes.title, children: title }),
|
|
380
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: reactComponents.mergeClasses(classes.title, descriptionClassName), children: description })
|
|
381
|
+
] }),
|
|
382
|
+
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(
|
|
383
|
+
reactComponents.Button,
|
|
384
|
+
{
|
|
385
|
+
appearance: "primary",
|
|
386
|
+
size: "small",
|
|
387
|
+
onClick,
|
|
388
|
+
style: { cursor: onClick ? "pointer" : "default" },
|
|
389
|
+
shape: "circular",
|
|
390
|
+
children: buttonText
|
|
391
|
+
}
|
|
392
|
+
) })
|
|
359
393
|
] })
|
|
360
394
|
]
|
|
361
395
|
}
|
|
@@ -2176,8 +2210,21 @@ function InputDynamic({
|
|
|
2176
2210
|
onChange: (_, data) => field.onChange(data.checked)
|
|
2177
2211
|
}
|
|
2178
2212
|
) });
|
|
2179
|
-
case "date":
|
|
2180
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2213
|
+
case "date": {
|
|
2214
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2215
|
+
DatePickerInput_default,
|
|
2216
|
+
{
|
|
2217
|
+
field,
|
|
2218
|
+
placeholder,
|
|
2219
|
+
disabled,
|
|
2220
|
+
appearance: error ? "outline" : appearance,
|
|
2221
|
+
size,
|
|
2222
|
+
onClick,
|
|
2223
|
+
style: inputStyle,
|
|
2224
|
+
max: max ? String(max) : void 0
|
|
2225
|
+
}
|
|
2226
|
+
);
|
|
2227
|
+
}
|
|
2181
2228
|
case "radio":
|
|
2182
2229
|
return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.RadioGroup, { ...field, disabled, layout: layout ?? "vertical", children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2183
2230
|
reactComponents.Radio,
|