@gears-frontx/ui-kit 0.4.2 → 0.4.3
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 +6 -5
- 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/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/sheet.BkZyzAbA.css +1 -0
- package/dist/chunks/sidebar.CIuN--7U.css +1 -0
- package/dist/chunks/slider.DY1XDCPw.css +1 -0
- package/dist/chunks/status-dot.39NKkKQF.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/description-list.d.ts +1 -0
- package/dist/description-list.js +78 -0
- package/dist/description-list.js.map +1 -0
- 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/description-list.md +53 -0
- 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/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/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/sheet.js +41 -41
- package/dist/sidebar.js +220 -206
- 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/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 -1
- 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/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/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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
Text on the kit's type ramp: `typography` is the ramp role and `tone` the
|
|
4
|
+
colour. The default element is `p`; `render` swaps it. No Base UI
|
|
5
|
+
primitive; `render` comes from `useRender`/`mergeProps`.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A paragraph between kit components.
|
|
10
|
+
- A short muted line (an update time, a hint) on the meta role.
|
|
11
|
+
- A path or a name on the mono role, with `render={<code />}`.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- A heading: use `Heading`.
|
|
16
|
+
- A block of code with a copy action: use `CodeBlock`.
|
|
17
|
+
- A key or a shortcut: use `Kbd`.
|
|
18
|
+
- The description line of a card: use `CardDescription`.
|
|
19
|
+
|
|
20
|
+
## Props (kit level)
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default |
|
|
23
|
+
|------|------|---------|
|
|
24
|
+
| `typography` | `'body' \| 'label' \| 'meta' \| 'mono' \| 'micro' \| 'kpi' \| 'kpi-lg'` - the ramp role; `mono` also sets `--font-mono`; `kpi` (32/32) and `kpi-lg` (48/48) are key figures on a dashboard card, with tabular figures | `'body'` |
|
|
25
|
+
| `tone` | `'default' \| 'muted'` - `--foreground` or `--muted-foreground` | `'default'` |
|
|
26
|
+
| `render` | `ReactElement` or callback - the element | `p` |
|
|
27
|
+
| `className` | `string` - merged after the role and tone classes | - |
|
|
28
|
+
|
|
29
|
+
All other props are native paragraph props. Margins are zero. No `lead`,
|
|
30
|
+
`overline` or uppercase roles: they are not ramp roles; a consumer that
|
|
31
|
+
wants one adds a class or brands a role.
|
|
32
|
+
|
|
33
|
+
## Accessibility
|
|
34
|
+
|
|
35
|
+
- Contrast of the two tones is a property of the theme's tokens.
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { Text } from '@gears-frontx/ui-kit';
|
|
41
|
+
|
|
42
|
+
<Text>Invite people by email.</Text>
|
|
43
|
+
<Text typography="meta" tone="muted" render={<span />}>Updated 2 hours ago</Text>
|
|
44
|
+
<Text typography="mono" render={<code />}>src/app/main.tsx</Text>
|
|
45
|
+
<Text typography="kpi" render={<strong />}>41,302</Text>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Anti-patterns
|
|
49
|
+
|
|
50
|
+
- Do not set font sizes or colours on it from outside: pick `typography`
|
|
51
|
+
and `tone`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# VisuallyHidden
|
|
2
|
+
|
|
3
|
+
Text a screen reader reads and the screen does not show. A `span` by default, with `render`. The same declarations the kit repeats
|
|
4
|
+
inside several component modules, as the one public copy; the `sr-only` class
|
|
5
|
+
in `utilities.css` is the same rule for markup that is not React.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- The name of an icon-only link or of a custom control without a label prop.
|
|
10
|
+
- A table caption the surrounding heading already shows.
|
|
11
|
+
- A live-region announcement.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- An icon-only `Button`: give it `icon` and `aria-label`.
|
|
16
|
+
- Text hidden from everyone: do not render it.
|
|
17
|
+
- A status dot without a label: give `StatusDot` an `aria-label`.
|
|
18
|
+
|
|
19
|
+
## Props (kit level)
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Default |
|
|
22
|
+
|------|------|---------|
|
|
23
|
+
| `render` | `ReactElement` or callback - the element, such as `<caption />` | `span` |
|
|
24
|
+
| `className` | `string` - merged after the kit class | - |
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
|
|
28
|
+
- The box is absolutely positioned, 1x1px, clipped with
|
|
29
|
+
`clip-path: inset(50%)`, with no padding or border and no wrapping; its
|
|
30
|
+
text stays in the accessibility tree.
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { VisuallyHidden } from '@gears-frontx/ui-kit';
|
|
36
|
+
|
|
37
|
+
<a href="/docs"><ExternalLink aria-hidden="true" /><VisuallyHidden>Open the docs</VisuallyHidden></a>
|
|
38
|
+
<VisuallyHidden render={<caption />}>Members</VisuallyHidden>
|
|
39
|
+
<span className="sr-only">Opens in a new tab</span>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Anti-patterns
|
|
43
|
+
|
|
44
|
+
- Do not hide a visible label: sighted users need it too.
|
package/dist/empty.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { mergeProps as r } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender as s } from "@base-ui/react/use-render";
|
|
2
5
|
import { cx as i, cva as m } from "class-variance-authority";
|
|
3
|
-
import './chunks/empty.
|
|
4
|
-
empty:
|
|
6
|
+
import './chunks/empty.DWqLrSfF.css';const o = "_empty_lrpps_7", c = "_emptyHeader_lrpps_27", l = "_emptyMedia_lrpps_35", y = "_variantDefault_lrpps_48", _ = "_variantIcon_lrpps_52", d = "_emptyTitle_lrpps_78", u = "_emptyDescription_lrpps_95", f = "_emptyDetail_lrpps_121", v = "_emptyActions_lrpps_150", D = "_emptyContent_lrpps_147", T = "_renderedTitle_lrpps_183", n = {
|
|
7
|
+
empty: o,
|
|
5
8
|
emptyHeader: c,
|
|
6
|
-
emptyMedia:
|
|
7
|
-
variantDefault:
|
|
8
|
-
variantIcon:
|
|
9
|
-
emptyTitle:
|
|
10
|
-
emptyDescription:
|
|
11
|
-
emptyDetail:
|
|
12
|
-
emptyActions:
|
|
13
|
-
emptyContent:
|
|
9
|
+
emptyMedia: l,
|
|
10
|
+
variantDefault: y,
|
|
11
|
+
variantIcon: _,
|
|
12
|
+
emptyTitle: d,
|
|
13
|
+
emptyDescription: u,
|
|
14
|
+
emptyDetail: f,
|
|
15
|
+
emptyActions: v,
|
|
16
|
+
emptyContent: D,
|
|
17
|
+
renderedTitle: T
|
|
14
18
|
};
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
19
|
+
function H({ className: e, ...t }) {
|
|
20
|
+
return /* @__PURE__ */ p("div", { className: i(n.empty, e), ...t });
|
|
17
21
|
}
|
|
18
|
-
function
|
|
19
|
-
return /* @__PURE__ */
|
|
22
|
+
function I({ className: e, ...t }) {
|
|
23
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyHeader, e), ...t });
|
|
20
24
|
}
|
|
21
|
-
const
|
|
25
|
+
const N = m(n.emptyMedia, {
|
|
22
26
|
variants: {
|
|
23
27
|
variant: {
|
|
24
28
|
default: n.variantDefault,
|
|
@@ -29,32 +33,39 @@ const f = m(n.emptyMedia, {
|
|
|
29
33
|
variant: "default"
|
|
30
34
|
}
|
|
31
35
|
});
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
36
|
+
function x({ className: e, variant: t, ...a }) {
|
|
37
|
+
return /* @__PURE__ */ p("div", { className: N({ variant: t, className: e }), ...a });
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
39
|
+
function g({ className: e, render: t, ...a }) {
|
|
40
|
+
return s({
|
|
41
|
+
defaultTagName: "div",
|
|
42
|
+
render: t,
|
|
43
|
+
props: r(
|
|
44
|
+
{ className: i(n.emptyTitle, t && n.renderedTitle, e) },
|
|
45
|
+
a
|
|
46
|
+
)
|
|
47
|
+
});
|
|
37
48
|
}
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */
|
|
49
|
+
function V({ className: e, ...t }) {
|
|
50
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyDescription, e), ...t });
|
|
40
51
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */
|
|
52
|
+
function j({ className: e, ...t }) {
|
|
53
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyContent, e), ...t });
|
|
43
54
|
}
|
|
44
|
-
function
|
|
45
|
-
return /* @__PURE__ */
|
|
55
|
+
function P({ className: e, ...t }) {
|
|
56
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyDetail, e), ...t });
|
|
46
57
|
}
|
|
47
|
-
function
|
|
48
|
-
return /* @__PURE__ */
|
|
58
|
+
function R({ className: e, ...t }) {
|
|
59
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyActions, e), ...t });
|
|
49
60
|
}
|
|
50
61
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
H as Empty,
|
|
63
|
+
R as EmptyActions,
|
|
64
|
+
j as EmptyContent,
|
|
65
|
+
V as EmptyDescription,
|
|
66
|
+
P as EmptyDetail,
|
|
67
|
+
I as EmptyHeader,
|
|
68
|
+
x as EmptyMedia,
|
|
69
|
+
g as EmptyTitle
|
|
59
70
|
};
|
|
60
71
|
//# sourceMappingURL=empty.js.map
|
package/dist/empty.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.js","sources":["../src/components/empty/empty.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"empty.js","sources":["../src/components/empty/empty.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 type { ComponentProps } from 'react';\n\nimport styles from './empty.module.css';\n\n/*\n * Empty has no Base UI primitive (registry/bases/base/ui/empty.tsx ships\n * plain `div`s with data-slot markers) — a pure styling translation over\n * native elements, same shape as Card (see card.tsx). No `data-slot`\n * attributes, per the kit-wide convention.\n */\n\nexport type EmptyProps = ComponentProps<'div'>;\n\nexport function Empty({ className, ...props }: EmptyProps) {\n return <div className={cx(styles.empty, className)} {...props} />;\n}\n\nexport type EmptyHeaderProps = ComponentProps<'div'>;\n\nexport function EmptyHeader({ className, ...props }: EmptyHeaderProps) {\n return <div className={cx(styles.emptyHeader, className)} {...props} />;\n}\n\nconst emptyMediaVariants = cva(styles.emptyMedia, {\n variants: {\n variant: {\n default: styles.variantDefault,\n icon: styles.variantIcon,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface EmptyMediaProps\n extends ComponentProps<'div'>, VariantProps<typeof emptyMediaVariants> {}\n\n/** `variant=\"icon\"` draws the muted rounded square upstream's icon\n * treatment uses; `variant=\"default\"` (the default) stays transparent —\n * for an illustration or image that already carries its own chrome. */\nexport function EmptyMedia({ className, variant, ...props }: EmptyMediaProps) {\n return <div className={emptyMediaVariants({ variant, className })} {...props} />;\n}\n\nexport type EmptyTitleProps = useRender.ComponentProps<'div'>;\n\n/*\n * `render` swaps the element (a heading, typically) through Base UI's\n * `useRender`/`mergeProps`, which is why this module ships `'use client'`.\n * With `render` the element also takes `.renderedTitle`, which resets the\n * UA heading margins and font at zero specificity. Without it the markup is\n * the same `div` with the same class.\n */\nexport function EmptyTitle({ className, render, ...props }: EmptyTitleProps) {\n return useRender({\n defaultTagName: 'div',\n render,\n props: mergeProps<'div'>(\n { className: cx(styles.emptyTitle, render && styles.renderedTitle, className) },\n props,\n ),\n });\n}\n\n/*\n * Deviation from upstream's own typing: source types this as\n * `React.ComponentProps<\"p\">` but renders a plain `<div>` regardless (the\n * same source/render mismatch as KbdGroup — see kbd.tsx). This port types\n * it `ComponentProps<'div'>`, matching the element actually rendered.\n */\nexport type EmptyDescriptionProps = ComponentProps<'div'>;\n\nexport function EmptyDescription({ className, ...props }: EmptyDescriptionProps) {\n return <div className={cx(styles.emptyDescription, className)} {...props} />;\n}\n\nexport type EmptyContentProps = ComponentProps<'div'>;\n\nexport function EmptyContent({ className, ...props }: EmptyContentProps) {\n return <div className={cx(styles.emptyContent, className)} {...props} />;\n}\n\nexport type EmptyDetailProps = ComponentProps<'div'>;\n\n/** A secondary line under the description - a count, a hint, the query\n * that came back empty. Goes last inside `EmptyHeader`, where the drawn\n * 16 above it comes out of the header's own gap plus this part's margin\n * (see empty.module.css). */\nexport function EmptyDetail({ className, ...props }: EmptyDetailProps) {\n return <div className={cx(styles.emptyDetail, className)} {...props} />;\n}\n\nexport type EmptyActionsProps = ComponentProps<'div'>;\n\n/** A row of actions at the foot of the placeholder. A row, not a column:\n * `EmptyContent` is the column that holds arbitrary content (a search\n * field, a form), this is the button strip beneath it. */\nexport function EmptyActions({ className, ...props }: EmptyActionsProps) {\n return <div className={cx(styles.emptyActions, className)} {...props} />;\n}\n"],"names":["Empty","className","props","jsx","cx","styles","EmptyHeader","emptyMediaVariants","cva","EmptyMedia","variant","EmptyTitle","render","useRender","mergeProps","EmptyDescription","EmptyContent","EmptyDetail","EmptyActions"],"mappings":";;;;;;;;;;;;;;;;;;AAkBO,SAASA,EAAM,EAAE,WAAAC,GAAW,GAAGC,KAAqB;AACzD,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,OAAOJ,CAAS,GAAI,GAAGC,GAAO;AACjE;AAIO,SAASI,EAAY,EAAE,WAAAL,GAAW,GAAGC,KAA2B;AACrE,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,aAAaJ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C,EAAO,cAAcJ,CAAS,GAAI,GAAGC,GAAO;AACxE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/heading/public.js'
|
package/dist/heading.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { mergeProps as n } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender as e } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva as o } from "class-variance-authority";
|
|
5
|
+
import './chunks/heading.DQxQs5po.css';const t = "_heading_ymrqn_8", i = "_typographyDisplay_ymrqn_13", h = "_typographyHeading1_ymrqn_20", s = "_typographyHeading2_ymrqn_27", a = {
|
|
6
|
+
heading: t,
|
|
7
|
+
typographyDisplay: i,
|
|
8
|
+
typographyHeading1: h,
|
|
9
|
+
typographyHeading2: s
|
|
10
|
+
}, d = o(a.heading, {
|
|
11
|
+
variants: {
|
|
12
|
+
typography: {
|
|
13
|
+
display: a.typographyDisplay,
|
|
14
|
+
"heading-1": a.typographyHeading1,
|
|
15
|
+
"heading-2": a.typographyHeading2
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
typography: "heading-1"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
function H({ className: p, typography: y, render: r, ...g }) {
|
|
23
|
+
return e({
|
|
24
|
+
defaultTagName: "h2",
|
|
25
|
+
render: r,
|
|
26
|
+
props: n(
|
|
27
|
+
{ className: d({ typography: y ?? "heading-1", className: p }) },
|
|
28
|
+
g
|
|
29
|
+
)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
H as Heading,
|
|
34
|
+
d as headingVariants
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.js","sources":["../src/components/heading/heading.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';\n\nimport styles from './heading.module.css';\n\n/*\n * A heading on the kit's type ramp: `typography` picks the ramp role and\n * `render` picks the element, so the document outline (h1 to h6) and the\n * look stay independent. The axis is named `typography`, as on CardTitle,\n * because it picks a set of ramp tokens, not a box size. No Base UI\n * primitive: `render` polymorphism comes from `useRender`/`mergeProps`, as\n * in StatusDot, Badge and Item. Margins are zero; spacing belongs to the\n * layout that places the heading.\n */\nconst headingVariants = cva(styles.heading, {\n variants: {\n typography: {\n display: styles.typographyDisplay,\n 'heading-1': styles.typographyHeading1,\n 'heading-2': styles.typographyHeading2,\n },\n },\n defaultVariants: {\n typography: 'heading-1',\n },\n});\n\nexport interface HeadingProps\n extends useRender.ComponentProps<'h2'>, VariantProps<typeof headingVariants> {}\n\nexport function Heading({ className, typography, render, ...props }: HeadingProps) {\n // cva reads an explicit `null` as \"emit no class\"; resolved here so\n // `typography={null}` lands on the default role, as StatusDot and Item do.\n const resolvedTypography = typography ?? 'heading-1';\n return useRender({\n defaultTagName: 'h2',\n render,\n props: mergeProps<'h2'>(\n { className: headingVariants({ typography: resolvedTypography, className }) },\n props,\n ),\n });\n}\n\nexport { headingVariants };\n"],"names":["headingVariants","cva","styles","Heading","className","typography","render","props","useRender","mergeProps"],"mappings":";;;;;;;;;GAiBMA,IAAkBC,EAAIC,EAAO,SAAS;AAAA,EAC1C,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAASA,EAAO;AAAA,MAChB,aAAaA,EAAO;AAAA,MACpB,aAAaA,EAAO;AAAA,IAAA;AAAA,EACtB;AAAA,EAEF,iBAAiB;AAAA,IACf,YAAY;AAAA,EAAA;AAEhB,CAAC;AAKM,SAASC,EAAQ,EAAE,WAAAC,GAAW,YAAAC,GAAY,QAAAC,GAAQ,GAAGC,KAAuB;AAIjF,SAAOC,EAAU;AAAA,IACf,gBAAgB;AAAA,IAChB,QAAAF;AAAA,IACA,OAAOG;AAAA,MACL,EAAE,WAAWT,EAAgB,EAAE,YALRK,KAAc,aAK0B,WAAAD,EAAA,CAAW,EAAA;AAAA,MAC1EG;AAAA,IAAA;AAAA,EACF,CACD;AACH;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from './components/card/public.js';
|
|
|
42
42
|
export * from './components/carousel/public.js';
|
|
43
43
|
export * from './components/chart/public.js';
|
|
44
44
|
export * from './components/checkbox/public.js';
|
|
45
|
+
export * from './components/code-block/public.js';
|
|
45
46
|
export * from './components/collapsible/public.js';
|
|
46
47
|
export * from './components/combobox/public.js';
|
|
47
48
|
export * from './components/command/public.js';
|
|
@@ -53,12 +54,14 @@ export * from './components/data-grid/plugins/text-search/public.js';
|
|
|
53
54
|
export * from './components/data-grid/public.js';
|
|
54
55
|
export * from './components/data-table/public.js';
|
|
55
56
|
export * from './components/date-picker/public.js';
|
|
57
|
+
export * from './components/description-list/public.js';
|
|
56
58
|
export * from './components/dialog/public.js';
|
|
57
59
|
export * from './components/direction/public.js';
|
|
58
60
|
export * from './components/drawer/public.js';
|
|
59
61
|
export * from './components/dropdown-menu/public.js';
|
|
60
62
|
export * from './components/empty/public.js';
|
|
61
63
|
export * from './components/field/public.js';
|
|
64
|
+
export * from './components/heading/public.js';
|
|
62
65
|
export * from './components/hover-card/public.js';
|
|
63
66
|
export * from './components/input/public.js';
|
|
64
67
|
export * from './components/input-group/public.js';
|
|
@@ -66,6 +69,7 @@ export * from './components/input-otp/public.js';
|
|
|
66
69
|
export * from './components/item/public.js';
|
|
67
70
|
export * from './components/kbd/public.js';
|
|
68
71
|
export * from './components/label/public.js';
|
|
72
|
+
export * from './components/link/public.js';
|
|
69
73
|
export * from './components/marker/public.js';
|
|
70
74
|
export * from './components/menubar/public.js';
|
|
71
75
|
export * from './components/message/public.js';
|
|
@@ -91,9 +95,11 @@ export * from './components/status-dot/public.js';
|
|
|
91
95
|
export * from './components/switch/public.js';
|
|
92
96
|
export * from './components/table/public.js';
|
|
93
97
|
export * from './components/tabs/public.js';
|
|
98
|
+
export * from './components/text/public.js';
|
|
94
99
|
export * from './components/textarea/public.js';
|
|
95
100
|
export * from './components/toast/public.js';
|
|
96
101
|
export * from './components/toggle/public.js';
|
|
97
102
|
export * from './components/toggle-group/public.js';
|
|
98
103
|
export * from './components/tooltip/public.js';
|
|
104
|
+
export * from './components/visually-hidden/public.js';
|
|
99
105
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAA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