@vlrc-fe/components 2.7.0 → 2.8.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/CHANGELOG.md +25 -0
- package/dist/ConfirmModal.d.ts +2 -3
- package/dist/ConfirmModal.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
- package/dist/DataTable/components/DataTablePagination.d.ts.map +1 -1
- package/dist/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown/types.d.ts +1 -1
- package/dist/Dropdown/types.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts +2 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +7 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/types.d.ts +5 -0
- package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
- package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
- package/dist/Form/FormNumberInput/useFormNumberInput.d.ts +2 -2
- package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
- package/dist/Form/FormSelect/FormSelect.d.ts.map +1 -1
- package/dist/Form/FormSelect/types.d.ts +1 -1
- package/dist/Form/FormSelect/types.d.ts.map +1 -1
- package/dist/Form/FormSelect/useFormSelect.d.ts +1 -1
- package/dist/Form/FormSelect/useFormSelect.d.ts.map +1 -1
- package/dist/MultiSelect/MultiSelect.d.ts +3 -31
- package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/renderers.d.ts.map +1 -1
- package/dist/MultiSelect/type.d.ts +1 -0
- package/dist/MultiSelect/type.d.ts.map +1 -1
- package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
- package/dist/Select/BaseSelect.d.ts.map +1 -1
- package/dist/Select/MultiSelectTags.d.ts.map +1 -1
- package/dist/Select/type.d.ts +1 -1
- package/dist/Select/type.d.ts.map +1 -1
- package/dist/Typography/Code.d.ts.map +1 -1
- package/dist/Typography/Link.d.ts.map +1 -1
- package/dist/Typography/Paragraph.d.ts.map +1 -1
- package/dist/Typography/Text.d.ts.map +1 -1
- package/dist/Typography/Title.d.ts.map +1 -1
- package/dist/Typography/types.d.ts +37 -1
- package/dist/Typography/types.d.ts.map +1 -1
- package/dist/Typography/utils.d.ts +3 -2
- package/dist/Typography/utils.d.ts.map +1 -1
- package/dist/assets/stylex.css +36 -24
- package/dist/index.cjs +1 -1
- package/dist/index.js +108 -108
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +18 -55
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +89 -89
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +29 -29
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +128 -124
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +16 -16
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +2 -2
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +114 -117
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +95 -92
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +41 -41
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +36 -164
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +128 -120
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +151 -151
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +96 -91
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +18 -18
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +2 -2
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +15 -15
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +147 -103
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +10 -10
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +31 -31
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +3 -3
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +2 -2
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +53 -49
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +35 -38
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +114 -107
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +8 -8
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +53 -53
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +130 -102
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +134 -130
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +7 -7
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +95 -95
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +2 -2
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +113 -99
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +8 -8
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +16 -16
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +20 -20
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +154 -80
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +2 -2
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +24 -24
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +2 -2
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +15 -15
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +3 -3
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +2 -2
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +88 -88
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +64 -64
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +116 -63
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +9 -9
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +41 -41
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +73 -73
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +34 -34
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +8 -8
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +30 -30
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +21 -21
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +60 -91
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +59 -59
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +2 -2
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +50 -50
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +11 -11
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +1 -1
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +33 -33
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +11 -11
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +2 -2
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +7 -7
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +74 -65
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +122 -15
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +9 -9
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +7 -7
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +12 -12
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +15 -15
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +13 -13
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +2 -2
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +140 -115
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +4 -4
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +47 -47
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +15 -268
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +36 -25
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +4 -4
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -8
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +5 -15
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +5 -20
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +5 -16
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +8 -5
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +11 -281
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +7 -4
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +12 -6
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +6 -5
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +6 -5
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +6 -7
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +10 -68
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +9 -10
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +5 -201
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +7 -123
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +7 -31
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +26 -11
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +66 -17
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +8 -68
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +13 -13
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +6 -6
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +15 -278
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +171 -126
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +21 -19
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +16 -8
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +123 -13
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +19 -7
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +29 -26
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +8 -6
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +9 -9
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +13 -8
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +9 -4
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +9 -6
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +4 -6
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +42 -9
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +386 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +37 -14
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +22 -10
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +367 -59
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +57 -9
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +39 -4
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +116 -35
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +85 -387
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +87 -35
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +116 -18
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +97 -55
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +154 -37
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +76 -121
- package/dist/index229.cjs +9 -1
- package/dist/index229.js +588 -77
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +212 -29
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +64 -68
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +42 -115
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +65 -98
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +48 -149
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +98 -68
- package/dist/index235.cjs +1 -9
- package/dist/index235.js +214 -580
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +29 -66
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +23 -40
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +55 -59
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +419 -46
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +200 -312
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +30 -97
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +205 -196
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +228 -124
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +161 -86
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +89 -143
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +140 -76
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +92 -84
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +84 -26
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +26 -35
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +39 -86
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +84 -231
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +234 -44
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +39 -26
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +30 -14
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +14 -13
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +13 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +4 -87
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +83 -174
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +66 -142
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +217 -62
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +135 -47
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +47 -260
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +273 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +7 -4
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -503
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +472 -177
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +205 -23
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +21 -1008
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1014 -21
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +22 -207
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +181 -130
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +132 -99
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +123 -19
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +17 -79
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +75 -90
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +91 -9
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +12 -91
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +62 -5
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +92 -31
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +29 -208
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +123 -99
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +17 -17
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +28 -28
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +30 -30
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +11 -11
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +22 -28
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +20 -20
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +7 -7
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +28 -28
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +28 -61
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +60 -15
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/calendar.d.ts +1 -1
- package/dist/ui/calendar.d.ts.map +1 -1
- package/dist/ui/command.d.ts +1 -1
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/editable.d.ts.map +1 -1
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/item.d.ts.map +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/pagination.d.ts +3 -1
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/useBreakpoint.d.ts +0 -4
- package/dist/ui/useBreakpoint.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index242.cjs +0 -1
- package/dist/index242.js +0 -25
- package/dist/index243.cjs +0 -1
- package/dist/index243.js +0 -26
- package/dist/index244.cjs +0 -1
- package/dist/index244.js +0 -63
- package/dist/index245.cjs +0 -1
- package/dist/index245.js +0 -422
- package/dist/index246.cjs +0 -1
- package/dist/index246.js +0 -25
- package/dist/index247.cjs +0 -1
- package/dist/index247.js +0 -209
package/dist/index153.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Text as e } from "./
|
|
2
|
-
import { Flex as t } from "./
|
|
3
|
-
import * as n from "react";
|
|
1
|
+
import { Text as e } from "./index14.js";
|
|
2
|
+
import { Flex as t } from "./index26.js";
|
|
4
3
|
import "@stylexjs/stylex";
|
|
5
|
-
import { Minus as
|
|
6
|
-
import { jsx as
|
|
4
|
+
import { Minus as n, TrendingDown as r, TrendingUp as i } from "lucide-react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import * as s from "react";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
// src/ui/stat.tsx
|
|
9
9
|
var l = {
|
|
@@ -54,7 +54,7 @@ var l = {
|
|
|
54
54
|
kMwMTN: "xw3nh4a",
|
|
55
55
|
$$css: !0
|
|
56
56
|
}
|
|
57
|
-
}, u =
|
|
57
|
+
}, u = s.forwardRef(({ bordered: e = !0, sx: n, className: r, children: i, ...o }, s) => /* @__PURE__ */ a(t, {
|
|
58
58
|
ref: s,
|
|
59
59
|
vertical: !0,
|
|
60
60
|
gap: "xs",
|
|
@@ -65,34 +65,34 @@ var l = {
|
|
|
65
65
|
n
|
|
66
66
|
],
|
|
67
67
|
className: r,
|
|
68
|
-
...
|
|
68
|
+
...o,
|
|
69
69
|
children: i
|
|
70
70
|
}));
|
|
71
71
|
u.displayName = "Stat";
|
|
72
|
-
var d =
|
|
73
|
-
let r = c(13), i,
|
|
74
|
-
r[0] === e ? (i = r[1],
|
|
72
|
+
var d = s.forwardRef((e, n) => {
|
|
73
|
+
let r = c(13), i, o, s, u;
|
|
74
|
+
r[0] === e ? (i = r[1], o = r[2], s = r[3], u = r[4]) : ({sx: u, className: o, children: i, ...s} = e, r[0] = e, r[1] = i, r[2] = o, r[3] = s, r[4] = u);
|
|
75
75
|
let d;
|
|
76
76
|
r[5] === u ? d = r[6] : (d = [l.header, u], r[5] = u, r[6] = d);
|
|
77
77
|
let f;
|
|
78
|
-
return r[7] !== i || r[8] !==
|
|
78
|
+
return r[7] !== i || r[8] !== o || r[9] !== s || r[10] !== n || r[11] !== d ? (f = /* @__PURE__ */ a(t, {
|
|
79
79
|
ref: n,
|
|
80
80
|
align: "center",
|
|
81
81
|
justify: "space-between",
|
|
82
82
|
gap: "sm",
|
|
83
83
|
"data-slot": "stat-header",
|
|
84
84
|
sx: d,
|
|
85
|
-
className:
|
|
85
|
+
className: o,
|
|
86
86
|
...s,
|
|
87
87
|
children: i
|
|
88
|
-
}), r[7] = i, r[8] =
|
|
88
|
+
}), r[7] = i, r[8] = o, r[9] = s, r[10] = n, r[11] = d, r[12] = f) : f = r[12], f;
|
|
89
89
|
});
|
|
90
90
|
d.displayName = "StatHeader";
|
|
91
|
-
var f =
|
|
92
|
-
let r = c(11), i,
|
|
93
|
-
r[0] === t ? (i = r[1],
|
|
91
|
+
var f = s.forwardRef((t, n) => {
|
|
92
|
+
let r = c(11), i, o, s, l;
|
|
93
|
+
r[0] === t ? (i = r[1], o = r[2], s = r[3], l = r[4]) : ({sx: l, className: o, children: i, ...s} = t, r[0] = t, r[1] = i, r[2] = o, r[3] = s, r[4] = l);
|
|
94
94
|
let u;
|
|
95
|
-
return r[5] !== i || r[6] !==
|
|
95
|
+
return r[5] !== i || r[6] !== o || r[7] !== s || r[8] !== n || r[9] !== l ? (u = /* @__PURE__ */ a(e, {
|
|
96
96
|
ref: n,
|
|
97
97
|
as: "span",
|
|
98
98
|
type: "secondary",
|
|
@@ -100,33 +100,33 @@ var f = n.forwardRef((t, n) => {
|
|
|
100
100
|
weight: "medium",
|
|
101
101
|
"data-slot": "stat-label",
|
|
102
102
|
sx: l,
|
|
103
|
-
className:
|
|
103
|
+
className: o,
|
|
104
104
|
...s,
|
|
105
105
|
children: i
|
|
106
|
-
}), r[5] = i, r[6] =
|
|
106
|
+
}), r[5] = i, r[6] = o, r[7] = s, r[8] = n, r[9] = l, r[10] = u) : u = r[10], u;
|
|
107
107
|
});
|
|
108
108
|
f.displayName = "StatLabel";
|
|
109
|
-
var p =
|
|
110
|
-
let r = c(13), i,
|
|
111
|
-
r[0] === t ? (i = r[1],
|
|
109
|
+
var p = s.forwardRef((t, n) => {
|
|
110
|
+
let r = c(13), i, o, s, u;
|
|
111
|
+
r[0] === t ? (i = r[1], o = r[2], s = r[3], u = r[4]) : ({sx: u, className: o, children: i, ...s} = t, r[0] = t, r[1] = i, r[2] = o, r[3] = s, r[4] = u);
|
|
112
112
|
let d;
|
|
113
113
|
r[5] === u ? d = r[6] : (d = [l.value, u], r[5] = u, r[6] = d);
|
|
114
114
|
let f;
|
|
115
|
-
return r[7] !== i || r[8] !==
|
|
115
|
+
return r[7] !== i || r[8] !== o || r[9] !== s || r[10] !== n || r[11] !== d ? (f = /* @__PURE__ */ a(e, {
|
|
116
116
|
ref: n,
|
|
117
117
|
weight: "bold",
|
|
118
118
|
size: "xxl",
|
|
119
119
|
"data-slot": "stat-value",
|
|
120
120
|
sx: d,
|
|
121
|
-
className:
|
|
121
|
+
className: o,
|
|
122
122
|
...s,
|
|
123
123
|
children: i
|
|
124
|
-
}), r[7] = i, r[8] =
|
|
124
|
+
}), r[7] = i, r[8] = o, r[9] = s, r[10] = n, r[11] = d, r[12] = f) : f = r[12], f;
|
|
125
125
|
});
|
|
126
126
|
p.displayName = "StatValue";
|
|
127
|
-
var m =
|
|
128
|
-
let m = e === "neutral" ? l.trendNeutral : !
|
|
129
|
-
return /* @__PURE__ */
|
|
127
|
+
var m = s.forwardRef(({ direction: e = "neutral", inverted: s = !1, sx: c, className: u, children: d, ...f }, p) => {
|
|
128
|
+
let m = e === "neutral" ? l.trendNeutral : !s && e === "up" || s && e === "down" ? l.trendPositive : l.trendNegative, h = e === "up" ? i : e === "down" ? r : n;
|
|
129
|
+
return /* @__PURE__ */ o(t, {
|
|
130
130
|
ref: p,
|
|
131
131
|
inline: !0,
|
|
132
132
|
align: "center",
|
|
@@ -140,46 +140,46 @@ var m = n.forwardRef(({ direction: e = "neutral", inverted: n = !1, sx: c, class
|
|
|
140
140
|
],
|
|
141
141
|
className: u,
|
|
142
142
|
...f,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ a(h, {
|
|
144
144
|
"data-slot": "stat-trend-icon",
|
|
145
145
|
className: "xcdlrvm x1l36t39 x2lah0s"
|
|
146
146
|
}), d]
|
|
147
147
|
});
|
|
148
148
|
});
|
|
149
149
|
m.displayName = "StatTrend";
|
|
150
|
-
var h =
|
|
151
|
-
let r = c(11), i,
|
|
152
|
-
r[0] === t ? (i = r[1],
|
|
150
|
+
var h = s.forwardRef((t, n) => {
|
|
151
|
+
let r = c(11), i, o, s, l;
|
|
152
|
+
r[0] === t ? (i = r[1], o = r[2], s = r[3], l = r[4]) : ({sx: l, className: o, children: i, ...s} = t, r[0] = t, r[1] = i, r[2] = o, r[3] = s, r[4] = l);
|
|
153
153
|
let u;
|
|
154
|
-
return r[5] !== i || r[6] !==
|
|
154
|
+
return r[5] !== i || r[6] !== o || r[7] !== s || r[8] !== n || r[9] !== l ? (u = /* @__PURE__ */ a(e, {
|
|
155
155
|
ref: n,
|
|
156
156
|
as: "p",
|
|
157
157
|
type: "secondary",
|
|
158
158
|
size: "xs",
|
|
159
159
|
"data-slot": "stat-description",
|
|
160
160
|
sx: l,
|
|
161
|
-
className:
|
|
161
|
+
className: o,
|
|
162
162
|
...s,
|
|
163
163
|
children: i
|
|
164
|
-
}), r[5] = i, r[6] =
|
|
164
|
+
}), r[5] = i, r[6] = o, r[7] = s, r[8] = n, r[9] = l, r[10] = u) : u = r[10], u;
|
|
165
165
|
});
|
|
166
166
|
h.displayName = "StatDescription";
|
|
167
|
-
var g =
|
|
168
|
-
let r = c(13), i,
|
|
169
|
-
r[0] === e ? (i = r[1],
|
|
167
|
+
var g = s.forwardRef((e, n) => {
|
|
168
|
+
let r = c(13), i, o, s, u;
|
|
169
|
+
r[0] === e ? (i = r[1], o = r[2], s = r[3], u = r[4]) : ({sx: u, className: o, children: i, ...s} = e, r[0] = e, r[1] = i, r[2] = o, r[3] = s, r[4] = u);
|
|
170
170
|
let d;
|
|
171
171
|
r[5] === u ? d = r[6] : (d = [l.indicatorWrapper, u], r[5] = u, r[6] = d);
|
|
172
172
|
let f;
|
|
173
|
-
return r[7] !== i || r[8] !==
|
|
173
|
+
return r[7] !== i || r[8] !== o || r[9] !== s || r[10] !== n || r[11] !== d ? (f = /* @__PURE__ */ a(t, {
|
|
174
174
|
ref: n,
|
|
175
175
|
align: "center",
|
|
176
176
|
justify: "center",
|
|
177
177
|
"data-slot": "stat-indicator",
|
|
178
178
|
sx: d,
|
|
179
|
-
className:
|
|
179
|
+
className: o,
|
|
180
180
|
...s,
|
|
181
181
|
children: i
|
|
182
|
-
}), r[7] = i, r[8] =
|
|
182
|
+
}), r[7] = i, r[8] = o, r[9] = s, r[10] = n, r[11] = d, r[12] = f) : f = r[12], f;
|
|
183
183
|
});
|
|
184
184
|
g.displayName = "StatIndicator";
|
|
185
185
|
export { u as Stat, h as StatDescription, d as StatHeader, g as StatIndicator, f as StatLabel, m as StatTrend, p as StatValue };
|
package/dist/index154.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./index2.cjs"),t=require("./index13.cjs"),n=require("./index24.cjs");let r=require("react"),i=e.__toESM(r,1);r=e.__toESM(r);let a=require("@stylexjs/stylex");a=e.__toESM(a,1);let o=require("react/jsx-runtime"),s=require("react/compiler-runtime");var c=i.createContext(null);function l(e){let t=i.useContext(c);if(!t)throw Error(`${e} must be used within a Stepper`);return t}var u=i.createContext(null);function d(e){let t=i.useContext(u);if(!t)throw Error(`${e} must be used within a StepperItem`);return t}var f={root:{k1xSpc:`x78zum5`,kzqmXN:`xh8yej3`,$$css:!0},rootVertical:{kXwgrk:`xdt5ytf`,kOIVth:`x1b1hbqf`,$$css:!0},rootHorizontal:{kXwgrk:`xdt5ytf`,kOIVth:`x1oqwmkw`,$$css:!0},list:{k1xSpc:`x78zum5`,kzqmXN:`xh8yej3`,kGNEyG:`x6s0dn4`,$$css:!0},listHorizontal:{kXwgrk:`x1q0g3np`,$$css:!0},listVertical:{kXwgrk:`xdt5ytf`,kGNEyG:`x1qjc9v5`,kOIVth:`xxhr3t`,$$css:!0},item:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kVAEAm:`x1n2onr6`,$$css:!0},itemHorizontal:{kUk6DE:`x98rzlu`,kXwgrk:`x1q0g3np`,$$css:!0},itemVertical:{kzqmXN:`xh8yej3`,kXwgrk:`xdt5ytf`,kGNEyG:`x1cy8zhl`,$$css:!0},trigger:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`xdkmor2`,kWkggS:`xjbqb8w`,kMzoRj:`xc342km`,kmVPX3:`x148pnnd`,kaIpWk:`xsda711`,kkrTdU:`x1ypdohk`,kI3sdo:`x1a2a7pz`,k9WMMc:`xdpxx8g`,k1ekBW:`xnpjden`,kIyJzY:`xx6bhzk`,kEtg5x:`xw5q27k`,$$css:!0},triggerDisabled:{kkrTdU:`x1h6gzvc`,kSiTet:`xbyyjgo`,$$css:!0},indicator:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kzqmXN:`xs5h3dt`,kZKoxP:`xettwda`,kaIpWk:`x7xypw4`,kGuDYH:`xkpwil5`,k63SB2:`x1s688f`,kmuXW:`x2lah0s`,kMzoRj:`xdh2fpr`,ksu8eU:`x1y0btm7`,k1ekBW:`x1eaenvl`,kIyJzY:`xx6bhzk`,$$css:!0},indicatorInactive:{kWkggS:`x1mlyrtw`,kVAM5u:`xb30jbz`,kMwMTN:`xw3nh4a`,$$css:!0},indicatorActive:{kWkggS:`x1mlyrtw`,kVAM5u:`x1khvrlk`,kMwMTN:`x6gpbkk`,kGVxlE:`x3c7tb4`,$$css:!0},indicatorCompleted:{kWkggS:`x1j7ufkg`,kVAM5u:`x1khvrlk`,kMwMTN:`xstwp1q`,$$css:!0},separator:{kWkggS:`xwefxjc`,k1ekBW:`x15406qy`,kIyJzY:`xx6bhzk`,$$css:!0},separatorCompleted:{kWkggS:`x1j7ufkg`,$$css:!0},separatorHorizontal:{kUk6DE:`x98rzlu`,kZKoxP:`x36qwtl`,kUOVxO:`xaex8be`,k7Eaqz:`xgomdpo`,$$css:!0},separatorVertical:{kzqmXN:`xfo62xy`,kAzted:`x1in32aq`,kZKoxP:`x5yr21d`,koQZXg:`xpek4lm`,kqGvvJ:`x10im51j`,$$css:!0},content:{kzqmXN:`xh8yej3`,k8WAf4:`xuv7m44`,$$css:!0},textWrapper:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x1cy8zhl`,kOIVth:`x195vfkc`,$$css:!0},title:{k1xSpc:`x1lliihq`,kGuDYH:`xkpwil5`,k63SB2:`x1s688f`,kLWn49:`x132q4wb`,kMwMTN:`x84br7x`,$$css:!0},titleInactive:{kMwMTN:`xw3nh4a`,$$css:!0},description:{k1xSpc:`x1lliihq`,kGuDYH:`xboafo0`,kLWn49:`x132q4wb`,keoZOQ:`xr9ek0c`,kMwMTN:`xw3nh4a`,$$css:!0}};function p({className:e,value:t,defaultValue:n=``,onValueChange:r,orientation:s=`horizontal`,linear:l=!0,onValidateStep:u,sx:d,children:p,...m}){let[h,g]=i.useState(n),[_,v]=i.useState([]),y=t===void 0?h:t,b=i.useCallback(e=>{v(t=>t.includes(e)?t:[...t,e])},[]),x=i.useCallback(e=>{v(t=>t.filter(t=>t!==e))},[]),S=i.useCallback(async e=>e===y?!0:u&&!await u(y,e)?!1:(t===void 0&&g(e),r?.(e),!0),[y,t,u,r]);i.useEffect(()=>{!y&&_.length>0&&_[0]&&S(_[0])},[y,_,S]);let C=i.useMemo(()=>({value:y,setValue:S,orientation:s,linear:l,stepKeys:_,registerStep:b,unregisterStep:x}),[y,S,s,l,_,b,x]),w=s===`vertical`?f.rootVertical:f.rootHorizontal,T=a.props(f.root,w,d);return(0,o.jsx)(c.Provider,{value:C,children:(0,o.jsx)(`div`,{"data-slot":`stepper`,"data-orientation":s,...T,className:e?`${T.className||``} ${e}`.trim():T.className,...m,children:p})})}function m(e){let t=(0,s.c)(17),n,r,i,c;t[0]===e?(n=t[1],r=t[2],i=t[3],c=t[4]):({className:r,sx:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c);let{orientation:u}=l(`StepperList`),d=u===`vertical`?f.listVertical:f.listHorizontal,p;t[5]!==d||t[6]!==c?(p=a.props(f.list,d,c),t[5]=d,t[6]=c,t[7]=p):p=t[7];let m=p,h;t[8]!==r||t[9]!==m.className?(h=r?`${m.className||``} ${r}`.trim():m.className,t[8]=r,t[9]=m.className,t[10]=h):h=t[10];let g;return t[11]!==n||t[12]!==u||t[13]!==i||t[14]!==m||t[15]!==h?(g=(0,o.jsx)(`div`,{role:`tablist`,"aria-orientation":u,"data-slot":`stepper-list`,...m,className:h,...i,children:n}),t[11]=n,t[12]=u,t[13]=i,t[14]=m,t[15]=h,t[16]=g):g=t[16],g}function h({className:e,value:t,completed:n,disabled:r=!1,sx:s,children:c,...d}){let{value:p,stepKeys:m,registerStep:h,unregisterStep:g,linear:_,orientation:v}=l(`StepperItem`);i.useEffect(()=>(h(t),()=>g(t)),[t,h,g]);let y=m.indexOf(t),b=m.indexOf(p),x=i.useMemo(()=>n?`completed`:t===p?`active`:b>y&&b!==-1?`completed`:`inactive`,[n,t,p,b,y]),S=r||_&&x===`inactive`&&y>b+1,C=i.useMemo(()=>({value:t,stepIndex:y,status:x,disabled:S}),[t,y,x,S]),w=v===`vertical`?f.itemVertical:f.itemHorizontal,T=a.props(f.item,w,s);return(0,o.jsx)(u.Provider,{value:C,children:(0,o.jsx)(`div`,{"data-slot":`stepper-item`,"data-status":x,"data-disabled":S?``:void 0,...T,className:e?`${T.className||``} ${e}`.trim():T.className,...d,children:c})})}function g(e){let t=(0,s.c)(34),n,r,i,c,u,p;t[0]===e?(n=t[1],r=t[2],i=t[3],c=t[4],u=t[5],p=t[6]):({className:r,onClick:i,onKeyDown:c,sx:p,children:n,...u}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=u,t[6]=p);let{setValue:m,stepKeys:h,orientation:g}=l(`StepperTrigger`),{value:_,status:v,disabled:y,stepIndex:b}=d(`StepperTrigger`),x;t[7]!==y||t[8]!==i||t[9]!==m||t[10]!==_?(x=async e=>{i?.(e),!(e.defaultPrevented||y)&&await m(_)},t[7]=y,t[8]=i,t[9]=m,t[10]=_,t[11]=x):x=t[11];let S=x,C;t[12]!==c||t[13]!==g||t[14]!==m||t[15]!==b||t[16]!==h?(C=async e=>{if(c?.(e),e.defaultPrevented)return;let t=null,n=g===`horizontal`;n&&e.key===`ArrowRight`||!n&&e.key===`ArrowDown`?t=Math.min(b+1,h.length-1):n&&e.key===`ArrowLeft`||!n&&e.key===`ArrowUp`?t=Math.max(b-1,0):e.key===`Home`?t=0:e.key===`End`&&(t=h.length-1),t!==null&&h[t]&&(e.preventDefault(),await m(h[t]))},t[12]=c,t[13]=g,t[14]=m,t[15]=b,t[16]=h,t[17]=C):C=t[17];let w=C,T;t[18]!==y||t[19]!==p?(T=a.props(f.trigger,y&&f.triggerDisabled,p),t[18]=y,t[19]=p,t[20]=T):T=t[20];let E=T,D=v===`active`,O;t[21]!==r||t[22]!==E.className?(O=r?`${E.className||``} ${r}`.trim():E.className,t[21]=r,t[22]=E.className,t[23]=O):O=t[23];let k;return t[24]!==n||t[25]!==y||t[26]!==S||t[27]!==w||t[28]!==u||t[29]!==v||t[30]!==E||t[31]!==D||t[32]!==O?(k=(0,o.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":D,"data-slot":`stepper-trigger`,"data-status":v,disabled:y,onClick:S,onKeyDown:w,...E,className:O,...u,children:n}),t[24]=n,t[25]=y,t[26]=S,t[27]=w,t[28]=u,t[29]=v,t[30]=E,t[31]=D,t[32]=O,t[33]=k):k=t[33],k}function _(e){let t=(0,s.c)(23),n,r,i,c;t[0]===e?(n=t[1],r=t[2],i=t[3],c=t[4]):({className:r,sx:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c);let{status:l,stepIndex:u}=d(`StepperIndicator`),p=l===`completed`?f.indicatorCompleted:l===`active`?f.indicatorActive:f.indicatorInactive,m;t[5]!==p||t[6]!==c?(m=a.props(f.indicator,p,c),t[5]=p,t[6]=c,t[7]=m):m=t[7];let h=m,g;t[8]!==n||t[9]!==l||t[10]!==u?(g=()=>n||(l===`completed`?(0,o.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,o.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}):u+1),t[8]=n,t[9]=l,t[10]=u,t[11]=g):g=t[11];let _=g,v;t[12]!==r||t[13]!==h.className?(v=r?`${h.className||``} ${r}`.trim():h.className,t[12]=r,t[13]=h.className,t[14]=v):v=t[14];let y;t[15]===_?y=t[16]:(y=_(),t[15]=_,t[16]=y);let b;return t[17]!==i||t[18]!==l||t[19]!==h||t[20]!==v||t[21]!==y?(b=(0,o.jsx)(`div`,{"aria-hidden":`true`,"data-slot":`stepper-indicator`,"data-status":l,...h,className:v,...i,children:y}),t[17]=i,t[18]=l,t[19]=h,t[20]=v,t[21]=y,t[22]=b):b=t[22],b}function v({className:e,forceMount:t=!1,sx:n,...r}){let{orientation:i,stepKeys:s}=l(`StepperSeparator`),{status:c,stepIndex:u}=d(`StepperSeparator`);if(u>=s.length-1&&!t)return null;let p=c===`completed`,m=i===`vertical`?f.separatorVertical:f.separatorHorizontal,h=a.props(f.separator,m,p&&f.separatorCompleted,n);return(0,o.jsx)(`div`,{"aria-hidden":`true`,"data-slot":`stepper-separator`,"data-completed":p?``:void 0,...h,className:e?`${h.className||``} ${e}`.trim():h.className,...r})}function y(e){let n=(0,s.c)(16),r,i,c,l;n[0]===e?(r=n[1],i=n[2],c=n[3],l=n[4]):({className:i,sx:l,children:r,...c}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=c,n[4]=l);let{status:u}=d(`StepperTitle`),p;n[5]!==u||n[6]!==l?(p=a.props(f.title,u===`inactive`&&f.titleInactive,l),n[5]=u,n[6]=l,n[7]=p):p=n[7];let m=p,h;n[8]!==i||n[9]!==m.className?(h=i?`${m.className||``} ${i}`.trim():m.className,n[8]=i,n[9]=m.className,n[10]=h):h=n[10];let g;return n[11]!==r||n[12]!==c||n[13]!==m||n[14]!==h?(g=(0,o.jsx)(t.Text,{strong:!0,"data-slot":`stepper-title`,...m,className:h,...c,children:r}),n[11]=r,n[12]=c,n[13]=m,n[14]=h,n[15]=g):g=n[15],g}function b(e){let n=(0,s.c)(15),r,i,c,l;n[0]===e?(r=n[1],i=n[2],c=n[3],l=n[4]):({className:i,sx:l,children:r,...c}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=c,n[4]=l);let u;n[5]===l?u=n[6]:(u=a.props(f.description,l),n[5]=l,n[6]=u);let d=u,p;n[7]!==i||n[8]!==d.className?(p=i?`${d.className||``} ${i}`.trim():d.className,n[7]=i,n[8]=d.className,n[9]=p):p=n[9];let m;return n[10]!==r||n[11]!==c||n[12]!==d||n[13]!==p?(m=(0,o.jsx)(t.Text,{type:`secondary`,size:`xs`,"data-slot":`stepper-description`,...d,className:p,...c,children:r}),n[10]=r,n[11]=c,n[12]=d,n[13]=p,n[14]=m):m=n[14],m}function x({className:e,value:t,forceMount:n=!1,sx:r,children:i,...s}){let{value:c}=l(`StepperContent`);if(c!==t&&!n)return null;let u=a.props(f.content,r);return(0,o.jsx)(`div`,{role:`tabpanel`,"data-slot":`stepper-content`,...u,className:e?`${u.className||``} ${e}`.trim():u.className,...s,children:i})}function S({children:e=`Next`,onClick:t,disabled:r,...i}){let{value:a,stepKeys:s,setValue:c}=l(`StepperNext`),u=s.indexOf(a),d=u>=s.length-1,f=r||d;return(0,o.jsx)(n.Button,{type:`button`,"data-slot":`stepper-next`,disabled:f,onClick:async e=>{if(t?.(e),e.defaultPrevented||f)return;let n=s[u+1];n&&await c(n)},...i,children:e})}function C({children:e=`Previous`,onClick:t,disabled:r,...i}){let{value:a,stepKeys:s,setValue:c}=l(`StepperPrev`),u=s.indexOf(a),d=r||u<=0;return(0,o.jsx)(n.Button,{type:`button`,variant:`outline`,"data-slot":`stepper-prev`,disabled:d,onClick:async e=>{if(t?.(e),e.defaultPrevented||d)return;let n=s[u-1];n&&await c(n)},...i,children:e})}function w(e){let t=(0,s.c)(15),n,r,i,c;t[0]===e?(n=t[1],r=t[2],i=t[3],c=t[4]):({className:r,sx:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c);let l;t[5]===c?l=t[6]:(l=a.props(f.textWrapper,c),t[5]=c,t[6]=l);let u=l,d;t[7]!==r||t[8]!==u.className?(d=r?`${u.className||``} ${r}`.trim():u.className,t[7]=r,t[8]=u.className,t[9]=d):d=t[9];let p;return t[10]!==n||t[11]!==i||t[12]!==u||t[13]!==d?(p=(0,o.jsx)(`div`,{"data-slot":`stepper-text`,...u,className:d,...i,children:n}),t[10]=n,t[11]=i,t[12]=u,t[13]=d,t[14]=p):p=t[14],p}exports.Stepper=p,exports.StepperContent=x,exports.StepperDescription=b,exports.StepperIndicator=_,exports.StepperItem=h,exports.StepperList=m,exports.StepperNext=S,exports.StepperPrev=C,exports.StepperSeparator=v,exports.StepperText=w,exports.StepperTitle=y,exports.StepperTrigger=g;
|
|
1
|
+
const e=require("./index2.cjs"),t=require("./index14.cjs"),n=require("./index22.cjs");let r=require("@stylexjs/stylex");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("react"),o=e.__toESM(a,1);a=e.__toESM(a);let s=require("react/compiler-runtime");var c=o.createContext(null);function l(e){let t=o.useContext(c);if(!t)throw Error(`${e} must be used within a Stepper`);return t}var u=o.createContext(null);function d(e){let t=o.useContext(u);if(!t)throw Error(`${e} must be used within a StepperItem`);return t}var f={root:{k1xSpc:`x78zum5`,kzqmXN:`xh8yej3`,$$css:!0},rootVertical:{kXwgrk:`xdt5ytf`,kOIVth:`x1b1hbqf`,$$css:!0},rootHorizontal:{kXwgrk:`xdt5ytf`,kOIVth:`x1oqwmkw`,$$css:!0},list:{k1xSpc:`x78zum5`,kzqmXN:`xh8yej3`,kGNEyG:`x6s0dn4`,$$css:!0},listHorizontal:{kXwgrk:`x1q0g3np`,$$css:!0},listVertical:{kXwgrk:`xdt5ytf`,kGNEyG:`x1qjc9v5`,kOIVth:`xxhr3t`,$$css:!0},item:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kVAEAm:`x1n2onr6`,$$css:!0},itemHorizontal:{kUk6DE:`x98rzlu`,kXwgrk:`x1q0g3np`,$$css:!0},itemVertical:{kzqmXN:`xh8yej3`,kXwgrk:`xdt5ytf`,kGNEyG:`x1cy8zhl`,$$css:!0},trigger:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`xdkmor2`,kWkggS:`xjbqb8w`,kMzoRj:`xc342km`,kmVPX3:`x148pnnd`,kaIpWk:`xsda711`,kkrTdU:`x1ypdohk`,kI3sdo:`x1a2a7pz`,k9WMMc:`xdpxx8g`,k1ekBW:`xnpjden`,kIyJzY:`xx6bhzk`,kEtg5x:`xw5q27k`,$$css:!0},triggerDisabled:{kkrTdU:`x1h6gzvc`,kSiTet:`xbyyjgo`,$$css:!0},indicator:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kzqmXN:`xs5h3dt`,kZKoxP:`xettwda`,kaIpWk:`x7xypw4`,kGuDYH:`xkpwil5`,k63SB2:`x1s688f`,kmuXW:`x2lah0s`,kMzoRj:`xdh2fpr`,ksu8eU:`x1y0btm7`,k1ekBW:`x1eaenvl`,kIyJzY:`xx6bhzk`,$$css:!0},indicatorInactive:{kWkggS:`x1mlyrtw`,kVAM5u:`xb30jbz`,kMwMTN:`xw3nh4a`,$$css:!0},indicatorActive:{kWkggS:`x1mlyrtw`,kVAM5u:`x1khvrlk`,kMwMTN:`x6gpbkk`,kGVxlE:`x3c7tb4`,$$css:!0},indicatorCompleted:{kWkggS:`x1j7ufkg`,kVAM5u:`x1khvrlk`,kMwMTN:`xstwp1q`,$$css:!0},separator:{kWkggS:`xwefxjc`,k1ekBW:`x15406qy`,kIyJzY:`xx6bhzk`,$$css:!0},separatorCompleted:{kWkggS:`x1j7ufkg`,$$css:!0},separatorHorizontal:{kUk6DE:`x98rzlu`,kZKoxP:`x36qwtl`,kUOVxO:`xaex8be`,k7Eaqz:`xgomdpo`,$$css:!0},separatorVertical:{kzqmXN:`xfo62xy`,kAzted:`x1in32aq`,kZKoxP:`x5yr21d`,koQZXg:`xpek4lm`,kqGvvJ:`x10im51j`,$$css:!0},content:{kzqmXN:`xh8yej3`,k8WAf4:`xuv7m44`,$$css:!0},textWrapper:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x1cy8zhl`,kOIVth:`x195vfkc`,$$css:!0},title:{k1xSpc:`x1lliihq`,kGuDYH:`xkpwil5`,k63SB2:`x1s688f`,kLWn49:`x132q4wb`,kMwMTN:`x84br7x`,$$css:!0},titleInactive:{kMwMTN:`xw3nh4a`,$$css:!0},description:{k1xSpc:`x1lliihq`,kGuDYH:`xboafo0`,kLWn49:`x132q4wb`,keoZOQ:`xr9ek0c`,kMwMTN:`xw3nh4a`,$$css:!0}};function p({className:e,value:t,defaultValue:n=``,onValueChange:a,orientation:s=`horizontal`,linear:l=!0,onValidateStep:u,sx:d,children:p,...m}){let[h,g]=o.useState(n),[_,v]=o.useState([]),y=t===void 0?h:t,b=o.useCallback(e=>{v(t=>t.includes(e)?t:[...t,e])},[]),x=o.useCallback(e=>{v(t=>t.filter(t=>t!==e))},[]),S=o.useCallback(async e=>e===y?!0:u&&!await u(y,e)?!1:(t===void 0&&g(e),a?.(e),!0),[y,t,u,a]);o.useEffect(()=>{!y&&_.length>0&&_[0]&&S(_[0])},[y,_,S]);let C=o.useMemo(()=>({value:y,setValue:S,orientation:s,linear:l,stepKeys:_,registerStep:b,unregisterStep:x}),[y,S,s,l,_,b,x]),w=s===`vertical`?f.rootVertical:f.rootHorizontal,T=r.props(f.root,w,d);return(0,i.jsx)(c.Provider,{value:C,children:(0,i.jsx)(`div`,{"data-slot":`stepper`,"data-orientation":s,...T,className:e?`${T.className||``} ${e}`.trim():T.className,...m,children:p})})}function m(e){let t=(0,s.c)(17),n,a,o,c;t[0]===e?(n=t[1],a=t[2],o=t[3],c=t[4]):({className:a,sx:c,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=o,t[4]=c);let{orientation:u}=l(`StepperList`),d=u===`vertical`?f.listVertical:f.listHorizontal,p;t[5]!==d||t[6]!==c?(p=r.props(f.list,d,c),t[5]=d,t[6]=c,t[7]=p):p=t[7];let m=p,h;t[8]!==a||t[9]!==m.className?(h=a?`${m.className||``} ${a}`.trim():m.className,t[8]=a,t[9]=m.className,t[10]=h):h=t[10];let g;return t[11]!==n||t[12]!==u||t[13]!==o||t[14]!==m||t[15]!==h?(g=(0,i.jsx)(`div`,{role:`tablist`,"aria-orientation":u,"data-slot":`stepper-list`,...m,className:h,...o,children:n}),t[11]=n,t[12]=u,t[13]=o,t[14]=m,t[15]=h,t[16]=g):g=t[16],g}function h({className:e,value:t,completed:n,disabled:a=!1,sx:s,children:c,...d}){let{value:p,stepKeys:m,registerStep:h,unregisterStep:g,linear:_,orientation:v}=l(`StepperItem`);o.useEffect(()=>(h(t),()=>g(t)),[t,h,g]);let y=m.indexOf(t),b=m.indexOf(p),x=o.useMemo(()=>n?`completed`:t===p?`active`:b>y&&b!==-1?`completed`:`inactive`,[n,t,p,b,y]),S=a||_&&x===`inactive`&&y>b+1,C=o.useMemo(()=>({value:t,stepIndex:y,status:x,disabled:S}),[t,y,x,S]),w=v===`vertical`?f.itemVertical:f.itemHorizontal,T=r.props(f.item,w,s);return(0,i.jsx)(u.Provider,{value:C,children:(0,i.jsx)(`div`,{"data-slot":`stepper-item`,"data-status":x,"data-disabled":S?``:void 0,...T,className:e?`${T.className||``} ${e}`.trim():T.className,...d,children:c})})}function g(e){let t=(0,s.c)(34),n,a,o,c,u,p;t[0]===e?(n=t[1],a=t[2],o=t[3],c=t[4],u=t[5],p=t[6]):({className:a,onClick:o,onKeyDown:c,sx:p,children:n,...u}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=o,t[4]=c,t[5]=u,t[6]=p);let{setValue:m,stepKeys:h,orientation:g}=l(`StepperTrigger`),{value:_,status:v,disabled:y,stepIndex:b}=d(`StepperTrigger`),x;t[7]!==y||t[8]!==o||t[9]!==m||t[10]!==_?(x=async e=>{o?.(e),!(e.defaultPrevented||y)&&await m(_)},t[7]=y,t[8]=o,t[9]=m,t[10]=_,t[11]=x):x=t[11];let S=x,C;t[12]!==c||t[13]!==g||t[14]!==m||t[15]!==b||t[16]!==h?(C=async e=>{if(c?.(e),e.defaultPrevented)return;let t=null,n=g===`horizontal`;n&&e.key===`ArrowRight`||!n&&e.key===`ArrowDown`?t=Math.min(b+1,h.length-1):n&&e.key===`ArrowLeft`||!n&&e.key===`ArrowUp`?t=Math.max(b-1,0):e.key===`Home`?t=0:e.key===`End`&&(t=h.length-1),t!==null&&h[t]&&(e.preventDefault(),await m(h[t]))},t[12]=c,t[13]=g,t[14]=m,t[15]=b,t[16]=h,t[17]=C):C=t[17];let w=C,T;t[18]!==y||t[19]!==p?(T=r.props(f.trigger,y&&f.triggerDisabled,p),t[18]=y,t[19]=p,t[20]=T):T=t[20];let E=T,D=v===`active`,O;t[21]!==a||t[22]!==E.className?(O=a?`${E.className||``} ${a}`.trim():E.className,t[21]=a,t[22]=E.className,t[23]=O):O=t[23];let k;return t[24]!==n||t[25]!==y||t[26]!==S||t[27]!==w||t[28]!==u||t[29]!==v||t[30]!==E||t[31]!==D||t[32]!==O?(k=(0,i.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":D,"data-slot":`stepper-trigger`,"data-status":v,disabled:y,onClick:S,onKeyDown:w,...E,className:O,...u,children:n}),t[24]=n,t[25]=y,t[26]=S,t[27]=w,t[28]=u,t[29]=v,t[30]=E,t[31]=D,t[32]=O,t[33]=k):k=t[33],k}function _(e){let t=(0,s.c)(23),n,a,o,c;t[0]===e?(n=t[1],a=t[2],o=t[3],c=t[4]):({className:a,sx:c,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=o,t[4]=c);let{status:l,stepIndex:u}=d(`StepperIndicator`),p=l===`completed`?f.indicatorCompleted:l===`active`?f.indicatorActive:f.indicatorInactive,m;t[5]!==p||t[6]!==c?(m=r.props(f.indicator,p,c),t[5]=p,t[6]=c,t[7]=m):m=t[7];let h=m,g;t[8]!==n||t[9]!==l||t[10]!==u?(g=()=>n||(l===`completed`?(0,i.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,i.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}):u+1),t[8]=n,t[9]=l,t[10]=u,t[11]=g):g=t[11];let _=g,v;t[12]!==a||t[13]!==h.className?(v=a?`${h.className||``} ${a}`.trim():h.className,t[12]=a,t[13]=h.className,t[14]=v):v=t[14];let y;t[15]===_?y=t[16]:(y=_(),t[15]=_,t[16]=y);let b;return t[17]!==o||t[18]!==l||t[19]!==h||t[20]!==v||t[21]!==y?(b=(0,i.jsx)(`div`,{"aria-hidden":`true`,"data-slot":`stepper-indicator`,"data-status":l,...h,className:v,...o,children:y}),t[17]=o,t[18]=l,t[19]=h,t[20]=v,t[21]=y,t[22]=b):b=t[22],b}function v({className:e,forceMount:t=!1,sx:n,...a}){let{orientation:o,stepKeys:s}=l(`StepperSeparator`),{status:c,stepIndex:u}=d(`StepperSeparator`);if(u>=s.length-1&&!t)return null;let p=c===`completed`,m=o===`vertical`?f.separatorVertical:f.separatorHorizontal,h=r.props(f.separator,m,p&&f.separatorCompleted,n);return(0,i.jsx)(`div`,{"aria-hidden":`true`,"data-slot":`stepper-separator`,"data-completed":p?``:void 0,...h,className:e?`${h.className||``} ${e}`.trim():h.className,...a})}function y(e){let n=(0,s.c)(16),a,o,c,l;n[0]===e?(a=n[1],o=n[2],c=n[3],l=n[4]):({className:o,sx:l,children:a,...c}=e,n[0]=e,n[1]=a,n[2]=o,n[3]=c,n[4]=l);let{status:u}=d(`StepperTitle`),p;n[5]!==u||n[6]!==l?(p=r.props(f.title,u===`inactive`&&f.titleInactive,l),n[5]=u,n[6]=l,n[7]=p):p=n[7];let m=p,h;n[8]!==o||n[9]!==m.className?(h=o?`${m.className||``} ${o}`.trim():m.className,n[8]=o,n[9]=m.className,n[10]=h):h=n[10];let g;return n[11]!==a||n[12]!==c||n[13]!==m||n[14]!==h?(g=(0,i.jsx)(t.Text,{strong:!0,"data-slot":`stepper-title`,...m,className:h,...c,children:a}),n[11]=a,n[12]=c,n[13]=m,n[14]=h,n[15]=g):g=n[15],g}function b(e){let n=(0,s.c)(15),a,o,c,l;n[0]===e?(a=n[1],o=n[2],c=n[3],l=n[4]):({className:o,sx:l,children:a,...c}=e,n[0]=e,n[1]=a,n[2]=o,n[3]=c,n[4]=l);let u;n[5]===l?u=n[6]:(u=r.props(f.description,l),n[5]=l,n[6]=u);let d=u,p;n[7]!==o||n[8]!==d.className?(p=o?`${d.className||``} ${o}`.trim():d.className,n[7]=o,n[8]=d.className,n[9]=p):p=n[9];let m;return n[10]!==a||n[11]!==c||n[12]!==d||n[13]!==p?(m=(0,i.jsx)(t.Text,{type:`secondary`,size:`xs`,"data-slot":`stepper-description`,...d,className:p,...c,children:a}),n[10]=a,n[11]=c,n[12]=d,n[13]=p,n[14]=m):m=n[14],m}function x({className:e,value:t,forceMount:n=!1,sx:a,children:o,...s}){let{value:c}=l(`StepperContent`);if(c!==t&&!n)return null;let u=r.props(f.content,a);return(0,i.jsx)(`div`,{role:`tabpanel`,"data-slot":`stepper-content`,...u,className:e?`${u.className||``} ${e}`.trim():u.className,...s,children:o})}function S({children:e=`Next`,onClick:t,disabled:r,...a}){let{value:o,stepKeys:s,setValue:c}=l(`StepperNext`),u=s.indexOf(o),d=u>=s.length-1,f=r||d;return(0,i.jsx)(n.Button,{type:`button`,"data-slot":`stepper-next`,disabled:f,onClick:async e=>{if(t?.(e),e.defaultPrevented||f)return;let n=s[u+1];n&&await c(n)},...a,children:e})}function C({children:e=`Previous`,onClick:t,disabled:r,...a}){let{value:o,stepKeys:s,setValue:c}=l(`StepperPrev`),u=s.indexOf(o),d=r||u<=0;return(0,i.jsx)(n.Button,{type:`button`,variant:`outline`,"data-slot":`stepper-prev`,disabled:d,onClick:async e=>{if(t?.(e),e.defaultPrevented||d)return;let n=s[u-1];n&&await c(n)},...a,children:e})}function w(e){let t=(0,s.c)(15),n,a,o,c;t[0]===e?(n=t[1],a=t[2],o=t[3],c=t[4]):({className:a,sx:c,children:n,...o}=e,t[0]=e,t[1]=n,t[2]=a,t[3]=o,t[4]=c);let l;t[5]===c?l=t[6]:(l=r.props(f.textWrapper,c),t[5]=c,t[6]=l);let u=l,d;t[7]!==a||t[8]!==u.className?(d=a?`${u.className||``} ${a}`.trim():u.className,t[7]=a,t[8]=u.className,t[9]=d):d=t[9];let p;return t[10]!==n||t[11]!==o||t[12]!==u||t[13]!==d?(p=(0,i.jsx)(`div`,{"data-slot":`stepper-text`,...u,className:d,...o,children:n}),t[10]=n,t[11]=o,t[12]=u,t[13]=d,t[14]=p):p=t[14],p}exports.Stepper=p,exports.StepperContent=x,exports.StepperDescription=b,exports.StepperIndicator=_,exports.StepperItem=h,exports.StepperList=m,exports.StepperNext=S,exports.StepperPrev=C,exports.StepperSeparator=v,exports.StepperText=w,exports.StepperTitle=y,exports.StepperTrigger=g;
|
package/dist/index154.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Text as e } from "./
|
|
2
|
-
import { Button as t } from "./
|
|
3
|
-
import * as n from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { Text as e } from "./index14.js";
|
|
2
|
+
import { Button as t } from "./index22.js";
|
|
3
|
+
import * as n from "@stylexjs/stylex";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "react";
|
|
6
6
|
import { c as a } from "react/compiler-runtime";
|
|
7
7
|
// src/ui/stepper.tsx
|
|
8
|
-
var o =
|
|
8
|
+
var o = i.createContext(null);
|
|
9
9
|
function s(e) {
|
|
10
|
-
let t =
|
|
10
|
+
let t = i.useContext(o);
|
|
11
11
|
if (!t) throw Error(`${e} must be used within a Stepper`);
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
|
-
var c =
|
|
14
|
+
var c = i.createContext(null);
|
|
15
15
|
function l(e) {
|
|
16
|
-
let t =
|
|
16
|
+
let t = i.useContext(c);
|
|
17
17
|
if (!t) throw Error(`${e} must be used within a StepperItem`);
|
|
18
18
|
return t;
|
|
19
19
|
}
|
|
@@ -181,24 +181,24 @@ var u = {
|
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
function d({ className: e, value: t, defaultValue: a = "", onValueChange: s, orientation: c = "horizontal", linear: l = !0, onValidateStep: d, sx: f, children: p, ...m }) {
|
|
184
|
-
let [h, g] =
|
|
184
|
+
let [h, g] = i.useState(a), [_, v] = i.useState([]), y = t === void 0 ? h : t, b = i.useCallback((e) => {
|
|
185
185
|
v((t) => t.includes(e) ? t : [...t, e]);
|
|
186
|
-
}, []), x =
|
|
186
|
+
}, []), x = i.useCallback((e) => {
|
|
187
187
|
v((t) => t.filter((t) => t !== e));
|
|
188
|
-
}, []), S =
|
|
188
|
+
}, []), S = i.useCallback(async (e) => e === y ? !0 : d && !await d(y, e) ? !1 : (t === void 0 && g(e), s?.(e), !0), [
|
|
189
189
|
y,
|
|
190
190
|
t,
|
|
191
191
|
d,
|
|
192
192
|
s
|
|
193
193
|
]);
|
|
194
|
-
|
|
194
|
+
i.useEffect(() => {
|
|
195
195
|
!y && _.length > 0 && _[0] && S(_[0]);
|
|
196
196
|
}, [
|
|
197
197
|
y,
|
|
198
198
|
_,
|
|
199
199
|
S
|
|
200
200
|
]);
|
|
201
|
-
let C =
|
|
201
|
+
let C = i.useMemo(() => ({
|
|
202
202
|
value: y,
|
|
203
203
|
setValue: S,
|
|
204
204
|
orientation: c,
|
|
@@ -214,10 +214,10 @@ function d({ className: e, value: t, defaultValue: a = "", onValueChange: s, ori
|
|
|
214
214
|
_,
|
|
215
215
|
b,
|
|
216
216
|
x
|
|
217
|
-
]), w = c === "vertical" ? u.rootVertical : u.rootHorizontal, T =
|
|
218
|
-
return /* @__PURE__ */
|
|
217
|
+
]), w = c === "vertical" ? u.rootVertical : u.rootHorizontal, T = n.props(u.root, w, f);
|
|
218
|
+
return /* @__PURE__ */ r(o.Provider, {
|
|
219
219
|
value: C,
|
|
220
|
-
children: /* @__PURE__ */
|
|
220
|
+
children: /* @__PURE__ */ r("div", {
|
|
221
221
|
"data-slot": "stepper",
|
|
222
222
|
"data-orientation": c,
|
|
223
223
|
...T,
|
|
@@ -228,37 +228,37 @@ function d({ className: e, value: t, defaultValue: a = "", onValueChange: s, ori
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
function f(e) {
|
|
231
|
-
let t = a(17),
|
|
232
|
-
t[0] === e ? (
|
|
231
|
+
let t = a(17), i, o, c, l;
|
|
232
|
+
t[0] === e ? (i = t[1], o = t[2], c = t[3], l = t[4]) : ({className: o, sx: l, children: i, ...c} = e, t[0] = e, t[1] = i, t[2] = o, t[3] = c, t[4] = l);
|
|
233
233
|
let { orientation: d } = s("StepperList"), f = d === "vertical" ? u.listVertical : u.listHorizontal, p;
|
|
234
|
-
t[5] !== f || t[6] !== l ? (p =
|
|
234
|
+
t[5] !== f || t[6] !== l ? (p = n.props(u.list, f, l), t[5] = f, t[6] = l, t[7] = p) : p = t[7];
|
|
235
235
|
let m = p, h;
|
|
236
236
|
t[8] !== o || t[9] !== m.className ? (h = o ? `${m.className || ""} ${o}`.trim() : m.className, t[8] = o, t[9] = m.className, t[10] = h) : h = t[10];
|
|
237
237
|
let g;
|
|
238
|
-
return t[11] !==
|
|
238
|
+
return t[11] !== i || t[12] !== d || t[13] !== c || t[14] !== m || t[15] !== h ? (g = /* @__PURE__ */ r("div", {
|
|
239
239
|
role: "tablist",
|
|
240
240
|
"aria-orientation": d,
|
|
241
241
|
"data-slot": "stepper-list",
|
|
242
242
|
...m,
|
|
243
243
|
className: h,
|
|
244
244
|
...c,
|
|
245
|
-
children:
|
|
246
|
-
}), t[11] =
|
|
245
|
+
children: i
|
|
246
|
+
}), t[11] = i, t[12] = d, t[13] = c, t[14] = m, t[15] = h, t[16] = g) : g = t[16], g;
|
|
247
247
|
}
|
|
248
248
|
function p({ className: e, value: t, completed: a, disabled: o = !1, sx: l, children: d, ...f }) {
|
|
249
249
|
let { value: p, stepKeys: m, registerStep: h, unregisterStep: g, linear: _, orientation: v } = s("StepperItem");
|
|
250
|
-
|
|
250
|
+
i.useEffect(() => (h(t), () => g(t)), [
|
|
251
251
|
t,
|
|
252
252
|
h,
|
|
253
253
|
g
|
|
254
254
|
]);
|
|
255
|
-
let y = m.indexOf(t), b = m.indexOf(p), x =
|
|
255
|
+
let y = m.indexOf(t), b = m.indexOf(p), x = i.useMemo(() => a ? "completed" : t === p ? "active" : b > y && b !== -1 ? "completed" : "inactive", [
|
|
256
256
|
a,
|
|
257
257
|
t,
|
|
258
258
|
p,
|
|
259
259
|
b,
|
|
260
260
|
y
|
|
261
|
-
]), S = o || _ && x === "inactive" && y > b + 1, C =
|
|
261
|
+
]), S = o || _ && x === "inactive" && y > b + 1, C = i.useMemo(() => ({
|
|
262
262
|
value: t,
|
|
263
263
|
stepIndex: y,
|
|
264
264
|
status: x,
|
|
@@ -268,10 +268,10 @@ function p({ className: e, value: t, completed: a, disabled: o = !1, sx: l, chil
|
|
|
268
268
|
y,
|
|
269
269
|
x,
|
|
270
270
|
S
|
|
271
|
-
]), w = v === "vertical" ? u.itemVertical : u.itemHorizontal, T =
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
]), w = v === "vertical" ? u.itemVertical : u.itemHorizontal, T = n.props(u.item, w, l);
|
|
272
|
+
return /* @__PURE__ */ r(c.Provider, {
|
|
273
273
|
value: C,
|
|
274
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ r("div", {
|
|
275
275
|
"data-slot": "stepper-item",
|
|
276
276
|
"data-status": x,
|
|
277
277
|
"data-disabled": S ? "" : void 0,
|
|
@@ -283,8 +283,8 @@ function p({ className: e, value: t, completed: a, disabled: o = !1, sx: l, chil
|
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
function m(e) {
|
|
286
|
-
let t = a(34),
|
|
287
|
-
t[0] === e ? (
|
|
286
|
+
let t = a(34), i, o, c, d, f, p;
|
|
287
|
+
t[0] === e ? (i = t[1], o = t[2], c = t[3], d = t[4], f = t[5], p = t[6]) : ({className: o, onClick: c, onKeyDown: d, sx: p, children: i, ...f} = e, t[0] = e, t[1] = i, t[2] = o, t[3] = c, t[4] = d, t[5] = f, t[6] = p);
|
|
288
288
|
let { setValue: m, stepKeys: h, orientation: g } = s("StepperTrigger"), { value: _, status: v, disabled: y, stepIndex: b } = l("StepperTrigger"), x;
|
|
289
289
|
t[7] !== y || t[8] !== c || t[9] !== m || t[10] !== _ ? (x = async (e) => {
|
|
290
290
|
c?.(e), !(e.defaultPrevented || y) && await m(_);
|
|
@@ -296,11 +296,11 @@ function m(e) {
|
|
|
296
296
|
n && e.key === "ArrowRight" || !n && e.key === "ArrowDown" ? t = Math.min(b + 1, h.length - 1) : n && e.key === "ArrowLeft" || !n && e.key === "ArrowUp" ? t = Math.max(b - 1, 0) : e.key === "Home" ? t = 0 : e.key === "End" && (t = h.length - 1), t !== null && h[t] && (e.preventDefault(), await m(h[t]));
|
|
297
297
|
}, t[12] = d, t[13] = g, t[14] = m, t[15] = b, t[16] = h, t[17] = C) : C = t[17];
|
|
298
298
|
let w = C, T;
|
|
299
|
-
t[18] !== y || t[19] !== p ? (T =
|
|
299
|
+
t[18] !== y || t[19] !== p ? (T = n.props(u.trigger, y && u.triggerDisabled, p), t[18] = y, t[19] = p, t[20] = T) : T = t[20];
|
|
300
300
|
let E = T, D = v === "active", O;
|
|
301
301
|
t[21] !== o || t[22] !== E.className ? (O = o ? `${E.className || ""} ${o}`.trim() : E.className, t[21] = o, t[22] = E.className, t[23] = O) : O = t[23];
|
|
302
302
|
let k;
|
|
303
|
-
return t[24] !==
|
|
303
|
+
return t[24] !== i || t[25] !== y || t[26] !== S || t[27] !== w || t[28] !== f || t[29] !== v || t[30] !== E || t[31] !== D || t[32] !== O ? (k = /* @__PURE__ */ r("button", {
|
|
304
304
|
type: "button",
|
|
305
305
|
role: "tab",
|
|
306
306
|
"aria-selected": D,
|
|
@@ -312,16 +312,16 @@ function m(e) {
|
|
|
312
312
|
...E,
|
|
313
313
|
className: O,
|
|
314
314
|
...f,
|
|
315
|
-
children:
|
|
316
|
-
}), t[24] =
|
|
315
|
+
children: i
|
|
316
|
+
}), t[24] = i, t[25] = y, t[26] = S, t[27] = w, t[28] = f, t[29] = v, t[30] = E, t[31] = D, t[32] = O, t[33] = k) : k = t[33], k;
|
|
317
317
|
}
|
|
318
318
|
function h(e) {
|
|
319
|
-
let t = a(23),
|
|
320
|
-
t[0] === e ? (
|
|
319
|
+
let t = a(23), i, o, s, c;
|
|
320
|
+
t[0] === e ? (i = t[1], o = t[2], s = t[3], c = t[4]) : ({className: o, sx: c, children: i, ...s} = e, t[0] = e, t[1] = i, t[2] = o, t[3] = s, t[4] = c);
|
|
321
321
|
let { status: d, stepIndex: f } = l("StepperIndicator"), p = d === "completed" ? u.indicatorCompleted : d === "active" ? u.indicatorActive : u.indicatorInactive, m;
|
|
322
|
-
t[5] !== p || t[6] !== c ? (m =
|
|
322
|
+
t[5] !== p || t[6] !== c ? (m = n.props(u.indicator, p, c), t[5] = p, t[6] = c, t[7] = m) : m = t[7];
|
|
323
323
|
let h = m, g;
|
|
324
|
-
t[8] !==
|
|
324
|
+
t[8] !== i || t[9] !== d || t[10] !== f ? (g = () => i || (d === "completed" ? /* @__PURE__ */ r("svg", {
|
|
325
325
|
width: "14",
|
|
326
326
|
height: "14",
|
|
327
327
|
viewBox: "0 0 24 24",
|
|
@@ -331,14 +331,14 @@ function h(e) {
|
|
|
331
331
|
strokeLinecap: "round",
|
|
332
332
|
strokeLinejoin: "round",
|
|
333
333
|
"aria-hidden": "true",
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
}) : f + 1), t[8] =
|
|
334
|
+
children: /* @__PURE__ */ r("polyline", { points: "20 6 9 17 4 12" })
|
|
335
|
+
}) : f + 1), t[8] = i, t[9] = d, t[10] = f, t[11] = g) : g = t[11];
|
|
336
336
|
let _ = g, v;
|
|
337
337
|
t[12] !== o || t[13] !== h.className ? (v = o ? `${h.className || ""} ${o}`.trim() : h.className, t[12] = o, t[13] = h.className, t[14] = v) : v = t[14];
|
|
338
338
|
let y;
|
|
339
339
|
t[15] === _ ? y = t[16] : (y = _(), t[15] = _, t[16] = y);
|
|
340
340
|
let b;
|
|
341
|
-
return t[17] !== s || t[18] !== d || t[19] !== h || t[20] !== v || t[21] !== y ? (b = /* @__PURE__ */
|
|
341
|
+
return t[17] !== s || t[18] !== d || t[19] !== h || t[20] !== v || t[21] !== y ? (b = /* @__PURE__ */ r("div", {
|
|
342
342
|
"aria-hidden": "true",
|
|
343
343
|
"data-slot": "stepper-indicator",
|
|
344
344
|
"data-status": d,
|
|
@@ -348,11 +348,11 @@ function h(e) {
|
|
|
348
348
|
children: y
|
|
349
349
|
}), t[17] = s, t[18] = d, t[19] = h, t[20] = v, t[21] = y, t[22] = b) : b = t[22], b;
|
|
350
350
|
}
|
|
351
|
-
function g({ className: e, forceMount: t = !1, sx:
|
|
351
|
+
function g({ className: e, forceMount: t = !1, sx: i, ...a }) {
|
|
352
352
|
let { orientation: o, stepKeys: c } = s("StepperSeparator"), { status: d, stepIndex: f } = l("StepperSeparator");
|
|
353
353
|
if (f >= c.length - 1 && !t) return null;
|
|
354
|
-
let p = d === "completed", m = o === "vertical" ? u.separatorVertical : u.separatorHorizontal, h =
|
|
355
|
-
return /* @__PURE__ */
|
|
354
|
+
let p = d === "completed", m = o === "vertical" ? u.separatorVertical : u.separatorHorizontal, h = n.props(u.separator, m, p && u.separatorCompleted, i);
|
|
355
|
+
return /* @__PURE__ */ r("div", {
|
|
356
356
|
"aria-hidden": "true",
|
|
357
357
|
"data-slot": "stepper-separator",
|
|
358
358
|
"data-completed": p ? "" : void 0,
|
|
@@ -362,31 +362,31 @@ function g({ className: e, forceMount: t = !1, sx: n, ...a }) {
|
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
function _(t) {
|
|
365
|
-
let
|
|
366
|
-
|
|
365
|
+
let i = a(16), o, s, c, d;
|
|
366
|
+
i[0] === t ? (o = i[1], s = i[2], c = i[3], d = i[4]) : ({className: s, sx: d, children: o, ...c} = t, i[0] = t, i[1] = o, i[2] = s, i[3] = c, i[4] = d);
|
|
367
367
|
let { status: f } = l("StepperTitle"), p;
|
|
368
|
-
|
|
368
|
+
i[5] !== f || i[6] !== d ? (p = n.props(u.title, f === "inactive" && u.titleInactive, d), i[5] = f, i[6] = d, i[7] = p) : p = i[7];
|
|
369
369
|
let m = p, h;
|
|
370
|
-
|
|
370
|
+
i[8] !== s || i[9] !== m.className ? (h = s ? `${m.className || ""} ${s}`.trim() : m.className, i[8] = s, i[9] = m.className, i[10] = h) : h = i[10];
|
|
371
371
|
let g;
|
|
372
|
-
return
|
|
372
|
+
return i[11] !== o || i[12] !== c || i[13] !== m || i[14] !== h ? (g = /* @__PURE__ */ r(e, {
|
|
373
373
|
strong: !0,
|
|
374
374
|
"data-slot": "stepper-title",
|
|
375
375
|
...m,
|
|
376
376
|
className: h,
|
|
377
377
|
...c,
|
|
378
378
|
children: o
|
|
379
|
-
}),
|
|
379
|
+
}), i[11] = o, i[12] = c, i[13] = m, i[14] = h, i[15] = g) : g = i[15], g;
|
|
380
380
|
}
|
|
381
381
|
function v(t) {
|
|
382
|
-
let
|
|
383
|
-
|
|
382
|
+
let i = a(15), o, s, c, l;
|
|
383
|
+
i[0] === t ? (o = i[1], s = i[2], c = i[3], l = i[4]) : ({className: s, sx: l, children: o, ...c} = t, i[0] = t, i[1] = o, i[2] = s, i[3] = c, i[4] = l);
|
|
384
384
|
let d;
|
|
385
|
-
|
|
385
|
+
i[5] === l ? d = i[6] : (d = n.props(u.description, l), i[5] = l, i[6] = d);
|
|
386
386
|
let f = d, p;
|
|
387
|
-
|
|
387
|
+
i[7] !== s || i[8] !== f.className ? (p = s ? `${f.className || ""} ${s}`.trim() : f.className, i[7] = s, i[8] = f.className, i[9] = p) : p = i[9];
|
|
388
388
|
let m;
|
|
389
|
-
return
|
|
389
|
+
return i[10] !== o || i[11] !== c || i[12] !== f || i[13] !== p ? (m = /* @__PURE__ */ r(e, {
|
|
390
390
|
type: "secondary",
|
|
391
391
|
size: "xs",
|
|
392
392
|
"data-slot": "stepper-description",
|
|
@@ -394,13 +394,13 @@ function v(t) {
|
|
|
394
394
|
className: p,
|
|
395
395
|
...c,
|
|
396
396
|
children: o
|
|
397
|
-
}),
|
|
397
|
+
}), i[10] = o, i[11] = c, i[12] = f, i[13] = p, i[14] = m) : m = i[14], m;
|
|
398
398
|
}
|
|
399
|
-
function y({ className: e, value: t, forceMount:
|
|
399
|
+
function y({ className: e, value: t, forceMount: i = !1, sx: a, children: o, ...c }) {
|
|
400
400
|
let { value: l } = s("StepperContent");
|
|
401
|
-
if (l !== t && !
|
|
402
|
-
let d =
|
|
403
|
-
return /* @__PURE__ */
|
|
401
|
+
if (l !== t && !i) return null;
|
|
402
|
+
let d = n.props(u.content, a);
|
|
403
|
+
return /* @__PURE__ */ r("div", {
|
|
404
404
|
role: "tabpanel",
|
|
405
405
|
"data-slot": "stepper-content",
|
|
406
406
|
...d,
|
|
@@ -409,9 +409,9 @@ function y({ className: e, value: t, forceMount: n = !1, sx: a, children: o, ...
|
|
|
409
409
|
children: o
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
function b({ children: e = "Next", onClick: n, disabled:
|
|
413
|
-
let { value: o, stepKeys: c, setValue: l } = s("StepperNext"), u = c.indexOf(o), d = u >= c.length - 1, f =
|
|
414
|
-
return /* @__PURE__ */
|
|
412
|
+
function b({ children: e = "Next", onClick: n, disabled: i, ...a }) {
|
|
413
|
+
let { value: o, stepKeys: c, setValue: l } = s("StepperNext"), u = c.indexOf(o), d = u >= c.length - 1, f = i || d;
|
|
414
|
+
return /* @__PURE__ */ r(t, {
|
|
415
415
|
type: "button",
|
|
416
416
|
"data-slot": "stepper-next",
|
|
417
417
|
disabled: f,
|
|
@@ -424,9 +424,9 @@ function b({ children: e = "Next", onClick: n, disabled: r, ...a }) {
|
|
|
424
424
|
children: e
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
|
-
function x({ children: e = "Previous", onClick: n, disabled:
|
|
428
|
-
let { value: o, stepKeys: c, setValue: l } = s("StepperPrev"), u = c.indexOf(o), d =
|
|
429
|
-
return /* @__PURE__ */
|
|
427
|
+
function x({ children: e = "Previous", onClick: n, disabled: i, ...a }) {
|
|
428
|
+
let { value: o, stepKeys: c, setValue: l } = s("StepperPrev"), u = c.indexOf(o), d = i || u <= 0;
|
|
429
|
+
return /* @__PURE__ */ r(t, {
|
|
430
430
|
type: "button",
|
|
431
431
|
variant: "outline",
|
|
432
432
|
"data-slot": "stepper-prev",
|
|
@@ -441,19 +441,19 @@ function x({ children: e = "Previous", onClick: n, disabled: r, ...a }) {
|
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
function S(e) {
|
|
444
|
-
let t = a(15),
|
|
445
|
-
t[0] === e ? (
|
|
444
|
+
let t = a(15), i, o, s, c;
|
|
445
|
+
t[0] === e ? (i = t[1], o = t[2], s = t[3], c = t[4]) : ({className: o, sx: c, children: i, ...s} = e, t[0] = e, t[1] = i, t[2] = o, t[3] = s, t[4] = c);
|
|
446
446
|
let l;
|
|
447
|
-
t[5] === c ? l = t[6] : (l =
|
|
447
|
+
t[5] === c ? l = t[6] : (l = n.props(u.textWrapper, c), t[5] = c, t[6] = l);
|
|
448
448
|
let d = l, f;
|
|
449
449
|
t[7] !== o || t[8] !== d.className ? (f = o ? `${d.className || ""} ${o}`.trim() : d.className, t[7] = o, t[8] = d.className, t[9] = f) : f = t[9];
|
|
450
450
|
let p;
|
|
451
|
-
return t[10] !==
|
|
451
|
+
return t[10] !== i || t[11] !== s || t[12] !== d || t[13] !== f ? (p = /* @__PURE__ */ r("div", {
|
|
452
452
|
"data-slot": "stepper-text",
|
|
453
453
|
...d,
|
|
454
454
|
className: f,
|
|
455
455
|
...s,
|
|
456
|
-
children:
|
|
457
|
-
}), t[10] =
|
|
456
|
+
children: i
|
|
457
|
+
}), t[10] = i, t[11] = s, t[12] = d, t[13] = f, t[14] = p) : p = t[14], p;
|
|
458
458
|
}
|
|
459
459
|
export { d as Stepper, y as StepperContent, v as StepperDescription, h as StepperIndicator, p as StepperItem, f as StepperList, b as StepperNext, x as StepperPrev, g as StepperSeparator, S as StepperText, _ as StepperTitle, m as StepperTrigger };
|
package/dist/index155.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require("./index2.cjs"),t=require("./
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index30.cjs"),n=require("./index31.cjs"),r=require("./index32.cjs"),i=require("./index35.cjs"),a=require("./index57.cjs"),o=require("./index73.cjs");let s=require("react/jsx-runtime"),c=require("react"),l=e.__toESM(c,1);c=e.__toESM(c);var u=Object.defineProperty,d=(e,t)=>u(e,`name`,{value:t,configurable:!0}),f=`Switch`,[p,m]=t.createContextScope(f),[h,g]=p(f);function _(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:o,form:c,name:u,onCheckedChange:d,required:p,value:m=`on`,internal_do_not_use_render:g}=e,[_,v]=a.useControllableState({prop:n,defaultProp:i??!1,onChange:d,caller:f}),[y,b]=l.useState(null),[x,S]=l.useState(null),C=l.useRef(!1),[w,E]=l.useReducer(e=>e+1,0),D={checked:_,setChecked:v,disabled:o,control:y,setControl:b,name:u,form:c,value:m,hasConsumerStoppedPropagationRef:C,userInteractionCount:w,onUserInteraction:E,required:p,defaultChecked:i,isFormControl:!y||!!c||!!y.closest(`form`),bubbleInput:x,setBubbleInput:S};return(0,s.jsx)(h,{scope:t,...D,children:T(g)?g(D):r})}d(_,`SwitchProvider`);var v=`SwitchTrigger`,y=l.forwardRef(d(function({__scopeSwitch:e,onClick:t,...a},o){let{control:c,form:u,value:f,disabled:p,checked:m,required:h,setControl:_,setChecked:y,hasConsumerStoppedPropagationRef:b,onUserInteraction:x,isFormControl:S,bubbleInput:C}=g(v,e),w=n.useComposedRefs(o,_),T=l.useRef(m);return l.useEffect(()=>{let e=u?c?.ownerDocument.getElementById(u):c?.form;if(e instanceof HTMLFormElement){let t=d(()=>y(T.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[c,u,y]),(0,s.jsx)(i.Primitive.button,{type:`button`,role:`switch`,"aria-checked":m,"aria-required":h,"data-state":E(m),"data-disabled":p?``:void 0,disabled:p,value:f,...a,ref:w,onClick:r.composeEventHandlers(t,e=>{x(),y(e=>!e),C&&S&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})})},`SwitchTrigger`)),b=l.forwardRef(d(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:c,value:l,onCheckedChange:u,form:d,...f}=e;return(0,s.jsx)(_,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:c,required:o,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y,{...f,ref:t,__scopeSwitch:n}),e&&(0,s.jsx)(w,{__scopeSwitch:n})]})})},`Switch`)),x=`SwitchThumb`,S=l.forwardRef(d(function(e,t){let{__scopeSwitch:n,...r}=e,a=g(x,n);return(0,s.jsx)(i.Primitive.span,{"data-state":E(a.checked),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),C=`SwitchBubbleInput`,w=l.forwardRef(d(function({__scopeSwitch:e,onClick:t,...a},c){let{control:u,hasConsumerStoppedPropagationRef:d,userInteractionCount:f,checked:p,defaultChecked:m,required:h,disabled:_,name:v,value:y,form:b,bubbleInput:x,setBubbleInput:S}=g(C,e),w=n.useComposedRefs(c,S),T=o.useSize(u),E=l.useRef(!1),D=l.useRef(p),O=l.useRef(f);l.useEffect(()=>{let e=x;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=f!==O.current;O.current=f;let i=D.current!==p;D.current=p;let a=!(r&&d.current);if(i&&n){E.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,p),e.dispatchEvent(t),E.current=!1}},[x,p,d,f]);let k=l.useRef(p);return(0,s.jsx)(i.Primitive.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:m??k.current,required:h,disabled:_,name:v,value:y,form:b,...a,tabIndex:-1,ref:w,onClick:r.composeEventHandlers(t,e=>{E.current&&e.stopPropagation()}),style:{...a.style,...T,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function T(e){return typeof e==`function`}d(T,`isFunction`);function E(e){return e?`checked`:`unchecked`}d(E,`getState`),exports.Root=b,exports.Switch=b,exports.SwitchThumb=S,exports.Thumb=S,exports.unstable_BubbleInput=w,exports.unstable_SwitchBubbleInput=w,exports.unstable_Provider=_,exports.unstable_SwitchProvider=_,exports.unstable_SwitchTrigger=y,exports.unstable_Trigger=y;
|