@asdp/ferryui 0.1.11 → 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 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -9
- 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,10 +3,10 @@
|
|
|
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');
|
|
9
|
-
require('react-phone-input-2/lib/style.css');
|
|
10
10
|
var Select = require('react-select');
|
|
11
11
|
var reactCalendarCompat = require('@fluentui/react-calendar-compat');
|
|
12
12
|
var moment = require('moment');
|
|
@@ -306,7 +306,6 @@ var useStyles3 = reactComponents.makeStyles({
|
|
|
306
306
|
info: {
|
|
307
307
|
display: "flex",
|
|
308
308
|
flexDirection: "column",
|
|
309
|
-
padding: reactComponents.tokens.spacingHorizontalM,
|
|
310
309
|
width: "100%",
|
|
311
310
|
alignContent: "center",
|
|
312
311
|
justifyContent: "space-between",
|
|
@@ -323,6 +322,22 @@ var useStyles3 = reactComponents.makeStyles({
|
|
|
323
322
|
padding: reactComponents.tokens.spacingVerticalSNudge,
|
|
324
323
|
gap: reactComponents.tokens.spacingVerticalXS
|
|
325
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"
|
|
326
341
|
}
|
|
327
342
|
});
|
|
328
343
|
var CardPromo = ({
|
|
@@ -332,7 +347,10 @@ var CardPromo = ({
|
|
|
332
347
|
imageAlt = "Promo image",
|
|
333
348
|
index = 0,
|
|
334
349
|
totalCards,
|
|
335
|
-
onClick
|
|
350
|
+
onClick,
|
|
351
|
+
showButton = false,
|
|
352
|
+
buttonText = "Lihat Detail",
|
|
353
|
+
className
|
|
336
354
|
}) => {
|
|
337
355
|
const classes = useStyles3();
|
|
338
356
|
const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
|
|
@@ -340,7 +358,7 @@ var CardPromo = ({
|
|
|
340
358
|
reactComponents.CarouselCard,
|
|
341
359
|
{
|
|
342
360
|
autoSize: true,
|
|
343
|
-
className: classes.actionCard,
|
|
361
|
+
className: reactComponents.mergeClasses(classes.actionCard, className),
|
|
344
362
|
"aria-label": ariaLabel,
|
|
345
363
|
onClick,
|
|
346
364
|
style: { cursor: onClick ? "pointer" : "default" },
|
|
@@ -354,9 +372,22 @@ var CardPromo = ({
|
|
|
354
372
|
alt: imageAlt
|
|
355
373
|
}
|
|
356
374
|
) }),
|
|
357
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
358
|
-
/* @__PURE__ */ jsxRuntime.
|
|
359
|
-
|
|
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
|
+
) })
|
|
360
391
|
] })
|
|
361
392
|
]
|
|
362
393
|
}
|
|
@@ -2177,8 +2208,21 @@ function InputDynamic({
|
|
|
2177
2208
|
onChange: (_, data) => field.onChange(data.checked)
|
|
2178
2209
|
}
|
|
2179
2210
|
) });
|
|
2180
|
-
case "date":
|
|
2181
|
-
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
|
+
}
|
|
2182
2226
|
case "radio":
|
|
2183
2227
|
return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.RadioGroup, { ...field, disabled, layout: layout ?? "vertical", children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2184
2228
|
reactComponents.Radio,
|