@blakesteve/roster 5.0.0 → 5.1.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/README.md +55 -8
- package/dist/components/atoms/Chip/Chip.cjs +1 -1
- package/dist/components/atoms/Chip/Chip.js +27 -27
- package/dist/components/atoms/Disclosure/Disclosure.cjs +1 -1
- package/dist/components/atoms/Disclosure/Disclosure.js +42 -44
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.d.ts +27 -2
- package/dist/components/atoms/Stat/Stat.js +38 -13
- package/dist/components/atoms/Switch/Switch.cjs +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts +11 -1
- package/dist/components/atoms/Switch/Switch.js +38 -36
- package/dist/components/atoms/Switch/switch-variants.cjs +1 -1
- package/dist/components/atoms/Switch/switch-variants.js +1 -1
- package/dist/components/molecules/LiquidTabs/LiquidNav.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/LiquidNav.d.ts +62 -0
- package/dist/components/molecules/LiquidTabs/LiquidNav.js +78 -0
- package/dist/components/molecules/LiquidTabs/LiquidTabs.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/LiquidTabs.d.ts +69 -0
- package/dist/components/molecules/LiquidTabs/LiquidTabs.js +92 -0
- package/dist/components/molecules/LiquidTabs/liquid-pill.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/liquid-pill.d.ts +56 -0
- package/dist/components/molecules/LiquidTabs/liquid-pill.js +129 -0
- package/dist/components/molecules/LiquidTabs/liquid-tab-id.cjs +1 -0
- package/dist/components/molecules/LiquidTabs/liquid-tab-id.d.ts +12 -0
- package/dist/components/molecules/LiquidTabs/liquid-tab-id.js +6 -0
- package/dist/components/molecules/Toast/Toaster.cjs +1 -1
- package/dist/components/molecules/Toast/Toaster.d.ts +7 -0
- package/dist/components/molecules/Toast/Toaster.js +67 -45
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +102 -79
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.js +157 -157
- package/dist/components/organisms/Sheet/Sheet.cjs +1 -0
- package/dist/components/organisms/Sheet/Sheet.d.ts +82 -0
- package/dist/components/organisms/Sheet/Sheet.js +303 -0
- package/dist/components/organisms/Sheet/sheet-drag.cjs +1 -0
- package/dist/components/organisms/Sheet/sheet-drag.d.ts +40 -0
- package/dist/components/organisms/Sheet/sheet-drag.js +22 -0
- package/dist/hooks/useCountdown.cjs +1 -1
- package/dist/hooks/useCountdown.d.ts +9 -0
- package/dist/hooks/useCountdown.js +20 -23
- package/dist/index.d.ts +4 -1
- package/dist/internal/motion.cjs +1 -0
- package/dist/internal/motion.d.ts +12 -0
- package/dist/internal/motion.js +21 -0
- package/dist/internal/page-inert.cjs +1 -0
- package/dist/internal/page-inert.d.ts +51 -0
- package/dist/internal/page-inert.js +36 -0
- package/dist/meta.json +3 -3
- package/dist/roster.cjs +1 -1
- package/dist/roster.css +1 -1
- package/dist/roster.js +128 -122
- package/package.json +3 -4
- package/dist/components/atoms/LiquidTabs/LiquidTabs.cjs +0 -1
- package/dist/components/atoms/LiquidTabs/LiquidTabs.d.ts +0 -39
- package/dist/components/atoms/LiquidTabs/LiquidTabs.js +0 -120
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -9
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
- package/dist/node_modules/date-fns/_lib/normalizeDates.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.cjs +0 -1
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/add.cjs +0 -1
- package/dist/node_modules/date-fns/add.js +0 -19
- package/dist/node_modules/date-fns/addDays.cjs +0 -1
- package/dist/node_modules/date-fns/addDays.js +0 -9
- package/dist/node_modules/date-fns/addMonths.cjs +0 -1
- package/dist/node_modules/date-fns/addMonths.js +0 -19
- package/dist/node_modules/date-fns/compareAsc.cjs +0 -1
- package/dist/node_modules/date-fns/compareAsc.js +0 -8
- package/dist/node_modules/date-fns/constants.cjs +0 -1
- package/dist/node_modules/date-fns/constants.js +0 -7
- package/dist/node_modules/date-fns/constructFrom.cjs +0 -1
- package/dist/node_modules/date-fns/constructFrom.js +0 -7
- package/dist/node_modules/date-fns/differenceInCalendarDays.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -15
- package/dist/node_modules/date-fns/differenceInCalendarMonths.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -12
- package/dist/node_modules/date-fns/differenceInCalendarYears.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInCalendarYears.js +0 -12
- package/dist/node_modules/date-fns/differenceInDays.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInDays.js +0 -21
- package/dist/node_modules/date-fns/differenceInHours.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInHours.js +0 -14
- package/dist/node_modules/date-fns/differenceInMilliseconds.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -7
- package/dist/node_modules/date-fns/differenceInMinutes.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInMinutes.js +0 -10
- package/dist/node_modules/date-fns/differenceInMonths.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInMonths.js +0 -23
- package/dist/node_modules/date-fns/differenceInSeconds.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInSeconds.js +0 -9
- package/dist/node_modules/date-fns/differenceInYears.cjs +0 -1
- package/dist/node_modules/date-fns/differenceInYears.js +0 -16
- package/dist/node_modules/date-fns/endOfDay.cjs +0 -1
- package/dist/node_modules/date-fns/endOfDay.js +0 -8
- package/dist/node_modules/date-fns/endOfMonth.cjs +0 -1
- package/dist/node_modules/date-fns/endOfMonth.js +0 -8
- package/dist/node_modules/date-fns/intervalToDuration.cjs +0 -1
- package/dist/node_modules/date-fns/intervalToDuration.js +0 -25
- package/dist/node_modules/date-fns/isAfter.cjs +0 -1
- package/dist/node_modules/date-fns/isAfter.js +0 -7
- package/dist/node_modules/date-fns/isLastDayOfMonth.cjs +0 -1
- package/dist/node_modules/date-fns/isLastDayOfMonth.js +0 -10
- package/dist/node_modules/date-fns/startOfDay.cjs +0 -1
- package/dist/node_modules/date-fns/startOfDay.js +0 -8
- package/dist/node_modules/date-fns/toDate.cjs +0 -1
- package/dist/node_modules/date-fns/toDate.js +0 -7
package/dist/roster.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Avatar as e } from "./components/atoms/Avatar/Avatar.js";
|
|
3
3
|
import { avatarVariants as p } from "./components/atoms/Avatar/avatar-variants.js";
|
|
4
4
|
import { Badge as m } from "./components/atoms/Badge/Badge.js";
|
|
5
|
-
import { badgeVariants as
|
|
5
|
+
import { badgeVariants as f } from "./components/atoms/Badge/badge-variants.js";
|
|
6
6
|
import { Button as s } from "./components/atoms/Button/Button.js";
|
|
7
7
|
import { buttonVariants as V } from "./components/atoms/Button/button-variants.js";
|
|
8
8
|
import { Card as b } from "./components/atoms/Card/Card.js";
|
|
@@ -10,14 +10,14 @@ import { cardVariants as u } from "./components/atoms/Card/card-variants.js";
|
|
|
10
10
|
import { Checkbox as C } from "./components/atoms/Checkbox/Checkbox.js";
|
|
11
11
|
import { checkboxVariants as S } from "./components/atoms/Checkbox/checkbox-variants.js";
|
|
12
12
|
import { Disclosure as w } from "./components/atoms/Disclosure/Disclosure.js";
|
|
13
|
-
import { disclosureContentVariants as
|
|
14
|
-
import { Input as
|
|
15
|
-
import { iconVariants as
|
|
13
|
+
import { disclosureContentVariants as v, disclosureTriggerVariants as A } from "./components/atoms/Disclosure/disclosure-variants.js";
|
|
14
|
+
import { Input as D } from "./components/atoms/Input/Input.js";
|
|
15
|
+
import { iconVariants as q, inputVariants as y } from "./components/atoms/Input/input-variants.js";
|
|
16
16
|
import { Link as I } from "./components/atoms/Link/Link.js";
|
|
17
|
-
import { linkVariants as
|
|
17
|
+
import { linkVariants as G } from "./components/atoms/Link/link-variants.js";
|
|
18
18
|
import { PasswordInput as H } from "./components/atoms/PasswordInput/PasswordInput.js";
|
|
19
|
-
import { Combobox as
|
|
20
|
-
import { Chip as
|
|
19
|
+
import { Combobox as R } from "./components/atoms/Combobox/Combobox.js";
|
|
20
|
+
import { Chip as M } from "./components/atoms/Chip/Chip.js";
|
|
21
21
|
import { chipVariants as _ } from "./components/atoms/Chip/chip-variants.js";
|
|
22
22
|
import { Pill as X } from "./components/atoms/Pill/Pill.js";
|
|
23
23
|
import { pillDotVariants as z, pillVariants as J } from "./components/atoms/Pill/pill-variants.js";
|
|
@@ -28,157 +28,163 @@ import { inlineCodeVariants as tr } from "./components/atoms/InlineCode/inline-c
|
|
|
28
28
|
import { LabeledDivider as ar } from "./components/atoms/LabeledDivider/LabeledDivider.js";
|
|
29
29
|
import { Stat as ir } from "./components/atoms/Stat/Stat.js";
|
|
30
30
|
import { statValueVariants as xr } from "./components/atoms/Stat/stat-variants.js";
|
|
31
|
-
import { ThemeToggle as
|
|
31
|
+
import { ThemeToggle as nr } from "./components/atoms/ThemeToggle/ThemeToggle.js";
|
|
32
32
|
import { MultiSelect as lr } from "./components/atoms/MultiSelect/MultiSelect.js";
|
|
33
33
|
import { Select as cr } from "./components/atoms/Select/Select.js";
|
|
34
34
|
import { selectOptionVariants as dr, selectTriggerVariants as ur } from "./components/atoms/Select/select-variants.js";
|
|
35
35
|
import { Spinner as Cr } from "./components/atoms/Spinner/Spinner.js";
|
|
36
36
|
import { Switch as Sr } from "./components/atoms/Switch/Switch.js";
|
|
37
37
|
import { switchThumbVariants as wr, switchTrackVariants as kr } from "./components/atoms/Switch/switch-variants.js";
|
|
38
|
-
import { Textarea as
|
|
39
|
-
import { textareaVariants as
|
|
40
|
-
import { AvatarStrip as
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
38
|
+
import { Textarea as Ar } from "./components/atoms/Textarea/Textarea.js";
|
|
39
|
+
import { textareaVariants as Dr } from "./components/atoms/Textarea/textarea-variants.js";
|
|
40
|
+
import { AvatarStrip as qr } from "./components/atoms/AvatarStrip/AvatarStrip.js";
|
|
41
|
+
import { Tooltip as Er } from "./components/atoms/Tooltip/Tooltip.js";
|
|
42
|
+
import { CollapsibleSection as Lr } from "./components/atoms/CollapsibleSection/CollapsibleSection.js";
|
|
43
|
+
import { SegmentBar as Pr } from "./components/atoms/SegmentBar/SegmentBar.js";
|
|
44
|
+
import { Toast as Nr } from "./components/molecules/Toast/Toast.js";
|
|
45
|
+
import { toastVariants as Fr } from "./components/molecules/Toast/toast-variants.js";
|
|
46
|
+
import { Toaster as Kr } from "./components/molecules/Toast/Toaster.js";
|
|
47
|
+
import { TONE_PREFIX as Wr, toast as Xr } from "./components/molecules/Toast/toast-api.js";
|
|
48
|
+
import { Alert as zr } from "./components/molecules/Alert/Alert.js";
|
|
49
|
+
import { alertVariants as Qr } from "./components/molecules/Alert/alert-variants.js";
|
|
50
|
+
import { Accordion as Yr } from "./components/molecules/Accordion/Accordion.js";
|
|
51
|
+
import { DescriptionList as $r } from "./components/molecules/DescriptionList/DescriptionList.js";
|
|
52
|
+
import { descriptionListVariants as oo } from "./components/molecules/DescriptionList/description-list-variants.js";
|
|
53
|
+
import { Pullquote as eo } from "./components/molecules/Pullquote/Pullquote.js";
|
|
54
|
+
import { pullquoteVariants as po } from "./components/molecules/Pullquote/pullquote-variants.js";
|
|
55
|
+
import { CheckboxGroup as mo } from "./components/molecules/CheckboxGroup/CheckboxGroup.js";
|
|
56
|
+
import { checkboxGroupOptionsVariants as fo, checkboxGroupPanelVariants as no } from "./components/molecules/CheckboxGroup/checkbox-group-variants.js";
|
|
57
|
+
import { RadioGroup as lo } from "./components/molecules/RadioGroup/RadioGroup.js";
|
|
58
|
+
import { radioDotVariants as co, radioGroupOptionsVariants as bo, radioOptionVariants as uo, radioVariants as To } from "./components/molecules/RadioGroup/radio-group-variants.js";
|
|
59
|
+
import { Breadcrumbs as ho } from "./components/molecules/Breadcrumbs/Breadcrumbs.js";
|
|
60
|
+
import { breadcrumbVariants as go } from "./components/molecules/Breadcrumbs/breadcrumb-variants.js";
|
|
61
|
+
import { LiquidTabs as ko } from "./components/molecules/LiquidTabs/LiquidTabs.js";
|
|
62
|
+
import { LiquidNav as Ao } from "./components/molecules/LiquidTabs/LiquidNav.js";
|
|
63
|
+
import { liquidTabId as Do } from "./components/molecules/LiquidTabs/liquid-tab-id.js";
|
|
64
|
+
import { CallToAction as qo } from "./components/molecules/CallToAction/CallToAction.js";
|
|
65
|
+
import { ctaVariants as Eo } from "./components/molecules/CallToAction/call-to-action-variants.js";
|
|
66
|
+
import { EmptyState as Lo } from "./components/molecules/EmptyState/EmptyState.js";
|
|
67
|
+
import { emptyStateVariants as Po } from "./components/molecules/EmptyState/empty-state-variants.js";
|
|
68
|
+
import { ErrorState as No } from "./components/molecules/ErrorState/ErrorState.js";
|
|
69
|
+
import { errorStateVariants as Fo } from "./components/molecules/ErrorState/error-state-variants.js";
|
|
70
|
+
import { MatchupCard as Ko } from "./components/molecules/MatchupCard/MatchupCard.js";
|
|
71
|
+
import { ActionBar as Wo } from "./components/organisms/ActionBar/ActionBar.js";
|
|
72
|
+
import { actionBarVariants as jo } from "./components/organisms/ActionBar/action-bar-variants.js";
|
|
73
|
+
import { Countdown as Jo } from "./components/organisms/Countdown/Countdown.js";
|
|
74
|
+
import { Dialog as Uo } from "./components/organisms/Dialog/Dialog.js";
|
|
75
|
+
import { Footer as Zo } from "./components/organisms/Footer/Footer.js";
|
|
76
|
+
import { Navbar as rt } from "./components/organisms/Navbar/Navbar.js";
|
|
77
|
+
import { navbarVariants as tt } from "./components/organisms/Navbar/navbar-variants.js";
|
|
78
|
+
import { Sheet as at } from "./components/organisms/Sheet/Sheet.js";
|
|
79
|
+
import { Table as it, TableBody as mt, TableCaption as xt, TableCell as ft, TableFooter as nt, TableHead as st, TableHeader as lt, TableRow as Vt } from "./components/organisms/Table/Table.js";
|
|
80
|
+
import { tableCellVariants as bt, tableHeadVariants as dt, tableHeaderVariants as ut, tableRowVariants as Tt, tableVariants as Ct, tableWrapperVariants as ht } from "./components/organisms/Table/table-variants.js";
|
|
81
|
+
import { useCountdown as gt } from "./hooks/useCountdown.js";
|
|
82
|
+
import { KONAMI_CODE as kt, useKeySequence as vt } from "./hooks/useKeySequence.js";
|
|
83
|
+
import { cn as Bt } from "./lib/utils.js";
|
|
81
84
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
Yr as Accordion,
|
|
86
|
+
Wo as ActionBar,
|
|
87
|
+
zr as Alert,
|
|
85
88
|
e as Avatar,
|
|
86
|
-
|
|
89
|
+
qr as AvatarStrip,
|
|
87
90
|
m as Badge,
|
|
88
|
-
|
|
91
|
+
ho as Breadcrumbs,
|
|
89
92
|
s as Button,
|
|
90
|
-
|
|
93
|
+
qo as CallToAction,
|
|
91
94
|
b as Card,
|
|
92
95
|
C as Checkbox,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
mo as CheckboxGroup,
|
|
97
|
+
M as Chip,
|
|
98
|
+
Lr as CollapsibleSection,
|
|
99
|
+
R as Combobox,
|
|
100
|
+
Jo as Countdown,
|
|
101
|
+
$r as DescriptionList,
|
|
102
|
+
Uo as Dialog,
|
|
100
103
|
w as Disclosure,
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
Lo as EmptyState,
|
|
105
|
+
No as ErrorState,
|
|
103
106
|
U as Eyebrow,
|
|
104
|
-
|
|
107
|
+
Zo as Footer,
|
|
105
108
|
rr as InlineCode,
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
D as Input,
|
|
110
|
+
kt as KONAMI_CODE,
|
|
108
111
|
ar as LabeledDivider,
|
|
109
112
|
I as Link,
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
Ao as LiquidNav,
|
|
114
|
+
ko as LiquidTabs,
|
|
115
|
+
Ko as MatchupCard,
|
|
112
116
|
lr as MultiSelect,
|
|
113
|
-
|
|
117
|
+
rt as Navbar,
|
|
114
118
|
H as PasswordInput,
|
|
115
119
|
X as Pill,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
eo as Pullquote,
|
|
121
|
+
lo as RadioGroup,
|
|
122
|
+
Pr as SegmentBar,
|
|
119
123
|
cr as Select,
|
|
124
|
+
at as Sheet,
|
|
120
125
|
Cr as Spinner,
|
|
121
126
|
ir as Stat,
|
|
122
127
|
Sr as Switch,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
Wr as TONE_PREFIX,
|
|
129
|
+
it as Table,
|
|
130
|
+
mt as TableBody,
|
|
131
|
+
xt as TableCaption,
|
|
132
|
+
ft as TableCell,
|
|
133
|
+
nt as TableFooter,
|
|
134
|
+
st as TableHead,
|
|
135
|
+
lt as TableHeader,
|
|
136
|
+
Vt as TableRow,
|
|
137
|
+
Ar as Textarea,
|
|
138
|
+
nr as ThemeToggle,
|
|
139
|
+
Nr as Toast,
|
|
140
|
+
Kr as Toaster,
|
|
141
|
+
Er as Tooltip,
|
|
142
|
+
jo as actionBarVariants,
|
|
143
|
+
Qr as alertVariants,
|
|
139
144
|
p as avatarVariants,
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
f as badgeVariants,
|
|
146
|
+
go as breadcrumbVariants,
|
|
142
147
|
V as buttonVariants,
|
|
143
148
|
u as cardVariants,
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
fo as checkboxGroupOptionsVariants,
|
|
150
|
+
no as checkboxGroupPanelVariants,
|
|
146
151
|
S as checkboxVariants,
|
|
147
152
|
_ as chipVariants,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
Bt as cn,
|
|
154
|
+
Eo as ctaVariants,
|
|
155
|
+
oo as descriptionListVariants,
|
|
156
|
+
v as disclosureContentVariants,
|
|
157
|
+
A as disclosureTriggerVariants,
|
|
158
|
+
Po as emptyStateVariants,
|
|
159
|
+
Fo as errorStateVariants,
|
|
155
160
|
Z as eyebrowVariants,
|
|
156
|
-
|
|
161
|
+
q as iconVariants,
|
|
157
162
|
tr as inlineCodeVariants,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
y as inputVariants,
|
|
164
|
+
G as linkVariants,
|
|
165
|
+
Do as liquidTabId,
|
|
166
|
+
tt as navbarVariants,
|
|
161
167
|
z as pillDotVariants,
|
|
162
168
|
J as pillVariants,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
po as pullquoteVariants,
|
|
170
|
+
co as radioDotVariants,
|
|
171
|
+
bo as radioGroupOptionsVariants,
|
|
172
|
+
uo as radioOptionVariants,
|
|
173
|
+
To as radioVariants,
|
|
168
174
|
dr as selectOptionVariants,
|
|
169
175
|
ur as selectTriggerVariants,
|
|
170
176
|
xr as statValueVariants,
|
|
171
177
|
wr as switchThumbVariants,
|
|
172
178
|
kr as switchTrackVariants,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
bt as tableCellVariants,
|
|
180
|
+
dt as tableHeadVariants,
|
|
181
|
+
ut as tableHeaderVariants,
|
|
182
|
+
Tt as tableRowVariants,
|
|
183
|
+
Ct as tableVariants,
|
|
184
|
+
ht as tableWrapperVariants,
|
|
185
|
+
Dr as textareaVariants,
|
|
186
|
+
Xr as toast,
|
|
187
|
+
Fr as toastVariants,
|
|
188
|
+
gt as useCountdown,
|
|
189
|
+
vt as useKeySequence
|
|
184
190
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blakesteve/roster",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "A production-grade atomic component library: accessible, theme-aware, and documented in Storybook. React 19, TypeScript, Tailwind CSS v4.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -116,14 +116,14 @@
|
|
|
116
116
|
"postcss": "^8.5.6",
|
|
117
117
|
"react": "^19.2.4",
|
|
118
118
|
"react-dom": "^19.2.4",
|
|
119
|
+
"react-hot-toast": "^2.6.0",
|
|
119
120
|
"storybook": "^10.2.8",
|
|
120
121
|
"tailwindcss": "^4.1.18",
|
|
121
122
|
"typescript": "~5.9.3",
|
|
122
123
|
"typescript-eslint": "^8.46.4",
|
|
123
124
|
"vite": "^7.2.4",
|
|
124
125
|
"vite-plugin-dts": "^4.5.4",
|
|
125
|
-
"vitest": "^4.0.18"
|
|
126
|
-
"react-hot-toast": "^2.6.0"
|
|
126
|
+
"vitest": "^4.0.18"
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
@@ -133,7 +133,6 @@
|
|
|
133
133
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
134
134
|
"class-variance-authority": "^0.7.1",
|
|
135
135
|
"clsx": "^2.1.1",
|
|
136
|
-
"date-fns": "^4.1.0",
|
|
137
136
|
"tailwind-merge": "^3.4.0"
|
|
138
137
|
}
|
|
139
138
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),r=require("react"),c=require("../../../lib/utils.cjs");function C({tabs:g,activeTab:l,onChange:x,variant:R="pill",fullWidth:b=!1,className:v}){const w=r.useRef(null),a=r.useRef(null),f=r.useRef(null),o=r.useRef(null),m=r.useRef(!1),h=R==="filled",i=r.useCallback(t=>{const e=w.current;if(!e)return null;const s=e.querySelector(`[data-tab-id="${t}"]`);if(!s)return null;const n=e.getBoundingClientRect(),d=s.getBoundingClientRect();return{left:d.left-n.left,width:d.width}},[]),u=r.useCallback((t,e,s)=>{const n=a.current;n&&(n.style.transition=e,n.style.left=`${t.left}px`,n.style.width=`${t.width}px`,n.style.transform=`scaleY(${s})`)},[]);r.useEffect(()=>{const t=i(l);t&&(f.current=t,u(t,"none",1),a.current&&(a.current.style.opacity="1"),m.current=!0)},[]),r.useEffect(()=>{if(!m.current||o.current!==null)return;const t=i(l);t&&(f.current=t,u(t,"none",1))},[l,i,u]);const q=r.useCallback(t=>{if(t===l||(x(t),!m.current))return;o.current&&clearTimeout(o.current);const e=f.current??i(l),s=i(t);if(!e||!s)return;const n=Math.min(e.left,s.left),d=Math.max(e.left+e.width,s.left+s.width)-n;u({left:n,width:d},"left 130ms ease-out, width 130ms ease-out, transform 130ms ease-out",.55),o.current=setTimeout(()=>{const y=i(t)??s;f.current=y,u(y,"left 160ms ease-in, width 160ms ease-in, transform 160ms ease-in",1),o.current=null},130)},[l,i,x,u]);return r.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),p.jsxs("div",{ref:w,role:"tablist","data-testid":"liquid-tabs",style:{background:"var(--roster-lt-bg)",borderColor:"var(--roster-lt-border)"},className:c.cn("rst:font-ui rst:relative rst:flex rst:border",h?"rst:w-full rst:overflow-hidden rst:rounded-lg":c.cn("rst:gap-1 rst:rounded-xl rst:p-1",b?"rst:w-full":"rst:w-fit"),v),children:[p.jsx("div",{ref:a,"aria-hidden":!0,"data-testid":"liquid-tabs-pill",className:c.cn("rst:absolute rst:rounded-lg",h?"rst:top-0 rst:bottom-0":"rst:top-1 rst:bottom-1"),style:{opacity:0,left:0,width:0,background:"var(--roster-lt-pill)"}}),g.map(t=>{const e=t.id===l;return p.jsx("button",{role:"tab","aria-selected":e,"data-tab-id":t.id,"data-testid":`liquid-tab-${t.id}`,onClick:()=>q(t.id),className:c.cn("rst:relative rst:z-10 rst:text-sm rst:font-medium rst:transition-colors rst:cursor-pointer",h?c.cn("rst:flex-1 rst:py-2",e?"rst:text-white":"rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)"):c.cn("rst:rounded-lg rst:py-1.5",b?"rst:flex-1":"rst:px-4",e?"rst:text-white":"rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)")),children:typeof t.label=="function"?t.label(e):t.label},t.id)})]})}exports.LiquidTabs=C;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface TabItem {
|
|
3
|
-
id: string;
|
|
4
|
-
/** Static label, or a render function that receives whether this tab is active. */
|
|
5
|
-
label: ReactNode | ((isActive: boolean) => ReactNode);
|
|
6
|
-
}
|
|
7
|
-
export interface LiquidTabsProps {
|
|
8
|
-
tabs: TabItem[];
|
|
9
|
-
/** The `id` of the currently active tab. */
|
|
10
|
-
activeTab: string;
|
|
11
|
-
/** Called with the new tab `id` when the user selects a different tab. */
|
|
12
|
-
onChange: (id: string) => void;
|
|
13
|
-
/**
|
|
14
|
-
* `"pill"` (default) — floating pill inside a padded container.
|
|
15
|
-
* Width is `w-fit` by default; use `fullWidth` to stretch it.
|
|
16
|
-
* Liquid feel via scaleY squash during the stretch phase.
|
|
17
|
-
*
|
|
18
|
-
* `"filled"` — active tab fills its entire cell; container is always `w-full`.
|
|
19
|
-
* Liquid feel via border-radius morphing (oval during stretch) so the
|
|
20
|
-
* full-height pill never gaps at the container edges.
|
|
21
|
-
*/
|
|
22
|
-
variant?: "pill" | "filled";
|
|
23
|
-
/** Stretch the `pill` variant container to full width with `flex-1` buttons. */
|
|
24
|
-
fullWidth?: boolean;
|
|
25
|
-
/** Extra classes applied to the outer container. */
|
|
26
|
-
className?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Controlled tab strip with a liquid sliding indicator.
|
|
30
|
-
*
|
|
31
|
-
* The pill animation is driven by direct DOM ref manipulation (no setState)
|
|
32
|
-
* to avoid re-renders during the transition. Two-phase motion:
|
|
33
|
-
* 1. Stretch — pill expands to span the gap between old and new tab (130 ms ease-out).
|
|
34
|
-
* 2. Contract — pill snaps to the target tab (160 ms ease-in).
|
|
35
|
-
*
|
|
36
|
-
* `getBoundingClientRect` is used to measure tab positions, so the component
|
|
37
|
-
* must be rendered in a document with a real layout engine to animate.
|
|
38
|
-
*/
|
|
39
|
-
export declare function LiquidTabs({ tabs, activeTab, onChange, variant, fullWidth, className, }: LiquidTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as k, jsx as v } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as c, useCallback as h, useEffect as x } from "react";
|
|
4
|
-
import { cn as u } from "../../../lib/utils.js";
|
|
5
|
-
function B({
|
|
6
|
-
tabs: R,
|
|
7
|
-
activeTab: n,
|
|
8
|
-
onChange: w,
|
|
9
|
-
variant: q = "pill",
|
|
10
|
-
fullWidth: y = !1,
|
|
11
|
-
className: C
|
|
12
|
-
}) {
|
|
13
|
-
const g = c(null), d = c(null), a = c(null), l = c(null), m = c(!1), p = q === "filled", o = h((t) => {
|
|
14
|
-
const r = g.current;
|
|
15
|
-
if (!r) return null;
|
|
16
|
-
const e = r.querySelector(`[data-tab-id="${t}"]`);
|
|
17
|
-
if (!e) return null;
|
|
18
|
-
const s = r.getBoundingClientRect(), f = e.getBoundingClientRect();
|
|
19
|
-
return { left: f.left - s.left, width: f.width };
|
|
20
|
-
}, []), i = h((t, r, e) => {
|
|
21
|
-
const s = d.current;
|
|
22
|
-
s && (s.style.transition = r, s.style.left = `${t.left}px`, s.style.width = `${t.width}px`, s.style.transform = `scaleY(${e})`);
|
|
23
|
-
}, []);
|
|
24
|
-
x(() => {
|
|
25
|
-
const t = o(n);
|
|
26
|
-
t && (a.current = t, i(t, "none", 1), d.current && (d.current.style.opacity = "1"), m.current = !0);
|
|
27
|
-
}, []), x(() => {
|
|
28
|
-
if (!m.current || l.current !== null) return;
|
|
29
|
-
const t = o(n);
|
|
30
|
-
t && (a.current = t, i(t, "none", 1));
|
|
31
|
-
}, [n, o, i]);
|
|
32
|
-
const $ = h(
|
|
33
|
-
(t) => {
|
|
34
|
-
if (t === n || (w(t), !m.current)) return;
|
|
35
|
-
l.current && clearTimeout(l.current);
|
|
36
|
-
const r = a.current ?? o(n), e = o(t);
|
|
37
|
-
if (!r || !e) return;
|
|
38
|
-
const s = Math.min(r.left, e.left), f = Math.max(r.left + r.width, e.left + e.width) - s;
|
|
39
|
-
i(
|
|
40
|
-
{ left: s, width: f },
|
|
41
|
-
"left 130ms ease-out, width 130ms ease-out, transform 130ms ease-out",
|
|
42
|
-
0.55
|
|
43
|
-
), l.current = setTimeout(() => {
|
|
44
|
-
const b = o(t) ?? e;
|
|
45
|
-
a.current = b, i(
|
|
46
|
-
b,
|
|
47
|
-
"left 160ms ease-in, width 160ms ease-in, transform 160ms ease-in",
|
|
48
|
-
1
|
|
49
|
-
), l.current = null;
|
|
50
|
-
}, 130);
|
|
51
|
-
},
|
|
52
|
-
[n, o, w, i]
|
|
53
|
-
);
|
|
54
|
-
return x(
|
|
55
|
-
() => () => {
|
|
56
|
-
l.current && clearTimeout(l.current);
|
|
57
|
-
},
|
|
58
|
-
[]
|
|
59
|
-
), /* @__PURE__ */ k(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
ref: g,
|
|
63
|
-
role: "tablist",
|
|
64
|
-
"data-testid": "liquid-tabs",
|
|
65
|
-
style: { background: "var(--roster-lt-bg)", borderColor: "var(--roster-lt-border)" },
|
|
66
|
-
className: u(
|
|
67
|
-
"rst:font-ui rst:relative rst:flex rst:border",
|
|
68
|
-
p ? "rst:w-full rst:overflow-hidden rst:rounded-lg" : u(
|
|
69
|
-
"rst:gap-1 rst:rounded-xl rst:p-1",
|
|
70
|
-
y ? "rst:w-full" : "rst:w-fit"
|
|
71
|
-
),
|
|
72
|
-
C
|
|
73
|
-
),
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ v(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
ref: d,
|
|
79
|
-
"aria-hidden": !0,
|
|
80
|
-
"data-testid": "liquid-tabs-pill",
|
|
81
|
-
className: u(
|
|
82
|
-
"rst:absolute rst:rounded-lg",
|
|
83
|
-
p ? "rst:top-0 rst:bottom-0" : "rst:top-1 rst:bottom-1"
|
|
84
|
-
),
|
|
85
|
-
style: { opacity: 0, left: 0, width: 0, background: "var(--roster-lt-pill)" }
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
R.map((t) => {
|
|
89
|
-
const r = t.id === n;
|
|
90
|
-
return /* @__PURE__ */ v(
|
|
91
|
-
"button",
|
|
92
|
-
{
|
|
93
|
-
role: "tab",
|
|
94
|
-
"aria-selected": r,
|
|
95
|
-
"data-tab-id": t.id,
|
|
96
|
-
"data-testid": `liquid-tab-${t.id}`,
|
|
97
|
-
onClick: () => $(t.id),
|
|
98
|
-
className: u(
|
|
99
|
-
"rst:relative rst:z-10 rst:text-sm rst:font-medium rst:transition-colors rst:cursor-pointer",
|
|
100
|
-
p ? u(
|
|
101
|
-
"rst:flex-1 rst:py-2",
|
|
102
|
-
r ? "rst:text-white" : "rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)"
|
|
103
|
-
) : u(
|
|
104
|
-
"rst:rounded-lg rst:py-1.5",
|
|
105
|
-
y ? "rst:flex-1" : "rst:px-4",
|
|
106
|
-
r ? "rst:text-white" : "rst:text-(--roster-lt-text-inactive) rst:hover:text-(--roster-lt-text-hover)"
|
|
107
|
-
)
|
|
108
|
-
),
|
|
109
|
-
children: typeof t.label == "function" ? t.label(r) : t.label
|
|
110
|
-
},
|
|
111
|
-
t.id
|
|
112
|
-
);
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
export {
|
|
119
|
-
B as LiquidTabs
|
|
120
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}exports.getRoundingMethod=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../toDate.cjs");function s(t){const e=o.toDate(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}exports.getTimezoneOffsetInMilliseconds=s;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { toDate as o } from "../toDate.js";
|
|
2
|
-
function l(t) {
|
|
3
|
-
const e = o(t), n = new Date(
|
|
4
|
-
Date.UTC(
|
|
5
|
-
e.getFullYear(),
|
|
6
|
-
e.getMonth(),
|
|
7
|
-
e.getDate(),
|
|
8
|
-
e.getHours(),
|
|
9
|
-
e.getMinutes(),
|
|
10
|
-
e.getSeconds(),
|
|
11
|
-
e.getMilliseconds()
|
|
12
|
-
)
|
|
13
|
-
);
|
|
14
|
-
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
l as getTimezoneOffsetInMilliseconds
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../constructFrom.cjs");function r(c,...t){const e=n.constructFrom.bind(null,t.find(o=>typeof o=="object"));return t.map(e)}exports.normalizeDates=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./normalizeDates.cjs");function o(t,e){const[r,n]=a.normalizeDates(t,e.start,e.end);return{start:r,end:n}}exports.normalizeInterval=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./addDays.cjs"),T=require("./addMonths.cjs"),q=require("./constructFrom.cjs"),A=require("./toDate.cjs");function M(t,r,l){const{years:o=0,months:s=0,weeks:d=0,days:e=0,hours:a=0,minutes:u=0,seconds:i=0}=r,n=A.toDate(t),c=s||o?T.addMonths(n,s+o*12):n,h=e||d?D.addDays(c,e+d*7):c,m=u+a*60,y=(i+m*60)*1e3;return q.constructFrom(t,+h+y)}exports.add=M;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { addDays as f } from "./addDays.js";
|
|
2
|
-
import { addMonths as y } from "./addMonths.js";
|
|
3
|
-
import { constructFrom as A } from "./constructFrom.js";
|
|
4
|
-
import { toDate as T } from "./toDate.js";
|
|
5
|
-
function F(o, e, D) {
|
|
6
|
-
const {
|
|
7
|
-
years: t = 0,
|
|
8
|
-
months: s = 0,
|
|
9
|
-
weeks: d = 0,
|
|
10
|
-
days: n = 0,
|
|
11
|
-
hours: m = 0,
|
|
12
|
-
minutes: a = 0,
|
|
13
|
-
seconds: i = 0
|
|
14
|
-
} = e, r = T(o), c = s || t ? y(r, s + t * 12) : r, h = n || d ? f(c, n + d * 7) : c, p = a + m * 60, u = (i + p * 60) * 1e3;
|
|
15
|
-
return A(o, +h + u);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
F as add
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./constructFrom.cjs"),s=require("./toDate.cjs");function n(r,e,a){const t=s.toDate(r);return isNaN(e)?o.constructFrom(r,NaN):(e&&t.setDate(t.getDate()+e),t)}exports.addDays=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./constructFrom.cjs"),i=require("./toDate.cjs");function u(o,n,a){const t=i.toDate(o);if(isNaN(n))return s.constructFrom(o,NaN);if(!n)return t;const r=t.getDate(),e=s.constructFrom(o,t.getTime());e.setMonth(t.getMonth()+n+1,0);const c=e.getDate();return r>=c?e:(t.setFullYear(e.getFullYear(),e.getMonth(),r),t)}exports.addMonths=u;
|