@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.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { makeStyles, tokens, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, mergeClasses, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React2, { forwardRef, useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
4
|
+
import { Row, Col } from 'react-grid-system';
|
|
4
5
|
import { Icon } from '@iconify/react';
|
|
5
6
|
import { Controller } from 'react-hook-form';
|
|
6
7
|
import PhoneInputComponent from 'react-phone-input-2';
|
|
7
|
-
import 'react-phone-input-2/lib/style.css';
|
|
8
8
|
import Select from 'react-select';
|
|
9
9
|
import { Calendar } from '@fluentui/react-calendar-compat';
|
|
10
10
|
import moment from 'moment';
|
|
@@ -297,7 +297,6 @@ var useStyles3 = makeStyles({
|
|
|
297
297
|
info: {
|
|
298
298
|
display: "flex",
|
|
299
299
|
flexDirection: "column",
|
|
300
|
-
padding: tokens.spacingHorizontalM,
|
|
301
300
|
width: "100%",
|
|
302
301
|
alignContent: "center",
|
|
303
302
|
justifyContent: "space-between",
|
|
@@ -314,6 +313,22 @@ var useStyles3 = makeStyles({
|
|
|
314
313
|
padding: tokens.spacingVerticalSNudge,
|
|
315
314
|
gap: tokens.spacingVerticalXS
|
|
316
315
|
}
|
|
316
|
+
},
|
|
317
|
+
infoWrapper: {
|
|
318
|
+
padding: tokens.spacingHorizontalM
|
|
319
|
+
},
|
|
320
|
+
buttonWrapper: {
|
|
321
|
+
display: "flex",
|
|
322
|
+
justifyContent: "center",
|
|
323
|
+
alignItems: "center"
|
|
324
|
+
},
|
|
325
|
+
title: {
|
|
326
|
+
lineClamp: 2,
|
|
327
|
+
overflow: "hidden",
|
|
328
|
+
textOverflow: "ellipsis",
|
|
329
|
+
display: "-webkit-box",
|
|
330
|
+
WebkitLineClamp: 2,
|
|
331
|
+
WebkitBoxOrient: "vertical"
|
|
317
332
|
}
|
|
318
333
|
});
|
|
319
334
|
var CardPromo = ({
|
|
@@ -323,7 +338,10 @@ var CardPromo = ({
|
|
|
323
338
|
imageAlt = "Promo image",
|
|
324
339
|
index = 0,
|
|
325
340
|
totalCards,
|
|
326
|
-
onClick
|
|
341
|
+
onClick,
|
|
342
|
+
showButton = false,
|
|
343
|
+
buttonText = "Lihat Detail",
|
|
344
|
+
className
|
|
327
345
|
}) => {
|
|
328
346
|
const classes = useStyles3();
|
|
329
347
|
const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
|
|
@@ -331,7 +349,7 @@ var CardPromo = ({
|
|
|
331
349
|
CarouselCard,
|
|
332
350
|
{
|
|
333
351
|
autoSize: true,
|
|
334
|
-
className: classes.actionCard,
|
|
352
|
+
className: mergeClasses(classes.actionCard, className),
|
|
335
353
|
"aria-label": ariaLabel,
|
|
336
354
|
onClick,
|
|
337
355
|
style: { cursor: onClick ? "pointer" : "default" },
|
|
@@ -345,9 +363,22 @@ var CardPromo = ({
|
|
|
345
363
|
alt: imageAlt
|
|
346
364
|
}
|
|
347
365
|
) }),
|
|
348
|
-
/* @__PURE__ */ jsxs(
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
|
|
366
|
+
/* @__PURE__ */ jsxs(Row, { className: classes.infoWrapper, children: [
|
|
367
|
+
/* @__PURE__ */ jsxs(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: [
|
|
368
|
+
/* @__PURE__ */ jsx(Subtitle2, { className: classes.title, children: title }),
|
|
369
|
+
/* @__PURE__ */ jsx(Body1, { className: classes.title, children: description })
|
|
370
|
+
] }),
|
|
371
|
+
showButton && /* @__PURE__ */ jsx(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__ */ jsx(
|
|
372
|
+
Button,
|
|
373
|
+
{
|
|
374
|
+
appearance: "primary",
|
|
375
|
+
size: "small",
|
|
376
|
+
onClick,
|
|
377
|
+
style: { cursor: onClick ? "pointer" : "default" },
|
|
378
|
+
shape: "circular",
|
|
379
|
+
children: buttonText
|
|
380
|
+
}
|
|
381
|
+
) })
|
|
351
382
|
] })
|
|
352
383
|
]
|
|
353
384
|
}
|
|
@@ -2168,8 +2199,21 @@ function InputDynamic({
|
|
|
2168
2199
|
onChange: (_, data) => field.onChange(data.checked)
|
|
2169
2200
|
}
|
|
2170
2201
|
) });
|
|
2171
|
-
case "date":
|
|
2172
|
-
return /* @__PURE__ */ jsx(
|
|
2202
|
+
case "date": {
|
|
2203
|
+
return /* @__PURE__ */ jsx(
|
|
2204
|
+
DatePickerInput_default,
|
|
2205
|
+
{
|
|
2206
|
+
field,
|
|
2207
|
+
placeholder,
|
|
2208
|
+
disabled,
|
|
2209
|
+
appearance: error ? "outline" : appearance,
|
|
2210
|
+
size,
|
|
2211
|
+
onClick,
|
|
2212
|
+
style: inputStyle,
|
|
2213
|
+
max: max ? String(max) : void 0
|
|
2214
|
+
}
|
|
2215
|
+
);
|
|
2216
|
+
}
|
|
2173
2217
|
case "radio":
|
|
2174
2218
|
return /* @__PURE__ */ jsx(RadioGroup, { ...field, disabled, layout: layout ?? "vertical", children: options.map((option) => /* @__PURE__ */ jsx(
|
|
2175
2219
|
Radio,
|