@blakesteve/roster 4.13.0 → 5.0.1
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 +15 -7
- package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
- package/dist/components/atoms/Avatar/Avatar.js +9 -8
- package/dist/components/atoms/AvatarStrip/AvatarStrip.cjs +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.js +11 -10
- package/dist/components/atoms/Badge/Badge.cjs +1 -1
- package/dist/components/atoms/Badge/Badge.js +12 -11
- package/dist/components/atoms/Button/Button.cjs +1 -1
- package/dist/components/atoms/Button/Button.js +9 -8
- package/dist/components/atoms/Card/Card.cjs +1 -1
- package/dist/components/atoms/Card/Card.js +14 -13
- package/dist/components/atoms/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +10 -9
- package/dist/components/atoms/Chip/Chip.cjs +1 -1
- package/dist/components/atoms/Chip/Chip.js +1 -0
- package/dist/components/atoms/CollapsibleSection/CollapsibleSection.cjs +1 -1
- package/dist/components/atoms/CollapsibleSection/CollapsibleSection.js +1 -0
- package/dist/components/atoms/Combobox/Combobox.cjs +1 -1
- package/dist/components/atoms/Combobox/Combobox.js +20 -19
- package/dist/components/atoms/Disclosure/Disclosure.cjs +1 -1
- package/dist/components/atoms/Disclosure/Disclosure.js +5 -4
- package/dist/components/atoms/Eyebrow/Eyebrow.cjs +1 -1
- package/dist/components/atoms/Eyebrow/Eyebrow.js +9 -8
- package/dist/components/atoms/InlineCode/InlineCode.cjs +1 -1
- package/dist/components/atoms/InlineCode/InlineCode.js +7 -6
- package/dist/components/atoms/Input/Input.cjs +1 -1
- package/dist/components/atoms/Input/Input.js +12 -11
- package/dist/components/atoms/LabeledDivider/LabeledDivider.cjs +1 -1
- package/dist/components/atoms/LabeledDivider/LabeledDivider.js +6 -5
- package/dist/components/atoms/Link/Link.cjs +1 -1
- package/dist/components/atoms/Link/Link.js +10 -9
- package/dist/components/atoms/LiquidTabs/LiquidTabs.cjs +1 -1
- package/dist/components/atoms/LiquidTabs/LiquidTabs.js +1 -0
- package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.js +1 -0
- package/dist/components/atoms/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/atoms/PasswordInput/PasswordInput.js +1 -0
- package/dist/components/atoms/Pill/Pill.cjs +1 -1
- package/dist/components/atoms/Pill/Pill.js +5 -4
- package/dist/components/atoms/SegmentBar/SegmentBar.cjs +1 -1
- package/dist/components/atoms/SegmentBar/SegmentBar.js +1 -0
- package/dist/components/atoms/Select/Select.cjs +1 -1
- package/dist/components/atoms/Select/Select.js +1 -0
- package/dist/components/atoms/Spinner/Spinner.cjs +1 -1
- package/dist/components/atoms/Spinner/Spinner.js +3 -2
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.js +7 -6
- package/dist/components/atoms/Switch/Switch.cjs +1 -1
- package/dist/components/atoms/Switch/Switch.js +1 -0
- package/dist/components/atoms/Textarea/Textarea.cjs +1 -1
- package/dist/components/atoms/Textarea/Textarea.js +11 -10
- package/dist/components/atoms/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/atoms/ThemeToggle/ThemeToggle.js +1 -0
- package/dist/components/atoms/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.js +4 -3
- package/dist/components/molecules/Accordion/Accordion.cjs +1 -1
- package/dist/components/molecules/Accordion/Accordion.js +5 -4
- package/dist/components/molecules/Alert/Alert.cjs +1 -1
- package/dist/components/molecules/Alert/Alert.js +1 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +4 -3
- package/dist/components/molecules/CallToAction/CallToAction.cjs +1 -1
- package/dist/components/molecules/CallToAction/CallToAction.js +1 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +7 -6
- package/dist/components/molecules/DescriptionList/DescriptionList.cjs +1 -1
- package/dist/components/molecules/DescriptionList/DescriptionList.js +1 -0
- package/dist/components/molecules/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/molecules/EmptyState/EmptyState.js +1 -0
- package/dist/components/molecules/ErrorState/ErrorState.cjs +1 -1
- package/dist/components/molecules/ErrorState/ErrorState.js +5 -4
- package/dist/components/molecules/MatchupCard/MatchupCard.cjs +1 -1
- package/dist/components/molecules/MatchupCard/MatchupCard.js +1 -0
- package/dist/components/molecules/Pullquote/Pullquote.cjs +1 -1
- package/dist/components/molecules/Pullquote/Pullquote.js +6 -5
- package/dist/components/molecules/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/molecules/RadioGroup/RadioGroup.js +1 -0
- package/dist/components/molecules/Toast/Toast.cjs +1 -1
- package/dist/components/molecules/Toast/Toast.js +1 -0
- package/dist/components/molecules/Toast/Toaster.cjs +1 -1
- package/dist/components/molecules/Toast/Toaster.js +1 -0
- package/dist/components/molecules/Toast/toast-api.cjs +1 -1
- package/dist/components/molecules/Toast/toast-api.js +11 -10
- package/dist/components/organisms/ActionBar/ActionBar.cjs +1 -1
- package/dist/components/organisms/ActionBar/ActionBar.js +5 -4
- package/dist/components/organisms/Countdown/Countdown.cjs +1 -1
- package/dist/components/organisms/Countdown/Countdown.js +1 -0
- package/dist/components/organisms/DataTable/DataTable.cjs +1 -1
- package/dist/components/organisms/DataTable/DataTable.js +1 -0
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +5 -4
- package/dist/components/organisms/Footer/Footer.cjs +1 -1
- package/dist/components/organisms/Footer/Footer.js +1 -0
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.js +1 -0
- package/dist/components/organisms/Table/Table.cjs +1 -1
- package/dist/components/organisms/Table/Table.js +20 -19
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.js +2 -3
- package/dist/hooks/useCountdown.cjs +1 -1
- package/dist/hooks/useCountdown.d.ts +9 -0
- package/dist/hooks/useCountdown.js +21 -23
- package/dist/hooks/useKeySequence.cjs +1 -1
- package/dist/hooks/useKeySequence.js +1 -0
- package/dist/internal/PopupOption.cjs +1 -1
- package/dist/internal/PopupOption.js +1 -0
- package/dist/internal/popup.cjs +1 -1
- package/dist/internal/popup.js +8 -7
- package/dist/meta.json +2 -2
- package/dist/roster.cjs +1 -1
- package/dist/roster.js +7 -8
- package/dist/utils.d.ts +11 -8
- package/package.json +6 -6
- 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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
3
|
import { useState as b } from "react";
|
|
3
4
|
import { FontAwesomeIcon as v } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
@@ -11,14 +12,14 @@ const O = ({
|
|
|
11
12
|
variant: e,
|
|
12
13
|
className: l,
|
|
13
14
|
defaultOpen: m = !1,
|
|
14
|
-
isOpen:
|
|
15
|
+
isOpen: n,
|
|
15
16
|
onToggle: d,
|
|
16
17
|
icon: f,
|
|
17
18
|
...p
|
|
18
19
|
}) => {
|
|
19
|
-
const [u, x] = b(m), t =
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const [u, x] = b(m), t = n !== void 0 ? n : u, h = () => {
|
|
21
|
+
const o = !t;
|
|
22
|
+
n === void 0 && x(o), d?.(o);
|
|
22
23
|
};
|
|
23
24
|
return /* @__PURE__ */ a("div", { className: s("rst:w-full rst:flex rst:flex-col", l), ...p, children: [
|
|
24
25
|
/* @__PURE__ */ a(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime");require("react");const y=require("../../../lib/utils.cjs"),b=require("./eyebrow-variants.cjs");function e({as:r,className:t,size:n,tone:o,weight:s,children:i,...
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime");require("react");const y=require("../../../lib/utils.cjs"),b=require("./eyebrow-variants.cjs");function e({as:r,className:t,size:n,tone:o,weight:s,children:i,...u}){const a=r??"span";return c.jsx(a,{className:y.cn(b.eyebrowVariants({size:n,tone:o,weight:s}),t),...u,children:i})}e.displayName="Eyebrow";exports.Eyebrow=e;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { eyebrowVariants as
|
|
4
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
5
|
+
import { eyebrowVariants as a } from "./eyebrow-variants.js";
|
|
5
6
|
function c({
|
|
6
7
|
as: o,
|
|
7
8
|
className: r,
|
|
8
|
-
size:
|
|
9
|
+
size: e,
|
|
9
10
|
tone: n,
|
|
10
11
|
weight: t,
|
|
11
|
-
children:
|
|
12
|
+
children: m,
|
|
12
13
|
...p
|
|
13
14
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ i(
|
|
15
16
|
o ?? "span",
|
|
16
17
|
{
|
|
17
|
-
className:
|
|
18
|
+
className: s(a({ size: e, tone: n, weight: t }), r),
|
|
18
19
|
...p,
|
|
19
|
-
children:
|
|
20
|
+
children: m
|
|
20
21
|
}
|
|
21
22
|
);
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),l=require("../../../lib/utils.cjs"),d=require("./inline-code-variants.cjs"),e=c.forwardRef(({className:n,colorScheme:i,surface:
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),l=require("../../../lib/utils.cjs"),d=require("./inline-code-variants.cjs"),e=c.forwardRef(({className:n,colorScheme:i,surface:t,children:o,...r},s)=>a.jsx("code",{ref:s,className:l.cn(d.inlineCodeVariants({colorScheme:i,surface:t}),n),...r,children:o}));e.displayName="InlineCode";exports.InlineCode=e;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import t from "react";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import a from "react";
|
|
3
4
|
import { cn as d } from "../../../lib/utils.js";
|
|
4
5
|
import { inlineCodeVariants as f } from "./inline-code-variants.js";
|
|
5
|
-
const l =
|
|
6
|
-
({ className:
|
|
6
|
+
const l = a.forwardRef(
|
|
7
|
+
({ className: e, colorScheme: o, surface: r, children: i, ...m }, n) => /* @__PURE__ */ t(
|
|
7
8
|
"code",
|
|
8
9
|
{
|
|
9
|
-
ref:
|
|
10
|
-
className: d(f({ colorScheme:
|
|
10
|
+
ref: n,
|
|
11
|
+
className: d(f({ colorScheme: o, surface: r }), e),
|
|
11
12
|
...m,
|
|
12
13
|
children: i
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),h=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),g=require("../../../node_modules/@headlessui/react/dist/components/input/input.cjs"),v=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),t=require("../../../lib/utils.cjs"),a=require("./input-variants.cjs"),m=b.forwardRef(({className:x,type:p,label:o,helperText:u,errorMessage:e,variant:i,size:n,error:f,startIcon:c,endIcon:l,disabled:d,inputClassName:j,...q},N)=>{const s=!!e||f;return r.jsxs(y.Field,{disabled:d,className:t.cn("rst:w-full",x),children:[o&&r.jsx(v.Label,{className:t.cn("rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-left rst:mb-1.5 rst:transition-colors","rst:text-[var(--roster-control-text)]","rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70"),children:o}),r.jsxs("div",{className:"rst:relative",children:[c&&r.jsx("div",{className:t.cn(a.iconVariants({variant:i,error:s}),"rst:left-3"),children:c}),r.jsx(g.Input,{ref:N,type:p,disabled:d,className:t.cn(a.inputVariants({variant:i,size:n,error:s}),c&&(n==="sm"?"rst:pl-9":"rst:pl-10"),l&&(n==="sm"?"rst:pr-9":"rst:pr-10"),j),...q}),l&&r.jsx("div",{className:t.cn(a.iconVariants({variant:i,error:s}),"rst:right-3"),children:l})]}),(u||e)&&r.jsx(h.Description,{className:t.cn("rst:text-xs rst:text-left rst:mt-1.5",s?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:e||u})]})});m.displayName="Input";exports.Input=m;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),h=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),g=require("../../../node_modules/@headlessui/react/dist/components/input/input.cjs"),v=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),t=require("../../../lib/utils.cjs"),a=require("./input-variants.cjs"),m=b.forwardRef(({className:x,type:p,label:o,helperText:u,errorMessage:e,variant:i,size:n,error:f,startIcon:c,endIcon:l,disabled:d,inputClassName:j,...q},N)=>{const s=!!e||f;return r.jsxs(y.Field,{disabled:d,className:t.cn("rst:w-full",x),children:[o&&r.jsx(v.Label,{className:t.cn("rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-left rst:mb-1.5 rst:transition-colors","rst:text-[var(--roster-control-text)]","rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70"),children:o}),r.jsxs("div",{className:"rst:relative",children:[c&&r.jsx("div",{className:t.cn(a.iconVariants({variant:i,error:s}),"rst:left-3"),children:c}),r.jsx(g.Input,{ref:N,type:p,disabled:d,className:t.cn(a.inputVariants({variant:i,size:n,error:s}),c&&(n==="sm"?"rst:pl-9":"rst:pl-10"),l&&(n==="sm"?"rst:pr-9":"rst:pr-10"),j),...q}),l&&r.jsx("div",{className:t.cn(a.iconVariants({variant:i,error:s}),"rst:right-3"),children:l})]}),(u||e)&&r.jsx(h.Description,{className:t.cn("rst:text-xs rst:text-left rst:mt-1.5",s?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:e||u})]})});m.displayName="Input";exports.Input=m;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
3
|
import b from "react";
|
|
3
4
|
import { Description as k } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
|
|
4
5
|
import { Field as v } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
|
|
5
6
|
import { Input as w } from "../../../node_modules/@headlessui/react/dist/components/input/input.js";
|
|
6
7
|
import { Label as g } from "../../../node_modules/@headlessui/react/dist/components/label/label.js";
|
|
7
8
|
import { cn as r } from "../../../lib/utils.js";
|
|
8
|
-
import { iconVariants as
|
|
9
|
+
import { iconVariants as d, inputVariants as j } from "./input-variants.js";
|
|
9
10
|
const R = b.forwardRef(
|
|
10
11
|
({
|
|
11
12
|
className: f,
|
|
12
13
|
type: x,
|
|
13
14
|
label: l,
|
|
14
|
-
helperText:
|
|
15
|
+
helperText: c,
|
|
15
16
|
errorMessage: e,
|
|
16
17
|
variant: o,
|
|
17
18
|
size: m,
|
|
18
19
|
error: u,
|
|
19
20
|
startIcon: a,
|
|
20
21
|
endIcon: i,
|
|
21
|
-
disabled:
|
|
22
|
+
disabled: p,
|
|
22
23
|
inputClassName: N,
|
|
23
24
|
...h
|
|
24
25
|
}, y) => {
|
|
@@ -37,7 +38,7 @@ const R = b.forwardRef(
|
|
|
37
38
|
DisabledProvider stays false and the Label and Description never dim.
|
|
38
39
|
Fixed in both rather than one, because a form with a disabled Input
|
|
39
40
|
and a disabled Select that grey differently is worse than neither. */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ n(v, { disabled: p, className: r("rst:w-full", f), children: [
|
|
41
42
|
l && /* @__PURE__ */ t(
|
|
42
43
|
g,
|
|
43
44
|
{
|
|
@@ -49,12 +50,12 @@ const R = b.forwardRef(
|
|
|
49
50
|
children: l
|
|
50
51
|
}
|
|
51
52
|
),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ n("div", { className: "rst:relative", children: [
|
|
53
54
|
a && /* @__PURE__ */ t(
|
|
54
55
|
"div",
|
|
55
56
|
{
|
|
56
57
|
className: r(
|
|
57
|
-
|
|
58
|
+
d({ variant: o, error: s }),
|
|
58
59
|
"rst:left-3"
|
|
59
60
|
),
|
|
60
61
|
children: a
|
|
@@ -65,7 +66,7 @@ const R = b.forwardRef(
|
|
|
65
66
|
{
|
|
66
67
|
ref: y,
|
|
67
68
|
type: x,
|
|
68
|
-
disabled:
|
|
69
|
+
disabled: p,
|
|
69
70
|
className: r(
|
|
70
71
|
j({ variant: o, size: m, error: s }),
|
|
71
72
|
/* Icon inset tracks the size's own padding: sm is px-3, so it
|
|
@@ -81,21 +82,21 @@ const R = b.forwardRef(
|
|
|
81
82
|
"div",
|
|
82
83
|
{
|
|
83
84
|
className: r(
|
|
84
|
-
|
|
85
|
+
d({ variant: o, error: s }),
|
|
85
86
|
"rst:right-3"
|
|
86
87
|
),
|
|
87
88
|
children: i
|
|
88
89
|
}
|
|
89
90
|
)
|
|
90
91
|
] }),
|
|
91
|
-
(
|
|
92
|
+
(c || e) && /* @__PURE__ */ t(
|
|
92
93
|
k,
|
|
93
94
|
{
|
|
94
95
|
className: r(
|
|
95
96
|
"rst:text-xs rst:text-left rst:mt-1.5",
|
|
96
97
|
s ? "rst:text-error-600 rst:dark:text-error-400 rst:font-medium" : "rst:text-gray-500 rst:dark:text-gray-400"
|
|
97
98
|
),
|
|
98
|
-
children: e ||
|
|
99
|
+
children: e || c
|
|
99
100
|
}
|
|
100
101
|
)
|
|
101
102
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),d=require("../../../lib/utils.cjs"),t=require("../Eyebrow/Eyebrow.cjs"),a=c.forwardRef(({label:i,trailing:r,align:s="start",className:n,...l},o)=>e.jsxs("div",{ref:o,className:d.cn("rst:font-ui rst:flex rst:items-center rst:gap-3",n),...l,children:[s==="end"&&e.jsx("span",{role:"presentation",className:"rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800"}),e.jsx(t.Eyebrow,{children:i}),s==="start"&&e.jsx("span",{role:"presentation",className:"rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800"}),r&&e.jsx(t.Eyebrow,{children:r})]}));a.displayName="LabeledDivider";exports.LabeledDivider=a;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
3
|
import m from "react";
|
|
3
|
-
import { cn as
|
|
4
|
+
import { cn as n } from "../../../lib/utils.js";
|
|
4
5
|
import { Eyebrow as t } from "../Eyebrow/Eyebrow.js";
|
|
5
|
-
const
|
|
6
|
-
({ label: a, trailing: e, align: s = "start", className: o, ...
|
|
6
|
+
const p = m.forwardRef(
|
|
7
|
+
({ label: a, trailing: e, align: s = "start", className: o, ...i }, d) => /* @__PURE__ */ l("div", { ref: d, className: n("rst:font-ui rst:flex rst:items-center rst:gap-3", o), ...i, children: [
|
|
7
8
|
s === "end" && /* @__PURE__ */ r("span", { role: "presentation", className: "rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800" }),
|
|
8
9
|
/* @__PURE__ */ r(t, { children: a }),
|
|
9
10
|
s === "start" && /* @__PURE__ */ r("span", { role: "presentation", className: "rst:h-px rst:flex-1 rst:bg-gray-200 rst:dark:bg-gray-800" }),
|
|
10
11
|
e && /* @__PURE__ */ r(t, { children: e })
|
|
11
12
|
] })
|
|
12
13
|
);
|
|
13
|
-
|
|
14
|
+
p.displayName = "LabeledDivider";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
p as LabeledDivider
|
|
16
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const a=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),c=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),w=require("../../../lib/utils.cjs"),g=require("./link-variants.cjs"),p=({as:l,className:u,variant:m,underline:x,size:d,external:k,showExternalIcon:j,children:n,href:t,...s})=>{const q=l||"a",r=k||typeof t=="string"&&t.startsWith("http"),o=j??r,i=w.cn(g.linkVariants({variant:m,underline:x,size:d}),u);return r?e.jsxs("a",{href:t,className:i,target:"_blank",rel:"noopener noreferrer",...s,children:[n,o&&e.jsx(a.FontAwesomeIcon,{icon:c.faExternalLinkAlt,className:"rst:ml-0.5 rst:h-3 rst:w-3","data-testid":"external-icon"})]}):e.jsxs(q,{className:i,...t!==void 0?{href:t}:{},...s,children:[n,o&&e.jsx(a.FontAwesomeIcon,{icon:c.faExternalLinkAlt,className:"rst:ml-1 rst:h-3 rst:w-3 rst:opacity-70","data-testid":"external-icon"})]})};exports.Link=p;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
4
|
import { FontAwesomeIcon as m } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
4
5
|
import { faExternalLinkAlt as c } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
5
|
-
import { cn as
|
|
6
|
-
import { linkVariants as
|
|
6
|
+
import { cn as N } from "../../../lib/utils.js";
|
|
7
|
+
import { linkVariants as h } from "./link-variants.js";
|
|
7
8
|
const I = ({
|
|
8
9
|
as: l,
|
|
9
10
|
className: p,
|
|
@@ -11,16 +12,16 @@ const I = ({
|
|
|
11
12
|
underline: x,
|
|
12
13
|
size: f,
|
|
13
14
|
external: k,
|
|
14
|
-
showExternalIcon:
|
|
15
|
+
showExternalIcon: u,
|
|
15
16
|
children: o,
|
|
16
17
|
href: t,
|
|
17
18
|
...s
|
|
18
19
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
20
|
+
const w = l || "a", n = k || typeof t == "string" && t.startsWith("http"), r = u ?? n, a = N(
|
|
21
|
+
h({ variant: d, underline: x, size: f }),
|
|
21
22
|
p
|
|
22
23
|
);
|
|
23
|
-
return
|
|
24
|
+
return n ? /* @__PURE__ */ e(
|
|
24
25
|
"a",
|
|
25
26
|
{
|
|
26
27
|
href: t,
|
|
@@ -30,7 +31,7 @@ const I = ({
|
|
|
30
31
|
...s,
|
|
31
32
|
children: [
|
|
32
33
|
o,
|
|
33
|
-
|
|
34
|
+
r && /* @__PURE__ */ i(
|
|
34
35
|
m,
|
|
35
36
|
{
|
|
36
37
|
icon: c,
|
|
@@ -41,14 +42,14 @@ const I = ({
|
|
|
41
42
|
]
|
|
42
43
|
}
|
|
43
44
|
) : /* @__PURE__ */ e(
|
|
44
|
-
|
|
45
|
+
w,
|
|
45
46
|
{
|
|
46
47
|
className: a,
|
|
47
48
|
...t !== void 0 ? { href: t } : {},
|
|
48
49
|
...s,
|
|
49
50
|
children: [
|
|
50
51
|
o,
|
|
51
|
-
|
|
52
|
+
r && /* @__PURE__ */ i(
|
|
52
53
|
m,
|
|
53
54
|
{
|
|
54
55
|
icon: c,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"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
|
+
"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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),O=require("react"),B=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),H=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),M=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),x=require("../../../node_modules/@headlessui/react/dist/components/listbox/listbox.cjs"),Y=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),S=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),T=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),s=require("../../../lib/utils.cjs"),W=require("../Select/select-variants.cjs"),F=require("../Chip/Chip.cjs"),X=require("../../../internal/PopupOption.cjs"),c=require("../../../internal/popup.cjs"),G=({options:h,value:n,onChange:m,placeholder:b="Select options",disabled:o=!1,variant:f,size:i,error:R,className:_,triggerClassName:L,optionsClassName:D,helperText:v,errorMessage:p,label:g,display:u="chips",maxChips:N,clearable:j=!1,chipColorScheme:k="neutral",chipVariant:w="outline",clearLabel:A="Clear selection",removeLabel:E=l=>`Remove ${l}`,...U})=>{const l=!!p||R,a=n.length>0,y=new Map(h.map((r,e)=>[r.value,e])),d=n.map(r=>({value:r,label:h.find(e=>e.value===r)?.label??String(r)})).sort((r,e)=>(y.get(r.value)??Number.POSITIVE_INFINITY)-(y.get(e.value)??Number.POSITIVE_INFINITY)),P=N===void 0?d:d.slice(0,N),I=d.length-P.length,{ref:$,inDarkScope:C}=c.useDarkScope(),q=O.useRef(null);return t.jsxs(H.Field,{disabled:o,className:s.cn("rst:flex rst:flex-col rst:gap-1.5",_),...U,children:[g&&t.jsx(M.Label,{className:"rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",children:g}),t.jsx(x.Listbox,{value:n,onChange:m,disabled:o,multiple:!0,children:t.jsxs("div",{ref:$,className:"rst:relative",children:[t.jsxs("div",{className:s.cn(W.selectTriggerVariants({variant:f,size:i,error:l}),"rst:h-auto rst:flex-wrap rst:items-center rst:gap-1.5 rst:py-1.5",i==="sm"?"rst:min-h-9":i==="lg"?"rst:min-h-11":"rst:min-h-10",j&&a&&"rst:pr-16","rst:focus-within:ring-2 rst:focus-within:ring-ring",o&&"rst:opacity-50 rst:cursor-not-allowed",L),children:[t.jsx(x.ListboxButton,{ref:q,"aria-invalid":l||void 0,className:"rst:absolute rst:inset-0 rst:h-full rst:w-full rst:cursor-pointer rst:rounded-md rst:focus:outline-hidden rst:disabled:cursor-not-allowed",children:t.jsx("span",{className:"rst:sr-only",children:a?u==="count"?`${n.length} selected`:d.map(r=>r.label).join(", "):b})}),!a&&t.jsx("span",{"aria-hidden":"true",className:"rst:pointer-events-none rst:relative rst:block rst:truncate rst:text-gray-500 rst:dark:text-gray-400",children:b}),a&&u==="count"&&t.jsxs("span",{"aria-hidden":"true",className:"rst:pointer-events-none rst:relative rst:block rst:truncate",children:[n.length," selected"]}),a&&u==="chips"&&P.map((r,e)=>t.jsx(F.Chip,{size:"sm",variant:w,colorScheme:k,disabled:o,onRemove:()=>m(n.filter(V=>V!==r.value)),removeLabel:E(r.label),className:s.cn("rst:relative rst:max-w-[12rem] rst:pointer-events-none","rst:[&_button]:pointer-events-auto","rst:text-inherit rst:border-current/70 rst:dark:text-inherit rst:dark:border-current/70"),children:t.jsx("span",{className:"rst:block rst:truncate",children:r.label})},`${e}-${String(r.value)}`)),I>0&&u==="chips"&&t.jsxs(F.Chip,{size:"sm",variant:w,colorScheme:k,"aria-hidden":"true",className:"rst:pointer-events-none rst:relative rst:text-inherit rst:border-current/70 rst:dark:text-inherit rst:dark:border-current/70",children:["+",I]}),t.jsx("span",{className:s.cn("rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",i==="sm"?"rst:pr-2.5":"rst:pr-3"),children:t.jsx(S.FontAwesomeIcon,{icon:T.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})}),j&&a&&t.jsx("button",{type:"button",disabled:o,onClick:()=>{m([]),q.current?.focus()},"aria-label":A,className:s.cn("rst:absolute rst:inset-y-0 rst:flex rst:w-6 rst:items-center rst:justify-center","rst:cursor-pointer rst:disabled:cursor-not-allowed","rst:text-current rst:opacity-70 rst:hover:opacity-100 rst:disabled:opacity-40","rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:rounded-sm",i==="sm"?"rst:right-7":"rst:right-8"),children:t.jsx(S.FontAwesomeIcon,{icon:T.faXmark,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"})})]}),t.jsx(Y.Transition,{as:O.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:t.jsx(x.ListboxOptions,{anchor:c.POPUP_ANCHOR,className:s.cn(c.popupInDarkPalette(C,f)&&"dark",c.POPUP_PANEL,c.POPUP_WIDTH_OF_BUTTON,D),children:h.map(r=>t.jsx(X.PopupOption,{as:x.ListboxOption,value:r.value,disabled:r.disabled,size:i,children:r.label},r.value))})})]})}),(v||p)&&t.jsx(B.Description,{className:s.cn("rst:text-xs rst:text-left",l?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:p||v})]})};exports.MultiSelect=G;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),O=require("react"),B=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),H=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),M=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),x=require("../../../node_modules/@headlessui/react/dist/components/listbox/listbox.cjs"),Y=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),S=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),T=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),s=require("../../../lib/utils.cjs"),W=require("../Select/select-variants.cjs"),F=require("../Chip/Chip.cjs"),X=require("../../../internal/PopupOption.cjs"),c=require("../../../internal/popup.cjs"),G=({options:h,value:n,onChange:m,placeholder:b="Select options",disabled:o=!1,variant:f,size:i,error:R,className:_,triggerClassName:L,optionsClassName:D,helperText:v,errorMessage:p,label:g,display:u="chips",maxChips:N,clearable:j=!1,chipColorScheme:k="neutral",chipVariant:w="outline",clearLabel:A="Clear selection",removeLabel:E=l=>`Remove ${l}`,...U})=>{const l=!!p||R,a=n.length>0,y=new Map(h.map((r,e)=>[r.value,e])),d=n.map(r=>({value:r,label:h.find(e=>e.value===r)?.label??String(r)})).sort((r,e)=>(y.get(r.value)??Number.POSITIVE_INFINITY)-(y.get(e.value)??Number.POSITIVE_INFINITY)),P=N===void 0?d:d.slice(0,N),I=d.length-P.length,{ref:$,inDarkScope:C}=c.useDarkScope(),q=O.useRef(null);return t.jsxs(H.Field,{disabled:o,className:s.cn("rst:flex rst:flex-col rst:gap-1.5",_),...U,children:[g&&t.jsx(M.Label,{className:"rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",children:g}),t.jsx(x.Listbox,{value:n,onChange:m,disabled:o,multiple:!0,children:t.jsxs("div",{ref:$,className:"rst:relative",children:[t.jsxs("div",{className:s.cn(W.selectTriggerVariants({variant:f,size:i,error:l}),"rst:h-auto rst:flex-wrap rst:items-center rst:gap-1.5 rst:py-1.5",i==="sm"?"rst:min-h-9":i==="lg"?"rst:min-h-11":"rst:min-h-10",j&&a&&"rst:pr-16","rst:focus-within:ring-2 rst:focus-within:ring-ring",o&&"rst:opacity-50 rst:cursor-not-allowed",L),children:[t.jsx(x.ListboxButton,{ref:q,"aria-invalid":l||void 0,className:"rst:absolute rst:inset-0 rst:h-full rst:w-full rst:cursor-pointer rst:rounded-md rst:focus:outline-hidden rst:disabled:cursor-not-allowed",children:t.jsx("span",{className:"rst:sr-only",children:a?u==="count"?`${n.length} selected`:d.map(r=>r.label).join(", "):b})}),!a&&t.jsx("span",{"aria-hidden":"true",className:"rst:pointer-events-none rst:relative rst:block rst:truncate rst:text-gray-500 rst:dark:text-gray-400",children:b}),a&&u==="count"&&t.jsxs("span",{"aria-hidden":"true",className:"rst:pointer-events-none rst:relative rst:block rst:truncate",children:[n.length," selected"]}),a&&u==="chips"&&P.map((r,e)=>t.jsx(F.Chip,{size:"sm",variant:w,colorScheme:k,disabled:o,onRemove:()=>m(n.filter(V=>V!==r.value)),removeLabel:E(r.label),className:s.cn("rst:relative rst:max-w-[12rem] rst:pointer-events-none","rst:[&_button]:pointer-events-auto","rst:text-inherit rst:border-current/70 rst:dark:text-inherit rst:dark:border-current/70"),children:t.jsx("span",{className:"rst:block rst:truncate",children:r.label})},`${e}-${String(r.value)}`)),I>0&&u==="chips"&&t.jsxs(F.Chip,{size:"sm",variant:w,colorScheme:k,"aria-hidden":"true",className:"rst:pointer-events-none rst:relative rst:text-inherit rst:border-current/70 rst:dark:text-inherit rst:dark:border-current/70",children:["+",I]}),t.jsx("span",{className:s.cn("rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",i==="sm"?"rst:pr-2.5":"rst:pr-3"),children:t.jsx(S.FontAwesomeIcon,{icon:T.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})}),j&&a&&t.jsx("button",{type:"button",disabled:o,onClick:()=>{m([]),q.current?.focus()},"aria-label":A,className:s.cn("rst:absolute rst:inset-y-0 rst:flex rst:w-6 rst:items-center rst:justify-center","rst:cursor-pointer rst:disabled:cursor-not-allowed","rst:text-current rst:opacity-70 rst:hover:opacity-100 rst:disabled:opacity-40","rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:rounded-sm",i==="sm"?"rst:right-7":"rst:right-8"),children:t.jsx(S.FontAwesomeIcon,{icon:T.faXmark,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"})})]}),t.jsx(Y.Transition,{as:O.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:t.jsx(x.ListboxOptions,{anchor:c.POPUP_ANCHOR,className:s.cn(c.popupInDarkPalette(C,f)&&"dark",c.POPUP_PANEL,c.POPUP_WIDTH_OF_BUTTON,D),children:h.map(r=>t.jsx(X.PopupOption,{as:x.ListboxOption,value:r.value,disabled:r.disabled,size:i,children:r.label},r.value))})})]})}),(v||p)&&t.jsx(B.Description,{className:s.cn("rst:text-xs rst:text-left",l?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:p||v})]})};exports.MultiSelect=G;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),j=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),j=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),c=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),a=require("../../../lib/utils.cjs"),S=require("../Input/Input.cjs"),u=i.forwardRef(({revealable:l=!0,defaultRevealed:d=!1,revealed:r,onRevealChange:p,showLabel:y="Show password",hideLabel:f="Hide password",disabled:e,variant:w,error:m,errorMessage:h,className:v,...x},g)=>{const[I,q]=i.useState(d),o=r!==void 0,t=o?r:I,b=()=>{const n=!t;o||q(n),p?.(n)};return s.jsx(S.Input,{ref:g,type:t?"text":"password",disabled:e,variant:w,error:m,errorMessage:h,className:a.cn("rst:[&_input::-ms-reveal]:hidden",v),endIcon:l?s.jsx("button",{type:"button",onClick:b,disabled:e,"aria-label":t?f:y,"aria-pressed":t,className:a.cn("rst:-m-1 rst:flex rst:items-center rst:rounded rst:p-1 rst:transition-opacity","rst:opacity-70 rst:hover:opacity-100","rst:focus:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring",e&&"rst:cursor-not-allowed rst:opacity-40 rst:hover:opacity-40"),children:s.jsx(j.FontAwesomeIcon,{icon:t?c.faEyeSlash:c.faEye,className:"rst:h-4 rst:w-4","aria-hidden":"true"})}):void 0,...x})});u.displayName="PasswordInput";exports.PasswordInput=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),f=require("react"),a=require("../../../lib/utils.cjs"),i=require("./pill-variants.cjs"),n=f.forwardRef(({className:c,colorScheme:e="neutral",variant:t="soft",size:r="sm",dot:u=!1,pulse:p=!1,leadingIcon:l,children:o,...d},m)=>s.jsxs("span",{ref:m,className:a.cn(i.pillVariants({colorScheme:e,variant:t,size:r}),c),...d,children:[u?s.jsxs("span",{className:"rst:relative rst:inline-flex rst:shrink-0","aria-hidden":"true",children:[p&&s.jsx("span",{className:a.cn(i.pillDotVariants({colorScheme:e,variant:t,size:r}),"rst:absolute rst:inset-0 rst:motion-safe:animate-ping rst:opacity-75")}),s.jsx("span",{className:a.cn(i.pillDotVariants({colorScheme:e,variant:t,size:r}),"rst:relative")})]}):l&&s.jsx("span",{className:"rst:inline-flex rst:shrink-0 rst:items-center","aria-hidden":"true",children:l}),o]}));n.displayName="Pill";exports.Pill=n;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),f=require("react"),a=require("../../../lib/utils.cjs"),i=require("./pill-variants.cjs"),n=f.forwardRef(({className:c,colorScheme:e="neutral",variant:t="soft",size:r="sm",dot:u=!1,pulse:p=!1,leadingIcon:l,children:o,...d},m)=>s.jsxs("span",{ref:m,className:a.cn(i.pillVariants({colorScheme:e,variant:t,size:r}),c),...d,children:[u?s.jsxs("span",{className:"rst:relative rst:inline-flex rst:shrink-0","aria-hidden":"true",children:[p&&s.jsx("span",{className:a.cn(i.pillDotVariants({colorScheme:e,variant:t,size:r}),"rst:absolute rst:inset-0 rst:motion-safe:animate-ping rst:opacity-75")}),s.jsx("span",{className:a.cn(i.pillDotVariants({colorScheme:e,variant:t,size:r}),"rst:relative")})]}):l&&s.jsx("span",{className:"rst:inline-flex rst:shrink-0 rst:items-center","aria-hidden":"true",children:l}),o]}));n.displayName="Pill";exports.Pill=n;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
3
|
import u from "react";
|
|
3
4
|
import { cn as e } from "../../../lib/utils.js";
|
|
@@ -12,13 +13,13 @@ const h = u.forwardRef(
|
|
|
12
13
|
pulse: f = !1,
|
|
13
14
|
leadingIcon: i,
|
|
14
15
|
children: o,
|
|
15
|
-
...
|
|
16
|
-
},
|
|
16
|
+
...c
|
|
17
|
+
}, d) => /* @__PURE__ */ l(
|
|
17
18
|
"span",
|
|
18
19
|
{
|
|
19
|
-
ref:
|
|
20
|
+
ref: d,
|
|
20
21
|
className: e(N({ colorScheme: s, variant: r, size: t }), m),
|
|
21
|
-
...
|
|
22
|
+
...c,
|
|
22
23
|
children: [
|
|
23
24
|
p ? (
|
|
24
25
|
// The pulse is a sibling ring rather than an animation on the dot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("../../../lib/utils.cjs");function o({segments:a,size:
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("../../../lib/utils.cjs");function o({segments:a,size:i="md",showLegend:c=!0,className:d}){const e=a.reduce((t,s)=>t+s.value,0);if(e===0)return null;const l=a.filter(t=>t.value>0);return r.jsxs("div",{className:n.cn("rst:font-ui rst:flex rst:flex-col rst:gap-1.5",d),children:[r.jsx("div",{"data-testid":"segment-bar-track",className:n.cn("rst:flex rst:w-full rst:overflow-hidden rst:rounded-full",i==="sm"?"rst:h-1.5":"rst:h-2"),children:l.map(t=>{const s=t.value/e*100;return r.jsx("div",{"data-testid":`segment-${t.key}`,className:"rst:transition-[width]",style:{width:`${s}%`,backgroundColor:t.color},title:`${t.label}: ${Math.round(s)}%`},t.key)})}),c&&r.jsx("div",{"data-testid":"segment-bar-legend",className:"rst:flex rst:flex-wrap rst:gap-x-3 rst:gap-y-0.5",children:l.map(t=>{const s=Math.round(t.value/e*100);return r.jsxs("span",{className:"rst:flex rst:items-center rst:gap-1.5 rst:text-xs rst:text-gray-600 rst:dark:text-gray-400",children:[r.jsx("span",{className:"rst:h-2 rst:w-2 rst:flex-none rst:rounded-full",style:{backgroundColor:t.color},"aria-hidden":"true"}),t.label,r.jsxs("span",{className:"rst:opacity-60",children:[s,"%"]})]},t.key)})})]})}exports.SegmentBar=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),y=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),k=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),S=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),n=require("../../../node_modules/@headlessui/react/dist/components/listbox/listbox.cjs"),D=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),L=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),T=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),r=require("../../../lib/utils.cjs"),F=require("./select-variants.cjs"),_=require("../../../internal/PopupOption.cjs"),s=require("../../../internal/popup.cjs"),R=({options:l,value:d,onChange:f,placeholder:h="Select an option",disabled:x=!1,variant:u,size:a,error:b,className:v,triggerClassName:j,optionsClassName:P,helperText:p,errorMessage:i,label:m,...q})=>{const c=l.find(e=>e.value===d),o=!!i||b,{ref:N,inDarkScope:O}=s.useDarkScope();return t.jsxs(k.Field,{disabled:x,className:r.cn("rst:flex rst:flex-col rst:gap-1.5",v),...q,children:[m&&t.jsx(S.Label,{className:"rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",children:m}),t.jsx(n.Listbox,{value:d??void 0,onChange:f,disabled:x,children:t.jsxs("div",{ref:N,className:"rst:relative",children:[t.jsxs(n.ListboxButton,{"aria-invalid":o||void 0,className:r.cn(F.selectTriggerVariants({variant:u,size:a,error:o}),j),children:[t.jsx("span",{className:r.cn("rst:block rst:truncate",!c&&"rst:text-gray-500 rst:dark:text-gray-400"),children:c?c.label:h}),t.jsx("span",{className:r.cn("rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",a==="sm"?"rst:pr-2.5":"rst:pr-3"),children:t.jsx(L.FontAwesomeIcon,{icon:T.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})})]}),t.jsx(D.Transition,{as:g.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:t.jsx(n.ListboxOptions,{anchor:s.POPUP_ANCHOR,className:r.cn(s.popupInDarkPalette(O,u)&&"dark",s.POPUP_PANEL,s.POPUP_WIDTH_OF_BUTTON,P),children:l.map(e=>t.jsx(_.PopupOption,{as:n.ListboxOption,value:e.value,disabled:e.disabled,size:a,children:e.label},e.value))})})]})}),(p||i)&&t.jsx(y.Description,{className:r.cn("rst:text-xs rst:text-left",o?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:i||p})]})};exports.Select=R;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),y=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),k=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),S=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),n=require("../../../node_modules/@headlessui/react/dist/components/listbox/listbox.cjs"),D=require("../../../node_modules/@headlessui/react/dist/components/transition/transition.cjs"),L=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),T=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),r=require("../../../lib/utils.cjs"),F=require("./select-variants.cjs"),_=require("../../../internal/PopupOption.cjs"),s=require("../../../internal/popup.cjs"),R=({options:l,value:d,onChange:f,placeholder:h="Select an option",disabled:x=!1,variant:u,size:a,error:b,className:v,triggerClassName:j,optionsClassName:P,helperText:p,errorMessage:i,label:m,...q})=>{const c=l.find(e=>e.value===d),o=!!i||b,{ref:N,inDarkScope:O}=s.useDarkScope();return t.jsxs(k.Field,{disabled:x,className:r.cn("rst:flex rst:flex-col rst:gap-1.5",v),...q,children:[m&&t.jsx(S.Label,{className:"rst:block rst:text-sm rst:font-medium rst:text-[var(--roster-control-text)] rst:text-left",children:m}),t.jsx(n.Listbox,{value:d??void 0,onChange:f,disabled:x,children:t.jsxs("div",{ref:N,className:"rst:relative",children:[t.jsxs(n.ListboxButton,{"aria-invalid":o||void 0,className:r.cn(F.selectTriggerVariants({variant:u,size:a,error:o}),j),children:[t.jsx("span",{className:r.cn("rst:block rst:truncate",!c&&"rst:text-gray-500 rst:dark:text-gray-400"),children:c?c.label:h}),t.jsx("span",{className:r.cn("rst:pointer-events-none rst:absolute rst:inset-y-0 rst:right-0 rst:flex rst:items-center",a==="sm"?"rst:pr-2.5":"rst:pr-3"),children:t.jsx(L.FontAwesomeIcon,{icon:T.faChevronDown,className:"rst:h-3.5 rst:w-3.5 rst:text-gray-400 rst:dark:text-gray-500","aria-hidden":"true"})})]}),t.jsx(D.Transition,{as:g.Fragment,leave:"rst:transition rst:ease-in rst:duration-100",leaveFrom:"rst:opacity-100",leaveTo:"rst:opacity-0",children:t.jsx(n.ListboxOptions,{anchor:s.POPUP_ANCHOR,className:r.cn(s.popupInDarkPalette(O,u)&&"dark",s.POPUP_PANEL,s.POPUP_WIDTH_OF_BUTTON,P),children:l.map(e=>t.jsx(_.PopupOption,{as:n.ListboxOption,value:e.value,disabled:e.disabled,size:a,children:e.label},e.value))})})]})}),(p||i)&&t.jsx(y.Description,{className:r.cn("rst:text-xs rst:text-left",o?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:i||p})]})};exports.Select=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("../../../node_modules/class-variance-authority/dist/index.cjs"),d=require("../../../lib/utils.cjs"),o=n.cva("rst:animate-spin rst:rounded-full rst:transition-colors",{variants:{variant:{primary:"rst:border-primary-600 rst:dark:border-primary-500",neutral:"rst:border-gray-600 rst:dark:border-gray-400",danger:"rst:border-error-600 rst:dark:border-error-500",white:"rst:border-white",current:"rst:border-current"},size:{sm:"rst:h-4 rst:w-4 rst:border-2",md:"rst:h-6 rst:w-6 rst:border-[3px]",lg:"rst:h-8 rst:w-8 rst:border-4"},animation:{classic:"rst:border-solid rst:border-r-transparent rst:dark:border-r-transparent",half:"rst:border-solid rst:border-r-transparent rst:border-b-transparent rst:dark:border-r-transparent rst:dark:border-b-transparent",dashed:"rst:border-dashed",dotted:"rst:border-dotted rst:border-r-transparent rst:dark:border-r-transparent"}},defaultVariants:{variant:"primary",size:"md",animation:"classic"}}),i=({variant:r,size:t,animation:s,className:e})=>a.jsx("div",{className:d.cn(o({variant:r,size:t,animation:s}),e),role:"status","aria-label":"loading"});exports.Spinner=i;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("../../../node_modules/class-variance-authority/dist/index.cjs"),d=require("../../../lib/utils.cjs"),o=n.cva("rst:animate-spin rst:rounded-full rst:transition-colors",{variants:{variant:{primary:"rst:border-primary-600 rst:dark:border-primary-500",neutral:"rst:border-gray-600 rst:dark:border-gray-400",danger:"rst:border-error-600 rst:dark:border-error-500",white:"rst:border-white",current:"rst:border-current"},size:{sm:"rst:h-4 rst:w-4 rst:border-2",md:"rst:h-6 rst:w-6 rst:border-[3px]",lg:"rst:h-8 rst:w-8 rst:border-4"},animation:{classic:"rst:border-solid rst:border-r-transparent rst:dark:border-r-transparent",half:"rst:border-solid rst:border-r-transparent rst:border-b-transparent rst:dark:border-r-transparent rst:dark:border-b-transparent",dashed:"rst:border-dashed",dotted:"rst:border-dotted rst:border-r-transparent rst:dark:border-r-transparent"}},defaultVariants:{variant:"primary",size:"md",animation:"classic"}}),i=({variant:r,size:t,animation:s,className:e})=>a.jsx("div",{className:d.cn(o({variant:r,size:t,animation:s}),e),role:"status","aria-label":"loading"});exports.Spinner=i;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
3
|
import { cva as d } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
3
4
|
import { cn as o } from "../../../lib/utils.js";
|
|
@@ -31,7 +32,7 @@ const n = /* @__PURE__ */ d("rst:animate-spin rst:rounded-full rst:transition-co
|
|
|
31
32
|
size: "md",
|
|
32
33
|
animation: "classic"
|
|
33
34
|
}
|
|
34
|
-
}),
|
|
35
|
+
}), l = ({
|
|
35
36
|
variant: r,
|
|
36
37
|
size: t,
|
|
37
38
|
animation: s,
|
|
@@ -45,5 +46,5 @@ const n = /* @__PURE__ */ d("rst:animate-spin rst:rounded-full rst:transition-co
|
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
l as Spinner
|
|
49
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),x=require("react"),s=require("../../../lib/utils.cjs"),u=require("./stat-variants.cjs"),m=require("../Eyebrow/Eyebrow.cjs"),r=x.forwardRef(({value:a,label:n,source:e,size:i,colorScheme:c,className:l,...o},d)=>t.jsxs("div",{ref:d,className:s.cn("rst:flex rst:flex-col rst:gap-[3px]",l),...o,children:[t.jsx("dd",{className:s.cn("rst:m-0",u.statValueVariants({size:i,colorScheme:c})),children:a}),t.jsx("dt",{children:t.jsx(m.Eyebrow,{size:"xs",children:n})}),e&&t.jsx("span",{className:"rst:font-mono rst:text-[0.53125rem] rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400",children:e})]}));r.displayName="Stat";exports.Stat=r;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import c from "react";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import d from "react";
|
|
3
4
|
import { cn as s } from "../../../lib/utils.js";
|
|
4
5
|
import { statValueVariants as f } from "./stat-variants.js";
|
|
5
6
|
import { Eyebrow as p } from "../Eyebrow/Eyebrow.js";
|
|
6
|
-
const x =
|
|
7
|
-
({ value:
|
|
8
|
-
/* @__PURE__ */ t("dd", { className: s("rst:m-0", f({ size: o, colorScheme:
|
|
9
|
-
/* @__PURE__ */ t("dt", { children: /* @__PURE__ */ t(p, { size: "xs", children:
|
|
7
|
+
const x = d.forwardRef(
|
|
8
|
+
({ value: e, label: a, source: r, size: o, colorScheme: i, className: m, ...l }, n) => /* @__PURE__ */ c("div", { ref: n, className: s("rst:flex rst:flex-col rst:gap-[3px]", m), ...l, children: [
|
|
9
|
+
/* @__PURE__ */ t("dd", { className: s("rst:m-0", f({ size: o, colorScheme: i })), children: e }),
|
|
10
|
+
/* @__PURE__ */ t("dt", { children: /* @__PURE__ */ t(p, { size: "xs", children: a }) }),
|
|
10
11
|
r && /* @__PURE__ */ t("span", { className: "rst:font-mono rst:text-[0.53125rem] rst:leading-none rst:tracking-[0.06em] rst:text-gray-500 rst:opacity-75 rst:dark:text-gray-400", children: r })
|
|
11
12
|
] })
|
|
12
13
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),d=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),g=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),j=require("../../../node_modules/@headlessui/react/dist/components/switch/switch.cjs"),s=require("../../../lib/utils.cjs"),a=require("./switch-variants.cjs"),p=({checked:n,onChange:l,label:e,description:r,disabled:c=!1,size:i,variant:o,className:u,ariaLabel:x})=>{const h=e?void 0:x||"Toggle setting";return t.jsxs(d.Field,{as:"div",className:s.cn("rst:flex rst:items-center rst:justify-between rst:gap-4",u),children:[(e||r)&&t.jsxs("span",{className:"rst:flex rst:flex-col",children:[e&&t.jsx(g.Label,{passive:!0,className:s.cn("rst:text-sm rst:font-medium rst:text-gray-900 rst:dark:text-gray-100",c&&"rst:opacity-50"),children:e}),r&&t.jsx(m.Description,{className:s.cn("rst:text-xs rst:text-gray-500 rst:dark:text-gray-400",c&&"rst:opacity-50"),children:r})]}),t.jsx(j.Switch,{checked:n,onChange:l,disabled:c,"aria-label":h,className:s.cn(a.switchTrackVariants({variant:o,size:i})),children:t.jsx("span",{"aria-hidden":"true",className:s.cn(a.switchThumbVariants({size:i}))})})]})};exports.Switch=p;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),d=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),g=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),j=require("../../../node_modules/@headlessui/react/dist/components/switch/switch.cjs"),s=require("../../../lib/utils.cjs"),a=require("./switch-variants.cjs"),p=({checked:n,onChange:l,label:e,description:r,disabled:c=!1,size:i,variant:o,className:u,ariaLabel:x})=>{const h=e?void 0:x||"Toggle setting";return t.jsxs(d.Field,{as:"div",className:s.cn("rst:flex rst:items-center rst:justify-between rst:gap-4",u),children:[(e||r)&&t.jsxs("span",{className:"rst:flex rst:flex-col",children:[e&&t.jsx(g.Label,{passive:!0,className:s.cn("rst:text-sm rst:font-medium rst:text-gray-900 rst:dark:text-gray-100",c&&"rst:opacity-50"),children:e}),r&&t.jsx(m.Description,{className:s.cn("rst:text-xs rst:text-gray-500 rst:dark:text-gray-400",c&&"rst:opacity-50"),children:r})]}),t.jsx(j.Switch,{checked:n,onChange:l,disabled:c,"aria-label":h,className:s.cn(a.switchTrackVariants({variant:o,size:i})),children:t.jsx("span",{"aria-hidden":"true",className:s.cn(a.switchThumbVariants({size:i}))})})]})};exports.Switch=p;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
3
|
import { Description as x } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
|
|
3
4
|
import { Field as h } from "../../../node_modules/@headlessui/react/dist/components/field/field.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),b=require("react"),q=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),j=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),p=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/textarea/textarea.cjs"),r=require("../../../lib/utils.cjs"),N=require("./textarea-variants.cjs"),n=b.forwardRef(({className:
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),b=require("react"),q=require("../../../node_modules/@headlessui/react/dist/components/description/description.cjs"),j=require("../../../node_modules/@headlessui/react/dist/components/field/field.cjs"),p=require("../../../node_modules/@headlessui/react/dist/components/label/label.cjs"),y=require("../../../node_modules/@headlessui/react/dist/components/textarea/textarea.cjs"),r=require("../../../lib/utils.cjs"),N=require("./textarea-variants.cjs"),n=b.forwardRef(({className:c,label:s,helperText:a,errorMessage:e,variant:o,error:l,resize:x,disabled:d,textareaClassName:u,...m},f)=>{const i=!!e||l;return t.jsxs(j.Field,{className:r.cn("rst:w-full",c),children:[s&&t.jsx(p.Label,{className:"rst:block rst:text-sm rst:font-medium rst:leading-none rst:text-[var(--roster-control-text)] rst:peer-disabled:cursor-not-allowed rst:peer-disabled:opacity-70 rst:text-left rst:mb-1.5",children:s}),t.jsx(y.Textarea,{ref:f,disabled:d,className:r.cn(N.textareaVariants({variant:o,resize:x,error:i}),u),...m}),(a||e)&&t.jsx(q.Description,{className:r.cn("rst:text-xs rst:text-left rst:mt-1.5",i?"rst:text-error-600 rst:dark:text-error-400 rst:font-medium":"rst:text-gray-500 rst:dark:text-gray-400"),children:e||a})]})});n.displayName="Textarea";exports.Textarea=n;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
3
|
import u from "react";
|
|
3
4
|
import { Description as N } from "../../../node_modules/@headlessui/react/dist/components/description/description.js";
|
|
@@ -14,11 +15,11 @@ const w = u.forwardRef(
|
|
|
14
15
|
errorMessage: t,
|
|
15
16
|
variant: i,
|
|
16
17
|
error: l,
|
|
17
|
-
resize:
|
|
18
|
-
disabled:
|
|
19
|
-
textareaClassName:
|
|
20
|
-
...
|
|
21
|
-
},
|
|
18
|
+
resize: c,
|
|
19
|
+
disabled: d,
|
|
20
|
+
textareaClassName: n,
|
|
21
|
+
...x
|
|
22
|
+
}, f) => {
|
|
22
23
|
const o = !!t || l;
|
|
23
24
|
return (
|
|
24
25
|
/* No `space-y-*` here, for the reason documented on Input: Headless UI's
|
|
@@ -36,13 +37,13 @@ const w = u.forwardRef(
|
|
|
36
37
|
/* @__PURE__ */ r(
|
|
37
38
|
h,
|
|
38
39
|
{
|
|
39
|
-
ref:
|
|
40
|
-
disabled:
|
|
40
|
+
ref: f,
|
|
41
|
+
disabled: d,
|
|
41
42
|
className: e(
|
|
42
|
-
k({ variant: i, resize:
|
|
43
|
-
|
|
43
|
+
k({ variant: i, resize: c, error: o }),
|
|
44
|
+
n
|
|
44
45
|
),
|
|
45
|
-
...
|
|
46
|
+
...x
|
|
46
47
|
}
|
|
47
48
|
),
|
|
48
49
|
(a || t) && /* @__PURE__ */ r(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),s=require("react"),q=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),a=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),v=require("../Button/Button.cjs"),L="roster-theme",o=new Set;function j(e){o.add(e);const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{o.delete(e),t.disconnect()}}function y(){return document.documentElement.classList.contains("dark")}function D(){return!1}const i=s.forwardRef(({storageKey:e=L,onThemeChange:t,showLabel:l=!1,lightLabel:u="Light",darkLabel:d="Dark",lightIcon:m,darkIcon:g,toDarkLabel:h="Switch to dark mode",toLightLabel:b="Switch to light mode",variant:f="ghost",colorScheme:k="neutral",size:E="sm",...S},T)=>{const r=s.useSyncExternalStore(j,y,D),w=s.useCallback(()=>{const n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem(e,n?"dark":"light")}catch{}o.forEach(x=>x()),t?.(n?"dark":"light")},[e,t]);return c.jsx(v.Button,{ref:T,variant:f,colorScheme:k,size:E,onClick:w,"aria-pressed":r,"aria-label":r?b:h,startIcon:(r?g:m)??c.jsx(q.FontAwesomeIcon,{icon:r?a.faSun:a.faMoon,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"}),...S,children:l?r?d:u:null})});i.displayName="ThemeToggle";exports.ThemeToggle=i;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),s=require("react"),q=require("../../../node_modules/@fortawesome/react-fontawesome/dist/index.cjs"),a=require("../../../node_modules/@fortawesome/free-solid-svg-icons/index.cjs"),v=require("../Button/Button.cjs"),L="roster-theme",o=new Set;function j(e){o.add(e);const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{o.delete(e),t.disconnect()}}function y(){return document.documentElement.classList.contains("dark")}function D(){return!1}const i=s.forwardRef(({storageKey:e=L,onThemeChange:t,showLabel:l=!1,lightLabel:u="Light",darkLabel:d="Dark",lightIcon:m,darkIcon:g,toDarkLabel:h="Switch to dark mode",toLightLabel:b="Switch to light mode",variant:f="ghost",colorScheme:k="neutral",size:E="sm",...S},T)=>{const r=s.useSyncExternalStore(j,y,D),w=s.useCallback(()=>{const n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem(e,n?"dark":"light")}catch{}o.forEach(x=>x()),t?.(n?"dark":"light")},[e,t]);return c.jsx(v.Button,{ref:T,variant:f,colorScheme:k,size:E,onClick:w,"aria-pressed":r,"aria-label":r?b:h,startIcon:(r?g:m)??c.jsx(q.FontAwesomeIcon,{icon:r?a.faSun:a.faMoon,className:"rst:h-3.5 rst:w-3.5","aria-hidden":"true"}),...S,children:l?r?d:u:null})});i.displayName="ThemeToggle";exports.ThemeToggle=i;
|