@charcuterie/ui 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/Card/Card.d.ts +12 -1
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +14 -2
- package/dist/Card/Card.js.map +1 -1
- package/dist/Card/cardAccentEdge.d.ts +101 -0
- package/dist/Card/cardAccentEdge.d.ts.map +1 -0
- package/dist/Card/cardAccentEdge.js +92 -0
- package/dist/Card/cardAccentEdge.js.map +1 -0
- package/dist/CopyButton/CopyButton.d.ts +67 -0
- package/dist/CopyButton/CopyButton.d.ts.map +1 -0
- package/dist/CopyButton/CopyButton.js +76 -0
- package/dist/CopyButton/CopyButton.js.map +1 -0
- package/dist/CopyButton/copyText.d.ts +23 -0
- package/dist/CopyButton/copyText.d.ts.map +1 -0
- package/dist/CopyButton/copyText.js +65 -0
- package/dist/CopyButton/copyText.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Card/Card.mdx +21 -0
- package/src/Card/Card.stories.tsx +91 -0
- package/src/Card/Card.test.tsx +92 -1
- package/src/Card/Card.tsx +34 -0
- package/src/Card/cardAccentEdge.test.ts +105 -0
- package/src/Card/cardAccentEdge.ts +135 -0
- package/src/CopyButton/CopyButton.mdx +84 -0
- package/src/CopyButton/CopyButton.stories.tsx +111 -0
- package/src/CopyButton/CopyButton.test.tsx +227 -0
- package/src/CopyButton/CopyButton.tsx +155 -0
- package/src/CopyButton/copyText.ts +68 -0
- package/src/index.ts +7 -0
- package/src/sourceRules.test.ts +7 -1
package/README.md
CHANGED
|
@@ -146,6 +146,7 @@ an hour of confusion.
|
|
|
146
146
|
| Type | `text-sm`/`text-md`/`text-lg`, which are **ours**: `theme.css` bridges `--text-*` onto the density-scaled `--font-size-*` |
|
|
147
147
|
| Motion | `styles.css`, at `--duration-loop-*`, switched off under `prefers-reduced-motion` |
|
|
148
148
|
| Scrollbar | `styles.css` — add `charcuterie-scrollbar` to any scrolling element for a token-tinted bar (rounded thumb on Chromium/Safari; thin standard match on Firefox) that flips with `[data-scheme]` |
|
|
149
|
+
| Accent edge | `Card/cardAccentEdge.ts` — `<Card accentEdge={{ categorical }} \| {{ color }}>` draws a bar down the leading edge from a pseudo-element that **inherits the card's radius**. A border cannot follow a corner, which is why three apps had a square bar on a round card |
|
|
149
150
|
| State | `@charcuterie/logic` — `useUniqueId` for label wiring, `useStatus` for `MediaTile`'s three image states |
|
|
150
151
|
|
|
151
152
|
**Class names are never interpolated.** `` `bg-intent-${intent}-solid` `` generates nothing
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import type { ElevationStep, SurfaceRole } from "@charcuterie/tokens";
|
|
2
2
|
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
import type { CardAccentEdge } from "./cardAccentEdge.ts";
|
|
3
4
|
export type CardSurface = Extract<SurfaceRole, "base" | "raised" | "sunken">;
|
|
4
5
|
export type CardPadding = "lg" | "md" | "none" | "sm";
|
|
5
6
|
export type CardProps = ComponentPropsWithRef<"section"> & {
|
|
7
|
+
/**
|
|
8
|
+
* A coloured bar down the leading edge, following the card's own
|
|
9
|
+
* corners.
|
|
10
|
+
*
|
|
11
|
+
* `{ categorical: 3 }` for a colour a user picked; `{ color }`
|
|
12
|
+
* for one an app computed — a hue hashed from a repo's name, say,
|
|
13
|
+
* where ten indices are not enough. See `cardAccentEdge.ts` for
|
|
14
|
+
* why it is a pseudo-element and not a border.
|
|
15
|
+
*/
|
|
16
|
+
accentEdge?: CardAccentEdge;
|
|
6
17
|
/** Buttons or a badge, laid out beside the heading. */
|
|
7
18
|
actions?: ReactNode;
|
|
8
19
|
elevation?: ElevationStep;
|
|
@@ -40,5 +51,5 @@ export declare const ELEVATION_CLASS: Record<ElevationStep, string>;
|
|
|
40
51
|
* because a card wrapping a poster grid genuinely has none, which is
|
|
41
52
|
* a layout fact rather than a density one.
|
|
42
53
|
*/
|
|
43
|
-
export declare const Card: ({ actions, children, className, elevation, footer, heading, headingLevel, padding, surface, ...sectionProps }: CardProps) => ReactNode;
|
|
54
|
+
export declare const Card: ({ accentEdge, actions, children, className, elevation, footer, heading, headingLevel, padding, style, surface, ...sectionProps }: CardProps) => ReactNode;
|
|
44
55
|
//# sourceMappingURL=Card.d.ts.map
|
package/dist/Card/Card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACV,MAAM,OAAO,CAAA;AAGd,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG,OAAO,CAC/B,WAAW,EACX,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAC7B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;AAErD,MAAM,MAAM,SAAS,GAAG,qBAAqB,CAAC,SAAS,CAAC,GAAG;IACzD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAC3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB,CAAA;AAQD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,aAAa,EACb,MAAM,CAMP,CAAA;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,IAAI,GAAI,kIAalB,SAAS,KAAG,SAmEd,CAAA"}
|
package/dist/Card/Card.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useUniqueId } from "@charcuterie/logic";
|
|
3
3
|
import { toClassName } from "../toClassName.js";
|
|
4
|
+
import { getAccentEdgeClassName, getAccentEdgeStyle, } from "./cardAccentEdge.js";
|
|
4
5
|
const SURFACE_CLASS = {
|
|
5
6
|
base: "bg-surface-base",
|
|
6
7
|
raised: "bg-surface-raised",
|
|
@@ -45,8 +46,17 @@ const PADDING_CLASS = {
|
|
|
45
46
|
* because a card wrapping a poster grid genuinely has none, which is
|
|
46
47
|
* a layout fact rather than a density one.
|
|
47
48
|
*/
|
|
48
|
-
export const Card = ({ actions, children, className, elevation = "low", footer, heading, headingLevel = 2, padding = "md", surface = "raised", ...sectionProps }) => {
|
|
49
|
+
export const Card = ({ accentEdge, actions, children, className, elevation = "low", footer, heading, headingLevel = 2, padding = "md", style, surface = "raised", ...sectionProps }) => {
|
|
49
50
|
const headingId = useUniqueId();
|
|
51
|
+
// The caller's own `style` wins. An accent colour is one custom
|
|
52
|
+
// property, and silently dropping whatever else the call site set
|
|
53
|
+
// would be a worse trade than letting it override this one.
|
|
54
|
+
const accentEdgeStyle = accentEdge == null
|
|
55
|
+
? undefined
|
|
56
|
+
: getAccentEdgeStyle(accentEdge);
|
|
57
|
+
const mergedStyle = accentEdgeStyle == null
|
|
58
|
+
? style
|
|
59
|
+
: { ...accentEdgeStyle, ...style };
|
|
50
60
|
const Heading = `h${headingLevel}`;
|
|
51
61
|
return (_jsxs("section", { ...sectionProps, "aria-labelledby": heading ? headingId : undefined, className: toClassName(
|
|
52
62
|
// `@container` here, not on a wrapper, is what lets the
|
|
@@ -54,6 +64,8 @@ export const Card = ({ actions, children, className, elevation = "low", footer,
|
|
|
54
64
|
// a card in a sidebar and the same card full-bleed are the
|
|
55
65
|
// case a media query cannot tell apart, and the fleet's
|
|
56
66
|
// poster grids get it wrong at intermediate widths today.
|
|
57
|
-
"@container flex flex-col gap-3 rounded-lg border border-border-subtle text-content-primary", SURFACE_CLASS[surface], ELEVATION_CLASS[elevation], PADDING_CLASS[padding],
|
|
67
|
+
"@container flex flex-col gap-3 rounded-lg border border-border-subtle text-content-primary", SURFACE_CLASS[surface], ELEVATION_CLASS[elevation], PADDING_CLASS[padding], accentEdge == null
|
|
68
|
+
? undefined
|
|
69
|
+
: getAccentEdgeClassName(accentEdge), className), style: mergedStyle, children: [heading || actions ? (_jsxs("header", { className: "flex flex-col gap-2 cq-sm:flex-row cq-sm:items-start cq-sm:justify-between", children: [heading ? (_jsx(Heading, { className: "font-semibold text-md leading-tight", id: headingId, children: heading })) : null, actions ? (_jsx("div", { className: "flex shrink-0 items-center gap-1", children: actions })) : null] })) : null, children, footer ? (_jsx("footer", { className: "border-t border-border-subtle pt-3 text-content-secondary text-sm", children: footer })) : null] }));
|
|
58
70
|
};
|
|
59
71
|
//# sourceMappingURL=Card.js.map
|
package/dist/Card/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAUhD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,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EAAE,GAAG,eAAe,EAAE,GAAG,KAAK,EAAE,CAAA;IAEtC,MAAM,OAAO,GAAG,IAAI,YAAY,EAAW,CAAA;IAE3C,OAAO,CACL,sBACM,YAAY,qBACC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAChD,SAAS,EAAE,WAAW;QACpB,wDAAwD;QACxD,2DAA2D;QAC3D,2DAA2D;QAC3D,wDAAwD;QACxD,0DAA0D;QAC1D,4FAA4F,EAC5F,aAAa,CAAC,OAAO,CAAC,EACtB,eAAe,CAAC,SAAS,CAAC,EAC1B,aAAa,CAAC,OAAO,CAAC,EACtB,UAAU,IAAI,IAAI;YAChB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,sBAAsB,CAAC,UAAU,CAAC,EACtC,SAAS,CACV,EACD,KAAK,EAAE,WAAW,aAEjB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CACpB,kBAAQ,SAAS,EAAC,4EAA4E,aAC3F,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,OAAO,IACN,SAAS,EAAC,qCAAqC,EAC/C,EAAE,EAAE,SAAS,YAEZ,OAAO,GACA,CACX,CAAC,CAAC,CAAC,IAAI,EAEP,OAAO,CAAC,CAAC,CAAC,CACT,cAAK,SAAS,EAAC,kCAAkC,YAC9C,OAAO,GACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAC,CAAC,CAAC,IAAI,EAEP,QAAQ,EAER,MAAM,CAAC,CAAC,CAAC,CACR,iBAAQ,SAAS,EAAC,mEAAmE,YAClF,MAAM,GACA,CACV,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A coloured bar down a card's leading edge — and the reason it is
|
|
3
|
+
* a pseudo-element rather than a border.
|
|
4
|
+
*
|
|
5
|
+
* Three apps had grown this shape independently and all three drew
|
|
6
|
+
* it as a straight border beside a rounded box, so the bar ran past
|
|
7
|
+
* the curve and stopped square while the card it belonged to was
|
|
8
|
+
* round. Folio put `border-inline-start` on a WRAPPER around the
|
|
9
|
+
* card; mail-sifter puts `borderInlineStartWidth: 4` on a
|
|
10
|
+
* `rounded-xl` anchor; spoolbuddy writes `rounded-lg border-l-3`.
|
|
11
|
+
* A border is painted on the border box, so none of them can follow
|
|
12
|
+
* a corner — the notch is not a bug in any one app, it is what that
|
|
13
|
+
* technique does.
|
|
14
|
+
*
|
|
15
|
+
* A pseudo-element overlays the card and takes
|
|
16
|
+
* `border-radius: inherit`, so the bar follows whatever radius the
|
|
17
|
+
* card already has and nobody states a radius twice.
|
|
18
|
+
*
|
|
19
|
+
* ⚠️ **The shadow goes on the pseudo-element, never on the card.**
|
|
20
|
+
* `Card` carries `shadow-low` from the elevation scale, and an app
|
|
21
|
+
* stylesheet is unlayered while Tailwind's utilities sit in
|
|
22
|
+
* `@layer utilities` — so a `box-shadow` written at the call site
|
|
23
|
+
* outranks the utility and takes the card's elevation away with it.
|
|
24
|
+
* That is not hypothetical; it is the version of this fix that was
|
|
25
|
+
* written first.
|
|
26
|
+
*
|
|
27
|
+
* ⚠️ **Not a 3px-wide pseudo-element with a rounded leading edge.**
|
|
28
|
+
* A `border-radius` of `0.5rem` on a 3px-wide box is clamped by the
|
|
29
|
+
* browser to fit, so it caps the bar instead of following the
|
|
30
|
+
* card's curve.
|
|
31
|
+
*
|
|
32
|
+
* ⚠️ **`box-shadow` has no logical form**, so the offset is
|
|
33
|
+
* physical and the `rtl:` variant is what carries the bar to the
|
|
34
|
+
* other side. A single `inset 3px` would put it on the left of an
|
|
35
|
+
* Arabic page, which is the trailing edge there.
|
|
36
|
+
*/
|
|
37
|
+
import type { CategoricalIndex } from "@charcuterie/tokens";
|
|
38
|
+
/**
|
|
39
|
+
* Which colour the bar takes.
|
|
40
|
+
*
|
|
41
|
+
* Two arms, because the fleet has two answers and neither is wrong.
|
|
42
|
+
* Docket picks a **categorical index** — a colour a user chose for
|
|
43
|
+
* a project, from the ten-wide contrast-audited family. Folio and
|
|
44
|
+
* mail-sifter derive a **hue from a name hash**, so a repo added
|
|
45
|
+
* tomorrow already has a colour and nobody maintains a palette;
|
|
46
|
+
* that is 360 answers, not ten, and it cannot be an index.
|
|
47
|
+
*
|
|
48
|
+
* `intent` is deliberately absent. An intent is a claim the design
|
|
49
|
+
* system makes — `danger` says what happens if you press the thing
|
|
50
|
+
* — and no card in this fleet wants its edge to make one. When one
|
|
51
|
+
* does, that is a third arm and a decision record, not a guess
|
|
52
|
+
* made here.
|
|
53
|
+
*/
|
|
54
|
+
export type CardAccentEdge = {
|
|
55
|
+
categorical: CategoricalIndex;
|
|
56
|
+
color?: never;
|
|
57
|
+
} | {
|
|
58
|
+
categorical?: never;
|
|
59
|
+
color: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The custom property an explicit colour is threaded through.
|
|
63
|
+
*
|
|
64
|
+
* A property rather than an inline `box-shadow`, because the shadow
|
|
65
|
+
* string has to stay a COMPLETE literal in the source for Tailwind
|
|
66
|
+
* to generate it at all. One literal reading one variable covers
|
|
67
|
+
* every colour an app can compute; interpolating the colour into
|
|
68
|
+
* the class name would generate nothing, paint nothing, and report
|
|
69
|
+
* nothing.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ACCENT_EDGE_COLOR_PROPERTY = "--charcuterie-accent-edge";
|
|
72
|
+
/**
|
|
73
|
+
* The overlay itself. Colour arrives separately.
|
|
74
|
+
*
|
|
75
|
+
* `pointer-events: none` is load-bearing rather than tidy: this box
|
|
76
|
+
* covers the whole card, including every link and button in it.
|
|
77
|
+
*/
|
|
78
|
+
export declare const ACCENT_EDGE_BASE_CLASS = "relative before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:content-['']";
|
|
79
|
+
/**
|
|
80
|
+
* Ten indices, written out in full, for the reason
|
|
81
|
+
* `categoricalStyles.ts` opens with: Tailwind scans source text for
|
|
82
|
+
* COMPLETE class strings, so a template literal generates nothing
|
|
83
|
+
* at all and the bar renders invisible with no error and no failing
|
|
84
|
+
* test. `tailwindCandidates.test.ts` compiles every literal in this
|
|
85
|
+
* package through the real Tailwind, which is the something that
|
|
86
|
+
* checks.
|
|
87
|
+
*/
|
|
88
|
+
export declare const ACCENT_EDGE_CATEGORICAL_CLASS: Record<CategoricalIndex, string>;
|
|
89
|
+
/** The same bar, reading the caller's own colour. */
|
|
90
|
+
export declare const ACCENT_EDGE_COLOR_CLASS = "before:shadow-[inset_3px_0_0_var(--charcuterie-accent-edge)] rtl:before:shadow-[inset_-3px_0_0_var(--charcuterie-accent-edge)]";
|
|
91
|
+
export declare const getAccentEdgeClassName: (accentEdge: CardAccentEdge) => string;
|
|
92
|
+
/**
|
|
93
|
+
* The inline style an explicit colour needs, and nothing when the
|
|
94
|
+
* colour came from an index.
|
|
95
|
+
*
|
|
96
|
+
* Returns `undefined` rather than `{}` so a card with a categorical
|
|
97
|
+
* edge and no `style` of its own renders no `style` attribute at
|
|
98
|
+
* all.
|
|
99
|
+
*/
|
|
100
|
+
export declare const getAccentEdgeStyle: (accentEdge: CardAccentEdge) => Record<string, string> | undefined;
|
|
101
|
+
//# sourceMappingURL=cardAccentEdge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardAccentEdge.d.ts","sourceRoot":"","sources":["../../src/Card/cardAccentEdge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,WAAW,EAAE,gBAAgB,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAChD;IAAE,WAAW,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1C;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,8BACV,CAAA;AAE7B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,oHACgF,CAAA;AAEnH;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAChD,gBAAgB,EAChB,MAAM,CAYP,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,uBAAuB,mIAC8F,CAAA;AAElI,eAAO,MAAM,sBAAsB,GACjC,YAAY,cAAc,KACzB,MAOC,CAAA;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,cAAc,KACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAG4B,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A coloured bar down a card's leading edge — and the reason it is
|
|
3
|
+
* a pseudo-element rather than a border.
|
|
4
|
+
*
|
|
5
|
+
* Three apps had grown this shape independently and all three drew
|
|
6
|
+
* it as a straight border beside a rounded box, so the bar ran past
|
|
7
|
+
* the curve and stopped square while the card it belonged to was
|
|
8
|
+
* round. Folio put `border-inline-start` on a WRAPPER around the
|
|
9
|
+
* card; mail-sifter puts `borderInlineStartWidth: 4` on a
|
|
10
|
+
* `rounded-xl` anchor; spoolbuddy writes `rounded-lg border-l-3`.
|
|
11
|
+
* A border is painted on the border box, so none of them can follow
|
|
12
|
+
* a corner — the notch is not a bug in any one app, it is what that
|
|
13
|
+
* technique does.
|
|
14
|
+
*
|
|
15
|
+
* A pseudo-element overlays the card and takes
|
|
16
|
+
* `border-radius: inherit`, so the bar follows whatever radius the
|
|
17
|
+
* card already has and nobody states a radius twice.
|
|
18
|
+
*
|
|
19
|
+
* ⚠️ **The shadow goes on the pseudo-element, never on the card.**
|
|
20
|
+
* `Card` carries `shadow-low` from the elevation scale, and an app
|
|
21
|
+
* stylesheet is unlayered while Tailwind's utilities sit in
|
|
22
|
+
* `@layer utilities` — so a `box-shadow` written at the call site
|
|
23
|
+
* outranks the utility and takes the card's elevation away with it.
|
|
24
|
+
* That is not hypothetical; it is the version of this fix that was
|
|
25
|
+
* written first.
|
|
26
|
+
*
|
|
27
|
+
* ⚠️ **Not a 3px-wide pseudo-element with a rounded leading edge.**
|
|
28
|
+
* A `border-radius` of `0.5rem` on a 3px-wide box is clamped by the
|
|
29
|
+
* browser to fit, so it caps the bar instead of following the
|
|
30
|
+
* card's curve.
|
|
31
|
+
*
|
|
32
|
+
* ⚠️ **`box-shadow` has no logical form**, so the offset is
|
|
33
|
+
* physical and the `rtl:` variant is what carries the bar to the
|
|
34
|
+
* other side. A single `inset 3px` would put it on the left of an
|
|
35
|
+
* Arabic page, which is the trailing edge there.
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* The custom property an explicit colour is threaded through.
|
|
39
|
+
*
|
|
40
|
+
* A property rather than an inline `box-shadow`, because the shadow
|
|
41
|
+
* string has to stay a COMPLETE literal in the source for Tailwind
|
|
42
|
+
* to generate it at all. One literal reading one variable covers
|
|
43
|
+
* every colour an app can compute; interpolating the colour into
|
|
44
|
+
* the class name would generate nothing, paint nothing, and report
|
|
45
|
+
* nothing.
|
|
46
|
+
*/
|
|
47
|
+
export const ACCENT_EDGE_COLOR_PROPERTY = "--charcuterie-accent-edge";
|
|
48
|
+
/**
|
|
49
|
+
* The overlay itself. Colour arrives separately.
|
|
50
|
+
*
|
|
51
|
+
* `pointer-events: none` is load-bearing rather than tidy: this box
|
|
52
|
+
* covers the whole card, including every link and button in it.
|
|
53
|
+
*/
|
|
54
|
+
export const ACCENT_EDGE_BASE_CLASS = "relative before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:content-['']";
|
|
55
|
+
/**
|
|
56
|
+
* Ten indices, written out in full, for the reason
|
|
57
|
+
* `categoricalStyles.ts` opens with: Tailwind scans source text for
|
|
58
|
+
* COMPLETE class strings, so a template literal generates nothing
|
|
59
|
+
* at all and the bar renders invisible with no error and no failing
|
|
60
|
+
* test. `tailwindCandidates.test.ts` compiles every literal in this
|
|
61
|
+
* package through the real Tailwind, which is the something that
|
|
62
|
+
* checks.
|
|
63
|
+
*/
|
|
64
|
+
export const ACCENT_EDGE_CATEGORICAL_CLASS = {
|
|
65
|
+
1: "before:shadow-[inset_3px_0_0_var(--color-categorical-1-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-1-solid)]",
|
|
66
|
+
2: "before:shadow-[inset_3px_0_0_var(--color-categorical-2-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-2-solid)]",
|
|
67
|
+
3: "before:shadow-[inset_3px_0_0_var(--color-categorical-3-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-3-solid)]",
|
|
68
|
+
4: "before:shadow-[inset_3px_0_0_var(--color-categorical-4-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-4-solid)]",
|
|
69
|
+
5: "before:shadow-[inset_3px_0_0_var(--color-categorical-5-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-5-solid)]",
|
|
70
|
+
6: "before:shadow-[inset_3px_0_0_var(--color-categorical-6-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-6-solid)]",
|
|
71
|
+
7: "before:shadow-[inset_3px_0_0_var(--color-categorical-7-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-7-solid)]",
|
|
72
|
+
8: "before:shadow-[inset_3px_0_0_var(--color-categorical-8-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-8-solid)]",
|
|
73
|
+
9: "before:shadow-[inset_3px_0_0_var(--color-categorical-9-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-9-solid)]",
|
|
74
|
+
10: "before:shadow-[inset_3px_0_0_var(--color-categorical-10-solid)] rtl:before:shadow-[inset_-3px_0_0_var(--color-categorical-10-solid)]",
|
|
75
|
+
};
|
|
76
|
+
/** The same bar, reading the caller's own colour. */
|
|
77
|
+
export const ACCENT_EDGE_COLOR_CLASS = "before:shadow-[inset_3px_0_0_var(--charcuterie-accent-edge)] rtl:before:shadow-[inset_-3px_0_0_var(--charcuterie-accent-edge)]";
|
|
78
|
+
export const getAccentEdgeClassName = (accentEdge) => `${ACCENT_EDGE_BASE_CLASS} ${accentEdge.categorical == null
|
|
79
|
+
? ACCENT_EDGE_COLOR_CLASS
|
|
80
|
+
: ACCENT_EDGE_CATEGORICAL_CLASS[accentEdge.categorical]}`;
|
|
81
|
+
/**
|
|
82
|
+
* The inline style an explicit colour needs, and nothing when the
|
|
83
|
+
* colour came from an index.
|
|
84
|
+
*
|
|
85
|
+
* Returns `undefined` rather than `{}` so a card with a categorical
|
|
86
|
+
* edge and no `style` of its own renders no `style` attribute at
|
|
87
|
+
* all.
|
|
88
|
+
*/
|
|
89
|
+
export const getAccentEdgeStyle = (accentEdge) => accentEdge.color == null
|
|
90
|
+
? undefined
|
|
91
|
+
: { [ACCENT_EDGE_COLOR_PROPERTY]: accentEdge.color };
|
|
92
|
+
//# sourceMappingURL=cardAccentEdge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardAccentEdge.js","sourceRoot":"","sources":["../../src/Card/cardAccentEdge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAwBH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,0BAA0B,GACrC,2BAA2B,CAAA;AAE7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GACjC,iHAAiH,CAAA;AAEnH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAGtC;IACF,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,CAAC,EAAE,oIAAoI;IACvI,EAAE,EAAE,sIAAsI;CAC3I,CAAA;AAED,qDAAqD;AACrD,MAAM,CAAC,MAAM,uBAAuB,GAClC,gIAAgI,CAAA;AAElI,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,UAA0B,EAClB,EAAE,CACV,GAAG,sBAAsB,IACvB,UAAU,CAAC,WAAW,IAAI,IAAI;IAC5B,CAAC,CAAC,uBAAuB;IACzB,CAAC,CAAC,6BAA6B,CAC3B,UAAU,CAAC,WAAW,CAE9B,EAAE,CAAA;AAEJ;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,UAA0B,EACU,EAAE,CACtC,UAAU,CAAC,KAAK,IAAI,IAAI;IACtB,CAAC,CAAC,SAAS;IACX,CAAC,CAAC,EAAE,CAAC,0BAA0B,CAAC,EAAE,UAAU,CAAC,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ButtonProps } from "../Button/Button.tsx";
|
|
3
|
+
/** Where the button is in the one action it performs. */
|
|
4
|
+
export type CopyStatus = "copied" | "failed" | "idle";
|
|
5
|
+
export type CopyButtonProps = Omit<ButtonProps, "children" | "isLoading" | "loadingLabel" | "onCopy"> & {
|
|
6
|
+
/**
|
|
7
|
+
* How long the confirmation stays up, in milliseconds.
|
|
8
|
+
*
|
|
9
|
+
* Long enough to be read after the eye has moved back to the form
|
|
10
|
+
* being filled in, short enough that a second copy of a *different*
|
|
11
|
+
* value is not mistaken for the first one's tick.
|
|
12
|
+
*/
|
|
13
|
+
confirmDuration?: number;
|
|
14
|
+
/** Resting label. A word, not a glyph — this library ships no icons. */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
/** Shown while the copy is confirmed. */
|
|
17
|
+
copiedLabel?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The clipboard write, injected. Swapped in tests and in a host
|
|
20
|
+
* that owns its own clipboard bridge (Electron, a kiosk shell).
|
|
21
|
+
*/
|
|
22
|
+
copy?: (value: string) => Promise<boolean> | boolean;
|
|
23
|
+
/** Shown when the clipboard refused. */
|
|
24
|
+
failedLabel?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Told what actually happened, every press.
|
|
27
|
+
*
|
|
28
|
+
* `isCopied` is the point of the callback rather than a detail: a
|
|
29
|
+
* consumer that files the mail away on a copy must not file it away
|
|
30
|
+
* on a copy the browser refused.
|
|
31
|
+
*/
|
|
32
|
+
onCopy?: (isCopied: boolean, value: string) => void;
|
|
33
|
+
/** The string that goes on the clipboard. */
|
|
34
|
+
value: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A button that puts a string on the clipboard and says so.
|
|
38
|
+
*
|
|
39
|
+
* From a consumer, like `Alert` and `BadgeButton` before it: four
|
|
40
|
+
* repos spell this shape by hand — mux-magic's YAML dialog flips its
|
|
41
|
+
* own label on a `setTimeout`, spoolbuddy carries a 15-line
|
|
42
|
+
* `copyToClipboard` with the `execCommand` fallback inline, bambuddy
|
|
43
|
+
* copies a download link from two menus, and mail-sifter's
|
|
44
|
+
* verification-code banner is the fourth. None of the four agree on
|
|
45
|
+
* what happens when the clipboard says no, and three of them cannot
|
|
46
|
+
* tell.
|
|
47
|
+
*
|
|
48
|
+
* **The confirmation is the button, not a toast.** The press and the
|
|
49
|
+
* proof are the same object, so the eye does not travel; a toast is
|
|
50
|
+
* right for something that happened *elsewhere*. A consumer that
|
|
51
|
+
* wants both still gets `onCopy`.
|
|
52
|
+
*
|
|
53
|
+
* **The label is a word.** `Copy` → `Copied`, and the intent goes
|
|
54
|
+
* with it, because a colour change alone is not a message and a tick
|
|
55
|
+
* glyph is an icon this library does not ship.
|
|
56
|
+
*
|
|
57
|
+
* **It announces.** A screen reader is not reliably told that a
|
|
58
|
+
* focused button's own name changed, so the outcome is also written
|
|
59
|
+
* into a `role="status"` region — and the failure says what to do
|
|
60
|
+
* next rather than only that it went wrong.
|
|
61
|
+
*
|
|
62
|
+
* **The timer is cancelled on unmount and on a re-press**, which is
|
|
63
|
+
* the bug in two of the four hand-rolled copies: press, navigate
|
|
64
|
+
* away, and a `setState` lands on nothing.
|
|
65
|
+
*/
|
|
66
|
+
export declare const CopyButton: ({ appearance, children, confirmDuration, copiedLabel, copy, failedLabel, intent, onClick, onCopy, value, ...buttonProps }: CopyButtonProps) => ReactNode;
|
|
67
|
+
//# sourceMappingURL=CopyButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../src/CopyButton/CopyButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKvD,yDAAyD;AACzD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,WAAW,EACX,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,QAAQ,CACrD,GAAG;IACF;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,yCAAyC;IACzC,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAA;IACpD,wCAAwC;IACxC,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,UAAU,GAAI,2HAYxB,eAAe,KAAG,SAmEpB,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { Button } from "../Button/Button.js";
|
|
4
|
+
import { VisuallyHidden } from "../VisuallyHidden/VisuallyHidden.js";
|
|
5
|
+
import { copyText as defaultCopyText } from "./copyText.js";
|
|
6
|
+
/**
|
|
7
|
+
* A button that puts a string on the clipboard and says so.
|
|
8
|
+
*
|
|
9
|
+
* From a consumer, like `Alert` and `BadgeButton` before it: four
|
|
10
|
+
* repos spell this shape by hand — mux-magic's YAML dialog flips its
|
|
11
|
+
* own label on a `setTimeout`, spoolbuddy carries a 15-line
|
|
12
|
+
* `copyToClipboard` with the `execCommand` fallback inline, bambuddy
|
|
13
|
+
* copies a download link from two menus, and mail-sifter's
|
|
14
|
+
* verification-code banner is the fourth. None of the four agree on
|
|
15
|
+
* what happens when the clipboard says no, and three of them cannot
|
|
16
|
+
* tell.
|
|
17
|
+
*
|
|
18
|
+
* **The confirmation is the button, not a toast.** The press and the
|
|
19
|
+
* proof are the same object, so the eye does not travel; a toast is
|
|
20
|
+
* right for something that happened *elsewhere*. A consumer that
|
|
21
|
+
* wants both still gets `onCopy`.
|
|
22
|
+
*
|
|
23
|
+
* **The label is a word.** `Copy` → `Copied`, and the intent goes
|
|
24
|
+
* with it, because a colour change alone is not a message and a tick
|
|
25
|
+
* glyph is an icon this library does not ship.
|
|
26
|
+
*
|
|
27
|
+
* **It announces.** A screen reader is not reliably told that a
|
|
28
|
+
* focused button's own name changed, so the outcome is also written
|
|
29
|
+
* into a `role="status"` region — and the failure says what to do
|
|
30
|
+
* next rather than only that it went wrong.
|
|
31
|
+
*
|
|
32
|
+
* **The timer is cancelled on unmount and on a re-press**, which is
|
|
33
|
+
* the bug in two of the four hand-rolled copies: press, navigate
|
|
34
|
+
* away, and a `setState` lands on nothing.
|
|
35
|
+
*/
|
|
36
|
+
export const CopyButton = ({ appearance = "solid", children = "Copy", confirmDuration = 2000, copiedLabel = "Copied", copy = defaultCopyText, failedLabel = "Copy failed", intent = "accent", onClick, onCopy, value, ...buttonProps }) => {
|
|
37
|
+
const [status, setStatus] = useState("idle");
|
|
38
|
+
const timerRef = useRef(undefined);
|
|
39
|
+
// One cleanup covers both the unmount and the re-press: every path
|
|
40
|
+
// that starts a timer clears the previous one first.
|
|
41
|
+
useEffect(() => () => {
|
|
42
|
+
clearTimeout(timerRef.current);
|
|
43
|
+
}, []);
|
|
44
|
+
const settle = (next) => {
|
|
45
|
+
setStatus(next);
|
|
46
|
+
clearTimeout(timerRef.current);
|
|
47
|
+
timerRef.current = setTimeout(() => {
|
|
48
|
+
setStatus("idle");
|
|
49
|
+
}, confirmDuration);
|
|
50
|
+
};
|
|
51
|
+
const handleClick = (event) => {
|
|
52
|
+
onClick?.(event);
|
|
53
|
+
if (event.defaultPrevented)
|
|
54
|
+
return;
|
|
55
|
+
void (async () => {
|
|
56
|
+
const isCopied = await copy(value);
|
|
57
|
+
settle(isCopied ? "copied" : "failed");
|
|
58
|
+
onCopy?.(isCopied, value);
|
|
59
|
+
})();
|
|
60
|
+
};
|
|
61
|
+
const label = status === "copied"
|
|
62
|
+
? copiedLabel
|
|
63
|
+
: status === "failed"
|
|
64
|
+
? failedLabel
|
|
65
|
+
: children;
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { ...buttonProps, appearance: appearance, intent: status === "copied"
|
|
67
|
+
? "success"
|
|
68
|
+
: status === "failed"
|
|
69
|
+
? "danger"
|
|
70
|
+
: intent, onClick: handleClick, children: label }), _jsx(VisuallyHidden, { role: "status", children: status === "copied"
|
|
71
|
+
? "Copied to the clipboard."
|
|
72
|
+
: status === "failed"
|
|
73
|
+
? "The clipboard refused. Select the value and press Control C."
|
|
74
|
+
: "" })] }));
|
|
75
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
4
|
+
* Three routes, tried in order, because the fleet runs in all three
|
|
5
|
+
* conditions:
|
|
6
|
+
*
|
|
7
|
+
* 1. **`navigator.clipboard.writeText`.** The real API. It exists
|
|
8
|
+
* only in a *secure context*, which a `devshare` URL and
|
|
9
|
+
* `localhost` both are — and a plain `http://storeman.octen:8080`
|
|
10
|
+
* dev server is not.
|
|
11
|
+
* 2. **A hidden `<textarea>` plus `document.execCommand("copy")`.**
|
|
12
|
+
* Deprecated, and kept anyway: it is the only thing that works in
|
|
13
|
+
* an insecure context, spoolbuddy already hand-rolls exactly this
|
|
14
|
+
* block, and the alternative is a Copy button that silently does
|
|
15
|
+
* nothing on the household's own LAN.
|
|
16
|
+
* 3. **Give up and report it.** A caller that marks mail done on a
|
|
17
|
+
* copy must not mark it done on a copy that never happened.
|
|
18
|
+
*
|
|
19
|
+
* Never throws. The boolean is the whole result, so a call site is an
|
|
20
|
+
* `if` rather than a `try`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const copyText: (value: string) => Promise<boolean>;
|
|
23
|
+
//# sourceMappingURL=copyText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyText.d.ts","sourceRoot":"","sources":["../../src/CopyButton/copyText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,GACnB,OAAO,MAAM,KACZ,OAAO,CAAC,OAAO,CAWjB,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Put a string on the clipboard, and say whether it landed.
|
|
3
|
+
*
|
|
4
|
+
* Three routes, tried in order, because the fleet runs in all three
|
|
5
|
+
* conditions:
|
|
6
|
+
*
|
|
7
|
+
* 1. **`navigator.clipboard.writeText`.** The real API. It exists
|
|
8
|
+
* only in a *secure context*, which a `devshare` URL and
|
|
9
|
+
* `localhost` both are — and a plain `http://storeman.octen:8080`
|
|
10
|
+
* dev server is not.
|
|
11
|
+
* 2. **A hidden `<textarea>` plus `document.execCommand("copy")`.**
|
|
12
|
+
* Deprecated, and kept anyway: it is the only thing that works in
|
|
13
|
+
* an insecure context, spoolbuddy already hand-rolls exactly this
|
|
14
|
+
* block, and the alternative is a Copy button that silently does
|
|
15
|
+
* nothing on the household's own LAN.
|
|
16
|
+
* 3. **Give up and report it.** A caller that marks mail done on a
|
|
17
|
+
* copy must not mark it done on a copy that never happened.
|
|
18
|
+
*
|
|
19
|
+
* Never throws. The boolean is the whole result, so a call site is an
|
|
20
|
+
* `if` rather than a `try`.
|
|
21
|
+
*/
|
|
22
|
+
export const copyText = async (value) => {
|
|
23
|
+
try {
|
|
24
|
+
// `writeText` rejects on a denied permission and on a document
|
|
25
|
+
// that is not focused — both real, both recoverable below.
|
|
26
|
+
await globalThis.navigator?.clipboard?.writeText(value);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Fall through to the legacy route.
|
|
31
|
+
}
|
|
32
|
+
return copyBySelection(value);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The pre-Clipboard-API route.
|
|
36
|
+
*
|
|
37
|
+
* The textarea is positioned off-screen rather than hidden: a
|
|
38
|
+
* `display: none` element has no selection to copy, and
|
|
39
|
+
* `visibility: hidden` is no better. `readOnly` stops the mobile
|
|
40
|
+
* keyboard appearing for the frame it is in the document.
|
|
41
|
+
*/
|
|
42
|
+
const copyBySelection = (value) => {
|
|
43
|
+
const owner = globalThis.document;
|
|
44
|
+
if (!owner?.body)
|
|
45
|
+
return false;
|
|
46
|
+
const field = owner.createElement("textarea");
|
|
47
|
+
field.value = value;
|
|
48
|
+
field.readOnly = true;
|
|
49
|
+
field.setAttribute("aria-hidden", "true");
|
|
50
|
+
field.style.position = "fixed";
|
|
51
|
+
field.style.insetInlineStart = "-9999px";
|
|
52
|
+
field.style.top = "0";
|
|
53
|
+
owner.body.append(field);
|
|
54
|
+
try {
|
|
55
|
+
field.select();
|
|
56
|
+
return owner.execCommand("copy");
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
finally {
|
|
62
|
+
field.remove();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=copyText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyText.js","sourceRoot":"","sources":["../../src/CopyButton/copyText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC3B,KAAa,EACK,EAAE;IACpB,IAAI,CAAC;QACH,+DAA+D;QAC/D,2DAA2D;QAC3D,MAAM,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;QACvD,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,MAAM,CAAC;QACP,oCAAoC;IACtC,CAAC;IAED,OAAO,eAAe,CAAC,KAAK,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,CAAC,KAAa,EAAW,EAAE;IACjD,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAA;IACjC,IAAI,CAAC,KAAK,EAAE,IAAI;QAAE,OAAO,KAAK,CAAA;IAE9B,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IAC7C,KAAK,CAAC,KAAK,GAAG,KAAK,CAAA;IACnB,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;IACzC,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;IAC9B,KAAK,CAAC,KAAK,CAAC,gBAAgB,GAAG,SAAS,CAAA;IACxC,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAA;IAErB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAExB,IAAI,CAAC;QACH,KAAK,CAAC,MAAM,EAAE,CAAA;QAEd,OAAO,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,MAAM,EAAE,CAAA;IAChB,CAAC;AACH,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export type { ButtonLinkProps } from "./ButtonLink/ButtonLink.tsx";
|
|
|
57
57
|
export { ButtonLink } from "./ButtonLink/ButtonLink.tsx";
|
|
58
58
|
export type { CardPadding, CardProps, CardSurface, } from "./Card/Card.tsx";
|
|
59
59
|
export { Card } from "./Card/Card.tsx";
|
|
60
|
+
export type { CardAccentEdge } from "./Card/cardAccentEdge.ts";
|
|
60
61
|
export type { CheckboxProps } from "./Checkbox/Checkbox.tsx";
|
|
61
62
|
export { Checkbox } from "./Checkbox/Checkbox.tsx";
|
|
62
63
|
export type { ColorSchemeSwitcherProps } from "./ColorSchemeSwitcher/ColorSchemeSwitcher.tsx";
|
|
@@ -65,6 +66,9 @@ export type { ColorSchemeIcons, ColorSchemeToggleProps, } from "./ColorSchemeTog
|
|
|
65
66
|
export { ColorSchemeToggle } from "./ColorSchemeToggle/ColorSchemeToggle.tsx";
|
|
66
67
|
export type { ComboboxProps } from "./Combobox/Combobox.tsx";
|
|
67
68
|
export { Combobox } from "./Combobox/Combobox.tsx";
|
|
69
|
+
export type { CopyButtonProps, CopyStatus, } from "./CopyButton/CopyButton.tsx";
|
|
70
|
+
export { CopyButton } from "./CopyButton/CopyButton.tsx";
|
|
71
|
+
export { copyText } from "./CopyButton/copyText.ts";
|
|
68
72
|
export { CATEGORICAL_APPEARANCE_CLASS, CATEGORICAL_CONTENT_CLASS, CATEGORICAL_HOVER_CLASS, CATEGORICAL_SOLID_FILL_CLASS, } from "./categoricalStyles.ts";
|
|
69
73
|
export type { BadgeSize } from "./controlStyles.ts";
|
|
70
74
|
export { BADGE_SIZE_CLASS, CONTROL_BASE_CLASS, CONTROL_SIZE_CLASS, DOT_SIZE_CLASS, getControlClassName, ICON_CONTROL_SIZE_CLASS, MIN_TOUCH_TARGET_CLASS, SPINNER_SIZE_CLASS, } from "./controlStyles.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,GACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,YAAY,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AACxC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,sCAAsC,CAAA;AAC7C,YAAY,EACV,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,YAAY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YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAClE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,8 @@ export { Checkbox } from "./Checkbox/Checkbox.js";
|
|
|
46
46
|
export { ColorSchemeSwitcher } from "./ColorSchemeSwitcher/ColorSchemeSwitcher.js";
|
|
47
47
|
export { ColorSchemeToggle } from "./ColorSchemeToggle/ColorSchemeToggle.js";
|
|
48
48
|
export { Combobox } from "./Combobox/Combobox.js";
|
|
49
|
+
export { CopyButton } from "./CopyButton/CopyButton.js";
|
|
50
|
+
export { copyText } from "./CopyButton/copyText.js";
|
|
49
51
|
export { CATEGORICAL_APPEARANCE_CLASS, CATEGORICAL_CONTENT_CLASS, CATEGORICAL_HOVER_CLASS, CATEGORICAL_SOLID_FILL_CLASS, } from "./categoricalStyles.js";
|
|
50
52
|
export { BADGE_SIZE_CLASS, CONTROL_BASE_CLASS, CONTROL_SIZE_CLASS, DOT_SIZE_CLASS, getControlClassName, ICON_CONTROL_SIZE_CLASS, MIN_TOUCH_TARGET_CLASS, SPINNER_SIZE_CLASS, } from "./controlStyles.js";
|
|
51
53
|
export { DataTable } from "./DataTable/DataTable.js";
|