@avenue-ticketing/native 0.1.7 → 0.1.9
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 +17 -10
- package/dist/button.js.map +1 -1
- package/dist/date-picker.js +17 -10
- 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 +17 -10
- package/dist/input.js.map +1 -1
- package/dist/multi-select.js +74 -35
- 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 +9 -0
- package/theme.css +3 -0
package/dist/dropdown.js
CHANGED
|
@@ -9,9 +9,9 @@ import { CaretRightIcon } from 'phosphor-react-native/src/icons/CaretRight';
|
|
|
9
9
|
import { CheckIcon } from 'phosphor-react-native/src/icons/Check';
|
|
10
10
|
import { DotsThreeVerticalIcon } from 'phosphor-react-native/src/icons/DotsThreeVertical';
|
|
11
11
|
import { XIcon } from 'phosphor-react-native/src/icons/X';
|
|
12
|
-
import Svg, { Path } from 'react-native-svg';
|
|
13
12
|
import { styled } from 'nativewind';
|
|
14
13
|
import { UserIcon } from 'phosphor-react-native/src/icons/User';
|
|
14
|
+
import Svg, { Path } from 'react-native-svg';
|
|
15
15
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
16
|
|
|
17
17
|
// ../../native/components/base/dropdown/dropdown.tsx
|
|
@@ -113,18 +113,55 @@ var isReactComponent = (component) => {
|
|
|
113
113
|
var avatarStyles = sortCx({
|
|
114
114
|
root: "relative shrink-0 rounded-[7px]",
|
|
115
115
|
rootRounded: "rounded-full",
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
// white pad + hairline + shadow-xs. width lives on each size.
|
|
117
|
+
rootBorder: "border-solid border-secondary_alt bg-primary shadow-xs",
|
|
118
|
+
content: "relative size-full shrink-0 items-center justify-center overflow-hidden rounded-md",
|
|
118
119
|
contentRounded: "rounded-full",
|
|
119
|
-
initials: "text-
|
|
120
|
+
initials: "text-utility-brand-600",
|
|
120
121
|
icon: "text-fg-quaternary",
|
|
121
122
|
sizes: {
|
|
122
|
-
xs: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
xs: {
|
|
124
|
+
root: "size-6",
|
|
125
|
+
rootWithBorder: "border-[0.5px] p-px",
|
|
126
|
+
placeholderBorder: "border-[0.5px] border-solid border-secondary",
|
|
127
|
+
initials: "text-xs font-medium",
|
|
128
|
+
icon: "size-3"
|
|
129
|
+
},
|
|
130
|
+
sm: {
|
|
131
|
+
root: "size-8",
|
|
132
|
+
rootWithBorder: "border-[0.5px] p-px",
|
|
133
|
+
placeholderBorder: "border-[0.5px] border-solid border-secondary",
|
|
134
|
+
initials: "text-sm font-medium",
|
|
135
|
+
icon: "size-4"
|
|
136
|
+
},
|
|
137
|
+
md: {
|
|
138
|
+
root: "size-10",
|
|
139
|
+
rootWithBorder: "border-[0.75px] p-px",
|
|
140
|
+
placeholderBorder: "border-[0.75px] border-solid border-secondary",
|
|
141
|
+
initials: "text-md font-medium",
|
|
142
|
+
icon: "size-5"
|
|
143
|
+
},
|
|
144
|
+
lg: {
|
|
145
|
+
root: "size-12",
|
|
146
|
+
rootWithBorder: "border-[0.75px] p-[1.5px]",
|
|
147
|
+
placeholderBorder: "border-[0.75px] border-solid border-secondary",
|
|
148
|
+
initials: "text-lg font-medium",
|
|
149
|
+
icon: "size-6"
|
|
150
|
+
},
|
|
151
|
+
xl: {
|
|
152
|
+
root: "size-14",
|
|
153
|
+
rootWithBorder: "border p-0.5",
|
|
154
|
+
placeholderBorder: "border border-solid border-secondary",
|
|
155
|
+
initials: "text-xl font-medium",
|
|
156
|
+
icon: "size-7"
|
|
157
|
+
},
|
|
158
|
+
"2xl": {
|
|
159
|
+
root: "size-16",
|
|
160
|
+
rootWithBorder: "border p-0.5",
|
|
161
|
+
placeholderBorder: "border border-solid border-secondary",
|
|
162
|
+
initials: "text-display-xs font-medium",
|
|
163
|
+
icon: "size-8"
|
|
164
|
+
}
|
|
128
165
|
}
|
|
129
166
|
});
|
|
130
167
|
var AVATAR_SIZE_PX = {
|
|
@@ -136,11 +173,11 @@ var AVATAR_SIZE_PX = {
|
|
|
136
173
|
"2xl": 64
|
|
137
174
|
};
|
|
138
175
|
var AVATAR_ICON_SIZE_PX = {
|
|
139
|
-
xs:
|
|
140
|
-
sm:
|
|
141
|
-
md:
|
|
142
|
-
lg:
|
|
143
|
-
xl:
|
|
176
|
+
xs: 12,
|
|
177
|
+
sm: 16,
|
|
178
|
+
md: 20,
|
|
179
|
+
lg: 24,
|
|
180
|
+
xl: 28,
|
|
144
181
|
"2xl": 32
|
|
145
182
|
};
|
|
146
183
|
var AVATAR_INITIALS_LINE_HEIGHT_PX = {
|
|
@@ -235,14 +272,7 @@ var VerifiedTick = ({ size, className }) => {
|
|
|
235
272
|
);
|
|
236
273
|
};
|
|
237
274
|
var AvatarCount = ({ count, className }) => {
|
|
238
|
-
return /* @__PURE__ */ jsx(View, { className: cx(avatarCountStyles.root, className), children: /* @__PURE__ */ jsx(View, { className: cx("flex-row", avatarCountStyles.badge), children: /* @__PURE__ */ jsx(
|
|
239
|
-
Text,
|
|
240
|
-
{
|
|
241
|
-
style: { includeFontPadding: false, lineHeight: AVATAR_COUNT_LABEL_LINE_HEIGHT_PX },
|
|
242
|
-
className: avatarCountStyles.label,
|
|
243
|
-
children: count
|
|
244
|
-
}
|
|
245
|
-
) }) });
|
|
275
|
+
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 }) }) });
|
|
246
276
|
};
|
|
247
277
|
var Avatar = ({
|
|
248
278
|
size = "md",
|
|
@@ -265,7 +295,7 @@ var Avatar = ({
|
|
|
265
295
|
const sizeStyles = avatarStyles.sizes[size];
|
|
266
296
|
const px = AVATAR_SIZE_PX[size];
|
|
267
297
|
const iconPx = AVATAR_ICON_SIZE_PX[size];
|
|
268
|
-
const
|
|
298
|
+
const placeholderColor = useNativeVariable("--color-utility-brand-600") ?? "#7c3aed";
|
|
269
299
|
const renderMainContent = () => {
|
|
270
300
|
if (canShowImage && src) {
|
|
271
301
|
return /* @__PURE__ */ jsx(
|
|
@@ -290,10 +320,10 @@ var Avatar = ({
|
|
|
290
320
|
);
|
|
291
321
|
}
|
|
292
322
|
if (PlaceholderIcon) {
|
|
293
|
-
return /* @__PURE__ */ jsx(PlaceholderIcon, { size: iconPx, color:
|
|
323
|
+
return /* @__PURE__ */ jsx(PlaceholderIcon, { size: iconPx, color: placeholderColor });
|
|
294
324
|
}
|
|
295
325
|
if (placeholder) return /* @__PURE__ */ jsx(Fragment, { children: placeholder });
|
|
296
|
-
return /* @__PURE__ */ jsx(UserIcon, { size: iconPx, color:
|
|
326
|
+
return /* @__PURE__ */ jsx(UserIcon, { size: iconPx, color: placeholderColor });
|
|
297
327
|
};
|
|
298
328
|
const renderBadgeContent = () => {
|
|
299
329
|
if (status) return /* @__PURE__ */ jsx(AvatarOnlineIndicator, { status, size });
|
|
@@ -321,6 +351,8 @@ var Avatar = ({
|
|
|
321
351
|
"flex-row",
|
|
322
352
|
avatarStyles.content,
|
|
323
353
|
rounded && avatarStyles.contentRounded,
|
|
354
|
+
canShowImage ? "bg-tertiary" : "bg-utility-brand-50",
|
|
355
|
+
!canShowImage && border && sizeStyles.placeholderBorder,
|
|
324
356
|
contentClassName
|
|
325
357
|
),
|
|
326
358
|
children: renderMainContent()
|