@nexub/react 1.5.0 → 1.6.0
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/{chunk-XR4NBY54.js → chunk-2DYKENBM.js} +10 -10
- package/dist/{chunk-SVQCINRE.js → chunk-2I7FIU6R.js} +5 -2
- package/dist/{chunk-FHFVBOF3.js → chunk-2Y4WLNEZ.js} +3 -3
- package/dist/{chunk-CWS37T3K.js → chunk-3E7X3YK3.js} +4 -2
- package/dist/{chunk-GRB6T2TT.js → chunk-3FPJIXG7.js} +19 -13
- package/dist/chunk-3MT23LNM.js +171 -0
- package/dist/chunk-3QD76BKT.js +80 -0
- package/dist/{chunk-B54WADL4.js → chunk-4P2JJ2FH.js} +12 -12
- package/dist/chunk-52ZVJPF7.js +1 -0
- package/dist/chunk-5KI4YHA3.js +144 -0
- package/dist/chunk-5QEARXY3.js +55 -0
- package/dist/chunk-5VW6RUKZ.js +134 -0
- package/dist/{chunk-CNNJFWFA.js → chunk-6BGUZQAX.js} +4 -4
- package/dist/{chunk-LDYD7WL3.js → chunk-6ECOCGZG.js} +4 -3
- package/dist/{chunk-3AXIMXDU.js → chunk-6JBQAJJD.js} +6 -12
- package/dist/{chunk-YRDCY6BI.js → chunk-6UKNUI46.js} +0 -19
- package/dist/chunk-743Y5MY3.js +95 -0
- package/dist/{chunk-BFRX6X4O.js → chunk-74RUJ5KZ.js} +23 -17
- package/dist/chunk-77LYWSJW.js +85 -0
- package/dist/{chunk-YPHNHQYQ.js → chunk-7B4VF2ZU.js} +6 -2
- package/dist/{chunk-NCRFKPA4.js → chunk-7MSIOYJZ.js} +6 -8
- package/dist/{chunk-AHT35UWY.js → chunk-7Q4T7CB6.js} +10 -6
- package/dist/{chunk-GIGOTRXX.js → chunk-7VJABRKB.js} +3 -10
- package/dist/{chunk-6QLLH6ID.js → chunk-7XWJCFWI.js} +8 -17
- package/dist/chunk-A3O23F2B.js +1 -0
- package/dist/chunk-AT2DSFP3.js +47 -0
- package/dist/{chunk-OASFXI27.js → chunk-BNFGVFZ3.js} +5 -5
- package/dist/{chunk-GHCV6UXG.js → chunk-BTYDDKRQ.js} +5 -5
- package/dist/chunk-C6JRJ6JW.js +167 -0
- package/dist/chunk-CAOLGXA5.js +1 -0
- package/dist/{chunk-IIPYF6ZQ.js → chunk-CBDJRPMD.js} +16 -13
- package/dist/{chunk-OJ2TLWYD.js → chunk-CKFRMCZ7.js} +5 -3
- package/dist/{chunk-LZB3KTSH.js → chunk-CQWYZPPJ.js} +1 -1
- package/dist/{chunk-6RBNM5RO.js → chunk-CUOASXI7.js} +10 -10
- package/dist/{chunk-HG6HTUWU.js → chunk-CV5ZKED7.js} +2 -2
- package/dist/{chunk-HJERFB7J.js → chunk-DDRYT3SY.js} +2 -2
- package/dist/chunk-DGCAM2UJ.js +60 -0
- package/dist/{chunk-RLE5RN3T.js → chunk-DGQJRTO6.js} +15 -11
- package/dist/{chunk-FD7YU53N.js → chunk-DT3QGFXB.js} +4 -4
- package/dist/chunk-F73DTG2V.js +123 -0
- package/dist/{chunk-V3TETH4J.js → chunk-FIDUY6SS.js} +17 -16
- package/dist/{chunk-Z3IG5WRA.js → chunk-FJUVYRNT.js} +3 -3
- package/dist/{chunk-KQPLFVFR.js → chunk-FLZD7HQY.js} +0 -2
- package/dist/{chunk-64JDZWCV.js → chunk-GRKCUQG4.js} +6 -5
- package/dist/{chunk-EZ23IA3H.js → chunk-GSG2W6DP.js} +3 -3
- package/dist/{chunk-4I5ULCYG.js → chunk-HFTS5AN7.js} +3 -3
- package/dist/{chunk-RB4CVS22.js → chunk-HH7EHNOW.js} +3 -1
- package/dist/{chunk-S46W2QER.js → chunk-HSPGJSFJ.js} +17 -11
- package/dist/{chunk-NQVRF4RB.js → chunk-HXV5UA7K.js} +16 -13
- package/dist/{chunk-GUB7YKG2.js → chunk-I4U36P54.js} +6 -3
- package/dist/{chunk-BTRTORKU.js → chunk-I6CAF7C5.js} +6 -7
- package/dist/chunk-IGLOYOCH.js +134 -0
- package/dist/{chunk-IK23Q2OF.js → chunk-JHVYI5GK.js} +3 -3
- package/dist/chunk-K5FKEAAK.js +94 -0
- package/dist/{chunk-5URGARPH.js → chunk-KE4YVG5Q.js} +6 -10
- package/dist/{chunk-A4IMFAZX.js → chunk-LESI7J7B.js} +3 -3
- package/dist/chunk-MEUJBGY5.js +88 -0
- package/dist/chunk-MNEXMMLM.js +23 -0
- package/dist/{chunk-PVTACENM.js → chunk-MTK3GHDQ.js} +2 -2
- package/dist/chunk-NA5UMOE5.js +55 -0
- package/dist/{chunk-YJ3JQYAN.js → chunk-NGQKBDHA.js} +5 -13
- package/dist/{chunk-7Q7ZF6BY.js → chunk-NNIFOMIH.js} +18 -8
- package/dist/{chunk-7L3CGIRA.js → chunk-NQPGELMP.js} +8 -19
- package/dist/chunk-NSVXGOR3.js +54 -0
- package/dist/{chunk-6J3QTWKC.js → chunk-NZT4TTNV.js} +18 -9
- package/dist/{chunk-TJCHA3OI.js → chunk-O626NJEM.js} +7 -4
- package/dist/chunk-O74XEHLA.js +331 -0
- package/dist/{chunk-JSD3H7WV.js → chunk-OYCK6BRG.js} +6 -6
- package/dist/{chunk-2555JXCP.js → chunk-PBPUSRTJ.js} +19 -11
- package/dist/{chunk-QD7H3WV3.js → chunk-PGDXFBKT.js} +8 -8
- package/dist/{chunk-PQ6GU7SG.js → chunk-PMWYLYM3.js} +20 -14
- package/dist/{chunk-I4BHRVRL.js → chunk-PPCGUIAB.js} +9 -5
- package/dist/{chunk-NIX4SEKM.js → chunk-PREMZMLU.js} +7 -4
- package/dist/{chunk-4SSUM4CL.js → chunk-Q3ESHXKU.js} +9 -6
- package/dist/{chunk-KM6Z3VTI.js → chunk-QVTVDL6Y.js} +1 -1
- package/dist/{chunk-AXOKFS4K.js → chunk-RSU2UHN4.js} +20 -4
- package/dist/{chunk-DJZZ3FIP.js → chunk-RUR57JZQ.js} +5 -14
- package/dist/{chunk-ZV3AF5CL.js → chunk-S2CTBFLN.js} +13 -2
- package/dist/{chunk-WESZPFBZ.js → chunk-S7GH2BJP.js} +7 -4
- package/dist/chunk-SAUA52EJ.js +131 -0
- package/dist/{chunk-72I7EVOL.js → chunk-SYZADSLI.js} +10 -6
- package/dist/{chunk-TEOLG3N2.js → chunk-SZ2WPWXJ.js} +10 -6
- package/dist/{chunk-W2NEXOTG.js → chunk-T7RLPFGX.js} +2 -2
- package/dist/{chunk-J6TU45KP.js → chunk-TRA6A5C5.js} +26 -12
- package/dist/{chunk-H2W7IYVY.js → chunk-UTJJ5HFX.js} +18 -12
- package/dist/{chunk-5O34ZNC3.js → chunk-VAFBGFKY.js} +19 -13
- package/dist/{chunk-OJRSPDNJ.js → chunk-VD4RFTNV.js} +8 -14
- package/dist/chunk-VLQGQFW7.js +110 -0
- package/dist/{chunk-RTDUTWJ4.js → chunk-VMT7Y3AT.js} +5 -8
- package/dist/{chunk-LGQ737BP.js → chunk-WHTLXQB6.js} +1 -1
- package/dist/chunk-WLRRMT6W.js +1 -0
- package/dist/{chunk-2FCSWBSM.js → chunk-WMWX6DPB.js} +3 -3
- package/dist/{chunk-UMC64NCT.js → chunk-WVBGQCYC.js} +6 -3
- package/dist/{chunk-QCNLE27O.js → chunk-WXRQ42DR.js} +11 -7
- package/dist/{chunk-SY6V3HAK.js → chunk-XDU27NRX.js} +3 -3
- package/dist/{chunk-KA2J5OBA.js → chunk-XQDD76EF.js} +4 -7
- package/dist/chunk-XTATJMY6.js +64 -0
- package/dist/chunk-XYXMPHND.js +1 -0
- package/dist/{chunk-7ZWBHHRK.js → chunk-YNU6VRD5.js} +23 -32
- package/dist/{chunk-6SJPVQQW.js → chunk-Z3HF6XJ3.js} +1 -1
- package/dist/{chunk-I4URNMI7.js → chunk-ZC4MZAEX.js} +9 -7
- package/dist/{chunk-PWBPHGM3.js → chunk-ZCEUVK2R.js} +2 -2
- package/dist/chunk-ZT3NWE5U.js +1 -0
- package/dist/{chunk-RHOYF7MO.js → chunk-ZTLALVWA.js} +6 -15
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Alert/index.js +2 -1
- package/dist/components/AlertDialog/index.js +3 -3
- package/dist/components/Amount/index.js +3 -1
- package/dist/components/AspectRatio/index.js +1 -1
- package/dist/components/Autocomplete/index.js +3 -2
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/AvatarGroup/index.js +3 -2
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Banner/index.js +2 -1
- package/dist/components/Breadcrumb/index.js +2 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Card/index.js +3 -1
- package/dist/components/CheckList/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxCard/index.js +9 -0
- package/dist/components/Chip/index.js +2 -1
- package/dist/components/Citation/index.js +17 -0
- package/dist/components/Code/index.js +1 -1
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/CommandPalette/index.js +3 -2
- package/dist/components/ContextMenu/index.js +2 -2
- package/dist/components/CountryBadge/index.js +1 -1
- package/dist/components/DataTable/index.js +2 -1
- package/dist/components/DatePicker/index.js +5 -1
- package/dist/components/DateRangePicker/index.js +5 -1
- package/dist/components/Dialog/index.js +2 -2
- package/dist/components/Drawer/index.js +2 -2
- package/dist/components/DropdownMenu/index.js +2 -2
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/ErrorState/index.js +2 -1
- package/dist/components/EyebrowChip/index.js +4 -1
- package/dist/components/FileUpload/index.js +2 -1
- package/dist/components/FilterChip/index.js +3 -1
- package/dist/components/Flex/index.js +2 -1
- package/dist/components/FormError/index.js +1 -1
- package/dist/components/FormField/index.js +7 -4
- package/dist/components/GradientDivider/index.js +1 -1
- package/dist/components/Grid/index.js +2 -1
- package/dist/components/Heading/index.js +4 -1
- package/dist/components/HelperText/index.js +4 -1
- package/dist/components/HoverCard/index.js +3 -2
- package/dist/components/IconButton/index.js +2 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Kbd/index.js +1 -1
- package/dist/components/KeyboardShortcut/index.js +2 -2
- package/dist/components/Label/index.js +4 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/Logo/index.js +1 -1
- package/dist/components/MediaCard/index.js +9 -0
- package/dist/components/Menubar/index.js +2 -2
- package/dist/components/MessageBubble/index.js +18 -0
- package/dist/components/MoneyInput/index.js +3 -2
- package/dist/components/NavigationMenu/index.js +2 -2
- package/dist/components/NavigationRail/index.js +2 -1
- package/dist/components/NexubProvider/index.js +14 -0
- package/dist/components/NumberInput/index.js +3 -2
- package/dist/components/NumberTicker/index.js +10 -0
- package/dist/components/PageHeader/index.js +1 -1
- package/dist/components/Pagination/index.js +3 -1
- package/dist/components/PasswordInput/index.js +3 -2
- package/dist/components/Popover/index.js +2 -2
- package/dist/components/Progress/index.js +2 -1
- package/dist/components/PromptInput/index.js +15 -0
- package/dist/components/RadioCard/index.js +11 -0
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/Rating/index.js +2 -1
- package/dist/components/ScrollArea/index.js +1 -1
- package/dist/components/SearchInput/index.js +3 -2
- package/dist/components/Section/index.js +1 -1
- package/dist/components/SegmentedControl/index.js +3 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Separator/index.js +1 -1
- package/dist/components/Sidebar/index.js +2 -1
- package/dist/components/Skeleton/index.js +1 -1
- package/dist/components/Spinner/index.js +2 -1
- package/dist/components/SplitButton/index.js +5 -5
- package/dist/components/Stack/index.js +2 -1
- package/dist/components/StatusPill/index.js +1 -1
- package/dist/components/StreamingText/index.js +8 -0
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/index.js +3 -2
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/TextGradient/index.js +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/ThinkingIndicator/index.js +9 -0
- package/dist/components/Toast/index.js +3 -1
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/components/TopNav/index.js +2 -1
- package/dist/index.d.ts +407 -22
- package/dist/index.js +245 -166
- package/package.json +52 -50
- package/dist/chunk-63DPMUMR.js +0 -67
- package/dist/chunk-CHGPGRML.js +0 -115
- package/dist/chunk-J2T4GFFS.js +0 -85
- package/dist/chunk-LH3BSAIS.js +0 -119
- package/dist/chunk-LMPGHWUA.js +0 -114
- package/dist/chunk-NMH5WSZG.js +0 -72
- package/dist/chunk-P44EROBX.js +0 -55
- package/dist/chunk-TYTW4F3B.js +0 -178
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexub/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "React component library for Nexub Design System — 90+ accessible, themeable UI components built on Radix UI primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,68 +36,70 @@
|
|
|
36
36
|
"main": "./dist/index.js",
|
|
37
37
|
"types": "./dist/index.d.ts",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@radix-ui/react-accordion": "^1.
|
|
40
|
-
"@radix-ui/react-alert-dialog": "^1.1
|
|
41
|
-
"@radix-ui/react-checkbox": "^1.
|
|
42
|
-
"@radix-ui/react-collapsible": "^1.1
|
|
43
|
-
"@radix-ui/react-context-menu": "^2.
|
|
44
|
-
"@radix-ui/react-dialog": "^1.1
|
|
45
|
-
"@radix-ui/react-
|
|
46
|
-
"@radix-ui/react-
|
|
47
|
-
"@radix-ui/react-
|
|
48
|
-
"@radix-ui/react-
|
|
49
|
-
"@radix-ui/react-
|
|
50
|
-
"@radix-ui/react-
|
|
51
|
-
"@radix-ui/react-
|
|
52
|
-
"@radix-ui/react-
|
|
53
|
-
"@radix-ui/react-
|
|
54
|
-
"@radix-ui/react-
|
|
55
|
-
"@radix-ui/react-
|
|
56
|
-
"@radix-ui/react-
|
|
57
|
-
"@radix-ui/react-
|
|
58
|
-
"@radix-ui/react-
|
|
59
|
-
"@radix-ui/react-toggle
|
|
60
|
-
"@radix-ui/react-
|
|
61
|
-
"@radix-ui/react-
|
|
62
|
-
"@radix-ui/react-
|
|
39
|
+
"@radix-ui/react-accordion": "^1.3.1",
|
|
40
|
+
"@radix-ui/react-alert-dialog": "^1.2.1",
|
|
41
|
+
"@radix-ui/react-checkbox": "^1.4.1",
|
|
42
|
+
"@radix-ui/react-collapsible": "^1.2.1",
|
|
43
|
+
"@radix-ui/react-context-menu": "^2.4.1",
|
|
44
|
+
"@radix-ui/react-dialog": "^1.3.1",
|
|
45
|
+
"@radix-ui/react-direction": "^1.2.0",
|
|
46
|
+
"@radix-ui/react-dropdown-menu": "^2.2.1",
|
|
47
|
+
"@radix-ui/react-hover-card": "^1.2.1",
|
|
48
|
+
"@radix-ui/react-menubar": "^1.2.1",
|
|
49
|
+
"@radix-ui/react-navigation-menu": "^1.4.1",
|
|
50
|
+
"@radix-ui/react-popover": "^1.3.1",
|
|
51
|
+
"@radix-ui/react-radio-group": "^1.5.1",
|
|
52
|
+
"@radix-ui/react-scroll-area": "^1.4.0",
|
|
53
|
+
"@radix-ui/react-select": "^2.4.1",
|
|
54
|
+
"@radix-ui/react-slider": "^1.6.1",
|
|
55
|
+
"@radix-ui/react-slot": "^1.5.0",
|
|
56
|
+
"@radix-ui/react-switch": "^1.4.1",
|
|
57
|
+
"@radix-ui/react-tabs": "^1.2.1",
|
|
58
|
+
"@radix-ui/react-toast": "^1.3.1",
|
|
59
|
+
"@radix-ui/react-toggle": "^1.2.1",
|
|
60
|
+
"@radix-ui/react-toggle-group": "^1.2.1",
|
|
61
|
+
"@radix-ui/react-toolbar": "^1.2.1",
|
|
62
|
+
"@radix-ui/react-tooltip": "^1.4.1",
|
|
63
|
+
"@radix-ui/react-visually-hidden": "^1.2.13",
|
|
63
64
|
"@tanstack/react-table": "^8.21.3",
|
|
64
65
|
"class-variance-authority": "^0.7.1",
|
|
65
66
|
"clsx": "^2.1.1",
|
|
66
67
|
"cmdk": "^1.1.1",
|
|
67
|
-
"date-fns": "^4.
|
|
68
|
+
"date-fns": "^4.4.0",
|
|
68
69
|
"react-day-picker": "^9.14.0",
|
|
69
|
-
"tailwind-merge": "^2.
|
|
70
|
-
"@nexub/icons": "1.
|
|
70
|
+
"tailwind-merge": "^2.6.1",
|
|
71
|
+
"@nexub/icons": "1.6.0"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
74
|
"react": ">=18 <20",
|
|
74
75
|
"react-dom": ">=18 <20",
|
|
75
|
-
"@nexub/tokens": "^1.
|
|
76
|
+
"@nexub/tokens": "^1.6.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@playwright/test": "1.64.0",
|
|
79
|
-
"@storybook/
|
|
80
|
-
"@storybook/react": "
|
|
81
|
-
"@
|
|
82
|
-
"@testing-library/
|
|
83
|
-
"@testing-library/
|
|
84
|
-
"@
|
|
85
|
-
"@types/react": "^19.
|
|
86
|
-
"@types/react-dom": "^19.
|
|
87
|
-
"autoprefixer": "^10.
|
|
88
|
-
"axe-core": "^4.
|
|
89
|
-
"jsdom": "^
|
|
90
|
-
"postcss": "^8.
|
|
91
|
-
"react": "^19.
|
|
92
|
-
"react-dom": "^19.
|
|
93
|
-
"storybook": "
|
|
94
|
-
"tailwindcss": "^3.4.
|
|
95
|
-
"tsup": "^8.
|
|
96
|
-
"typescript": "^5.
|
|
80
|
+
"@storybook/react": "10.6.3",
|
|
81
|
+
"@storybook/react-vite": "10.6.3",
|
|
82
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
83
|
+
"@testing-library/react": "^16.3.3",
|
|
84
|
+
"@testing-library/user-event": "^14.6.8",
|
|
85
|
+
"@types/node": "^26.6.5",
|
|
86
|
+
"@types/react": "^19.3.0",
|
|
87
|
+
"@types/react-dom": "^19.3.0",
|
|
88
|
+
"autoprefixer": "^10.6.1",
|
|
89
|
+
"axe-core": "^4.14.0",
|
|
90
|
+
"jsdom": "^30.1.3",
|
|
91
|
+
"postcss": "^8.5.31",
|
|
92
|
+
"react": "^19.3.1",
|
|
93
|
+
"react-dom": "^19.3.1",
|
|
94
|
+
"storybook": "10.6.3",
|
|
95
|
+
"tailwindcss": "^3.4.19",
|
|
96
|
+
"tsup": "^8.5.1",
|
|
97
|
+
"typescript": "^5.9.3",
|
|
97
98
|
"vaul": "1.1.2",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"@nexub/
|
|
99
|
+
"vite": "^7.3.7",
|
|
100
|
+
"vitest": "^5.0.5",
|
|
101
|
+
"@nexub/themes": "1.6.0",
|
|
102
|
+
"@nexub/tokens": "1.6.0"
|
|
101
103
|
},
|
|
102
104
|
"scripts": {
|
|
103
105
|
"build": "tsup && node scripts/check-dts.mjs",
|
package/dist/chunk-63DPMUMR.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-Q7G5WGYV.js";
|
|
5
|
-
|
|
6
|
-
// src/components/Skeleton/Skeleton.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import { cva } from "class-variance-authority";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var skeletonVariants = cva(
|
|
11
|
-
"bg-[var(--color-bg-muted)]",
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
shape: {
|
|
15
|
-
line: "rounded",
|
|
16
|
-
rect: "rounded-md",
|
|
17
|
-
circle: "rounded-full"
|
|
18
|
-
},
|
|
19
|
-
animated: {
|
|
20
|
-
true: "animate-pulse"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
shape: "line",
|
|
25
|
-
animated: true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
var Skeleton = React.forwardRef(
|
|
30
|
-
({
|
|
31
|
-
className,
|
|
32
|
-
shape = "line",
|
|
33
|
-
width,
|
|
34
|
-
height,
|
|
35
|
-
animated = true,
|
|
36
|
-
style,
|
|
37
|
-
...props
|
|
38
|
-
}, ref) => {
|
|
39
|
-
const defaultHeight = shape === "line" ? "1em" : shape === "circle" ? void 0 : void 0;
|
|
40
|
-
const resolvedWidth = width !== void 0 ? typeof width === "number" ? `${width}px` : width : shape === "circle" ? height !== void 0 ? typeof height === "number" ? `${height}px` : height : "2.5rem" : "100%";
|
|
41
|
-
const resolvedHeight = height !== void 0 ? typeof height === "number" ? `${height}px` : height : shape === "circle" ? resolvedWidth : defaultHeight;
|
|
42
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
-
"span",
|
|
44
|
-
{
|
|
45
|
-
ref,
|
|
46
|
-
"aria-hidden": "true",
|
|
47
|
-
className: cn(
|
|
48
|
-
skeletonVariants({ shape, animated }),
|
|
49
|
-
"block",
|
|
50
|
-
className
|
|
51
|
-
),
|
|
52
|
-
style: {
|
|
53
|
-
width: resolvedWidth,
|
|
54
|
-
height: resolvedHeight,
|
|
55
|
-
...style
|
|
56
|
-
},
|
|
57
|
-
...props
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
Skeleton.displayName = "Skeleton";
|
|
63
|
-
|
|
64
|
-
export {
|
|
65
|
-
skeletonVariants,
|
|
66
|
-
Skeleton
|
|
67
|
-
};
|
package/dist/chunk-CHGPGRML.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-Q7G5WGYV.js";
|
|
5
|
-
|
|
6
|
-
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import * as RadixPopover from "@radix-ui/react-popover";
|
|
9
|
-
import { DayPicker } from "react-day-picker";
|
|
10
|
-
import { format } from "date-fns";
|
|
11
|
-
import { CalendarDays, ChevronLeft, ChevronRight } from "@nexub/icons";
|
|
12
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
function formatRange(range, placeholder) {
|
|
14
|
-
if (!range) return placeholder;
|
|
15
|
-
if (range.from && range.to) {
|
|
16
|
-
return `${format(range.from, "PP")} \u2013 ${format(range.to, "PP")}`;
|
|
17
|
-
}
|
|
18
|
-
if (range.from) return `${format(range.from, "PP")} \u2013 \u2026`;
|
|
19
|
-
return placeholder;
|
|
20
|
-
}
|
|
21
|
-
var calendarClassNames = {
|
|
22
|
-
months: "flex flex-col sm:flex-row gap-4",
|
|
23
|
-
month: "flex flex-col gap-4",
|
|
24
|
-
month_caption: "flex justify-center pt-1 relative items-center",
|
|
25
|
-
caption_label: "text-sm font-medium",
|
|
26
|
-
nav: "flex items-center gap-1",
|
|
27
|
-
button_previous: "absolute left-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
|
|
28
|
-
button_next: "absolute right-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
|
|
29
|
-
month_grid: "w-full border-collapse",
|
|
30
|
-
weekdays: "flex",
|
|
31
|
-
weekday: "text-[var(--color-text-muted)] rounded-md w-8 font-normal text-[0.8rem] flex-1 text-center",
|
|
32
|
-
week: "flex w-full mt-2",
|
|
33
|
-
day: "relative p-0 text-center text-sm flex-1 focus-within:relative focus-within:z-20",
|
|
34
|
-
day_button: "inline-flex h-8 w-8 items-center justify-center rounded-md text-sm hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
35
|
-
selected: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)]",
|
|
36
|
-
range_start: "rounded-l-md",
|
|
37
|
-
range_end: "rounded-r-md",
|
|
38
|
-
range_middle: "aria-selected:bg-[var(--color-bg-subtle)] aria-selected:text-[var(--color-text-primary)] rounded-none",
|
|
39
|
-
today: "bg-[var(--color-bg-subtle)]",
|
|
40
|
-
outside: "opacity-50",
|
|
41
|
-
disabled: "opacity-50",
|
|
42
|
-
hidden: "invisible"
|
|
43
|
-
};
|
|
44
|
-
var DateRangePicker = React.forwardRef(function DateRangePicker2({
|
|
45
|
-
value,
|
|
46
|
-
onChange,
|
|
47
|
-
placeholder = "Pick a date range",
|
|
48
|
-
disabled = false,
|
|
49
|
-
minDate,
|
|
50
|
-
maxDate,
|
|
51
|
-
className,
|
|
52
|
-
id,
|
|
53
|
-
"aria-label": ariaLabel
|
|
54
|
-
}, ref) {
|
|
55
|
-
const [open, setOpen] = React.useState(false);
|
|
56
|
-
const display = formatRange(value, placeholder);
|
|
57
|
-
const label = ariaLabel ? `${ariaLabel}: ${display}` : display;
|
|
58
|
-
return /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange: setOpen, children: [
|
|
59
|
-
/* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
60
|
-
"button",
|
|
61
|
-
{
|
|
62
|
-
ref,
|
|
63
|
-
id,
|
|
64
|
-
disabled,
|
|
65
|
-
"aria-label": label,
|
|
66
|
-
className: cn(
|
|
67
|
-
"inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border border-[var(--color-border-input)] bg-[var(--color-bg-default)] px-3 py-2 text-sm",
|
|
68
|
-
"hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
69
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
70
|
-
!value && "text-[var(--color-text-muted)]",
|
|
71
|
-
className
|
|
72
|
-
),
|
|
73
|
-
children: [
|
|
74
|
-
/* @__PURE__ */ jsx(CalendarDays, { size: "sm", "aria-hidden": "true" }),
|
|
75
|
-
display
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
) }),
|
|
79
|
-
/* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(
|
|
80
|
-
RadixPopover.Content,
|
|
81
|
-
{
|
|
82
|
-
align: "start",
|
|
83
|
-
className: cn(
|
|
84
|
-
"z-[var(--z-popover)] rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
|
|
85
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
86
|
-
"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
87
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
88
|
-
),
|
|
89
|
-
children: /* @__PURE__ */ jsx(
|
|
90
|
-
DayPicker,
|
|
91
|
-
{
|
|
92
|
-
mode: "range",
|
|
93
|
-
selected: value,
|
|
94
|
-
onSelect: onChange,
|
|
95
|
-
numberOfMonths: 2,
|
|
96
|
-
startMonth: minDate,
|
|
97
|
-
endMonth: maxDate,
|
|
98
|
-
initialFocus: true,
|
|
99
|
-
showOutsideDays: true,
|
|
100
|
-
className: "p-3",
|
|
101
|
-
classNames: calendarClassNames,
|
|
102
|
-
components: {
|
|
103
|
-
Chevron: ({ orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { size: "xs", "aria-hidden": "true" }) : orientation === "right" ? /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true", ...rest })
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
) })
|
|
109
|
-
] });
|
|
110
|
-
});
|
|
111
|
-
DateRangePicker.displayName = "DateRangePicker";
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
DateRangePicker
|
|
115
|
-
};
|
package/dist/chunk-J2T4GFFS.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-Q7G5WGYV.js";
|
|
5
|
-
|
|
6
|
-
// src/components/StatusPill/StatusPill.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import { cva } from "class-variance-authority";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
var statusPillVariants = cva(
|
|
11
|
-
"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium select-none",
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
tone: {
|
|
15
|
-
neutral: "bg-[var(--color-neutral-100)] text-[var(--color-neutral-700)] border border-[var(--color-neutral-200)]",
|
|
16
|
-
info: "bg-[var(--color-semantic-info-default)]/10 text-[var(--color-semantic-info-default)] border border-[var(--color-semantic-info-default)]/20",
|
|
17
|
-
success: "bg-[var(--color-semantic-success-default)]/10 text-[var(--color-semantic-success-default)] border border-[var(--color-semantic-success-default)]/20",
|
|
18
|
-
warning: "bg-[var(--color-semantic-warning-default)]/10 text-[var(--color-semantic-warning-default)] border border-[var(--color-semantic-warning-default)]/20",
|
|
19
|
-
danger: "bg-[var(--color-semantic-error-default)]/10 text-[var(--color-semantic-error-default)] border border-[var(--color-semantic-error-default)]/20",
|
|
20
|
-
leap: "bg-[var(--color-leap-500)]/10 text-[var(--color-leap-700)] border border-[var(--color-leap-500)]/20",
|
|
21
|
-
bookub: "bg-[var(--color-bookub-500)]/10 text-[var(--color-bookub-700)] border border-[var(--color-bookub-500)]/20",
|
|
22
|
-
payub: "bg-[var(--color-payub-500)]/10 text-[var(--color-payub-700)] border border-[var(--color-payub-500)]/20",
|
|
23
|
-
founderub: "bg-[var(--color-founderub-500)]/10 text-[var(--color-founderub-700)] border border-[var(--color-founderub-500)]/20"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
tone: "neutral"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
var dotColorMap = {
|
|
32
|
-
neutral: "bg-[var(--color-neutral-500)]",
|
|
33
|
-
info: "bg-[var(--color-semantic-info-default)]",
|
|
34
|
-
success: "bg-[var(--color-semantic-success-default)]",
|
|
35
|
-
warning: "bg-[var(--color-semantic-warning-default)]",
|
|
36
|
-
danger: "bg-[var(--color-semantic-error-default)]",
|
|
37
|
-
leap: "bg-[var(--color-leap-500)]",
|
|
38
|
-
bookub: "bg-[var(--color-bookub-500)]",
|
|
39
|
-
payub: "bg-[var(--color-payub-500)]",
|
|
40
|
-
founderub: "bg-[var(--color-founderub-500)]"
|
|
41
|
-
};
|
|
42
|
-
var pulseTones = ["success", "info"];
|
|
43
|
-
var StatusPill = React.forwardRef(
|
|
44
|
-
({ className, tone = "neutral", label, dot = false, ...props }, ref) => {
|
|
45
|
-
const shouldPulse = dot && pulseTones.includes(tone);
|
|
46
|
-
return /* @__PURE__ */ jsxs(
|
|
47
|
-
"span",
|
|
48
|
-
{
|
|
49
|
-
ref,
|
|
50
|
-
className: cn(statusPillVariants({ tone }), className),
|
|
51
|
-
...props,
|
|
52
|
-
children: [
|
|
53
|
-
dot && /* @__PURE__ */ jsxs("span", { className: "relative inline-flex h-2 w-2 shrink-0", children: [
|
|
54
|
-
shouldPulse && /* @__PURE__ */ jsx(
|
|
55
|
-
"span",
|
|
56
|
-
{
|
|
57
|
-
className: cn(
|
|
58
|
-
"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
|
|
59
|
-
dotColorMap[tone]
|
|
60
|
-
),
|
|
61
|
-
"aria-hidden": "true"
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ jsx(
|
|
65
|
-
"span",
|
|
66
|
-
{
|
|
67
|
-
className: cn(
|
|
68
|
-
"relative inline-flex rounded-full h-2 w-2",
|
|
69
|
-
dotColorMap[tone]
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
] }),
|
|
74
|
-
label
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
StatusPill.displayName = "StatusPill";
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
statusPillVariants,
|
|
84
|
-
StatusPill
|
|
85
|
-
};
|
package/dist/chunk-LH3BSAIS.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-Q7G5WGYV.js";
|
|
5
|
-
|
|
6
|
-
// src/components/DatePicker/DatePicker.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import * as RadixPopover from "@radix-ui/react-popover";
|
|
9
|
-
import { DayPicker } from "react-day-picker";
|
|
10
|
-
import { format } from "date-fns";
|
|
11
|
-
import { CalendarDays, ChevronLeft, ChevronRight } from "@nexub/icons";
|
|
12
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
var calendarClassNames = {
|
|
14
|
-
months: "flex flex-col sm:flex-row gap-4",
|
|
15
|
-
month: "flex flex-col gap-4",
|
|
16
|
-
month_caption: "flex justify-center pt-1 relative items-center",
|
|
17
|
-
caption_label: "text-sm font-medium",
|
|
18
|
-
nav: "flex items-center gap-1",
|
|
19
|
-
button_previous: "absolute left-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
|
|
20
|
-
button_next: "absolute right-1 inline-flex h-7 w-7 items-center justify-center rounded-md border border-[var(--color-border-default)] hover:bg-[var(--color-bg-subtle)] disabled:pointer-events-none disabled:opacity-50",
|
|
21
|
-
month_grid: "w-full border-collapse",
|
|
22
|
-
weekdays: "flex",
|
|
23
|
-
weekday: "text-[var(--color-text-muted)] rounded-md w-8 font-normal text-[0.8rem] flex-1 text-center",
|
|
24
|
-
week: "flex w-full mt-2",
|
|
25
|
-
day: cn(
|
|
26
|
-
"relative p-0 text-center text-sm flex-1",
|
|
27
|
-
"[&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
28
|
-
"[&:has([aria-selected].day-outside)]:bg-[var(--color-bg-subtle)]/50",
|
|
29
|
-
"[&:has([aria-selected])]:bg-[var(--color-bg-subtle)]",
|
|
30
|
-
"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md",
|
|
31
|
-
"focus-within:relative focus-within:z-20"
|
|
32
|
-
),
|
|
33
|
-
day_button: cn(
|
|
34
|
-
"inline-flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",
|
|
35
|
-
"hover:bg-[var(--color-bg-subtle)] hover:text-[var(--color-text-primary)]",
|
|
36
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
37
|
-
"aria-selected:opacity-100"
|
|
38
|
-
),
|
|
39
|
-
selected: "bg-[var(--color-fill-primary)] text-white hover:bg-[var(--color-fill-primary-hover)] hover:text-white focus:bg-[var(--color-fill-primary)] focus:text-white",
|
|
40
|
-
today: "bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]",
|
|
41
|
-
outside: "text-[var(--color-text-muted)] opacity-50",
|
|
42
|
-
disabled: "text-[var(--color-text-muted)] opacity-50",
|
|
43
|
-
hidden: "invisible"
|
|
44
|
-
};
|
|
45
|
-
var DatePicker = React.forwardRef(
|
|
46
|
-
function DatePicker2({
|
|
47
|
-
value,
|
|
48
|
-
onChange,
|
|
49
|
-
placeholder = "Pick a date",
|
|
50
|
-
disabled = false,
|
|
51
|
-
minDate,
|
|
52
|
-
maxDate,
|
|
53
|
-
className,
|
|
54
|
-
id,
|
|
55
|
-
"aria-label": ariaLabel
|
|
56
|
-
}, ref) {
|
|
57
|
-
const [open, setOpen] = React.useState(false);
|
|
58
|
-
const display = value ? format(value, "PP") : placeholder;
|
|
59
|
-
return /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange: setOpen, children: [
|
|
60
|
-
/* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
61
|
-
"button",
|
|
62
|
-
{
|
|
63
|
-
ref,
|
|
64
|
-
id,
|
|
65
|
-
disabled,
|
|
66
|
-
"aria-label": ariaLabel ? `${ariaLabel}: ${display}` : display,
|
|
67
|
-
className: cn(
|
|
68
|
-
"inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border border-[var(--color-border-input)] bg-[var(--color-bg-default)] px-3 py-2 text-sm",
|
|
69
|
-
"hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
70
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
71
|
-
!value && "text-[var(--color-text-muted)]",
|
|
72
|
-
className
|
|
73
|
-
),
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ jsx(CalendarDays, { size: "sm", "aria-hidden": "true" }),
|
|
76
|
-
value ? format(value, "PP") : placeholder
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
) }),
|
|
80
|
-
/* @__PURE__ */ jsx(RadixPopover.Portal, { children: /* @__PURE__ */ jsx(
|
|
81
|
-
RadixPopover.Content,
|
|
82
|
-
{
|
|
83
|
-
align: "start",
|
|
84
|
-
className: cn(
|
|
85
|
-
"z-[var(--z-popover)] rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-default)] shadow-md",
|
|
86
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
87
|
-
"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
88
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
89
|
-
),
|
|
90
|
-
children: /* @__PURE__ */ jsx(
|
|
91
|
-
DayPicker,
|
|
92
|
-
{
|
|
93
|
-
mode: "single",
|
|
94
|
-
selected: value,
|
|
95
|
-
onSelect: (date) => {
|
|
96
|
-
onChange?.(date);
|
|
97
|
-
setOpen(false);
|
|
98
|
-
},
|
|
99
|
-
startMonth: minDate,
|
|
100
|
-
endMonth: maxDate,
|
|
101
|
-
initialFocus: true,
|
|
102
|
-
showOutsideDays: true,
|
|
103
|
-
className: "p-3",
|
|
104
|
-
classNames: calendarClassNames,
|
|
105
|
-
components: {
|
|
106
|
-
Chevron: ({ orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { size: "xs", "aria-hidden": "true" }) : orientation === "right" ? /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(ChevronRight, { size: "xs", "aria-hidden": "true", ...rest })
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
}
|
|
111
|
-
) })
|
|
112
|
-
] });
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
DatePicker.displayName = "DatePicker";
|
|
116
|
-
|
|
117
|
-
export {
|
|
118
|
-
DatePicker
|
|
119
|
-
};
|
package/dist/chunk-LMPGHWUA.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import {
|
|
3
|
-
disabledContainer,
|
|
4
|
-
disabledText,
|
|
5
|
-
pressable
|
|
6
|
-
} from "./chunk-7SXR4PGO.js";
|
|
7
|
-
import {
|
|
8
|
-
glassSurfaceClass
|
|
9
|
-
} from "./chunk-DEIBF3P7.js";
|
|
10
|
-
import {
|
|
11
|
-
cn
|
|
12
|
-
} from "./chunk-Q7G5WGYV.js";
|
|
13
|
-
|
|
14
|
-
// src/components/Button/Button.tsx
|
|
15
|
-
import * as React from "react";
|
|
16
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
17
|
-
import { Loader2 } from "@nexub/icons";
|
|
18
|
-
import { cva } from "class-variance-authority";
|
|
19
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
var toneClasses = {
|
|
21
|
-
neutral: "bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)]",
|
|
22
|
-
info: "bg-[var(--color-info)] text-[var(--color-on-info)]",
|
|
23
|
-
success: "bg-[var(--color-success)] text-[var(--color-on-success)]",
|
|
24
|
-
warning: "bg-[var(--color-warning)] text-[var(--color-on-warning)]",
|
|
25
|
-
danger: "bg-[var(--color-error)] text-[var(--color-on-error)]",
|
|
26
|
-
leap: "bg-[color:light-dark(var(--color-palette-leap-40),var(--color-palette-leap-80))] text-[color:light-dark(var(--color-palette-leap-100),var(--color-palette-leap-20))]",
|
|
27
|
-
bookub: "bg-[color:light-dark(var(--color-palette-bookub-40),var(--color-palette-bookub-80))] text-[color:light-dark(var(--color-palette-bookub-100),var(--color-palette-bookub-20))]",
|
|
28
|
-
payub: "bg-[color:light-dark(var(--color-palette-payub-40),var(--color-palette-payub-80))] text-[color:light-dark(var(--color-palette-payub-100),var(--color-palette-payub-20))]",
|
|
29
|
-
founderub: "bg-[color:light-dark(var(--color-palette-founderub-40),var(--color-palette-founderub-80))] text-[color:light-dark(var(--color-palette-founderub-100),var(--color-palette-founderub-20))]"
|
|
30
|
-
};
|
|
31
|
-
var filled = `bg-[var(--color-primary)] text-[var(--color-on-primary)] ${disabledContainer}`;
|
|
32
|
-
var tonal = `bg-[var(--color-secondary-container)] text-[var(--color-on-secondary-container)] ${disabledContainer}`;
|
|
33
|
-
var outlined = `bg-transparent border border-[var(--color-outline-variant)] text-[var(--color-on-surface)] ${disabledContainer}`;
|
|
34
|
-
var text = `bg-transparent text-[var(--color-on-surface)] ${disabledText}`;
|
|
35
|
-
var buttonVariants = cva(
|
|
36
|
-
[pressable, "relative inline-flex items-center justify-center gap-2 whitespace-nowrap"],
|
|
37
|
-
{
|
|
38
|
-
variants: {
|
|
39
|
-
variant: {
|
|
40
|
-
filled,
|
|
41
|
-
tonal,
|
|
42
|
-
outlined,
|
|
43
|
-
text,
|
|
44
|
-
// Thin glass: for buttons floating over content/media (toolbars, media controls).
|
|
45
|
-
glass: `border ${glassSurfaceClass} text-[var(--color-on-surface)] ${disabledContainer}`,
|
|
46
|
-
// Legacy names (kept as aliases).
|
|
47
|
-
primary: filled,
|
|
48
|
-
secondary: tonal,
|
|
49
|
-
subtle: `bg-[var(--color-surface-container-high)] text-[var(--color-on-surface)] ${disabledContainer}`,
|
|
50
|
-
outline: outlined,
|
|
51
|
-
ghost: text,
|
|
52
|
-
destructive: `bg-[var(--color-error)] text-[var(--color-on-error)] ${disabledContainer}`,
|
|
53
|
-
accent: `bg-[var(--color-tertiary)] text-[var(--color-on-tertiary)] ${disabledContainer}`,
|
|
54
|
-
link: `bg-transparent text-[var(--color-primary)] underline underline-offset-[0.3em] ${disabledText}`
|
|
55
|
-
},
|
|
56
|
-
// The control ladder (density-aware: data-density="compact" shrinks it).
|
|
57
|
-
size: {
|
|
58
|
-
xs: "h-control-xs px-2.5 text-label-sm",
|
|
59
|
-
sm: "h-control-sm px-3.5 text-label-md",
|
|
60
|
-
md: "h-control-md px-5 text-label-lg",
|
|
61
|
-
lg: "h-control-lg px-6 text-title-md",
|
|
62
|
-
xl: "h-control-xl px-7 text-title-md"
|
|
63
|
-
},
|
|
64
|
-
fullWidth: {
|
|
65
|
-
true: "w-full"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
variant: "primary",
|
|
70
|
-
size: "md"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
var Button = React.forwardRef(
|
|
75
|
-
({
|
|
76
|
-
className,
|
|
77
|
-
variant,
|
|
78
|
-
size,
|
|
79
|
-
tone,
|
|
80
|
-
loading = false,
|
|
81
|
-
fullWidth,
|
|
82
|
-
leadingIcon,
|
|
83
|
-
trailingIcon,
|
|
84
|
-
asChild = false,
|
|
85
|
-
disabled,
|
|
86
|
-
children,
|
|
87
|
-
...props
|
|
88
|
-
}, ref) => {
|
|
89
|
-
const sharedProps = {
|
|
90
|
-
className: cn(
|
|
91
|
-
buttonVariants({ variant, size, fullWidth }),
|
|
92
|
-
tone ? toneClasses[tone] : "",
|
|
93
|
-
className
|
|
94
|
-
),
|
|
95
|
-
"data-tone": tone,
|
|
96
|
-
...variant === "glass" && { "data-material": "glass", "data-glass-thickness": "thin" },
|
|
97
|
-
...props
|
|
98
|
-
};
|
|
99
|
-
if (asChild) {
|
|
100
|
-
return /* @__PURE__ */ jsx(Slot, { ref, ...sharedProps, children });
|
|
101
|
-
}
|
|
102
|
-
return /* @__PURE__ */ jsxs("button", { ref, disabled: disabled ?? loading, ...sharedProps, children: [
|
|
103
|
-
loading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) : leadingIcon,
|
|
104
|
-
children,
|
|
105
|
-
!loading && trailingIcon
|
|
106
|
-
] });
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
Button.displayName = "Button";
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
buttonVariants,
|
|
113
|
-
Button
|
|
114
|
-
};
|