@gears-frontx/ui-kit 0.4.2 → 0.4.4
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 +10 -6
- package/dist/alert.js +35 -24
- package/dist/alert.js.map +1 -1
- package/dist/attachment.js +117 -76
- package/dist/attachment.js.map +1 -1
- package/dist/avatar.js +43 -43
- package/dist/badge.js +14 -14
- package/dist/card.js +81 -44
- package/dist/card.js.map +1 -1
- package/dist/chart.js +50 -50
- package/dist/chunks/alert.Csv2-ccF.css +1 -0
- package/dist/chunks/attachment.BRyIQq3F.css +1 -0
- package/dist/chunks/avatar.7EUG65-M.css +1 -0
- package/dist/chunks/badge.BwUxa9PB.css +1 -0
- package/dist/chunks/card.DSiUMxGK.css +1 -0
- package/dist/chunks/chart.B9cGEno8.css +1 -0
- package/dist/chunks/code-block.r7Cm0ncj.css +1 -0
- package/dist/chunks/description-list.Cx-vFGJL.css +1 -0
- package/dist/chunks/dialog.CIR9bQoU.css +1 -0
- package/dist/chunks/dropdown-menu.DT1_JLqL.css +1 -0
- package/dist/chunks/empty.DWqLrSfF.css +1 -0
- package/dist/chunks/heading.DQxQs5po.css +1 -0
- package/dist/chunks/item.BQ70Khqj.css +1 -0
- package/dist/chunks/link.BOE4f-aB.css +1 -0
- package/dist/chunks/message-scroller.CBjPcz8Y.css +1 -0
- package/dist/chunks/pagination.BAAl9D_S.css +1 -0
- package/dist/chunks/{select.BFwI5rhI.css → select.C3sLDoZI.css} +1 -1
- package/dist/chunks/sheet.BkZyzAbA.css +1 -0
- package/dist/chunks/sidebar.Dw_e0Jqw.css +1 -0
- package/dist/chunks/slider.DY1XDCPw.css +1 -0
- package/dist/chunks/status-dot.39NKkKQF.css +1 -0
- package/dist/chunks/tabs.BqhiMRUP.css +1 -0
- package/dist/chunks/text.7frjnkUr.css +1 -0
- package/dist/chunks/visually-hidden.Bd2oAR5D.css +1 -0
- package/dist/code-block.d.ts +1 -0
- package/dist/code-block.js +152 -0
- package/dist/code-block.js.map +1 -0
- package/dist/command.js +63 -48
- package/dist/command.js.map +1 -1
- package/dist/components/alert/alert.d.ts +3 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/attachment/attachment.d.ts +10 -3
- package/dist/components/attachment/attachment.d.ts.map +1 -1
- package/dist/components/card/card.d.ts +6 -4
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/code-block/code-block.d.ts +57 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/public.d.ts +2 -0
- package/dist/components/code-block/public.d.ts.map +1 -0
- package/dist/components/command/command.d.ts +1 -1
- package/dist/components/command/command.d.ts.map +1 -1
- package/dist/components/description-list/description-list.d.ts +21 -0
- package/dist/components/description-list/description-list.d.ts.map +1 -0
- package/dist/components/description-list/public.d.ts +2 -0
- package/dist/components/description-list/public.d.ts.map +1 -0
- package/dist/components/empty/empty.d.ts +3 -2
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/heading/heading.d.ts +10 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/heading/public.d.ts +2 -0
- package/dist/components/heading/public.d.ts.map +1 -0
- package/dist/components/input-otp/input-otp.d.ts +1 -1
- package/dist/components/input-otp/input-otp.d.ts.map +1 -1
- package/dist/components/item/item.d.ts +15 -6
- package/dist/components/item/item.d.ts.map +1 -1
- package/dist/components/link/link.d.ts +18 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/public.d.ts +2 -0
- package/dist/components/link/public.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -3
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/text/public.d.ts +2 -0
- package/dist/components/text/public.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +11 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/visually-hidden/public.d.ts +2 -0
- package/dist/components/visually-hidden/public.d.ts.map +1 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +4 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/data-grid/pagination.js +35 -35
- package/dist/description-list.d.ts +1 -0
- package/dist/description-list.js +78 -0
- package/dist/description-list.js.map +1 -0
- package/dist/dialog.js +38 -38
- package/dist/docs/alert.md +8 -2
- package/dist/docs/attachment.md +20 -8
- package/dist/docs/avatar.md +8 -2
- package/dist/docs/badge.md +12 -11
- package/dist/docs/button.md +16 -4
- package/dist/docs/calendar.md +6 -0
- package/dist/docs/card.md +38 -6
- package/dist/docs/carousel.md +4 -2
- package/dist/docs/chart.md +23 -0
- package/dist/docs/code-block.md +114 -0
- package/dist/docs/data-grid.md +2 -0
- package/dist/docs/description-list.md +53 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/empty.md +9 -3
- package/dist/docs/heading.md +60 -0
- package/dist/docs/item.md +70 -3
- package/dist/docs/link.md +48 -0
- package/dist/docs/message-scroller.md +5 -0
- package/dist/docs/questionnaire.md +1 -1
- package/dist/docs/sheet.md +20 -3
- package/dist/docs/sidebar.md +27 -0
- package/dist/docs/status-dot.md +2 -2
- package/dist/docs/switch.md +10 -4
- package/dist/docs/text.md +51 -0
- package/dist/docs/visually-hidden.md +44 -0
- package/dist/dropdown-menu.js +56 -56
- package/dist/empty.js +47 -36
- package/dist/empty.js.map +1 -1
- package/dist/heading.d.ts +1 -0
- package/dist/heading.js +36 -0
- package/dist/heading.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +427 -401
- package/dist/index.js.map +1 -1
- package/dist/input-otp.js +34 -20
- package/dist/input-otp.js.map +1 -1
- package/dist/item.js +119 -71
- package/dist/item.js.map +1 -1
- package/dist/link.d.ts +1 -0
- package/dist/link.js +55 -0
- package/dist/link.js.map +1 -0
- package/dist/message-scroller.js +24 -24
- package/dist/select.js +45 -45
- package/dist/sheet.js +41 -41
- package/dist/sidebar.js +207 -193
- package/dist/sidebar.js.map +1 -1
- package/dist/slider.js +34 -21
- package/dist/slider.js.map +1 -1
- package/dist/status-dot.js +25 -25
- package/dist/table.js +172 -157
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +14 -14
- package/dist/text.d.ts +1 -0
- package/dist/text.js +53 -0
- package/dist/text.js.map +1 -0
- package/dist/theme.css +29 -6
- package/dist/utilities.css +25 -2
- package/dist/visually-hidden.d.ts +1 -0
- package/dist/visually-hidden.js +18 -0
- package/dist/visually-hidden.js.map +1 -0
- package/llms.txt +72 -15
- package/package.json +1 -4
- package/dist/chunks/alert.DsgRIXLn.css +0 -1
- package/dist/chunks/attachment.CZuZdlXC.css +0 -1
- package/dist/chunks/avatar.BMm-Z9l5.css +0 -1
- package/dist/chunks/badge.BCreEn3O.css +0 -1
- package/dist/chunks/card.DdBl-usf.css +0 -1
- package/dist/chunks/chart.CeyctrXQ.css +0 -1
- package/dist/chunks/dialog.Cpo8vChK.css +0 -1
- package/dist/chunks/dropdown-menu.TU3FHXbJ.css +0 -1
- package/dist/chunks/empty.DnAKlw2g.css +0 -1
- package/dist/chunks/item.BkcgydVc.css +0 -1
- package/dist/chunks/message-scroller.CbLooS7Q.css +0 -1
- package/dist/chunks/pagination.Cn8tIWMX.css +0 -1
- package/dist/chunks/sheet.BWvXXyXk.css +0 -1
- package/dist/chunks/sidebar.DdEvMURX.css +0 -1
- package/dist/chunks/slider.inyNxx4y.css +0 -1
- package/dist/chunks/status-dot.DWa2qGKe.css +0 -1
- package/dist/chunks/tabs.DFa0OYMo.css +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/input-otp.js
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
3
|
import { OTPField as s } from "@base-ui/react/otp-field";
|
|
3
|
-
import { cx as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import { cx as a } from "class-variance-authority";
|
|
5
|
+
import { useId as p, useContext as m, createContext as _ } from "react";
|
|
6
|
+
import './chunks/input-otp.Dvxlngb4.css';const b = "_root_dt327_13", f = "_slot_dt327_19", I = "_group_dt327_23", h = "_separator_dt327_126", n = {
|
|
7
|
+
root: b,
|
|
8
|
+
slot: f,
|
|
9
|
+
group: I,
|
|
10
|
+
separator: h
|
|
11
|
+
}, c = _(void 0);
|
|
12
|
+
function y({ className: o, children: t, ...r }) {
|
|
13
|
+
const i = p(), l = r["aria-label"], d = typeof l == "string" && l !== "" && r["aria-labelledby"] === void 0;
|
|
14
|
+
return /* @__PURE__ */ e(c.Provider, { value: d ? i : void 0, children: /* @__PURE__ */ u(s.Root, { className: a(n.root, o), ...r, children: [
|
|
15
|
+
t,
|
|
16
|
+
d ? /* @__PURE__ */ e("span", { id: i, hidden: !0, children: l }) : null
|
|
17
|
+
] }) });
|
|
12
18
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
19
|
+
function N({ className: o, ...t }) {
|
|
20
|
+
return /* @__PURE__ */ e("div", { className: a(n.group, o), ...t });
|
|
15
21
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
22
|
+
function C({ className: o, ...t }) {
|
|
23
|
+
const r = m(c);
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
|
+
s.Input,
|
|
26
|
+
{
|
|
27
|
+
className: a(n.slot, o),
|
|
28
|
+
"aria-labelledby": t["aria-label"] ? void 0 : r,
|
|
29
|
+
...t
|
|
30
|
+
}
|
|
31
|
+
);
|
|
18
32
|
}
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */
|
|
33
|
+
function S({ className: o, children: t, ...r }) {
|
|
34
|
+
return /* @__PURE__ */ e(s.Separator, { className: a(n.separator, o), ...r, children: t ?? /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "-" }) });
|
|
21
35
|
}
|
|
22
36
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
y as InputOtp,
|
|
38
|
+
N as InputOtpGroup,
|
|
39
|
+
S as InputOtpSeparator,
|
|
40
|
+
C as InputOtpSlot
|
|
27
41
|
};
|
|
28
42
|
//# sourceMappingURL=input-otp.js.map
|
package/dist/input-otp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","sources":["../src/components/input-otp/input-otp.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"input-otp.js","sources":["../src/components/input-otp/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport { OTPField as OTPFieldPrimitive } from '@base-ui/react/otp-field';\nimport { cx } from 'class-variance-authority';\nimport { type ComponentProps, createContext, useContext, useId } from 'react';\n\nimport styles from './input-otp.module.css';\n\n/*\n * Deviation from upstream (see input-otp.md's \"Deviation from upstream\"\n * section for the full rationale): upstream wraps the third-party\n * `input-otp` package, whose `OTPInput` renders ONE shared, visually\n * hidden native input, with each visible \"slot\" a plain decorative <div>\n * reading its character/active/caret state from React context\n * (`OTPInputContext`). This port builds on Base UI's `OTPField` instead —\n * it renders one REAL `<input>` PER SLOT (Base UI derives each input's\n * position from render order via a composite list, not a context read),\n * so `InputOtpSlot` below IS that input, not a context-driven display\n * div. The exported part names mirror upstream's (`InputOtp`/\n * `InputOtpGroup`/`InputOtpSlot`/`InputOtpSeparator` for upstream's\n * `InputOTP`/`InputOTPGroup`/`InputOTPSlot`/`InputOTPSeparator`) as\n * closely as the primitive allows.\n */\n\nexport interface InputOtpProps extends Omit<OTPFieldPrimitive.Root.Props, 'className'> {\n className?: string;\n}\n\n// The id of the hidden text that names every slot, when the root was given\n// an `aria-label` (see InputOtp).\nconst InputOtpLabelContext = createContext<string | undefined>(undefined);\n\n/*\n * Base UI's OTPField names its inputs from a `<label>` or Field.Label only:\n * an `aria-label` on the root stays on the root, and the first input\n * ignores one of its own, so `<InputOtp aria-label=\"Verification code\">`\n * left every slot unnamed (axe `label`). With an `aria-label` and no\n * `aria-labelledby`, the root renders that text in a hidden span and every\n * slot points at it through `aria-labelledby`. A slot's own\n * `aria-labelledby` or non-empty `aria-label` still wins (Base UI ignores\n * an `aria-label` on the first slot, so leave that one to the root). Name\n * the field one way: an `aria-label` on the root takes over from a\n * `<label htmlFor>` naming it.\n */\nexport function InputOtp({ className, children, ...props }: InputOtpProps) {\n const labelId = useId();\n const ariaLabel = props['aria-label'];\n const labelled =\n typeof ariaLabel === 'string' && ariaLabel !== '' && props['aria-labelledby'] === undefined;\n return (\n <InputOtpLabelContext.Provider value={labelled ? labelId : undefined}>\n <OTPFieldPrimitive.Root className={cx(styles.root, className)} {...props}>\n {children}\n {labelled ? (\n <span id={labelId} hidden>\n {ariaLabel}\n </span>\n ) : null}\n </OTPFieldPrimitive.Root>\n </InputOtpLabelContext.Provider>\n );\n}\n\n// No Base UI primitive backs this part (upstream's own `InputOTPGroup` is\n// also a plain `<div>`) — purely a visual grouping of a run of slots, so\n// a caret-blink separator can sit between groups without one running the\n// full length of the code.\nexport type InputOtpGroupProps = ComponentProps<'div'>;\n\nexport function InputOtpGroup({ className, ...props }: InputOtpGroupProps) {\n return <div className={cx(styles.group, className)} {...props} />;\n}\n\nexport interface InputOtpSlotProps extends Omit<OTPFieldPrimitive.Input.Props, 'className'> {\n className?: string;\n}\n\nexport function InputOtpSlot({ className, ...props }: InputOtpSlotProps) {\n const labelId = useContext(InputOtpLabelContext);\n return (\n <OTPFieldPrimitive.Input\n className={cx(styles.slot, className)}\n aria-labelledby={props['aria-label'] ? undefined : labelId}\n {...props}\n />\n );\n}\n\nexport interface InputOtpSeparatorProps\n extends Omit<OTPFieldPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\n// Base UI's OTPField namespace exports a `Separator` part of its own (see\n// @base-ui/react/otp-field's index.parts.ts re-exporting\n// @base-ui/react/separator) — used directly here rather than a plain\n// decorative div, since it already carries `role=\"separator\"` and\n// `data-orientation`. Defaults to a dash glyph (upstream's own default,\n// there via a lucide MinusIcon) only when the consumer renders no\n// children of their own.\nexport function InputOtpSeparator({ className, children, ...props }: InputOtpSeparatorProps) {\n return (\n <OTPFieldPrimitive.Separator className={cx(styles.separator, className)} {...props}>\n {children ?? <span aria-hidden=\"true\">-</span>}\n </OTPFieldPrimitive.Separator>\n );\n}\n"],"names":["InputOtpLabelContext","createContext","InputOtp","className","children","props","labelId","useId","ariaLabel","labelled","jsxs","OTPFieldPrimitive","cx","styles","InputOtpGroup","jsx","InputOtpSlot","useContext","InputOtpSeparator"],"mappings":";;;;;;;;;;GA8BMA,IAAuBC,EAAkC,MAAS;AAcjE,SAASC,EAAS,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAwB;AACzE,QAAMC,IAAUC,EAAA,GACVC,IAAYH,EAAM,YAAY,GAC9BI,IACJ,OAAOD,KAAc,YAAYA,MAAc,MAAMH,EAAM,iBAAiB,MAAM;AACpF,2BACGL,EAAqB,UAArB,EAA8B,OAAOS,IAAWH,IAAU,QACzD,UAAA,gBAAAI,EAACC,EAAkB,MAAlB,EAAuB,WAAWC,EAAGC,EAAO,MAAMV,CAAS,GAAI,GAAGE,GAChE,UAAA;AAAA,IAAAD;AAAA,IACAK,sBACE,QAAA,EAAK,IAAIH,GAAS,QAAM,IACtB,aACH,IACE;AAAA,EAAA,EAAA,CACN,EAAA,CACF;AAEJ;AAQO,SAASQ,EAAc,EAAE,WAAAX,GAAW,GAAGE,KAA6B;AACzE,SAAO,gBAAAU,EAAC,SAAI,WAAWH,EAAGC,EAAO,OAAOV,CAAS,GAAI,GAAGE,GAAO;AACjE;AAMO,SAASW,EAAa,EAAE,WAAAb,GAAW,GAAGE,KAA4B;AACvE,QAAMC,IAAUW,EAAWjB,CAAoB;AAC/C,SACE,gBAAAe;AAAA,IAACJ,EAAkB;AAAA,IAAlB;AAAA,MACC,WAAWC,EAAGC,EAAO,MAAMV,CAAS;AAAA,MACpC,mBAAiBE,EAAM,YAAY,IAAI,SAAYC;AAAA,MAClD,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;AAcO,SAASa,EAAkB,EAAE,WAAAf,GAAW,UAAAC,GAAU,GAAGC,KAAiC;AAC3F,2BACGM,EAAkB,WAAlB,EAA4B,WAAWC,EAAGC,EAAO,WAAWV,CAAS,GAAI,GAAGE,GAC1E,UAAAD,KAAY,gBAAAW,EAAC,UAAK,eAAY,QAAO,eAAC,GACzC;AAEJ;"}
|
package/dist/item.js
CHANGED
|
@@ -1,107 +1,155 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { mergeProps as v } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender as M } from "@base-ui/react/use-render";
|
|
5
|
+
import { cx as l, cva as p } from "class-variance-authority";
|
|
6
|
+
import { useContext as y, isValidElement as d, createContext as V, Children as h, Fragment as I, cloneElement as D } from "react";
|
|
7
|
+
import { Separator as z } from "./separator.js";
|
|
8
|
+
import './chunks/item.BQ70Khqj.css';const S = "_item_lyk2k_23", T = "_itemDescription_lyk2k_113", g = "_itemListItem_lyk2k_127", C = "_variantDefault_lyk2k_153", N = "_variantOutline_lyk2k_157", x = "_variantMuted_lyk2k_34", A = "_sizeDefault_lyk2k_166", F = "_sizeSm_lyk2k_171", G = "_sizeXs_lyk2k_176", R = "_itemMedia_lyk2k_181", H = "_itemMediaVariantDefault_lyk2k_203", O = "_itemMediaVariantIcon_lyk2k_207", $ = "_itemMediaVariantChip_lyk2k_220", L = "_itemMediaVariantChipRound_lyk2k_245", U = "_itemMediaVariantImage_lyk2k_258", X = "_itemContent_lyk2k_290", b = "_itemTitle_lyk2k_310", w = "_itemTitleText_lyk2k_310", j = "_itemDescriptionUnclamped_lyk2k_352", E = "_itemActions_lyk2k_373", P = "_itemHeader_lyk2k_379", q = "_itemFooter_lyk2k_380", B = "_itemGroup_lyk2k_388", J = "_itemSeparator_lyk2k_406", e = {
|
|
9
|
+
item: S,
|
|
10
|
+
itemDescription: T,
|
|
11
|
+
itemListItem: g,
|
|
12
|
+
variantDefault: C,
|
|
13
|
+
variantOutline: N,
|
|
14
|
+
variantMuted: x,
|
|
15
|
+
sizeDefault: A,
|
|
16
|
+
sizeSm: F,
|
|
17
|
+
sizeXs: G,
|
|
18
|
+
itemMedia: R,
|
|
19
|
+
itemMediaVariantDefault: H,
|
|
20
|
+
itemMediaVariantIcon: O,
|
|
21
|
+
itemMediaVariantChip: $,
|
|
22
|
+
itemMediaVariantChipRound: L,
|
|
23
|
+
itemMediaVariantImage: U,
|
|
24
|
+
itemContent: X,
|
|
25
|
+
itemTitle: b,
|
|
26
|
+
itemTitleText: w,
|
|
27
|
+
itemDescriptionUnclamped: j,
|
|
28
|
+
itemActions: E,
|
|
29
|
+
itemHeader: P,
|
|
30
|
+
itemFooter: q,
|
|
31
|
+
itemGroup: B,
|
|
32
|
+
itemSeparator: J
|
|
33
|
+
}, K = p(e.item, {
|
|
27
34
|
variants: {
|
|
28
35
|
variant: {
|
|
29
|
-
default:
|
|
30
|
-
outline:
|
|
31
|
-
muted:
|
|
36
|
+
default: e.variantDefault,
|
|
37
|
+
outline: e.variantOutline,
|
|
38
|
+
muted: e.variantMuted
|
|
32
39
|
},
|
|
33
40
|
size: {
|
|
34
|
-
default:
|
|
35
|
-
sm:
|
|
36
|
-
xs:
|
|
41
|
+
default: e.sizeDefault,
|
|
42
|
+
sm: e.sizeSm,
|
|
43
|
+
xs: e.sizeXs
|
|
37
44
|
}
|
|
38
45
|
},
|
|
39
46
|
defaultVariants: {
|
|
40
47
|
variant: "default",
|
|
41
48
|
size: "default"
|
|
42
49
|
}
|
|
43
|
-
});
|
|
44
|
-
function
|
|
45
|
-
|
|
50
|
+
}), u = V(!1);
|
|
51
|
+
function nt({ className: i, variant: t, size: a, render: n, ...s }) {
|
|
52
|
+
const m = y(u), _ = M({
|
|
46
53
|
defaultTagName: "div",
|
|
47
|
-
render:
|
|
48
|
-
state: { variant: t ?? "default", size:
|
|
54
|
+
render: n,
|
|
55
|
+
state: { variant: t ?? "default", size: a ?? "default" },
|
|
49
56
|
stateAttributesMapping: {
|
|
50
57
|
variant: () => null,
|
|
51
58
|
size: () => null
|
|
52
59
|
},
|
|
53
|
-
props:
|
|
54
|
-
|
|
60
|
+
props: v(
|
|
61
|
+
{
|
|
62
|
+
className: K({ variant: t, size: a, className: i }),
|
|
63
|
+
role: m && n === void 0 ? "listitem" : void 0
|
|
64
|
+
},
|
|
65
|
+
s
|
|
66
|
+
)
|
|
67
|
+
}), f = d(n) && (n.type === "li" || n.props.role === "listitem" || n.props.role === "none" || n.props.role === "presentation"), k = m && n !== void 0 && s.role === void 0 && !f ? /* @__PURE__ */ o("div", { role: "listitem", className: e.itemListItem, children: _ }) : _;
|
|
68
|
+
return /* @__PURE__ */ o(u.Provider, { value: !1, children: k });
|
|
55
69
|
}
|
|
56
|
-
const
|
|
70
|
+
const Q = p(e.itemMedia, {
|
|
57
71
|
variants: {
|
|
58
72
|
variant: {
|
|
59
|
-
default:
|
|
60
|
-
icon:
|
|
61
|
-
image:
|
|
73
|
+
default: e.itemMediaVariantDefault,
|
|
74
|
+
icon: e.itemMediaVariantIcon,
|
|
75
|
+
image: e.itemMediaVariantImage,
|
|
76
|
+
chip: e.itemMediaVariantChip,
|
|
77
|
+
"chip-round": e.itemMediaVariantChipRound
|
|
62
78
|
}
|
|
63
79
|
},
|
|
64
80
|
defaultVariants: {
|
|
65
81
|
variant: "default"
|
|
66
82
|
}
|
|
67
83
|
});
|
|
68
|
-
function
|
|
69
|
-
return /* @__PURE__ */
|
|
84
|
+
function ot({ className: i, variant: t, ...a }) {
|
|
85
|
+
return /* @__PURE__ */ o("div", { className: Q({ variant: t, className: i }), ...a });
|
|
86
|
+
}
|
|
87
|
+
function rt({ className: i, ...t }) {
|
|
88
|
+
return /* @__PURE__ */ o("div", { className: l(e.itemContent, i), ...t });
|
|
70
89
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
90
|
+
function W(i) {
|
|
91
|
+
const t = [];
|
|
92
|
+
let a = [];
|
|
93
|
+
const n = () => {
|
|
94
|
+
const m = a.join("");
|
|
95
|
+
a = [], m.trim() !== "" && t.push(
|
|
96
|
+
/* @__PURE__ */ o("span", { className: e.itemTitleText, children: m }, `text-${t.length}`)
|
|
97
|
+
);
|
|
98
|
+
}, s = (m, c) => {
|
|
99
|
+
for (const r of h.toArray(m))
|
|
100
|
+
typeof r == "string" || typeof r == "number" ? a.push(String(r)) : d(r) && r.type === I ? s(r.props.children, `${c}${String(r.key)}/`) : (n(), t.push(
|
|
101
|
+
c && d(r) ? D(r, { key: `${c}${String(r.key)}` }) : r
|
|
102
|
+
));
|
|
103
|
+
};
|
|
104
|
+
return s(i, ""), n(), t;
|
|
73
105
|
}
|
|
74
|
-
function
|
|
75
|
-
return /* @__PURE__ */
|
|
106
|
+
function st({ className: i, children: t, ...a }) {
|
|
107
|
+
return /* @__PURE__ */ o("div", { className: l(e.itemTitle, i), ...a, children: W(t) });
|
|
76
108
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
109
|
+
function mt({ className: i, style: t, lineClamp: a = 2, ...n }) {
|
|
110
|
+
const s = a === "none" || !Number.isFinite(a) || a < 1 ? void 0 : Math.floor(a), m = s === void 0;
|
|
111
|
+
return /* @__PURE__ */ o(
|
|
112
|
+
"p",
|
|
113
|
+
{
|
|
114
|
+
className: l(e.itemDescription, m && e.itemDescriptionUnclamped, i),
|
|
115
|
+
style: s === void 0 || s === 2 ? t : { "--_item-line-clamp": s, ...t },
|
|
116
|
+
...n
|
|
117
|
+
}
|
|
118
|
+
);
|
|
79
119
|
}
|
|
80
|
-
function
|
|
81
|
-
return /* @__PURE__ */
|
|
120
|
+
function lt({ className: i, ...t }) {
|
|
121
|
+
return /* @__PURE__ */ o("div", { className: l(e.itemActions, i), ...t });
|
|
82
122
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */
|
|
123
|
+
function ct({ className: i, ...t }) {
|
|
124
|
+
return /* @__PURE__ */ o("div", { className: l(e.itemHeader, i), ...t });
|
|
85
125
|
}
|
|
86
|
-
function
|
|
87
|
-
return /* @__PURE__ */
|
|
126
|
+
function dt({ className: i, ...t }) {
|
|
127
|
+
return /* @__PURE__ */ o("div", { className: l(e.itemFooter, i), ...t });
|
|
88
128
|
}
|
|
89
|
-
function
|
|
90
|
-
return /* @__PURE__ */
|
|
129
|
+
function ut({ className: i, role: t = "list", ...a }) {
|
|
130
|
+
return /* @__PURE__ */ o(u.Provider, { value: t === "list", children: /* @__PURE__ */ o("div", { role: t, className: l(e.itemGroup, i), ...a }) });
|
|
91
131
|
}
|
|
92
|
-
function
|
|
93
|
-
return /* @__PURE__ */
|
|
132
|
+
function _t({ className: i, ...t }) {
|
|
133
|
+
return /* @__PURE__ */ o(
|
|
134
|
+
z,
|
|
135
|
+
{
|
|
136
|
+
orientation: "horizontal",
|
|
137
|
+
"aria-hidden": !0,
|
|
138
|
+
className: l(e.itemSeparator, i),
|
|
139
|
+
...t
|
|
140
|
+
}
|
|
141
|
+
);
|
|
94
142
|
}
|
|
95
143
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
144
|
+
nt as Item,
|
|
145
|
+
lt as ItemActions,
|
|
146
|
+
rt as ItemContent,
|
|
147
|
+
mt as ItemDescription,
|
|
148
|
+
dt as ItemFooter,
|
|
149
|
+
ut as ItemGroup,
|
|
150
|
+
ct as ItemHeader,
|
|
151
|
+
ot as ItemMedia,
|
|
152
|
+
_t as ItemSeparator,
|
|
153
|
+
st as ItemTitle
|
|
106
154
|
};
|
|
107
155
|
//# sourceMappingURL=item.js.map
|
package/dist/item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sources":["../src/components/item/item.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { Separator, type SeparatorProps } from '../separator/separator';\nimport styles from './item.module.css';\n\n/*\n * Item is mostly primitive-free (registry/bases/base/ui/item.tsx ships\n * plain `div`s with data-slot markers, same shape as Card — see card.tsx),\n * EXCEPT the root: upstream builds `Item` itself on Base UI's headless\n * `useRender`/`mergeProps` utilities for render-prop polymorphism (e.g.\n * rendering as an `<a>` so a whole item is a link), not a stateful/\n * positioned primitive like Button or Dialog. This port keeps that\n * capability rather than dropping it — the `render` prop is a real part of\n * Item's upstream surface, and \"replicate faithfully\" extends to it.\n *\n * No `data-slot`/`data-variant`/`data-size` attributes, per the kit-wide\n * convention (see card.tsx): `useRender`'s `state` option would otherwise\n * auto-reflect `variant`/`size` as `data-*` attributes (see Base UI's\n * getStateAttributesProps), so `stateAttributesMapping` below suppresses\n * that while still handing `{ variant, size }` through to a\n * function-as-`render` consumer's callback.\n */\n\nconst itemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.variantDefault,\n outline: styles.variantOutline,\n muted: styles.variantMuted,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n xs: styles.sizeXs,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\ntype ItemVariant = NonNullable<VariantProps<typeof itemVariants>['variant']>;\ntype ItemSize = NonNullable<VariantProps<typeof itemVariants>['size']>;\n\nexport type ItemProps = useRender.ComponentProps<'div', { variant: ItemVariant; size: ItemSize }> &\n VariantProps<typeof itemVariants>;\n\nexport function Item({ className, variant, size, render, ...props }: ItemProps) {\n // cva's own VariantProps types these `| null` (a consumer can pass\n // `variant={null}` to explicitly reset to the default), which a default\n // parameter value alone doesn't absorb — only `undefined` does. Resolved\n // here once so `state` below can stay a plain, non-nullable\n // `{ variant, size }` pair.\n const resolvedVariant = variant ?? 'default';\n const resolvedSize = size ?? 'default';\n return useRender({\n defaultTagName: 'div',\n render,\n state: { variant: resolvedVariant, size: resolvedSize },\n stateAttributesMapping: {\n variant: () => null,\n size: () => null,\n },\n props: mergeProps<'div'>({ className: itemVariants({ variant, size, className }) }, props),\n });\n}\n\nconst itemMediaVariants = cva(styles.itemMedia, {\n variants: {\n variant: {\n default: styles.itemMediaVariantDefault,\n icon: styles.itemMediaVariantIcon,\n image: styles.itemMediaVariantImage,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface ItemMediaProps\n extends ComponentProps<'div'>, VariantProps<typeof itemMediaVariants> {}\n\n/** `variant=\"image\"` also shrinks to match the ancestor `Item`'s own\n * `size` (see item.module.css) — no separate prop, it reads the size class\n * already sitting on the `Item` root. */\nexport function ItemMedia({ className, variant, ...props }: ItemMediaProps) {\n return <div className={itemMediaVariants({ variant, className })} {...props} />;\n}\n\nexport type ItemContentProps = ComponentProps<'div'>;\n\nexport function ItemContent({ className, ...props }: ItemContentProps) {\n return <div className={cx(styles.itemContent, className)} {...props} />;\n}\n\nexport type ItemTitleProps = ComponentProps<'div'>;\n\nexport function ItemTitle({ className, ...props }: ItemTitleProps) {\n return <div className={cx(styles.itemTitle, className)} {...props} />;\n}\n\n/*\n * Deviation from upstream's own typing: source types this as\n * `React.ComponentProps<\"p\">` and does render a `<p>` (unlike KbdGroup/\n * EmptyDescription's own typing/render mismatch elsewhere in this port —\n * Item's is consistent), kept as-is.\n */\nexport type ItemDescriptionProps = ComponentProps<'p'>;\n\nexport function ItemDescription({ className, ...props }: ItemDescriptionProps) {\n return <p className={cx(styles.itemDescription, className)} {...props} />;\n}\n\nexport type ItemActionsProps = ComponentProps<'div'>;\n\nexport function ItemActions({ className, ...props }: ItemActionsProps) {\n return <div className={cx(styles.itemActions, className)} {...props} />;\n}\n\nexport type ItemHeaderProps = ComponentProps<'div'>;\n\nexport function ItemHeader({ className, ...props }: ItemHeaderProps) {\n return <div className={cx(styles.itemHeader, className)} {...props} />;\n}\n\nexport type ItemFooterProps = ComponentProps<'div'>;\n\nexport function ItemFooter({ className, ...props }: ItemFooterProps) {\n return <div className={cx(styles.itemFooter, className)} {...props} />;\n}\n\nexport type ItemGroupProps = ComponentProps<'div'>;\n\n/** A `role=\"list\"` container for a run of `Item`s, spacing them apart\n * (the gap shrinks to match the smallest `size` of Item it contains — see\n * item.module.css). */\nexport function ItemGroup({ className, ...props }: ItemGroupProps) {\n return <div role=\"list\" className={cx(styles.itemGroup, className)} {...props} />;\n}\n\n/** A divider between `Item`s, built on the kit's own `Separator` — same\n * composition idiom as `field.tsx`'s `FieldSeparator`. */\nexport type ItemSeparatorProps = SeparatorProps;\n\nexport function ItemSeparator({ className, ...props }: ItemSeparatorProps) {\n return <Separator orientation=\"horizontal\" className={cx(styles.itemSeparator, className)} {...props} />;\n}\n"],"names":["itemVariants","cva","styles","Item","className","variant","size","render","props","useRender","mergeProps","itemMediaVariants","ItemMedia","jsx","ItemContent","cx","ItemTitle","ItemDesc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AGI,EAAA,CAAO;AACxG;"}
|
|
1
|
+
{"version":3,"file":"item.js","sources":["../src/components/item/item.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport {\n Children,\n cloneElement,\n type ComponentProps,\n createContext,\n type CSSProperties,\n Fragment,\n isValidElement,\n type ReactNode,\n useContext,\n} from 'react';\n\nimport { Separator, type SeparatorProps } from '../separator/separator';\nimport styles from './item.module.css';\n\n/*\n * Item is mostly primitive-free (registry/bases/base/ui/item.tsx ships\n * plain `div`s with data-slot markers, same shape as Card — see card.tsx),\n * EXCEPT the root: upstream builds `Item` itself on Base UI's headless\n * `useRender`/`mergeProps` utilities for render-prop polymorphism (e.g.\n * rendering as an `<a>` so a whole item is a link), not a stateful/\n * positioned primitive like Button or Dialog. This port keeps that\n * capability rather than dropping it — the `render` prop is a real part of\n * Item's upstream surface, and \"replicate faithfully\" extends to it.\n *\n * No `data-slot`/`data-variant`/`data-size` attributes, per the kit-wide\n * convention (see card.tsx): `useRender`'s `state` option would otherwise\n * auto-reflect `variant`/`size` as `data-*` attributes (see Base UI's\n * getStateAttributesProps), so `stateAttributesMapping` below suppresses\n * that while still handing `{ variant, size }` through to a\n * function-as-`render` consumer's callback.\n */\n\nconst itemVariants = cva(styles.item, {\n variants: {\n variant: {\n default: styles.variantDefault,\n outline: styles.variantOutline,\n muted: styles.variantMuted,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n xs: styles.sizeXs,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\ntype ItemVariant = NonNullable<VariantProps<typeof itemVariants>['variant']>;\ntype ItemSize = NonNullable<VariantProps<typeof itemVariants>['size']>;\n\nexport type ItemProps = useRender.ComponentProps<'div', { variant: ItemVariant; size: ItemSize }> &\n VariantProps<typeof itemVariants>;\n\n// Set by ItemGroup, whose `role=\"list\"` needs list items as its children.\nconst ItemGroupContext = createContext(false);\n\n/*\n * Inside an ItemGroup a plain Item is the list's `listitem` (axe\n * `aria-required-children` on the group otherwise). An Item with `render`\n * (a link or a button row) keeps the rendered element's role, which a\n * listitem role would replace, and is wrapped in a `div role=\"listitem\"`\n * instead, so the row stays a link or a button and the list stays well\n * formed. A `role` the caller passes always wins and gets no wrapper. Each\n * Item resets the context for its own children, so an Item nested in a\n * row (or in a popup opened from one) is not taken for a row of the list.\n * The context and the hook are why this module ships `'use client'`.\n */\nexport function Item({ className, variant, size, render, ...props }: ItemProps) {\n const inGroup = useContext(ItemGroupContext);\n // cva's own VariantProps types these `| null` (a consumer can pass\n // `variant={null}` to explicitly reset to the default), which a default\n // parameter value alone doesn't absorb — only `undefined` does. Resolved\n // here once so `state` below can stay a plain, non-nullable\n // `{ variant, size }` pair.\n const resolvedVariant = variant ?? 'default';\n const resolvedSize = size ?? 'default';\n const element = useRender({\n defaultTagName: 'div',\n render,\n state: { variant: resolvedVariant, size: resolvedSize },\n stateAttributesMapping: {\n variant: () => null,\n size: () => null,\n },\n props: mergeProps<'div'>(\n {\n className: itemVariants({ variant, size, className }),\n role: inGroup && render === undefined ? 'listitem' : undefined,\n },\n props,\n ),\n });\n // No wrapper when the rendered element is already a list item (an `li`\n // or role=\"listitem\") or opts out of semantics (none, presentation); any\n // other role on it (a link styled as a button, a menuitem) still sits in\n // the list item.\n const renderOwnsRole =\n isValidElement<{ role?: string }>(render) &&\n (render.type === 'li' ||\n render.props.role === 'listitem' ||\n render.props.role === 'none' ||\n render.props.role === 'presentation');\n const wrapped =\n inGroup && render !== undefined && props.role === undefined && !renderOwnsRole ? (\n <div role=\"listitem\" className={styles.itemListItem}>\n {element}\n </div>\n ) : (\n element\n );\n return <ItemGroupContext.Provider value={false}>{wrapped}</ItemGroupContext.Provider>;\n}\n\nconst itemMediaVariants = cva(styles.itemMedia, {\n variants: {\n variant: {\n default: styles.itemMediaVariantDefault,\n icon: styles.itemMediaVariantIcon,\n image: styles.itemMediaVariantImage,\n chip: styles.itemMediaVariantChip,\n 'chip-round': styles.itemMediaVariantChipRound,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface ItemMediaProps\n extends ComponentProps<'div'>, VariantProps<typeof itemMediaVariants> {}\n\n/** `variant=\"image\"` also shrinks to match the ancestor `Item`'s own\n * `size` (see item.module.css) — no separate prop, it reads the size class\n * already sitting on the `Item` root. */\nexport function ItemMedia({ className, variant, ...props }: ItemMediaProps) {\n return <div className={itemMediaVariants({ variant, className })} {...props} />;\n}\n\nexport type ItemContentProps = ComponentProps<'div'>;\n\nexport function ItemContent({ className, ...props }: ItemContentProps) {\n return <div className={cx(styles.itemContent, className)} {...props} />;\n}\n\nexport type ItemTitleProps = ComponentProps<'div'>;\n\n/*\n * Each run of adjacent text children goes into one `.itemTitleText` span,\n * the box that draws the ellipsis (see item.module.css). A fragment's\n * children count as the title's own, so `<>{first} {last}</>` is one run.\n * Element children, such as an icon or a badge beside the text, render as\n * they are, so the flex gap between an icon and the text keeps working. A\n * run of whitespace only (the space between two elements in JSX) is\n * dropped: a flex container drops it anyway, while a span would add a\n * second gap.\n */\nfunction wrapTextRuns(children: ReactNode): ReactNode[] {\n const out: ReactNode[] = [];\n let run: string[] = [];\n const flush = () => {\n const text = run.join('');\n run = [];\n if (text.trim() !== '') {\n out.push(\n <span key={`text-${out.length}`} className={styles.itemTitleText}>\n {text}\n </span>,\n );\n }\n };\n // `Children.toArray` keys each level from `.0`, so an element taken out\n // of a fragment is re-keyed under the fragment's own key to stay unique.\n const collect = (nodes: ReactNode, keyPrefix: string) => {\n for (const child of Children.toArray(nodes)) {\n if (typeof child === 'string' || typeof child === 'number') {\n run.push(String(child));\n } else if (isValidElement<{ children?: ReactNode }>(child) && child.type === Fragment) {\n collect(child.props.children, `${keyPrefix}${String(child.key)}/`);\n } else {\n flush();\n out.push(\n keyPrefix && isValidElement(child)\n ? cloneElement(child, { key: `${keyPrefix}${String(child.key)}` })\n : child,\n );\n }\n }\n };\n collect(children, '');\n flush();\n return out;\n}\n\nexport function ItemTitle({ className, children, ...props }: ItemTitleProps) {\n return (\n <div className={cx(styles.itemTitle, className)} {...props}>\n {wrapTextRuns(children)}\n </div>\n );\n}\n\n/*\n * Deviation from upstream's own typing: source types this as\n * `React.ComponentProps<\"p\">` and does render a `<p>` (unlike KbdGroup/\n * EmptyDescription's own typing/render mismatch elsewhere in this port —\n * Item's is consistent), kept as-is.\n */\nexport interface ItemDescriptionProps extends ComponentProps<'p'> {\n /**\n * Lines shown before the text is cut with an ellipsis, rounded down to a\n * whole line. `'none'` shows the full text; a number below 1 or a\n * non-finite one does the same, so a description never clamps to zero\n * lines.\n * @default 2\n */\n lineClamp?: number | 'none';\n}\n\n/*\n * Upstream hardcodes a two-line clamp and leaves any other count to a\n * `className` override. Under CSS Modules that override competes with\n * `.itemDescription` at equal specificity, so stylesheet order decides, and\n * that order differs between the document and a shadow root. `lineClamp`\n * is the declared way out instead. A count other than 2 travels as the\n * private `--_item-line-clamp` custom property (the inline-variable idiom of\n * Textarea's `--rows`); the default writes no inline style, so the default\n * markup stays what it was. `'none'` swaps in a class that drops the clamp.\n */\nexport function ItemDescription({ className, style, lineClamp = 2, ...props }: ItemDescriptionProps) {\n const lines = lineClamp === 'none' || !Number.isFinite(lineClamp) || lineClamp < 1 ? undefined : Math.floor(lineClamp);\n const unclamped = lines === undefined;\n return (\n <p\n className={cx(styles.itemDescription, unclamped && styles.itemDescriptionUnclamped, className)}\n style={lines === undefined || lines === 2 ? style : ({ '--_item-line-clamp': lines, ...style } as CSSProperties)}\n {...props}\n />\n );\n}\n\nexport type ItemActionsProps = ComponentProps<'div'>;\n\nexport function ItemActions({ className, ...props }: ItemActionsProps) {\n return <div className={cx(styles.itemActions, className)} {...props} />;\n}\n\nexport type ItemHeaderProps = ComponentProps<'div'>;\n\nexport function ItemHeader({ className, ...props }: ItemHeaderProps) {\n return <div className={cx(styles.itemHeader, className)} {...props} />;\n}\n\nexport type ItemFooterProps = ComponentProps<'div'>;\n\nexport function ItemFooter({ className, ...props }: ItemFooterProps) {\n return <div className={cx(styles.itemFooter, className)} {...props} />;\n}\n\nexport type ItemGroupProps = ComponentProps<'div'>;\n\n/** A `role=\"list\"` container for a run of `Item`s, spacing them apart\n * (the gap shrinks to match the smallest `size` of Item it contains — see\n * item.module.css). */\n// Its rows are list items only while the group is a list: a `role` the\n// caller passes replaces `list`, and then no row takes `listitem`.\nexport function ItemGroup({ className, role = 'list', ...props }: ItemGroupProps) {\n return (\n <ItemGroupContext.Provider value={role === 'list'}>\n <div role={role} className={cx(styles.itemGroup, className)} {...props} />\n </ItemGroupContext.Provider>\n );\n}\n\n/** A divider between `Item`s, built on the kit's own `Separator` — same\n * composition idiom as `field.tsx`'s `FieldSeparator`. */\nexport type ItemSeparatorProps = SeparatorProps;\n\n/*\n * Decorative by default (`aria-hidden`, the kit's documented decorative\n * form, see separator.md): inside ItemGroup's list a separator role is a\n * child the list role does not allow, and the rows already read as items.\n */\nexport function ItemSeparator({ className, ...props }: ItemSeparatorProps) {\n return (\n <Separator\n orientation=\"horizontal\"\n aria-hidden\n className={cx(styles.itemSeparator, className)}\n {...props}\n />\n );\n}\n"],"names":["itemVariants","cva","styles","ItemGroupContext","createContext","Item","className","variant","size","render","props","inGroup","useContext","element","useRender","mergeProps","renderOwnsRole","isValidElement","wrapped","jsx","itemMediaVariants","ItemMedia","ItemContent","cx","wrapTextRuns","children","out","run","flush","text","collect","nodes","keyPrefix","child","Children","Fragment","cloneElement","ItemTitle","ItemDescription","style","lineClamp","lines","unclamped","ItemActions","ItemHeader","ItemFooter","ItemGroup","role","ItemSeparator","Separator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCMA,IAAeC,EAAIC,EAAO,MAAM;AAAA,EACpC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,IAAA;AAAA,I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AO,QAAQ,GAAGrC,KAAyB;AAChF,2BACGP,EAAiB,UAAjB,EAA0B,OAAO4C,MAAS,QACzC,UAAA,gBAAA5B,EAAC,OAAA,EAAI,MAAA4B,GAAY,WAAWxB,EAAGrB,EAAO,WAAWI,CAAS,GAAI,GAAGI,GAAO,GAC1E;AAEJ;AAWO,SAASsC,GAAc,EAAE,WAAA1C,GAAW,GAAGI,KAA6B;AACzE,SACE,gBAAAS;AAAA,IAAC8B;AAAA,IAAA;AAAA,MACC,aAAY;AAAA,MACZ,eAAW;AAAA,MACX,WAAW1B,EAAGrB,EAAO,eAAeI,CAAS;AAAA,MAC5C,GAAGI;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
package/dist/link.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/link/public.js'
|
package/dist/link.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, Fragment as d, jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { mergeProps as _ } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender as p } from "@base-ui/react/use-render";
|
|
5
|
+
import { cva as h } from "class-variance-authority";
|
|
6
|
+
import { ArrowUpRight as k } from "lucide-react";
|
|
7
|
+
import './chunks/link.BOE4f-aB.css';const x = "_link_i5a7x_12", g = "_variantDefault_i5a7x_31", D = "_variantMuted_i5a7x_35", I = "_variantInherit_i5a7x_47", a = {
|
|
8
|
+
link: x,
|
|
9
|
+
variantDefault: g,
|
|
10
|
+
variantMuted: D,
|
|
11
|
+
variantInherit: I
|
|
12
|
+
}, M = h(a.link, {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: a.variantDefault,
|
|
16
|
+
muted: a.variantMuted,
|
|
17
|
+
inherit: a.variantInherit
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
function b({
|
|
25
|
+
className: e,
|
|
26
|
+
variant: o,
|
|
27
|
+
external: t = !1,
|
|
28
|
+
render: s,
|
|
29
|
+
children: r,
|
|
30
|
+
target: n,
|
|
31
|
+
rel: i,
|
|
32
|
+
...l
|
|
33
|
+
}) {
|
|
34
|
+
const u = o ?? "default", v = t ? { target: n ?? "_blank", rel: i ?? "noopener noreferrer" } : { target: n, rel: i }, f = t ? /* @__PURE__ */ c(d, { children: [
|
|
35
|
+
r,
|
|
36
|
+
/* @__PURE__ */ m(k, { "aria-hidden": "true" })
|
|
37
|
+
] }) : r;
|
|
38
|
+
return p({
|
|
39
|
+
defaultTagName: "a",
|
|
40
|
+
render: s,
|
|
41
|
+
props: _(
|
|
42
|
+
{
|
|
43
|
+
className: M({ variant: u, className: e }),
|
|
44
|
+
children: f,
|
|
45
|
+
...v
|
|
46
|
+
},
|
|
47
|
+
l
|
|
48
|
+
)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
b as Link,
|
|
53
|
+
M as linkVariants
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=link.js.map
|
package/dist/link.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sources":["../src/components/link/link.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ArrowUpRight } from 'lucide-react';\n\nimport styles from './link.module.css';\n\n/*\n * An inline anchor that inherits font size and line height from its line,\n * so it never changes the line box: the difference from\n * `buttonVariants({ variant: 'link' })`, which carries a control's height\n * and padding. `render` hands the anchor to the application's router link,\n * which keeps routing out of the kit. An explicit `variant={null}` resolves\n * to the default, as on Heading.\n */\nconst linkVariants = cva(styles.link, {\n variants: {\n variant: {\n default: styles.variantDefault,\n muted: styles.variantMuted,\n inherit: styles.variantInherit,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface LinkProps\n extends useRender.ComponentProps<'a'>, VariantProps<typeof linkVariants> {\n /**\n * A link that leaves the application: opens in a new tab\n * (`target=\"_blank\"`, `rel=\"noopener noreferrer\"` unless the caller passes\n * its own) and appends an arrow icon hidden from assistive technology. The\n * accessible wording (\"opens in a new tab\") stays with the caller.\n * @default false\n */\n external?: boolean;\n}\n\nexport function Link({\n className,\n variant,\n external = false,\n render,\n children,\n target,\n rel,\n ...props\n}: LinkProps) {\n const resolvedVariant = variant ?? 'default';\n const externalProps = external\n ? { target: target ?? '_blank', rel: rel ?? 'noopener noreferrer' }\n : { target, rel };\n const content = external ? (\n <>\n {children}\n <ArrowUpRight aria-hidden=\"true\" />\n </>\n ) : (\n children\n );\n return useRender({\n defaultTagName: 'a',\n render,\n props: mergeProps<'a'>(\n {\n className: linkVariants({ variant: resolvedVariant, className }),\n children: content,\n ...externalProps,\n },\n props,\n ),\n });\n}\n\nexport { linkVariants };\n"],"names":["linkVariants","cva","styles","Link","className","variant","external","render","children","target","rel","props","resolvedVariant","externalProps","content","jsxs","Fragment","jsx","ArrowUpRight","useRender","mergeProps"],"mappings":";;;;;;;;;;;GAiBMA,IAAeC,EAAIC,EAAO,MAAM;AAAA,EACpC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,MACd,SAASA,EAAO;AAAA,IAAA;AAAA,EAClB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;AAcM,SAASC,EAAK;AAAA,EACnB,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,GAAGC;AACL,GAAc;AACZ,QAAMC,IAAkBP,KAAW,WAC7BQ,IAAgBP,IAClB,EAAE,QAAQG,KAAU,UAAU,KAAKC,KAAO,sBAAA,IAC1C,EAAE,QAAAD,GAAQ,KAAAC,EAAA,GACRI,IAAUR,IACd,gBAAAS,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAR;AAAA,IACD,gBAAAS,EAACC,GAAA,EAAa,eAAY,OAAA,CAAO;AAAA,EAAA,EAAA,CACnC,IAEAV;AAEF,SAAOW,EAAU;AAAA,IACf,gBAAgB;AAAA,IAChB,QAAAZ;AAAA,IACA,OAAOa;AAAA,MACL;AAAA,QACE,WAAWpB,EAAa,EAAE,SAASY,GAAiB,WAAAR,GAAW;AAAA,QAC/D,UAAUU;AAAA,QACV,GAAGD;AAAA,MAAA;AAAA,MAELF;AAAA,IAAA;AAAA,EACF,CACD;AACH;"}
|
package/dist/message-scroller.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { MessageScroller as r } from "@shadcn/react/message-scroller";
|
|
3
3
|
import { useMessageScroller as A, useMessageScrollerScrollable as D, useMessageScrollerVisibility as R } from "@shadcn/react/message-scroller";
|
|
4
4
|
import { cx as n } from "class-variance-authority";
|
|
5
5
|
import { ArrowDownIcon as _ } from "lucide-react";
|
|
6
6
|
import { Button as S } from "./button.js";
|
|
7
|
-
import './chunks/message-scroller.
|
|
7
|
+
import './chunks/message-scroller.CBjPcz8Y.css';const p = "_root_1tvy6_9", f = "_viewport_1tvy6_23", g = "_content_1tvy6_37", v = "_item_1tvy6_79", M = "_button_1tvy6_102", s = {
|
|
8
8
|
root: p,
|
|
9
9
|
viewport: f,
|
|
10
10
|
content: g,
|
|
11
11
|
item: v,
|
|
12
12
|
button: M
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
function x(e) {
|
|
15
|
+
return /* @__PURE__ */ o(r.Provider, { ...e });
|
|
16
16
|
}
|
|
17
|
-
function B({ className:
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
function B({ className: e, ...t }) {
|
|
18
|
+
return /* @__PURE__ */ o(r.Root, { className: n(s.root, e), ...t });
|
|
19
19
|
}
|
|
20
|
-
function I({ className:
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
function I({ className: e, ...t }) {
|
|
21
|
+
return /* @__PURE__ */ o(r.Viewport, { className: n(s.viewport, e), ...t });
|
|
22
22
|
}
|
|
23
|
-
function V({ className:
|
|
24
|
-
return /* @__PURE__ */
|
|
23
|
+
function V({ className: e, ...t }) {
|
|
24
|
+
return /* @__PURE__ */ o(r.Content, { className: n(s.content, e), ...t });
|
|
25
25
|
}
|
|
26
|
-
function C({ className:
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
function C({ className: e, ...t }) {
|
|
27
|
+
return /* @__PURE__ */ o(r.Item, { className: n(s.item, e), ...t });
|
|
28
28
|
}
|
|
29
29
|
function P({
|
|
30
|
-
className:
|
|
31
|
-
children:
|
|
30
|
+
className: e,
|
|
31
|
+
children: t,
|
|
32
32
|
render: c,
|
|
33
33
|
direction: l = "end",
|
|
34
|
-
variant:
|
|
35
|
-
size:
|
|
34
|
+
variant: a = "secondary",
|
|
35
|
+
size: i = "sm",
|
|
36
36
|
"aria-label": m,
|
|
37
37
|
...u
|
|
38
38
|
}) {
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ o(
|
|
40
40
|
r.Button,
|
|
41
41
|
{
|
|
42
42
|
direction: l,
|
|
43
43
|
"aria-label": m ?? (l === "end" ? "Scroll to end" : "Scroll to start"),
|
|
44
|
-
className: n(s.button,
|
|
45
|
-
render: c ?? /* @__PURE__ */
|
|
44
|
+
className: n(s.button, e),
|
|
45
|
+
render: c ?? /* @__PURE__ */ o(
|
|
46
46
|
S,
|
|
47
47
|
{
|
|
48
|
-
variant:
|
|
49
|
-
size:
|
|
50
|
-
icon: /* @__PURE__ */
|
|
48
|
+
variant: a,
|
|
49
|
+
size: i,
|
|
50
|
+
icon: /* @__PURE__ */ o(_, {})
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
53
|
...u,
|
|
54
|
-
children:
|
|
54
|
+
children: t ?? ""
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
@@ -60,7 +60,7 @@ export {
|
|
|
60
60
|
P as MessageScrollerButton,
|
|
61
61
|
V as MessageScrollerContent,
|
|
62
62
|
C as MessageScrollerItem,
|
|
63
|
-
|
|
63
|
+
x as MessageScrollerProvider,
|
|
64
64
|
I as MessageScrollerViewport,
|
|
65
65
|
A as useMessageScroller,
|
|
66
66
|
D as useMessageScrollerScrollable,
|