@avenue-ticketing/ui 0.11.0 → 0.12.0-beta.2
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/README.md +47 -0
- package/dist/badge-types-B67wcd4m.d.ts +22 -0
- package/dist/react/app-store-buttons-outline.d.ts +17 -0
- package/dist/react/app-store-buttons-outline.js +582 -0
- package/dist/react/app-store-buttons-outline.js.map +1 -0
- package/dist/react/app-store-buttons.d.ts +20 -0
- package/dist/react/app-store-buttons.js +817 -0
- package/dist/react/app-store-buttons.js.map +1 -0
- package/dist/react/avatar-label-group.d.ts +14 -0
- package/dist/react/avatar-label-group.js +183 -0
- package/dist/react/avatar-label-group.js.map +1 -0
- package/dist/react/avatar-profile-photo.d.ts +9 -0
- package/dist/react/avatar-profile-photo.js +202 -0
- package/dist/react/avatar-profile-photo.js.map +1 -0
- package/dist/react/avatar.d.ts +66 -40
- package/dist/react/avatar.js +159 -149
- package/dist/react/avatar.js.map +1 -1
- package/dist/react/badge-groups.d.ts +25 -0
- package/dist/react/badge-groups.js +162 -0
- package/dist/react/badge-groups.js.map +1 -0
- package/dist/react/badge.d.ts +123 -59
- package/dist/react/badge.js +314 -86
- package/dist/react/badge.js.map +1 -1
- package/dist/react/button-group.d.ts +43 -0
- package/dist/react/button-group.js +108 -0
- package/dist/react/button-group.js.map +1 -0
- package/dist/react/button-utility.d.ts +47 -0
- package/dist/react/button-utility.js +158 -0
- package/dist/react/button-utility.js.map +1 -0
- package/dist/react/button.d.ts +112 -37
- package/dist/react/button.js +270 -55
- package/dist/react/button.js.map +1 -1
- package/dist/react/checkbox.d.ts +25 -8
- package/dist/react/checkbox.js +115 -110
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/close-button.d.ts +25 -0
- package/dist/react/close-button.js +54 -0
- package/dist/react/close-button.js.map +1 -0
- package/dist/react/combobox.d.ts +18 -0
- package/dist/react/combobox.js +574 -0
- package/dist/react/combobox.js.map +1 -0
- package/dist/react/dialog.d.ts +15 -15
- package/dist/react/dialog.js +43 -108
- package/dist/react/dialog.js.map +1 -1
- package/dist/react/dropdown-account-breadcrumb.d.ts +5 -0
- package/dist/react/dropdown-account-breadcrumb.js +481 -0
- package/dist/react/dropdown-account-breadcrumb.js.map +1 -0
- package/dist/react/dropdown-account-button.d.ts +5 -0
- package/dist/react/dropdown-account-button.js +938 -0
- package/dist/react/dropdown-account-button.js.map +1 -0
- package/dist/react/dropdown-account-card-md.d.ts +5 -0
- package/dist/react/dropdown-account-card-md.js +714 -0
- package/dist/react/dropdown-account-card-md.js.map +1 -0
- package/dist/react/dropdown-account-card-sm.d.ts +5 -0
- package/dist/react/dropdown-account-card-sm.js +692 -0
- package/dist/react/dropdown-account-card-sm.js.map +1 -0
- package/dist/react/dropdown-account-card-xs.d.ts +5 -0
- package/dist/react/dropdown-account-card-xs.js +672 -0
- package/dist/react/dropdown-account-card-xs.js.map +1 -0
- package/dist/react/dropdown-avatar.d.ts +5 -0
- package/dist/react/dropdown-avatar.js +955 -0
- package/dist/react/dropdown-avatar.js.map +1 -0
- package/dist/react/dropdown-button-advanced.d.ts +5 -0
- package/dist/react/dropdown-button-advanced.js +964 -0
- package/dist/react/dropdown-button-advanced.js.map +1 -0
- package/dist/react/dropdown-button-link.d.ts +5 -0
- package/dist/react/dropdown-button-link.js +666 -0
- package/dist/react/dropdown-button-link.js.map +1 -0
- package/dist/react/dropdown-button-simple.d.ts +5 -0
- package/dist/react/dropdown-button-simple.js +919 -0
- package/dist/react/dropdown-button-simple.js.map +1 -0
- package/dist/react/dropdown-icon-advanced.d.ts +5 -0
- package/dist/react/dropdown-icon-advanced.js +708 -0
- package/dist/react/dropdown-icon-advanced.js.map +1 -0
- package/dist/react/dropdown-icon-simple.d.ts +5 -0
- package/dist/react/dropdown-icon-simple.js +670 -0
- package/dist/react/dropdown-icon-simple.js.map +1 -0
- package/dist/react/dropdown-integration.d.ts +5 -0
- package/dist/react/dropdown-integration.js +1490 -0
- package/dist/react/dropdown-integration.js.map +1 -0
- package/dist/react/dropdown-search-advanced.d.ts +5 -0
- package/dist/react/dropdown-search-advanced.js +1163 -0
- package/dist/react/dropdown-search-advanced.js.map +1 -0
- package/dist/react/dropdown-search-simple.d.ts +5 -0
- package/dist/react/dropdown-search-simple.js +1125 -0
- package/dist/react/dropdown-search-simple.js.map +1 -0
- package/dist/react/dropdown.d.ts +35 -133
- package/dist/react/dropdown.js +536 -1318
- package/dist/react/dropdown.js.map +1 -1
- package/dist/react/file-upload-trigger.d.ts +34 -0
- package/dist/react/file-upload-trigger.js +39 -0
- package/dist/react/file-upload-trigger.js.map +1 -0
- package/dist/react/form.d.ts +10 -0
- package/dist/react/form.js +11 -0
- package/dist/react/form.js.map +1 -0
- package/dist/react/hint-text.d.ts +17 -0
- package/dist/react/hint-text.js +36 -0
- package/dist/react/hint-text.js.map +1 -0
- package/dist/react/hook-form.d.ts +35 -0
- package/dist/react/hook-form.js +50 -0
- package/dist/react/hook-form.js.map +1 -0
- package/dist/react/input-date.d.ts +43 -0
- package/dist/react/input-date.js +306 -0
- package/dist/react/input-date.js.map +1 -0
- package/dist/react/input-file.d.ts +45 -0
- package/dist/react/input-file.js +748 -0
- package/dist/react/input-file.js.map +1 -0
- package/dist/react/input-group.d.ts +37 -0
- package/dist/react/input-group.js +251 -0
- package/dist/react/input-group.js.map +1 -0
- package/dist/react/input-number.d.ts +32 -0
- package/dist/react/input-number.js +553 -0
- package/dist/react/input-number.js.map +1 -0
- package/dist/react/input-payment.d.ts +16 -0
- package/dist/react/input-payment.js +593 -0
- package/dist/react/input-payment.js.map +1 -0
- package/dist/react/input-tags-outer.d.ts +53 -0
- package/dist/react/input-tags-outer.js +607 -0
- package/dist/react/input-tags-outer.js.map +1 -0
- package/dist/react/input-tags.d.ts +53 -0
- package/dist/react/input-tags.js +565 -0
- package/dist/react/input-tags.js.map +1 -0
- package/dist/react/input.d.ts +71 -22
- package/dist/react/input.js +332 -45
- package/dist/react/input.js.map +1 -1
- package/dist/react/label.d.ts +18 -0
- package/dist/react/label.js +112 -0
- package/dist/react/label.js.map +1 -0
- package/dist/react/multi-select.d.ts +90 -0
- package/dist/react/multi-select.js +1237 -0
- package/dist/react/multi-select.js.map +1 -0
- package/dist/react/pin-input.d.ts +59 -0
- package/dist/react/pin-input.js +229 -0
- package/dist/react/pin-input.js.map +1 -0
- package/dist/react/popover.d.ts +14 -71
- package/dist/react/popover.js +171 -540
- package/dist/react/popover.js.map +1 -1
- package/dist/react/progress-circle.d.ts +9 -0
- package/dist/react/progress-circle.js +36 -0
- package/dist/react/progress-circle.js.map +1 -0
- package/dist/react/progress-circles.d.ts +14 -0
- package/dist/react/progress-circles.js +160 -0
- package/dist/react/progress-circles.js.map +1 -0
- package/dist/react/progress-indicators.d.ts +52 -0
- package/dist/react/progress-indicators.js +78 -0
- package/dist/react/progress-indicators.js.map +1 -0
- package/dist/react/radio-buttons.d.ts +35 -0
- package/dist/react/radio-buttons.js +117 -0
- package/dist/react/radio-buttons.js.map +1 -0
- package/dist/react/scroll-header.d.ts +6 -0
- package/dist/react/scroll-header.js +42 -61
- package/dist/react/scroll-header.js.map +1 -1
- package/dist/react/scroll-wheel.d.ts +4 -5
- package/dist/react/scroll-wheel.js +19 -15
- package/dist/react/scroll-wheel.js.map +1 -1
- package/dist/react/select-item.d.ts +14 -0
- package/dist/react/select-item.js +340 -0
- package/dist/react/select-item.js.map +1 -0
- package/dist/react/select-native.d.ts +17 -0
- package/dist/react/select-native.js +203 -0
- package/dist/react/select-native.js.map +1 -0
- package/dist/react/select.d.ts +19 -61
- package/dist/react/select.js +866 -908
- package/dist/react/select.js.map +1 -1
- package/dist/react/sheet.d.ts +19 -19
- package/dist/react/sheet.js +97 -219
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/slider.d.ts +15 -0
- package/dist/react/slider.js +66 -0
- package/dist/react/slider.js.map +1 -0
- package/dist/react/social-button.d.ts +55 -0
- package/dist/react/social-button.js +263 -0
- package/dist/react/social-button.js.map +1 -0
- package/dist/react/social-logos.d.ts +20 -0
- package/dist/react/social-logos.js +131 -0
- package/dist/react/social-logos.js.map +1 -0
- package/dist/react/switch.d.ts +21 -36
- package/dist/react/switch.js +121 -109
- package/dist/react/switch.js.map +1 -1
- package/dist/react/tag-select.d.ts +47 -0
- package/dist/react/tag-select.js +1252 -0
- package/dist/react/tag-select.js.map +1 -0
- package/dist/react/tags.d.ts +30 -0
- package/dist/react/tags.js +228 -0
- package/dist/react/tags.js.map +1 -0
- package/dist/react/textarea.d.ts +40 -4
- package/dist/react/textarea.js +193 -27
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/tooltip.d.ts +30 -43
- package/dist/react/tooltip.js +65 -521
- package/dist/react/tooltip.js.map +1 -1
- package/dist/select-mobile-sheet-CB2ptDTJ.d.ts +12 -0
- package/dist/select-shared-oJEeJxeB.d.ts +68 -0
- package/package.json +28 -21
- package/source.css +2 -13
- package/theme.css +883 -79
- package/dist/react/calendar.d.ts +0 -13
- package/dist/react/calendar.js +0 -4639
- package/dist/react/calendar.js.map +0 -1
- package/dist/react/card.d.ts +0 -11
- package/dist/react/card.js +0 -113
- package/dist/react/card.js.map +0 -1
- package/dist/react/datetime-picker.d.ts +0 -21
- package/dist/react/datetime-picker.js +0 -6142
- package/dist/react/datetime-picker.js.map +0 -1
- package/dist/react/pagination.d.ts +0 -28
- package/dist/react/pagination.js +0 -262
- package/dist/react/pagination.js.map +0 -1
- package/dist/react/table-pagination.d.ts +0 -15
- package/dist/react/table-pagination.js +0 -1247
- package/dist/react/table-pagination.js.map +0 -1
- package/dist/react/table-view/column-menu.d.ts +0 -15
- package/dist/react/table-view/column-menu.js +0 -1049
- package/dist/react/table-view/column-menu.js.map +0 -1
- package/dist/react/table-view/index.d.ts +0 -70
- package/dist/react/table-view/index.js +0 -2284
- package/dist/react/table-view/index.js.map +0 -1
- package/dist/react/table.d.ts +0 -86
- package/dist/react/table.js +0 -414
- package/dist/react/table.js.map +0 -1
- package/dist/react/tabs.d.ts +0 -34
- package/dist/react/tabs.js +0 -423
- package/dist/react/tabs.js.map +0 -1
- package/dist/react/time-picker.d.ts +0 -22
- package/dist/react/time-picker.js +0 -856
- package/dist/react/time-picker.js.map +0 -1
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
import { createContext, useContext, isValidElement } from 'react';
|
|
2
|
+
import { CaretDownIcon } from '@phosphor-icons/react/dist/csr/CaretDown';
|
|
3
|
+
import { CaretUpIcon } from '@phosphor-icons/react/dist/csr/CaretUp';
|
|
4
|
+
import { MinusIcon } from '@phosphor-icons/react/dist/csr/Minus';
|
|
5
|
+
import { PlusIcon } from '@phosphor-icons/react/dist/csr/Plus';
|
|
6
|
+
import { Group, Input, Button as Button$1, NumberField, Link, Label as Label$1, Text, TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, OverlayArrow } from 'react-aria-components';
|
|
7
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
8
|
+
import '@phosphor-icons/react/dist/csr/Eye';
|
|
9
|
+
import '@phosphor-icons/react/dist/csr/EyeSlash';
|
|
10
|
+
import { QuestionIcon } from '@phosphor-icons/react/dist/csr/Question';
|
|
11
|
+
import '@phosphor-icons/react/dist/csr/Info';
|
|
12
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var twMerge = extendTailwindMerge({
|
|
15
|
+
extend: {
|
|
16
|
+
theme: {
|
|
17
|
+
text: ["display-xs", "display-sm", "display-md", "display-lg", "display-xl", "display-2xl"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var cx = twMerge;
|
|
22
|
+
function sortCx(classes) {
|
|
23
|
+
return classes;
|
|
24
|
+
}
|
|
25
|
+
var HintText = ({ isInvalid, className, size = "md", ...props }) => {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
Text,
|
|
28
|
+
{
|
|
29
|
+
...props,
|
|
30
|
+
slot: isInvalid ? "errorMessage" : "description",
|
|
31
|
+
className: cx(
|
|
32
|
+
"text-sm text-tertiary",
|
|
33
|
+
// Size
|
|
34
|
+
size === "sm" && "text-xs",
|
|
35
|
+
"in-data-[input-size=sm]:text-xs",
|
|
36
|
+
// Invalid state
|
|
37
|
+
isInvalid && "text-error-primary",
|
|
38
|
+
"group-invalid:text-error-primary",
|
|
39
|
+
className
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
HintText.displayName = "HintText";
|
|
45
|
+
var Tooltip = ({
|
|
46
|
+
title,
|
|
47
|
+
description,
|
|
48
|
+
children,
|
|
49
|
+
arrow = false,
|
|
50
|
+
delay = 100,
|
|
51
|
+
closeDelay = 0,
|
|
52
|
+
trigger,
|
|
53
|
+
isDisabled,
|
|
54
|
+
isOpen,
|
|
55
|
+
defaultOpen,
|
|
56
|
+
offset = 6,
|
|
57
|
+
crossOffset,
|
|
58
|
+
placement = "top",
|
|
59
|
+
onOpenChange,
|
|
60
|
+
...tooltipProps
|
|
61
|
+
}) => {
|
|
62
|
+
const isTopOrBottomLeft = ["top left", "top end", "bottom left", "bottom end"].includes(placement);
|
|
63
|
+
const isTopOrBottomRight = ["top right", "top start", "bottom right", "bottom start"].includes(placement);
|
|
64
|
+
const calculatedCrossOffset = isTopOrBottomLeft ? -12 : isTopOrBottomRight ? 12 : 0;
|
|
65
|
+
return /* @__PURE__ */ jsxs(TooltipTrigger$1, { ...{ trigger, delay, closeDelay, isDisabled, isOpen, defaultOpen, onOpenChange }, children: [
|
|
66
|
+
children,
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
Tooltip$1,
|
|
69
|
+
{
|
|
70
|
+
...tooltipProps,
|
|
71
|
+
offset,
|
|
72
|
+
placement,
|
|
73
|
+
crossOffset: crossOffset ?? calculatedCrossOffset,
|
|
74
|
+
className: ({ isEntering, isExiting }) => cx(isEntering && "ease-out animate-in", isExiting && "ease-in animate-out"),
|
|
75
|
+
children: ({ isEntering, isExiting }) => /* @__PURE__ */ jsxs(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: cx(
|
|
79
|
+
"z-50 flex max-w-xs origin-(--trigger-anchor-point) flex-col items-start gap-1 rounded-lg bg-primary-solid px-3 shadow-lg will-change-transform",
|
|
80
|
+
description ? "py-3" : "py-2",
|
|
81
|
+
isEntering && "ease-out animate-in fade-in zoom-in-95 in-placement-left:slide-in-from-right-0.5 in-placement-right:slide-in-from-left-0.5 in-placement-top:slide-in-from-bottom-0.5 in-placement-bottom:slide-in-from-top-0.5",
|
|
82
|
+
isExiting && "ease-in animate-out fade-out zoom-out-95 in-placement-left:slide-out-to-right-0.5 in-placement-right:slide-out-to-left-0.5 in-placement-top:slide-out-to-bottom-0.5 in-placement-bottom:slide-out-to-top-0.5"
|
|
83
|
+
),
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-white", children: title }),
|
|
86
|
+
description && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-tooltip-supporting-text", children: description }),
|
|
87
|
+
arrow && /* @__PURE__ */ jsx(OverlayArrow, { children: /* @__PURE__ */ jsx(
|
|
88
|
+
"svg",
|
|
89
|
+
{
|
|
90
|
+
viewBox: "0 0 100 100",
|
|
91
|
+
className: "size-2.5 fill-bg-primary-solid in-placement-left:-rotate-90 in-placement-right:rotate-90 in-placement-top:rotate-0 in-placement-bottom:rotate-180",
|
|
92
|
+
children: /* @__PURE__ */ jsx("path", { d: "M0,0 L35.858,35.858 Q50,50 64.142,35.858 L100,0 Z" })
|
|
93
|
+
}
|
|
94
|
+
) })
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] });
|
|
101
|
+
};
|
|
102
|
+
var TooltipTrigger = ({ children, className, ...buttonProps }) => {
|
|
103
|
+
return /* @__PURE__ */ jsx(Button$1, { ...buttonProps, className: (values) => cx("h-max w-max outline-hidden", typeof className === "function" ? className(values) : className), children });
|
|
104
|
+
};
|
|
105
|
+
var Label = ({ isInvalid, isRequired, tooltip, tooltipDescription, className, ...props }) => {
|
|
106
|
+
return /* @__PURE__ */ jsxs(
|
|
107
|
+
Label$1,
|
|
108
|
+
{
|
|
109
|
+
"data-label": "true",
|
|
110
|
+
...props,
|
|
111
|
+
className: cx("flex cursor-default items-center gap-0.5 text-sm font-medium text-secondary", className),
|
|
112
|
+
children: [
|
|
113
|
+
props.children,
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
"span",
|
|
116
|
+
{
|
|
117
|
+
className: cx(
|
|
118
|
+
"hidden text-brand-tertiary",
|
|
119
|
+
isRequired && "block",
|
|
120
|
+
typeof isRequired === "undefined" && "group-required:block",
|
|
121
|
+
isInvalid && "text-error-primary",
|
|
122
|
+
typeof isInvalid === "undefined" && "group-invalid:text-error-primary"
|
|
123
|
+
),
|
|
124
|
+
children: "*"
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
tooltip && /* @__PURE__ */ jsx(Tooltip, { title: tooltip, description: tooltipDescription, placement: "top", children: /* @__PURE__ */ jsx(
|
|
128
|
+
TooltipTrigger,
|
|
129
|
+
{
|
|
130
|
+
isDisabled: false,
|
|
131
|
+
className: "cursor-pointer text-fg-quaternary transition duration-200 hover:text-fg-quaternary_hover focus:text-fg-quaternary_hover",
|
|
132
|
+
children: /* @__PURE__ */ jsx(QuestionIcon, { className: "size-4" })
|
|
133
|
+
}
|
|
134
|
+
) })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
Label.displayName = "Label";
|
|
140
|
+
var inputFocusRingShellOverlay = "after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-brand after:ring-1 after:ring-inset after:ring-brand after:content-['']";
|
|
141
|
+
var inputErrorFocusRingShellOverlay = "after:pointer-events-none after:absolute after:-inset-px after:z-10 after:rounded-lg after:border after:border-solid after:border-error after:ring-1 after:ring-inset after:ring-error after:content-['']";
|
|
142
|
+
var inputErrorFocusRingGroupInvalidShellOverlay = "group-invalid:focus-within:after:pointer-events-none group-invalid:focus-within:after:absolute group-invalid:focus-within:after:-inset-px group-invalid:focus-within:after:z-10 group-invalid:focus-within:after:rounded-lg group-invalid:focus-within:after:border group-invalid:focus-within:after:border-solid group-invalid:focus-within:after:border-error group-invalid:focus-within:after:ring-1 group-invalid:focus-within:after:ring-inset group-invalid:focus-within:after:ring-error group-invalid:focus-within:after:content-['']";
|
|
143
|
+
createContext({});
|
|
144
|
+
|
|
145
|
+
// ../../utils/is-react-component.ts
|
|
146
|
+
var isFunctionComponent = (component) => {
|
|
147
|
+
return typeof component === "function";
|
|
148
|
+
};
|
|
149
|
+
var isClassComponent = (component) => {
|
|
150
|
+
return typeof component === "function" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);
|
|
151
|
+
};
|
|
152
|
+
var isForwardRefComponent = (component) => {
|
|
153
|
+
return typeof component === "object" && component !== null && component.$$typeof.toString() === "Symbol(react.forward_ref)";
|
|
154
|
+
};
|
|
155
|
+
var isReactComponent = (component) => {
|
|
156
|
+
return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);
|
|
157
|
+
};
|
|
158
|
+
var focusShadowPlain = "focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
159
|
+
var focusShadowSkeuomorphic = "focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-xs-skeuomorphic),0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
160
|
+
var skeuomorphicGradientBorderClass = [
|
|
161
|
+
"ring-1 ring-inset ring-transparent",
|
|
162
|
+
"before:pointer-events-none before:absolute before:inset-px before:rounded-[inherit] before:border before:border-[#ffffff1f] before:content-['']",
|
|
163
|
+
"before:[mask-image:linear-gradient(to_bottom,#000,transparent)]"
|
|
164
|
+
].join(" ");
|
|
165
|
+
var skeuomorphicShadowClass = ["shadow-xs-skeuomorphic", focusShadowSkeuomorphic, "overflow-hidden"].join(" ");
|
|
166
|
+
var focusShadowSecondary = "focus-visible:outline-none focus-visible:[box-shadow:0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
167
|
+
var secondaryInnerShadow = "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] after:[box-shadow:inset_0px_-1px_0px_0px_rgba(0,0,0,0.05)]";
|
|
168
|
+
var secondaryShadowClass = ["relative overflow-hidden shadow-xs", secondaryInnerShadow, focusShadowSecondary].join(" ");
|
|
169
|
+
var inputNumberButtonClass = [
|
|
170
|
+
"in-data-number-input:border-0 in-data-number-input:shadow-none in-data-number-input:!rounded-none in-data-number-input:!h-full in-data-number-input:!min-h-0 in-data-number-input:self-stretch in-data-number-input:overflow-hidden",
|
|
171
|
+
"in-data-number-input:before:hidden in-data-number-input:after:hidden",
|
|
172
|
+
"in-data-number-input:focus-visible:outline-none in-data-number-input:focus-visible:shadow-none in-data-number-input:focus-visible:ring-0 in-data-number-input:focus-visible:![box-shadow:none]"
|
|
173
|
+
].join(" ");
|
|
174
|
+
var inputAddonButtonClass = [
|
|
175
|
+
"in-data-input-wrapper:border-0 in-data-input-wrapper:shadow-none in-data-input-wrapper:!rounded-none in-data-input-wrapper:overflow-hidden",
|
|
176
|
+
"in-data-input-wrapper:in-data-trailing:border-l in-data-input-wrapper:in-data-trailing:border-solid in-data-input-wrapper:in-data-trailing:border-primary",
|
|
177
|
+
"in-data-input-wrapper:in-data-leading:border-r in-data-input-wrapper:in-data-leading:border-solid in-data-input-wrapper:in-data-leading:border-primary",
|
|
178
|
+
"in-data-input-wrapper:group-invalid:in-data-trailing:border-error_subtle in-data-input-wrapper:group-invalid:in-data-leading:border-error_subtle",
|
|
179
|
+
"in-data-input-wrapper:before:hidden in-data-input-wrapper:after:hidden",
|
|
180
|
+
"in-data-input-wrapper:focus-visible:outline-none in-data-input-wrapper:focus-visible:shadow-none in-data-input-wrapper:focus-visible:ring-0 in-data-input-wrapper:focus-visible:![box-shadow:none]"
|
|
181
|
+
].join(" ");
|
|
182
|
+
var styles = sortCx({
|
|
183
|
+
common: {
|
|
184
|
+
root: [
|
|
185
|
+
"group relative inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-full font-body outline-none before:absolute",
|
|
186
|
+
"font-semibold transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-out",
|
|
187
|
+
"pressed:scale-[0.985] pressed:duration-100 pressed:ease-linear motion-reduce:pressed:scale-100",
|
|
188
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed in-data-input-wrapper:disabled:opacity-100",
|
|
189
|
+
inputAddonButtonClass,
|
|
190
|
+
inputNumberButtonClass,
|
|
191
|
+
// Stretch to InputGroup row height; padding/typography follow `data-input-size` on the field (Figma 85:1269).
|
|
192
|
+
"in-data-input-wrapper:!h-full in-data-input-wrapper:!min-h-0 in-data-input-wrapper:self-stretch",
|
|
193
|
+
"in-data-input-wrapper:in-data-[input-size=sm]:gap-1 in-data-input-wrapper:in-data-[input-size=sm]:px-3 in-data-input-wrapper:in-data-[input-size=sm]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm",
|
|
194
|
+
"in-data-input-wrapper:in-data-[input-size=md]:gap-1 in-data-input-wrapper:in-data-[input-size=md]:px-3.5 in-data-input-wrapper:in-data-[input-size=md]:py-2.5 in-data-input-wrapper:in-data-[input-size=md]:text-sm",
|
|
195
|
+
"in-data-input-wrapper:in-data-[input-size=lg]:gap-1.5 in-data-input-wrapper:in-data-[input-size=lg]:px-4 in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=lg]:text-md",
|
|
196
|
+
"*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:transition-inherit-all"
|
|
197
|
+
].join(" "),
|
|
198
|
+
icon: "pointer-events-none shrink-0 transition-inherit-all"
|
|
199
|
+
},
|
|
200
|
+
sizes: {
|
|
201
|
+
xs: {
|
|
202
|
+
root: [
|
|
203
|
+
"h-8 min-h-8 gap-1 px-[0.625rem] py-1.5 text-sm data-icon-only:size-8 data-icon-only:min-h-8 data-icon-only:min-w-8 data-icon-only:p-2",
|
|
204
|
+
"in-data-input-wrapper:data-icon-only:p-2.5",
|
|
205
|
+
"*:data-icon:size-4"
|
|
206
|
+
].join(" "),
|
|
207
|
+
linkRoot: "h-auto min-h-0 gap-1 px-0! py-0! text-sm *:data-text:underline-offset-3"
|
|
208
|
+
},
|
|
209
|
+
sm: {
|
|
210
|
+
root: [
|
|
211
|
+
"h-9 min-h-9 gap-1 px-3 py-2 text-sm data-icon-only:size-9 data-icon-only:min-h-9 data-icon-only:min-w-9 data-icon-only:p-2",
|
|
212
|
+
"in-data-input-wrapper:data-icon-only:p-2.5",
|
|
213
|
+
"*:data-icon:size-5"
|
|
214
|
+
].join(" "),
|
|
215
|
+
linkRoot: "h-auto min-h-0 gap-1 px-0! py-0! text-sm *:data-text:underline-offset-3"
|
|
216
|
+
},
|
|
217
|
+
md: {
|
|
218
|
+
root: [
|
|
219
|
+
"h-10 min-h-10 gap-1 px-3.5 py-2.5 text-sm data-icon-only:size-10 data-icon-only:min-h-10 data-icon-only:min-w-10 data-icon-only:p-2.5",
|
|
220
|
+
"in-data-input-wrapper:data-icon-only:p-3",
|
|
221
|
+
"*:data-icon:size-5"
|
|
222
|
+
].join(" "),
|
|
223
|
+
linkRoot: "h-auto min-h-0 gap-1 px-0! py-0! text-sm *:data-text:underline-offset-4"
|
|
224
|
+
},
|
|
225
|
+
lg: {
|
|
226
|
+
root: "h-11 min-h-11 gap-1.5 px-4 py-2.5 text-md data-icon-only:size-11 data-icon-only:min-h-11 data-icon-only:min-w-11 data-icon-only:p-3 *:data-icon:size-5",
|
|
227
|
+
linkRoot: "h-auto min-h-0 gap-1.5 px-0! py-0! text-md *:data-text:underline-offset-4"
|
|
228
|
+
},
|
|
229
|
+
xl: {
|
|
230
|
+
root: "h-12 min-h-12 gap-1.5 px-[1.125rem] py-3 text-md data-icon-only:size-12 data-icon-only:min-h-12 data-icon-only:min-w-12 data-icon-only:p-3 data-icon-only:*:data-icon:size-6 *:data-icon:size-5",
|
|
231
|
+
linkRoot: "h-auto min-h-0 gap-1.5 px-0! py-0! text-md *:data-text:underline-offset-4"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
colors: {
|
|
235
|
+
/** Figma Hierarchy=Primary — dark neutral solid; hover lightens to fg-tertiary_hover (#404040). */
|
|
236
|
+
primary: {
|
|
237
|
+
root: [
|
|
238
|
+
"bg-primary-solid text-white",
|
|
239
|
+
skeuomorphicShadowClass,
|
|
240
|
+
skeuomorphicGradientBorderClass,
|
|
241
|
+
"hover:bg-fg-tertiary_hover dark:hover:bg-quaternary",
|
|
242
|
+
"disabled:opacity-30",
|
|
243
|
+
"data-loading:bg-fg-tertiary_hover dark:data-loading:bg-quaternary",
|
|
244
|
+
"*:data-icon:not([data-icon=loading]):text-white/70"
|
|
245
|
+
].join(" ")
|
|
246
|
+
},
|
|
247
|
+
/** Figma Hierarchy=Brand — purple solid; hover darkens to bg-brand-solid_hover (#6d28d9). */
|
|
248
|
+
brand: {
|
|
249
|
+
root: [
|
|
250
|
+
"bg-brand-solid text-primary_on-brand",
|
|
251
|
+
skeuomorphicShadowClass,
|
|
252
|
+
skeuomorphicGradientBorderClass,
|
|
253
|
+
"hover:bg-brand-solid_hover",
|
|
254
|
+
"disabled:opacity-50",
|
|
255
|
+
"data-loading:bg-brand-solid_hover",
|
|
256
|
+
"*:data-icon:not([data-icon=loading]):text-primary_on-brand"
|
|
257
|
+
].join(" ")
|
|
258
|
+
},
|
|
259
|
+
/** Figma Hierarchy=Secondary — border-primary + shadow-xs + skeuomorphic inner rim overlay. */
|
|
260
|
+
secondary: {
|
|
261
|
+
root: [
|
|
262
|
+
"border border-solid border-primary bg-primary text-secondary",
|
|
263
|
+
secondaryShadowClass,
|
|
264
|
+
"hover:bg-primary_hover hover:text-secondary_hover",
|
|
265
|
+
"disabled:opacity-50",
|
|
266
|
+
"data-loading:bg-primary_hover",
|
|
267
|
+
"*:data-icon:text-fg-secondary hover:*:data-icon:text-fg-quaternary_hover"
|
|
268
|
+
].join(" ")
|
|
269
|
+
},
|
|
270
|
+
/** Figma Hierarchy=Tertiary */
|
|
271
|
+
tertiary: {
|
|
272
|
+
root: [
|
|
273
|
+
"border border-transparent bg-transparent text-tertiary",
|
|
274
|
+
focusShadowPlain,
|
|
275
|
+
"hover:bg-primary_hover hover:text-tertiary_hover",
|
|
276
|
+
"disabled:opacity-50",
|
|
277
|
+
"*:data-icon:text-fg-tertiary hover:*:data-icon:text-fg-quaternary_hover"
|
|
278
|
+
].join(" ")
|
|
279
|
+
},
|
|
280
|
+
/** Figma Hierarchy=Link color — text + icons share brand-secondary; hover underlines with fg-brand-secondary. */
|
|
281
|
+
"link-color": {
|
|
282
|
+
root: [
|
|
283
|
+
"h-auto min-h-0 border-0 bg-transparent px-0! py-0! text-brand-secondary shadow-none",
|
|
284
|
+
focusShadowPlain,
|
|
285
|
+
"hover:text-brand-secondary_hover",
|
|
286
|
+
"disabled:opacity-50",
|
|
287
|
+
"*:data-text:underline *:data-text:decoration-transparent *:data-text:decoration-solid hover:*:data-text:decoration-fg-brand-secondary"
|
|
288
|
+
].join(" ")
|
|
289
|
+
},
|
|
290
|
+
/** Figma Hierarchy=Link gray — text + icons share tertiary; hover underlines with fg-quaternary. */
|
|
291
|
+
"link-gray": {
|
|
292
|
+
root: [
|
|
293
|
+
"h-auto min-h-0 border-0 bg-transparent px-0! py-0! text-tertiary shadow-none",
|
|
294
|
+
focusShadowPlain,
|
|
295
|
+
"hover:text-tertiary_hover",
|
|
296
|
+
"disabled:opacity-50",
|
|
297
|
+
"*:data-text:underline *:data-text:decoration-transparent *:data-text:decoration-solid hover:*:data-text:decoration-fg-quaternary"
|
|
298
|
+
].join(" ")
|
|
299
|
+
},
|
|
300
|
+
"primary-destructive": {
|
|
301
|
+
root: [
|
|
302
|
+
"bg-error-solid text-white",
|
|
303
|
+
skeuomorphicShadowClass,
|
|
304
|
+
skeuomorphicGradientBorderClass,
|
|
305
|
+
"hover:bg-error-solid_hover",
|
|
306
|
+
"disabled:opacity-50",
|
|
307
|
+
"data-loading:bg-error-solid_hover",
|
|
308
|
+
"*:data-icon:not([data-icon=loading]):text-white/70"
|
|
309
|
+
].join(" ")
|
|
310
|
+
},
|
|
311
|
+
"secondary-destructive": {
|
|
312
|
+
root: [
|
|
313
|
+
"border border-solid border-primary bg-primary text-error-primary",
|
|
314
|
+
secondaryShadowClass,
|
|
315
|
+
"hover:bg-error-primary hover:text-error-primary_hover",
|
|
316
|
+
"disabled:opacity-50",
|
|
317
|
+
"data-loading:bg-error-primary",
|
|
318
|
+
"*:data-icon:text-fg-error-secondary hover:*:data-icon:text-fg-error-primary"
|
|
319
|
+
].join(" ")
|
|
320
|
+
},
|
|
321
|
+
"tertiary-destructive": {
|
|
322
|
+
root: [
|
|
323
|
+
"border border-transparent bg-transparent text-error-primary",
|
|
324
|
+
focusShadowPlain,
|
|
325
|
+
"hover:bg-error-primary hover:text-error-primary_hover",
|
|
326
|
+
"disabled:opacity-50",
|
|
327
|
+
"*:data-icon:text-fg-error-secondary hover:*:data-icon:text-fg-error-primary"
|
|
328
|
+
].join(" ")
|
|
329
|
+
},
|
|
330
|
+
/** Figma Hierarchy=Link (destructive) — text + icons share error-primary; hover underlines. */
|
|
331
|
+
"link-destructive": {
|
|
332
|
+
root: [
|
|
333
|
+
"h-auto min-h-0 border-0 bg-transparent px-0! py-0! text-error-primary shadow-none",
|
|
334
|
+
focusShadowPlain,
|
|
335
|
+
"hover:text-error-primary_hover",
|
|
336
|
+
"disabled:opacity-50",
|
|
337
|
+
"*:data-text:underline *:data-text:decoration-transparent *:data-text:decoration-solid hover:*:data-text:decoration-current"
|
|
338
|
+
].join(" ")
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
var Button = ({
|
|
343
|
+
size = "md",
|
|
344
|
+
color = "primary",
|
|
345
|
+
children,
|
|
346
|
+
className,
|
|
347
|
+
noTextPadding,
|
|
348
|
+
iconLeading: IconLeading,
|
|
349
|
+
iconTrailing: IconTrailing,
|
|
350
|
+
isDisabled: disabled,
|
|
351
|
+
isLoading: loading,
|
|
352
|
+
showTextWhileLoading,
|
|
353
|
+
...props
|
|
354
|
+
}) => {
|
|
355
|
+
const href = "href" in props ? props.href : void 0;
|
|
356
|
+
const isIcon = (IconLeading || IconTrailing) && !children;
|
|
357
|
+
const isLinkType = ["link-gray", "link-color", "link-destructive"].includes(color);
|
|
358
|
+
noTextPadding = isLinkType || noTextPadding;
|
|
359
|
+
const commonChildren = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
360
|
+
isValidElement(IconLeading) && IconLeading,
|
|
361
|
+
isReactComponent(IconLeading) && /* @__PURE__ */ jsx(IconLeading, { "data-icon": "leading", className: styles.common.icon }),
|
|
362
|
+
loading && /* @__PURE__ */ jsx(
|
|
363
|
+
"svg",
|
|
364
|
+
{
|
|
365
|
+
fill: "none",
|
|
366
|
+
"data-icon": "loading",
|
|
367
|
+
viewBox: "0 0 256 256",
|
|
368
|
+
"aria-hidden": true,
|
|
369
|
+
className: cx(
|
|
370
|
+
styles.common.icon,
|
|
371
|
+
"size-5 animate-spin",
|
|
372
|
+
!showTextWhileLoading && "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
373
|
+
),
|
|
374
|
+
children: /* @__PURE__ */ jsx(
|
|
375
|
+
"path",
|
|
376
|
+
{
|
|
377
|
+
fill: "currentColor",
|
|
378
|
+
d: "M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60,61.46,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20-66.54-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"
|
|
379
|
+
}
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
),
|
|
383
|
+
children && /* @__PURE__ */ jsx("span", { "data-text": true, className: cx("transition-inherit-all", !noTextPadding && !isLinkType && "px-0.5"), children }),
|
|
384
|
+
isValidElement(IconTrailing) && IconTrailing,
|
|
385
|
+
isReactComponent(IconTrailing) && /* @__PURE__ */ jsx(IconTrailing, { "data-icon": "trailing", className: styles.common.icon })
|
|
386
|
+
] });
|
|
387
|
+
const commonProps = {
|
|
388
|
+
"data-icon-only": isIcon ? true : void 0,
|
|
389
|
+
"data-loading": loading ? true : void 0,
|
|
390
|
+
...props,
|
|
391
|
+
isDisabled: disabled || loading,
|
|
392
|
+
className: cx(
|
|
393
|
+
styles.common.root,
|
|
394
|
+
styles.sizes[size].root,
|
|
395
|
+
styles.colors[color].root,
|
|
396
|
+
isLinkType && styles.sizes[size].linkRoot,
|
|
397
|
+
(loading || href && (disabled || loading)) && "pointer-events-none",
|
|
398
|
+
loading && (showTextWhileLoading ? "[&>*:not([data-icon=loading]):not([data-text])]:hidden" : "[&>*:not([data-icon=loading])]:invisible"),
|
|
399
|
+
className
|
|
400
|
+
),
|
|
401
|
+
children: commonChildren
|
|
402
|
+
};
|
|
403
|
+
if ("href" in commonProps) {
|
|
404
|
+
return /* @__PURE__ */ jsx(Link, { ...commonProps, href: disabled || loading ? void 0 : href });
|
|
405
|
+
}
|
|
406
|
+
return /* @__PURE__ */ jsx(Button$1, { ...commonProps, type: commonProps.type || "button", isPending: loading });
|
|
407
|
+
};
|
|
408
|
+
var NumberFieldContext = createContext({});
|
|
409
|
+
var styles2 = {
|
|
410
|
+
sm: "px-3 py-2 text-sm",
|
|
411
|
+
md: "px-3 py-2 text-md",
|
|
412
|
+
lg: "px-3.5 py-2.5 text-md"
|
|
413
|
+
};
|
|
414
|
+
var InputNumberBase = ({
|
|
415
|
+
ref,
|
|
416
|
+
groupRef,
|
|
417
|
+
size = "md",
|
|
418
|
+
isInvalid,
|
|
419
|
+
isDisabled,
|
|
420
|
+
placeholder,
|
|
421
|
+
wrapperClassName,
|
|
422
|
+
inputClassName,
|
|
423
|
+
orientation = "vertical",
|
|
424
|
+
// Omit this prop to avoid invalid HTML attribute warning
|
|
425
|
+
isRequired: _isRequired,
|
|
426
|
+
...inputProps
|
|
427
|
+
}) => {
|
|
428
|
+
const context = useContext(NumberFieldContext);
|
|
429
|
+
const inputSize = context?.size || size;
|
|
430
|
+
return /* @__PURE__ */ jsxs(
|
|
431
|
+
Group,
|
|
432
|
+
{
|
|
433
|
+
...{ isDisabled, isInvalid },
|
|
434
|
+
ref: groupRef,
|
|
435
|
+
"data-number-input": true,
|
|
436
|
+
"data-number-size": inputSize,
|
|
437
|
+
className: ({ isFocusWithin, isDisabled: isDisabled2, isInvalid: isInvalid2 }) => cx(
|
|
438
|
+
"relative flex w-full flex-row items-stretch overflow-clip rounded-lg border border-solid border-primary bg-primary shadow-xs transition-[border-color,box-shadow] duration-100 ease-linear",
|
|
439
|
+
isFocusWithin && !isDisabled2 && !isInvalid2 && inputFocusRingShellOverlay,
|
|
440
|
+
// Disabled state styles
|
|
441
|
+
isDisabled2 && "cursor-not-allowed opacity-50 in-data-input-wrapper:opacity-100",
|
|
442
|
+
"group-disabled:cursor-not-allowed group-disabled:opacity-50 in-data-input-wrapper:group-disabled:opacity-100",
|
|
443
|
+
// Invalid state styles
|
|
444
|
+
isInvalid2 && !isFocusWithin && "border-error_subtle",
|
|
445
|
+
"group-invalid:border-error_subtle",
|
|
446
|
+
inputErrorFocusRingGroupInvalidShellOverlay,
|
|
447
|
+
isInvalid2 && isFocusWithin && inputErrorFocusRingShellOverlay,
|
|
448
|
+
context?.wrapperClassName,
|
|
449
|
+
wrapperClassName
|
|
450
|
+
),
|
|
451
|
+
children: [
|
|
452
|
+
orientation === "horizontal" && /* @__PURE__ */ jsx(
|
|
453
|
+
Button,
|
|
454
|
+
{
|
|
455
|
+
size,
|
|
456
|
+
iconLeading: MinusIcon,
|
|
457
|
+
slot: "decrement",
|
|
458
|
+
color: "tertiary",
|
|
459
|
+
"data-number-control": "decrement",
|
|
460
|
+
className: "static z-0"
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ jsx(
|
|
464
|
+
Input,
|
|
465
|
+
{
|
|
466
|
+
...inputProps,
|
|
467
|
+
ref,
|
|
468
|
+
placeholder,
|
|
469
|
+
className: cx(
|
|
470
|
+
"m-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder autofill:rounded-lg autofill:text-primary disabled:cursor-not-allowed",
|
|
471
|
+
styles2[inputSize],
|
|
472
|
+
context?.inputClassName,
|
|
473
|
+
inputClassName
|
|
474
|
+
)
|
|
475
|
+
}
|
|
476
|
+
),
|
|
477
|
+
orientation === "horizontal" && /* @__PURE__ */ jsx(
|
|
478
|
+
Button,
|
|
479
|
+
{
|
|
480
|
+
size,
|
|
481
|
+
iconLeading: PlusIcon,
|
|
482
|
+
slot: "increment",
|
|
483
|
+
color: "tertiary",
|
|
484
|
+
"data-number-control": "increment",
|
|
485
|
+
className: "static z-0"
|
|
486
|
+
}
|
|
487
|
+
),
|
|
488
|
+
orientation === "vertical" && /* @__PURE__ */ jsxs("div", { className: cx("relative z-0 flex w-7 shrink-0 flex-col overflow-hidden border-l border-primary", size === "lg" && "w-7.5"), children: [
|
|
489
|
+
/* @__PURE__ */ jsx(
|
|
490
|
+
Button$1,
|
|
491
|
+
{
|
|
492
|
+
slot: "increment",
|
|
493
|
+
className: "relative z-0 flex flex-1 cursor-pointer items-center justify-center text-fg-quaternary outline-none transition duration-100 ease-linear hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:cursor-not-allowed disabled:opacity-50",
|
|
494
|
+
children: /* @__PURE__ */ jsx(CaretUpIcon, { className: cx("size-3 stroke-3", size === "lg" && "size-3.5 stroke-[2.57px]") })
|
|
495
|
+
}
|
|
496
|
+
),
|
|
497
|
+
/* @__PURE__ */ jsx(
|
|
498
|
+
Button$1,
|
|
499
|
+
{
|
|
500
|
+
slot: "decrement",
|
|
501
|
+
className: "relative z-0 flex flex-1 cursor-pointer items-center justify-center border-t border-primary text-fg-quaternary outline-none transition duration-100 ease-linear hover:bg-primary_hover hover:text-fg-quaternary_hover disabled:cursor-not-allowed disabled:opacity-50",
|
|
502
|
+
children: /* @__PURE__ */ jsx(CaretDownIcon, { className: cx("size-3 stroke-3", size === "lg" && "size-3.5 stroke-[2.57px]") })
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
] })
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
};
|
|
510
|
+
var InputNumber = ({
|
|
511
|
+
size = "md",
|
|
512
|
+
placeholder,
|
|
513
|
+
label,
|
|
514
|
+
hint,
|
|
515
|
+
hideRequiredIndicator,
|
|
516
|
+
className,
|
|
517
|
+
ref,
|
|
518
|
+
groupRef,
|
|
519
|
+
inputClassName,
|
|
520
|
+
wrapperClassName,
|
|
521
|
+
orientation = "vertical",
|
|
522
|
+
...props
|
|
523
|
+
}) => {
|
|
524
|
+
return /* @__PURE__ */ jsx(
|
|
525
|
+
NumberField,
|
|
526
|
+
{
|
|
527
|
+
...props,
|
|
528
|
+
className: (state) => cx("group flex h-max w-full flex-col items-start justify-start gap-1.5", typeof className === "function" ? className(state) : className),
|
|
529
|
+
children: ({ isInvalid, isRequired }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
530
|
+
label && /* @__PURE__ */ jsx(Label, { isRequired: hideRequiredIndicator ? !hideRequiredIndicator : isRequired, isInvalid, children: label }),
|
|
531
|
+
/* @__PURE__ */ jsx(
|
|
532
|
+
InputNumberBase,
|
|
533
|
+
{
|
|
534
|
+
...{
|
|
535
|
+
ref,
|
|
536
|
+
groupRef,
|
|
537
|
+
size,
|
|
538
|
+
placeholder,
|
|
539
|
+
inputClassName,
|
|
540
|
+
wrapperClassName,
|
|
541
|
+
orientation
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
),
|
|
545
|
+
hint && /* @__PURE__ */ jsx(HintText, { isInvalid, className: cx(size === "sm" && "text-xs"), children: hint })
|
|
546
|
+
] })
|
|
547
|
+
}
|
|
548
|
+
);
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
export { InputNumber, InputNumberBase };
|
|
552
|
+
//# sourceMappingURL=input-number.js.map
|
|
553
|
+
//# sourceMappingURL=input-number.js.map
|