@asdp/ferryui 0.1.22-dev.10194 → 0.1.22-dev.10206
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1153,6 +1153,7 @@ function useWindowSize() {
|
|
|
1153
1153
|
var DEFAULT_LABELS5 = {
|
|
1154
1154
|
id: {
|
|
1155
1155
|
availableSeatsLabel: "Tersedia",
|
|
1156
|
+
soldOutLabel: "Habis",
|
|
1156
1157
|
estimationPrefix: "Estimasi",
|
|
1157
1158
|
priceDetailsButton: "Rincian Harga",
|
|
1158
1159
|
policyButton: "Kebijakan",
|
|
@@ -1166,6 +1167,7 @@ var DEFAULT_LABELS5 = {
|
|
|
1166
1167
|
},
|
|
1167
1168
|
en: {
|
|
1168
1169
|
availableSeatsLabel: "Available",
|
|
1170
|
+
soldOutLabel: "Sold Out",
|
|
1169
1171
|
estimationPrefix: "Estimation",
|
|
1170
1172
|
priceDetailsButton: "Price Details",
|
|
1171
1173
|
policyButton: "Policy",
|
|
@@ -1458,7 +1460,7 @@ var CardTicket = ({
|
|
|
1458
1460
|
{
|
|
1459
1461
|
size: "large",
|
|
1460
1462
|
appearance: "filled",
|
|
1461
|
-
style: { backgroundColor: departureItem?.provider?.serviceColor, padding: "0.5rem" },
|
|
1463
|
+
style: { backgroundColor: departureItem?.availableTicket <= 0 ? reactComponents.tokens.colorNeutralForeground3 : departureItem?.provider?.serviceColor, padding: "0.5rem" },
|
|
1462
1464
|
iconPosition: "before",
|
|
1463
1465
|
shape: "rounded",
|
|
1464
1466
|
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:info-24-regular" }),
|
|
@@ -1491,7 +1493,8 @@ var CardTicket = ({
|
|
|
1491
1493
|
className: styles.asdpLogo,
|
|
1492
1494
|
alt: mergedLabels.logoAlt,
|
|
1493
1495
|
height: 56,
|
|
1494
|
-
width: 82
|
|
1496
|
+
width: 82,
|
|
1497
|
+
style: departureItem?.availableTicket <= 0 ? { filter: "grayscale(100%)", opacity: 0.7 } : {}
|
|
1495
1498
|
}
|
|
1496
1499
|
)
|
|
1497
1500
|
}
|
|
@@ -1511,23 +1514,19 @@ var CardTicket = ({
|
|
|
1511
1514
|
justifyContent: "center",
|
|
1512
1515
|
alignItems: "center"
|
|
1513
1516
|
},
|
|
1514
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
1517
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1515
1518
|
reactComponents.Badge,
|
|
1516
1519
|
{
|
|
1517
1520
|
size: "large",
|
|
1518
|
-
style: {
|
|
1521
|
+
style: departureItem?.availableTicket <= 0 ? void 0 : {
|
|
1519
1522
|
color: departureItem?.availableTicket > 50 ? sharedColors.Shared_Green_Primary : sharedColors.Shared_Red_Primary
|
|
1520
1523
|
},
|
|
1521
|
-
appearance: "tint",
|
|
1524
|
+
appearance: departureItem?.availableTicket <= 0 ? "outline" : "tint",
|
|
1522
1525
|
color: departureItem?.availableTicket > 50 ? "success" : "danger",
|
|
1523
1526
|
iconPosition: "after",
|
|
1524
1527
|
shape: "rounded",
|
|
1525
1528
|
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:ticket-diagonal-24-regular" }),
|
|
1526
|
-
children:
|
|
1527
|
-
mergedLabels.availableSeatsLabel,
|
|
1528
|
-
" ",
|
|
1529
|
-
departureItem?.availableTicket
|
|
1530
|
-
]
|
|
1529
|
+
children: departureItem?.availableTicket <= 0 ? mergedLabels.soldOutLabel : `${mergedLabels.availableSeatsLabel} ${departureItem?.availableTicket}`
|
|
1531
1530
|
}
|
|
1532
1531
|
)
|
|
1533
1532
|
}
|
|
@@ -1600,23 +1599,19 @@ var CardTicket = ({
|
|
|
1600
1599
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { flex: 1, height: "32px", borderRadius: "16px" } })
|
|
1601
1600
|
] }) })
|
|
1602
1601
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1603
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Visible, { lg: true, xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsxRuntime.
|
|
1602
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Visible, { lg: true, xl: true, xxl: true, xxxl: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1604
1603
|
reactComponents.Badge,
|
|
1605
1604
|
{
|
|
1606
1605
|
size: "extra-large",
|
|
1607
|
-
style: {
|
|
1606
|
+
style: departureItem?.availableTicket <= 0 ? void 0 : {
|
|
1608
1607
|
color: departureItem?.availableTicket > 50 ? sharedColors.Shared_Green_Primary : sharedColors.Shared_Red_Primary
|
|
1609
1608
|
},
|
|
1610
|
-
appearance: "tint",
|
|
1609
|
+
appearance: departureItem?.availableTicket <= 0 ? "outline" : "tint",
|
|
1611
1610
|
color: departureItem?.availableTicket > 50 ? "success" : "danger",
|
|
1612
1611
|
iconPosition: "after",
|
|
1613
1612
|
shape: "rounded",
|
|
1614
1613
|
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:ticket-diagonal-24-regular" }),
|
|
1615
|
-
children:
|
|
1616
|
-
mergedLabels.availableSeatsLabel,
|
|
1617
|
-
" ",
|
|
1618
|
-
departureItem?.availableTicket
|
|
1619
|
-
]
|
|
1614
|
+
children: departureItem?.availableTicket <= 0 ? mergedLabels.soldOutLabel : `${mergedLabels.availableSeatsLabel} ${departureItem?.availableTicket}`
|
|
1620
1615
|
}
|
|
1621
1616
|
) }),
|
|
1622
1617
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketInfo, children: [
|
|
@@ -1647,8 +1642,8 @@ var CardTicket = ({
|
|
|
1647
1642
|
shape: "circular",
|
|
1648
1643
|
style: {
|
|
1649
1644
|
flex: 1,
|
|
1650
|
-
borderColor: reactComponents.tokens.colorBrandBackground,
|
|
1651
|
-
color: reactComponents.tokens.colorBrandBackground
|
|
1645
|
+
borderColor: departureItem?.availableTicket <= 0 ? reactComponents.tokens.colorNeutralForeground4 : reactComponents.tokens.colorBrandBackground,
|
|
1646
|
+
color: departureItem?.availableTicket <= 0 ? reactComponents.tokens.colorNeutralForeground4 : reactComponents.tokens.colorBrandBackground
|
|
1652
1647
|
},
|
|
1653
1648
|
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:money-24-regular" }),
|
|
1654
1649
|
size: "medium",
|
|
@@ -1663,8 +1658,8 @@ var CardTicket = ({
|
|
|
1663
1658
|
shape: "circular",
|
|
1664
1659
|
style: {
|
|
1665
1660
|
flex: 1,
|
|
1666
|
-
borderColor: reactComponents.tokens.colorBrandBackground,
|
|
1667
|
-
color: reactComponents.tokens.colorBrandBackground
|
|
1661
|
+
borderColor: departureItem?.availableTicket <= 0 ? reactComponents.tokens.colorNeutralForeground4 : reactComponents.tokens.colorBrandBackground,
|
|
1662
|
+
color: departureItem?.availableTicket <= 0 ? reactComponents.tokens.colorNeutralForeground4 : reactComponents.tokens.colorBrandBackground
|
|
1668
1663
|
},
|
|
1669
1664
|
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:document-bullet-list-24-regular" }),
|
|
1670
1665
|
size: "medium",
|
|
@@ -1687,7 +1682,7 @@ var CardTicket = ({
|
|
|
1687
1682
|
xxl: 4.5,
|
|
1688
1683
|
xxxl: 4.5,
|
|
1689
1684
|
style: { padding: 0, margin: 0 },
|
|
1690
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.ticketRightCard, children: [
|
|
1685
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.ticketRightCard, style: departureItem?.availableTicket <= 0 ? { background: "linear-gradient(75deg, #7A7A7A 0%, #4D4D4D 103.3%)" } : {}, children: [
|
|
1691
1686
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1692
1687
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.priceCard, children: [
|
|
1693
1688
|
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { style: { display: "flex", flexDirection: "column", gap: "8px", flex: 1 }, children: [
|
|
@@ -1731,11 +1726,11 @@ var CardTicket = ({
|
|
|
1731
1726
|
{
|
|
1732
1727
|
onClick: onSelectTicket,
|
|
1733
1728
|
appearance: "primary",
|
|
1734
|
-
style: { backgroundColor: brandColors["60"] },
|
|
1729
|
+
style: isVerifyingTicket || departureItem?.availableTicket <= 0 ? void 0 : { backgroundColor: brandColors["60"] },
|
|
1735
1730
|
size: "medium",
|
|
1736
1731
|
shape: "circular",
|
|
1737
1732
|
icon: isVerifyingTicket ? null : /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:ticket-diagonal-24-filled" }),
|
|
1738
|
-
disabled: isVerifyingTicket,
|
|
1733
|
+
disabled: isVerifyingTicket || departureItem?.availableTicket <= 0,
|
|
1739
1734
|
children: isVerifyingTicket ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1740
1735
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Spinner, { size: "extra-tiny", style: { marginRight: "5px" } }),
|
|
1741
1736
|
" ",
|