@avenue-ticketing/native 0.1.8 → 0.1.10
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/avatar.js +61 -37
- package/dist/avatar.js.map +1 -1
- package/dist/button.js +12 -5
- package/dist/button.js.map +1 -1
- package/dist/date-picker.js +12 -5
- package/dist/date-picker.js.map +1 -1
- package/dist/dropdown.js +58 -26
- package/dist/dropdown.js.map +1 -1
- package/dist/input.js +92 -78
- package/dist/input.js.map +1 -1
- package/dist/multi-select.js +69 -30
- package/dist/multi-select.js.map +1 -1
- package/dist/select-item.js +59 -27
- package/dist/select-item.js.map +1 -1
- package/dist/select.js +58 -26
- package/dist/select.js.map +1 -1
- package/dist/tabs.d.ts +2 -1
- package/dist/tabs.js +31 -10
- package/dist/tabs.js.map +1 -1
- package/dist/tag-select.js +102 -55
- package/dist/tag-select.js.map +1 -1
- package/package.json +1 -1
- package/theme-dark.css +4 -1
package/dist/multi-select.js
CHANGED
|
@@ -179,8 +179,8 @@ var buttonStyles = sortCx({
|
|
|
179
179
|
primary: {
|
|
180
180
|
root: "bg-button-primary",
|
|
181
181
|
label: "text-button-primary",
|
|
182
|
-
/**
|
|
183
|
-
icon: "text-button-primary
|
|
182
|
+
/** Same color as the label. Figma fg-white is full strength. */
|
|
183
|
+
icon: "text-button-primary",
|
|
184
184
|
/** Loading icon inherits the primary label color. */
|
|
185
185
|
spinner: "text-button-primary"
|
|
186
186
|
},
|
|
@@ -260,10 +260,12 @@ var isReactComponent = (component) => {
|
|
|
260
260
|
var nativeButtonInteraction = sortCx({
|
|
261
261
|
root: "active:scale-[0.985]",
|
|
262
262
|
drop: "shadow-xs",
|
|
263
|
+
primaryDrop: "shadow-button-primary-drop",
|
|
263
264
|
clip: "absolute inset-0 overflow-hidden rounded-full",
|
|
264
265
|
insetRing: "absolute inset-0 rounded-full border border-solid border-[rgba(0,0,0,0.18)]",
|
|
265
266
|
bottomWeight: "absolute inset-x-0 bottom-0 h-0.5 bg-[rgba(0,0,0,0.05)]",
|
|
266
267
|
topHighlight: "absolute left-px right-px top-px h-px bg-[rgba(255,255,255,0.12)]",
|
|
268
|
+
primaryBorder: "absolute inset-0 rounded-full border-2 border-solid border-white/12",
|
|
267
269
|
secondaryBottom: "absolute inset-x-0 bottom-0 h-px bg-[rgba(0,0,0,0.05)]",
|
|
268
270
|
colors: {
|
|
269
271
|
primary: "active:bg-button-primary_hover",
|
|
@@ -347,7 +349,7 @@ var Button = ({
|
|
|
347
349
|
const iconToken = buttonStyles.colors[color].icon.replace(/^text-/, "");
|
|
348
350
|
const onSolid = iconToken.startsWith("white");
|
|
349
351
|
const resolvedIconColor = useNativeVariable(
|
|
350
|
-
onSolid ? "--color-white" : iconToken.startsWith("fg-") ? `--color-${iconToken}` : `--color-text-${iconToken}`
|
|
352
|
+
onSolid ? "--color-white" : iconToken.startsWith("fg-") ? `--color-${iconToken}` : iconToken.startsWith("button-primary") ? "--color-button-primary-fg" : `--color-text-${iconToken}`
|
|
351
353
|
);
|
|
352
354
|
const iconColor = onSolid ? "rgba(255,255,255,0.7)" : typeof resolvedIconColor === "string" ? resolvedIconColor : void 0;
|
|
353
355
|
const iconClassName = cx(
|
|
@@ -378,7 +380,7 @@ var Button = ({
|
|
|
378
380
|
flattenInGroup ? cx(buttonStyles.inputGroup.root, buttonStyles.inputGroup[size]) : cx(buttonStyles.sizes[size].root, isIcon && buttonStyles.sizes[size].iconOnly),
|
|
379
381
|
flattenInGroup ? "bg-primary" : buttonStyles.colors[color].root,
|
|
380
382
|
!flattenInGroup && hasPressScale(color) && nativeButtonInteraction.root,
|
|
381
|
-
!flattenInGroup && (isSolidSkeuomorphic(color) || isSecondarySkeuomorphic(color)) && nativeButtonInteraction.drop,
|
|
383
|
+
!flattenInGroup && (isSolidSkeuomorphic(color) || isSecondarySkeuomorphic(color)) && (color === "primary" ? nativeButtonInteraction.primaryDrop : nativeButtonInteraction.drop),
|
|
382
384
|
nativeButtonInteraction.colors[color],
|
|
383
385
|
isLinkType && "h-auto min-h-0 px-0 py-0",
|
|
384
386
|
// Web applies disabled opacity only when disabled — not while loading.
|
|
@@ -390,7 +392,12 @@ var Button = ({
|
|
|
390
392
|
!flattenInGroup && isSolidSkeuomorphic(color) && /* @__PURE__ */ jsxs(View, { pointerEvents: "none", className: nativeButtonInteraction.clip, children: [
|
|
391
393
|
/* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.insetRing }),
|
|
392
394
|
/* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.bottomWeight }),
|
|
393
|
-
/* @__PURE__ */ jsx(
|
|
395
|
+
/* @__PURE__ */ jsx(
|
|
396
|
+
View,
|
|
397
|
+
{
|
|
398
|
+
className: color === "primary" ? nativeButtonInteraction.primaryBorder : nativeButtonInteraction.topHighlight
|
|
399
|
+
}
|
|
400
|
+
)
|
|
394
401
|
] }),
|
|
395
402
|
!flattenInGroup && isSecondarySkeuomorphic(color) && /* @__PURE__ */ jsx(View, { pointerEvents: "none", className: nativeButtonInteraction.clip, children: /* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.secondaryBottom }) }),
|
|
396
403
|
/* @__PURE__ */ jsxs(IconContext.Provider, { value: iconColor ? { color: iconColor } : {}, children: [
|
|
@@ -718,18 +725,55 @@ var SelectSheet = ({ open, onClose, title, fullScreen, overlay, className, child
|
|
|
718
725
|
var avatarStyles = sortCx({
|
|
719
726
|
root: "relative shrink-0 rounded-[7px]",
|
|
720
727
|
rootRounded: "rounded-full",
|
|
721
|
-
|
|
722
|
-
|
|
728
|
+
// white pad + hairline + shadow-xs. width lives on each size.
|
|
729
|
+
rootBorder: "border-solid border-secondary_alt bg-primary shadow-xs",
|
|
730
|
+
content: "relative size-full shrink-0 items-center justify-center overflow-hidden rounded-md",
|
|
723
731
|
contentRounded: "rounded-full",
|
|
724
|
-
initials: "text-
|
|
732
|
+
initials: "text-utility-brand-600",
|
|
725
733
|
icon: "text-fg-quaternary",
|
|
726
734
|
sizes: {
|
|
727
|
-
xs: {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
735
|
+
xs: {
|
|
736
|
+
root: "size-6",
|
|
737
|
+
rootWithBorder: "border-[0.5px] p-px",
|
|
738
|
+
placeholderBorder: "border-[0.5px] border-solid border-secondary",
|
|
739
|
+
initials: "text-xs font-medium",
|
|
740
|
+
icon: "size-3"
|
|
741
|
+
},
|
|
742
|
+
sm: {
|
|
743
|
+
root: "size-8",
|
|
744
|
+
rootWithBorder: "border-[0.5px] p-px",
|
|
745
|
+
placeholderBorder: "border-[0.5px] border-solid border-secondary",
|
|
746
|
+
initials: "text-sm font-medium",
|
|
747
|
+
icon: "size-4"
|
|
748
|
+
},
|
|
749
|
+
md: {
|
|
750
|
+
root: "size-10",
|
|
751
|
+
rootWithBorder: "border-[0.75px] p-px",
|
|
752
|
+
placeholderBorder: "border-[0.75px] border-solid border-secondary",
|
|
753
|
+
initials: "text-md font-medium",
|
|
754
|
+
icon: "size-5"
|
|
755
|
+
},
|
|
756
|
+
lg: {
|
|
757
|
+
root: "size-12",
|
|
758
|
+
rootWithBorder: "border-[0.75px] p-[1.5px]",
|
|
759
|
+
placeholderBorder: "border-[0.75px] border-solid border-secondary",
|
|
760
|
+
initials: "text-lg font-medium",
|
|
761
|
+
icon: "size-6"
|
|
762
|
+
},
|
|
763
|
+
xl: {
|
|
764
|
+
root: "size-14",
|
|
765
|
+
rootWithBorder: "border p-0.5",
|
|
766
|
+
placeholderBorder: "border border-solid border-secondary",
|
|
767
|
+
initials: "text-xl font-medium",
|
|
768
|
+
icon: "size-7"
|
|
769
|
+
},
|
|
770
|
+
"2xl": {
|
|
771
|
+
root: "size-16",
|
|
772
|
+
rootWithBorder: "border p-0.5",
|
|
773
|
+
placeholderBorder: "border border-solid border-secondary",
|
|
774
|
+
initials: "text-display-xs font-medium",
|
|
775
|
+
icon: "size-8"
|
|
776
|
+
}
|
|
733
777
|
}
|
|
734
778
|
});
|
|
735
779
|
var AVATAR_SIZE_PX = {
|
|
@@ -741,11 +785,11 @@ var AVATAR_SIZE_PX = {
|
|
|
741
785
|
"2xl": 64
|
|
742
786
|
};
|
|
743
787
|
var AVATAR_ICON_SIZE_PX = {
|
|
744
|
-
xs:
|
|
745
|
-
sm:
|
|
746
|
-
md:
|
|
747
|
-
lg:
|
|
748
|
-
xl:
|
|
788
|
+
xs: 12,
|
|
789
|
+
sm: 16,
|
|
790
|
+
md: 20,
|
|
791
|
+
lg: 24,
|
|
792
|
+
xl: 28,
|
|
749
793
|
"2xl": 32
|
|
750
794
|
};
|
|
751
795
|
var AVATAR_INITIALS_LINE_HEIGHT_PX = {
|
|
@@ -840,14 +884,7 @@ var VerifiedTick = ({ size, className }) => {
|
|
|
840
884
|
);
|
|
841
885
|
};
|
|
842
886
|
var AvatarCount = ({ count, className }) => {
|
|
843
|
-
return /* @__PURE__ */ jsx(View, { className: cx(avatarCountStyles.root, className), children: /* @__PURE__ */ jsx(View, { className: cx("flex-row", avatarCountStyles.badge), children: /* @__PURE__ */ jsx(
|
|
844
|
-
Text,
|
|
845
|
-
{
|
|
846
|
-
style: { includeFontPadding: false, lineHeight: AVATAR_COUNT_LABEL_LINE_HEIGHT_PX },
|
|
847
|
-
className: avatarCountStyles.label,
|
|
848
|
-
children: count
|
|
849
|
-
}
|
|
850
|
-
) }) });
|
|
887
|
+
return /* @__PURE__ */ jsx(View, { className: cx(avatarCountStyles.root, className), children: /* @__PURE__ */ jsx(View, { className: cx("flex-row", avatarCountStyles.badge), children: /* @__PURE__ */ jsx(Text, { style: { includeFontPadding: false, lineHeight: AVATAR_COUNT_LABEL_LINE_HEIGHT_PX }, className: avatarCountStyles.label, children: count }) }) });
|
|
851
888
|
};
|
|
852
889
|
var Avatar = ({
|
|
853
890
|
size = "md",
|
|
@@ -870,7 +907,7 @@ var Avatar = ({
|
|
|
870
907
|
const sizeStyles = avatarStyles.sizes[size];
|
|
871
908
|
const px = AVATAR_SIZE_PX[size];
|
|
872
909
|
const iconPx = AVATAR_ICON_SIZE_PX[size];
|
|
873
|
-
const
|
|
910
|
+
const placeholderColor = useNativeVariable("--color-utility-brand-600") ?? "#7c3aed";
|
|
874
911
|
const renderMainContent = () => {
|
|
875
912
|
if (canShowImage && src) {
|
|
876
913
|
return /* @__PURE__ */ jsx(
|
|
@@ -895,10 +932,10 @@ var Avatar = ({
|
|
|
895
932
|
);
|
|
896
933
|
}
|
|
897
934
|
if (PlaceholderIcon) {
|
|
898
|
-
return /* @__PURE__ */ jsx(PlaceholderIcon, { size: iconPx, color:
|
|
935
|
+
return /* @__PURE__ */ jsx(PlaceholderIcon, { size: iconPx, color: placeholderColor });
|
|
899
936
|
}
|
|
900
937
|
if (placeholder) return /* @__PURE__ */ jsx(Fragment, { children: placeholder });
|
|
901
|
-
return /* @__PURE__ */ jsx(UserIcon, { size: iconPx, color:
|
|
938
|
+
return /* @__PURE__ */ jsx(UserIcon, { size: iconPx, color: placeholderColor });
|
|
902
939
|
};
|
|
903
940
|
const renderBadgeContent = () => {
|
|
904
941
|
if (status) return /* @__PURE__ */ jsx(AvatarOnlineIndicator, { status, size });
|
|
@@ -926,6 +963,8 @@ var Avatar = ({
|
|
|
926
963
|
"flex-row",
|
|
927
964
|
avatarStyles.content,
|
|
928
965
|
rounded && avatarStyles.contentRounded,
|
|
966
|
+
canShowImage ? "bg-tertiary" : "bg-utility-brand-50",
|
|
967
|
+
!canShowImage && border && sizeStyles.placeholderBorder,
|
|
929
968
|
contentClassName
|
|
930
969
|
),
|
|
931
970
|
children: renderMainContent()
|