@charcuterie/ui 2.7.0 → 2.9.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 +11 -0
- package/dist/AdaptiveGrid/AdaptiveGrid.d.ts +94 -0
- package/dist/AdaptiveGrid/AdaptiveGrid.d.ts.map +1 -0
- package/dist/AdaptiveGrid/AdaptiveGrid.js +73 -0
- package/dist/AdaptiveGrid/AdaptiveGrid.js.map +1 -0
- package/dist/AdaptiveGrid/chooseColumns.d.ts +206 -0
- package/dist/AdaptiveGrid/chooseColumns.d.ts.map +1 -0
- package/dist/AdaptiveGrid/chooseColumns.js +156 -0
- package/dist/AdaptiveGrid/chooseColumns.js.map +1 -0
- package/dist/AdaptiveGrid/useAdaptiveColumns.d.ts +155 -0
- package/dist/AdaptiveGrid/useAdaptiveColumns.d.ts.map +1 -0
- package/dist/AdaptiveGrid/useAdaptiveColumns.js +153 -0
- package/dist/AdaptiveGrid/useAdaptiveColumns.js.map +1 -0
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +11 -6
- package/dist/Button/Button.js.map +1 -1
- package/dist/ButtonLink/ButtonLink.d.ts +59 -0
- package/dist/ButtonLink/ButtonLink.d.ts.map +1 -0
- package/dist/ButtonLink/ButtonLink.js +69 -0
- package/dist/ButtonLink/ButtonLink.js.map +1 -0
- package/dist/Combobox/Combobox.d.ts.map +1 -1
- package/dist/Combobox/Combobox.js +1 -1
- package/dist/Combobox/Combobox.js.map +1 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -1
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/Field/Field.js +1 -1
- package/dist/Field/Field.js.map +1 -1
- package/dist/Field/FieldGroup.d.ts.map +1 -1
- package/dist/Field/FieldGroup.js +1 -1
- package/dist/Field/FieldGroup.js.map +1 -1
- package/dist/LogViewer/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer/LogViewer.js +33 -1
- package/dist/LogViewer/LogViewer.js.map +1 -1
- package/dist/RouterLink/AnchorLink.d.ts +17 -0
- package/dist/RouterLink/AnchorLink.d.ts.map +1 -0
- package/dist/RouterLink/AnchorLink.js +16 -0
- package/dist/RouterLink/AnchorLink.js.map +1 -0
- package/dist/RouterLink/RouterLinkProvider.d.ts +13 -0
- package/dist/RouterLink/RouterLinkProvider.d.ts.map +1 -0
- package/dist/RouterLink/RouterLinkProvider.js +47 -0
- package/dist/RouterLink/RouterLinkProvider.js.map +1 -0
- package/dist/RouterLink/routerLink.d.ts +45 -0
- package/dist/RouterLink/routerLink.d.ts.map +1 -0
- package/dist/RouterLink/routerLink.js +31 -0
- package/dist/RouterLink/routerLink.js.map +1 -0
- package/dist/SortableTableHeader/SortableTableHeader.d.ts.map +1 -1
- package/dist/SortableTableHeader/SortableTableHeader.js +7 -1
- package/dist/SortableTableHeader/SortableTableHeader.js.map +1 -1
- package/dist/TextLink/TextLink.d.ts +69 -0
- package/dist/TextLink/TextLink.d.ts.map +1 -0
- package/dist/TextLink/TextLink.js +79 -0
- package/dist/TextLink/TextLink.js.map +1 -0
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +5 -1
- package/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/controlStyles.d.ts +36 -1
- package/dist/controlStyles.d.ts.map +1 -1
- package/dist/controlStyles.js +30 -0
- package/dist/controlStyles.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/intentStyles.d.ts +17 -0
- package/dist/intentStyles.d.ts.map +1 -1
- package/dist/intentStyles.js +17 -0
- package/dist/intentStyles.js.map +1 -1
- package/dist/mountStory.testHelpers.d.ts.map +1 -1
- package/dist/mountStory.testHelpers.js +56 -0
- package/dist/mountStory.testHelpers.js.map +1 -1
- package/dist/reactRouter/ReactRouterLink.d.ts +23 -0
- package/dist/reactRouter/ReactRouterLink.d.ts.map +1 -0
- package/dist/reactRouter/ReactRouterLink.js +23 -0
- package/dist/reactRouter/ReactRouterLink.js.map +1 -0
- package/dist/reactRouter/index.d.ts +29 -0
- package/dist/reactRouter/index.d.ts.map +1 -0
- package/dist/reactRouter/index.js +29 -0
- package/dist/reactRouter/index.js.map +1 -0
- package/package.json +15 -3
- package/src/AdaptiveGrid/AdaptiveGrid.mdx +169 -0
- package/src/AdaptiveGrid/AdaptiveGrid.stories.tsx +240 -0
- package/src/AdaptiveGrid/AdaptiveGrid.test.tsx +243 -0
- package/src/AdaptiveGrid/AdaptiveGrid.tsx +150 -0
- package/src/AdaptiveGrid/chooseColumns.test.ts +253 -0
- package/src/AdaptiveGrid/chooseColumns.ts +270 -0
- package/src/AdaptiveGrid/useAdaptiveColumns.ts +355 -0
- package/src/Button/Button.tsx +10 -22
- package/src/ButtonLink/ButtonLink.mdx +75 -0
- package/src/ButtonLink/ButtonLink.stories.tsx +281 -0
- package/src/ButtonLink/ButtonLink.test.tsx +203 -0
- package/src/ButtonLink/ButtonLink.tsx +149 -0
- package/src/Combobox/Combobox.tsx +4 -1
- package/src/Dialog/Dialog.tsx +18 -2
- package/src/Field/Field.tsx +10 -2
- package/src/Field/FieldGroup.tsx +4 -2
- package/src/LogViewer/LogViewer.test.tsx +47 -0
- package/src/LogViewer/LogViewer.tsx +35 -1
- package/src/RouterLink/AnchorLink.tsx +23 -0
- package/src/RouterLink/RouterLink.mdx +178 -0
- package/src/RouterLink/RouterLinkProvider.tsx +68 -0
- package/src/RouterLink/routerLink.ts +56 -0
- package/src/SortableTableHeader/SortableTableHeader.tsx +6 -1
- package/src/TextLink/TextLink.mdx +93 -0
- package/src/TextLink/TextLink.stories.tsx +260 -0
- package/src/TextLink/TextLink.test.tsx +230 -0
- package/src/TextLink/TextLink.tsx +194 -0
- package/src/Tooltip/Tooltip.tsx +5 -1
- package/src/controlStyles.ts +69 -1
- package/src/icons.storyHelpers.tsx +32 -0
- package/src/index.ts +41 -0
- package/src/intentStyles.ts +19 -0
- package/src/mountStory.testHelpers.ts +63 -0
- package/src/reactRouter/ReactRouterLink.tsx +30 -0
- package/src/reactRouter/index.ts +29 -0
- package/src/sourceRules.test.ts +41 -6
package/dist/controlStyles.js
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* density axis also scales. See
|
|
16
16
|
* `packages/tokens/src/tailwindCollisions.test.ts`.
|
|
17
17
|
*/
|
|
18
|
+
import { FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_HOVER_CLASS, } from "./intentStyles.js";
|
|
19
|
+
import { toClassName } from "./toClassName.js";
|
|
18
20
|
export const CONTROL_SIZE_CLASS = {
|
|
19
21
|
sm: "h-(--control-height-sm) gap-(--control-gap-sm) px-(--control-padding-inline-sm) text-sm",
|
|
20
22
|
md: "h-(--control-height-md) gap-(--control-gap-md) px-(--control-padding-inline-md) text-md",
|
|
@@ -45,6 +47,34 @@ export const ICON_CONTROL_SIZE_CLASS = {
|
|
|
45
47
|
* `docs/decisions/2026-08-05-controls-share-one-height-no-per-component-touch-floor.md`.
|
|
46
48
|
*/
|
|
47
49
|
export const MIN_TOUCH_TARGET_CLASS = "min-h-(--control-min-touch-target) min-w-(--control-min-touch-target)";
|
|
50
|
+
/**
|
|
51
|
+
* Everything a pressable control looks like before an intent, a size,
|
|
52
|
+
* or a state is applied to it.
|
|
53
|
+
*
|
|
54
|
+
* Pulled out of `Button` the day `ButtonLink` shipped. Those two must
|
|
55
|
+
* paint **identically** — the whole point of `ButtonLink` is that a
|
|
56
|
+
* navigation can read as a primary button — and "identically" spelled
|
|
57
|
+
* as two copies of the same string is a promise that survives exactly
|
|
58
|
+
* one edit.
|
|
59
|
+
*/
|
|
60
|
+
export const CONTROL_BASE_CLASS = "inline-flex cursor-pointer items-center justify-center rounded-md border font-medium whitespace-nowrap transition-colors duration-(--duration-fast) ease-standard select-none";
|
|
61
|
+
/**
|
|
62
|
+
* The one class list a button-shaped control wears, assembled once.
|
|
63
|
+
*
|
|
64
|
+
* `Button` and `ButtonLink` call this with the same arguments and get
|
|
65
|
+
* the same string back, so a new appearance, a changed radius, or a
|
|
66
|
+
* different hover ramp reaches both or neither. `ButtonLink.test.tsx`
|
|
67
|
+
* asserts the resulting *computed styles* match, which is the version
|
|
68
|
+
* of this claim a class-name refactor cannot quietly break.
|
|
69
|
+
*
|
|
70
|
+
* The disabled treatment is the caller's, because it is the one thing
|
|
71
|
+
* that genuinely differs: a `<button>` has a real `disabled`
|
|
72
|
+
* attribute and gets `DISABLED_CLASS`, while an `<a>` has no such
|
|
73
|
+
* concept and gets `ARIA_DISABLED_CLASS` keyed off `aria-disabled`.
|
|
74
|
+
*/
|
|
75
|
+
export const getControlClassName = ({ appearance, className, disabledClass, intent, isFullWidth, size, sizing, }) => toClassName(CONTROL_BASE_CLASS, sizing === "icon"
|
|
76
|
+
? ICON_CONTROL_SIZE_CLASS[size]
|
|
77
|
+
: CONTROL_SIZE_CLASS[size], INTENT_APPEARANCE_CLASS[intent][appearance], INTENT_HOVER_CLASS[intent][appearance], FOCUS_RING_CLASS, disabledClass, isFullWidth && "w-full", className);
|
|
48
78
|
/**
|
|
49
79
|
* Non-control sizing: badges, indicator dots, spinners. These are
|
|
50
80
|
* type-relative on purpose — a badge beside `text-sm` prose that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlStyles.js","sourceRoot":"","sources":["../src/controlStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"controlStyles.js","sourceRoot":"","sources":["../src/controlStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,CAAC,MA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AAE,EAAE,iBAAiB;CACtB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -32,12 +32,20 @@
|
|
|
32
32
|
*/
|
|
33
33
|
export type { AccordionHeadingLevel, AccordionItem, AccordionProps, } from "./Accordion/Accordion.tsx";
|
|
34
34
|
export { Accordion } from "./Accordion/Accordion.tsx";
|
|
35
|
+
export type { AdaptiveGridProps } from "./AdaptiveGrid/AdaptiveGrid.tsx";
|
|
36
|
+
export { AdaptiveGrid } from "./AdaptiveGrid/AdaptiveGrid.tsx";
|
|
37
|
+
export type { ColumnChoice } from "./AdaptiveGrid/chooseColumns.ts";
|
|
38
|
+
export { chooseColumns, DEFAULT_MAX_AUTO_COLUMNS, DEFAULT_MAX_MANUAL_COLUMNS, DEFAULT_MIN_COLUMN_INLINE_SIZE_PX, getColumnChoices, getContentMaxInlineSize, } from "./AdaptiveGrid/chooseColumns.ts";
|
|
39
|
+
export type { BlockSizeResolver, ColumnPersistence, } from "./AdaptiveGrid/useAdaptiveColumns.ts";
|
|
40
|
+
export { localStorageColumnPersistence, readStoredChoice, useAdaptiveColumns, viewportBlockSizeResolver, } from "./AdaptiveGrid/useAdaptiveColumns.ts";
|
|
35
41
|
export type { AlertProps, AlertSize, } from "./Alert/Alert.tsx";
|
|
36
42
|
export { Alert } from "./Alert/Alert.tsx";
|
|
37
43
|
export type { BadgeProps } from "./Badge/Badge.tsx";
|
|
38
44
|
export { Badge } from "./Badge/Badge.tsx";
|
|
39
45
|
export type { ButtonProps } from "./Button/Button.tsx";
|
|
40
46
|
export { Button } from "./Button/Button.tsx";
|
|
47
|
+
export type { ButtonLinkProps } from "./ButtonLink/ButtonLink.tsx";
|
|
48
|
+
export { ButtonLink } from "./ButtonLink/ButtonLink.tsx";
|
|
41
49
|
export type { CardPadding, CardProps, CardSurface, } from "./Card/Card.tsx";
|
|
42
50
|
export { Card } from "./Card/Card.tsx";
|
|
43
51
|
export type { CheckboxProps } from "./Checkbox/Checkbox.tsx";
|
|
@@ -49,7 +57,7 @@ export { ColorSchemeToggle } from "./ColorSchemeToggle/ColorSchemeToggle.tsx";
|
|
|
49
57
|
export type { ComboboxProps } from "./Combobox/Combobox.tsx";
|
|
50
58
|
export { Combobox } from "./Combobox/Combobox.tsx";
|
|
51
59
|
export type { BadgeSize } from "./controlStyles.ts";
|
|
52
|
-
export { BADGE_SIZE_CLASS, CONTROL_SIZE_CLASS, DOT_SIZE_CLASS, ICON_CONTROL_SIZE_CLASS, MIN_TOUCH_TARGET_CLASS, SPINNER_SIZE_CLASS, } from "./controlStyles.ts";
|
|
60
|
+
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";
|
|
53
61
|
export type { DialogProps, DialogSize, } from "./Dialog/Dialog.tsx";
|
|
54
62
|
export { Dialog } from "./Dialog/Dialog.tsx";
|
|
55
63
|
export type { EmptyStateProps, EmptyStateSize, } from "./EmptyState/EmptyState.tsx";
|
|
@@ -63,7 +71,7 @@ export { FileDropZone } from "./FileDropZone/FileDropZone.tsx";
|
|
|
63
71
|
export type { IconButtonProps } from "./IconButton/IconButton.tsx";
|
|
64
72
|
export { IconButton } from "./IconButton/IconButton.tsx";
|
|
65
73
|
export type { IntentAppearance } from "./intentStyles.ts";
|
|
66
|
-
export { DISABLED_CLASS, FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_CONTENT_CLASS, INTENT_HOVER_CLASS, INTENT_SOLID_FILL_CLASS, } from "./intentStyles.ts";
|
|
74
|
+
export { ARIA_DISABLED_CLASS, DISABLED_CLASS, FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_CONTENT_CLASS, INTENT_HOVER_CLASS, INTENT_SOLID_FILL_CLASS, } from "./intentStyles.ts";
|
|
67
75
|
export type { LightboxProps } from "./Lightbox/Lightbox.tsx";
|
|
68
76
|
export { Lightbox } from "./Lightbox/Lightbox.tsx";
|
|
69
77
|
export type { ListboxItem, ListboxProps, } from "./Listbox/Listbox.tsx";
|
|
@@ -88,6 +96,10 @@ export type { ProgressThreshold } from "./ProgressBar/progressValue.ts";
|
|
|
88
96
|
export { getProgressIntent, toProgressPercent, toProgressValue, } from "./ProgressBar/progressValue.ts";
|
|
89
97
|
export type { RadioGroupProps, RadioItem, } from "./RadioGroup/RadioGroup.tsx";
|
|
90
98
|
export { RadioGroup } from "./RadioGroup/RadioGroup.tsx";
|
|
99
|
+
export { AnchorLink } from "./RouterLink/AnchorLink.tsx";
|
|
100
|
+
export { RouterLinkProvider, useRouterLink, } from "./RouterLink/RouterLinkProvider.tsx";
|
|
101
|
+
export type { RouterLinkComponent, RouterLinkProps, } from "./RouterLink/routerLink.ts";
|
|
102
|
+
export { getIsRoutedHref } from "./RouterLink/routerLink.ts";
|
|
91
103
|
export type { SegmentedControlProps, SegmentedItem, } from "./SegmentedControl/SegmentedControl.tsx";
|
|
92
104
|
export { SegmentedControl } from "./SegmentedControl/SegmentedControl.tsx";
|
|
93
105
|
export type { SelectItem, SelectOption, SelectOptionGroup, SelectProps, } from "./Select/Select.tsx";
|
|
@@ -107,6 +119,8 @@ export { mergeSlotProps } from "./slotProps.ts";
|
|
|
107
119
|
export { getAsyncIntent, getAsyncLabel, getConnectionIntent, getConnectionLabel, getIsConnectionBusy, } from "./statusIntent.ts";
|
|
108
120
|
export type { TabItem, TabsActivation, TabsOrientation, TabsProps, } from "./Tabs/Tabs.tsx";
|
|
109
121
|
export { Tabs } from "./Tabs/Tabs.tsx";
|
|
122
|
+
export type { TextLinkAppearance, TextLinkProps, } from "./TextLink/TextLink.tsx";
|
|
123
|
+
export { TextLink } from "./TextLink/TextLink.tsx";
|
|
110
124
|
export type { ToastProps } from "./Toast/Toast.tsx";
|
|
111
125
|
export { Toast } from "./Toast/Toast.tsx";
|
|
112
126
|
export type { ToastRecord, ToastRegionProps, } from "./Toast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A;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -31,22 +31,26 @@
|
|
|
31
31
|
* this package's README has always told it to do.
|
|
32
32
|
*/
|
|
33
33
|
export { Accordion } from "./Accordion/Accordion.js";
|
|
34
|
+
export { AdaptiveGrid } from "./AdaptiveGrid/AdaptiveGrid.js";
|
|
35
|
+
export { chooseColumns, DEFAULT_MAX_AUTO_COLUMNS, DEFAULT_MAX_MANUAL_COLUMNS, DEFAULT_MIN_COLUMN_INLINE_SIZE_PX, getColumnChoices, getContentMaxInlineSize, } from "./AdaptiveGrid/chooseColumns.js";
|
|
36
|
+
export { localStorageColumnPersistence, readStoredChoice, useAdaptiveColumns, viewportBlockSizeResolver, } from "./AdaptiveGrid/useAdaptiveColumns.js";
|
|
34
37
|
export { Alert } from "./Alert/Alert.js";
|
|
35
38
|
export { Badge } from "./Badge/Badge.js";
|
|
36
39
|
export { Button } from "./Button/Button.js";
|
|
40
|
+
export { ButtonLink } from "./ButtonLink/ButtonLink.js";
|
|
37
41
|
export { Card } from "./Card/Card.js";
|
|
38
42
|
export { Checkbox } from "./Checkbox/Checkbox.js";
|
|
39
43
|
export { ColorSchemeSwitcher } from "./ColorSchemeSwitcher/ColorSchemeSwitcher.js";
|
|
40
44
|
export { ColorSchemeToggle } from "./ColorSchemeToggle/ColorSchemeToggle.js";
|
|
41
45
|
export { Combobox } from "./Combobox/Combobox.js";
|
|
42
|
-
export { BADGE_SIZE_CLASS, CONTROL_SIZE_CLASS, DOT_SIZE_CLASS, ICON_CONTROL_SIZE_CLASS, MIN_TOUCH_TARGET_CLASS, SPINNER_SIZE_CLASS, } from "./controlStyles.js";
|
|
46
|
+
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";
|
|
43
47
|
export { Dialog } from "./Dialog/Dialog.js";
|
|
44
48
|
export { EmptyState } from "./EmptyState/EmptyState.js";
|
|
45
49
|
export { Field } from "./Field/Field.js";
|
|
46
50
|
export { FieldGroup } from "./Field/FieldGroup.js";
|
|
47
51
|
export { FileDropZone } from "./FileDropZone/FileDropZone.js";
|
|
48
52
|
export { IconButton } from "./IconButton/IconButton.js";
|
|
49
|
-
export { DISABLED_CLASS, FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_CONTENT_CLASS, INTENT_HOVER_CLASS, INTENT_SOLID_FILL_CLASS, } from "./intentStyles.js";
|
|
53
|
+
export { ARIA_DISABLED_CLASS, DISABLED_CLASS, FOCUS_RING_CLASS, INTENT_APPEARANCE_CLASS, INTENT_CONTENT_CLASS, INTENT_HOVER_CLASS, INTENT_SOLID_FILL_CLASS, } from "./intentStyles.js";
|
|
50
54
|
export { Lightbox } from "./Lightbox/Lightbox.js";
|
|
51
55
|
export { Listbox } from "./Listbox/Listbox.js";
|
|
52
56
|
export { LiveStatusIndicator } from "./LiveStatusIndicator/LiveStatusIndicator.js";
|
|
@@ -59,6 +63,9 @@ export { Popover } from "./Popover/Popover.js";
|
|
|
59
63
|
export { ProgressBar } from "./ProgressBar/ProgressBar.js";
|
|
60
64
|
export { getProgressIntent, toProgressPercent, toProgressValue, } from "./ProgressBar/progressValue.js";
|
|
61
65
|
export { RadioGroup } from "./RadioGroup/RadioGroup.js";
|
|
66
|
+
export { AnchorLink } from "./RouterLink/AnchorLink.js";
|
|
67
|
+
export { RouterLinkProvider, useRouterLink, } from "./RouterLink/RouterLinkProvider.js";
|
|
68
|
+
export { getIsRoutedHref } from "./RouterLink/routerLink.js";
|
|
62
69
|
export { SegmentedControl } from "./SegmentedControl/SegmentedControl.js";
|
|
63
70
|
export { Select } from "./Select/Select.js";
|
|
64
71
|
export { Skeleton } from "./Skeleton/Skeleton.js";
|
|
@@ -69,6 +76,7 @@ export { Switch } from "./Switch/Switch.js";
|
|
|
69
76
|
export { mergeSlotProps } from "./slotProps.js";
|
|
70
77
|
export { getAsyncIntent, getAsyncLabel, getConnectionIntent, getConnectionLabel, getIsConnectionBusy, } from "./statusIntent.js";
|
|
71
78
|
export { Tabs } from "./Tabs/Tabs.js";
|
|
79
|
+
export { TextLink } from "./TextLink/TextLink.js";
|
|
72
80
|
export { Toast } from "./Toast/Toast.js";
|
|
73
81
|
export { ToastRegion } from "./Toast/ToastRegion.js";
|
|
74
82
|
export { toastTransitions } from "./Toast/toastLifecycle.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAOH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAOH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA2B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAiC,CAAA;AAE9D,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AAKxC,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,sCAAsC,CAAA;AAK7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAmB,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM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mB,CAAA;AAKzC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAyB,CAAA;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAuB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAqC,CAAA"}
|
package/dist/intentStyles.d.ts
CHANGED
|
@@ -73,4 +73,21 @@ export declare const FOCUS_RING_CLASS = "focus-visible:outline-solid focus-visib
|
|
|
73
73
|
* Keeping it in one constant is what stops it drifting onto prose.
|
|
74
74
|
*/
|
|
75
75
|
export declare const DISABLED_CLASS = "disabled:cursor-not-allowed disabled:border-border-subtle disabled:bg-surface-sunken disabled:text-content-disabled disabled:shadow-none";
|
|
76
|
+
/**
|
|
77
|
+
* The same treatment for something that cannot *be* disabled.
|
|
78
|
+
*
|
|
79
|
+
* **`disabled` is not a thing an `<a>` has.** There is no attribute,
|
|
80
|
+
* no `:disabled` match, and no browser behaviour to inherit — so a
|
|
81
|
+
* "disabled link" is entirely something a component has to build, and
|
|
82
|
+
* the usual build of it is a focusable `<a href>` that silently does
|
|
83
|
+
* nothing when pressed. `ButtonLink` instead drops `href` (the
|
|
84
|
+
* platform's own way to make an anchor inert and unfocusable) and
|
|
85
|
+
* says so with `aria-disabled`, which is what this paints against.
|
|
86
|
+
*
|
|
87
|
+
* `pointer-events-none` rather than `cursor-not-allowed`: without a
|
|
88
|
+
* real `:disabled`, the `hover:` classes still match — CSS `:hover`
|
|
89
|
+
* fires on disabled elements too — so the hover fill has to be taken
|
|
90
|
+
* off the table rather than merely overridden.
|
|
91
|
+
*/
|
|
92
|
+
export declare const ARIA_DISABLED_CLASS = "aria-disabled:pointer-events-none aria-disabled:border-border-subtle aria-disabled:bg-surface-sunken aria-disabled:text-content-disabled aria-disabled:shadow-none";
|
|
76
93
|
//# sourceMappingURL=intentStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intentStyles.d.ts","sourceRoot":"","sources":["../src/intentStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,CAAA;AAEX,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,UAAU,EACV,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAwDjC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,UAAU,EACV,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAsCjC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,UAAU,EACV,MAAM,CAQP,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,UAAU,EACV,MAAM,CAQP,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,sKACwI,CAAA;AAErK;;;;;GAKG;AACH,eAAO,MAAM,cAAc,6IACiH,CAAA"}
|
|
1
|
+
{"version":3,"file":"intentStyles.d.ts","sourceRoot":"","sources":["../src/intentStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,CAAA;AAEX,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,UAAU,EACV,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAwDjC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,UAAU,EACV,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAsCjC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,UAAU,EACV,MAAM,CAQP,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,UAAU,EACV,MAAM,CAQP,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,sKACwI,CAAA;AAErK;;;;;GAKG;AACH,eAAO,MAAM,cAAc,6IACiH,CAAA;AAE5I;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,uKACsI,CAAA"}
|
package/dist/intentStyles.js
CHANGED
|
@@ -147,4 +147,21 @@ export const FOCUS_RING_CLASS = "focus-visible:outline-solid focus-visible:outli
|
|
|
147
147
|
* Keeping it in one constant is what stops it drifting onto prose.
|
|
148
148
|
*/
|
|
149
149
|
export const DISABLED_CLASS = "disabled:cursor-not-allowed disabled:border-border-subtle disabled:bg-surface-sunken disabled:text-content-disabled disabled:shadow-none";
|
|
150
|
+
/**
|
|
151
|
+
* The same treatment for something that cannot *be* disabled.
|
|
152
|
+
*
|
|
153
|
+
* **`disabled` is not a thing an `<a>` has.** There is no attribute,
|
|
154
|
+
* no `:disabled` match, and no browser behaviour to inherit — so a
|
|
155
|
+
* "disabled link" is entirely something a component has to build, and
|
|
156
|
+
* the usual build of it is a focusable `<a href>` that silently does
|
|
157
|
+
* nothing when pressed. `ButtonLink` instead drops `href` (the
|
|
158
|
+
* platform's own way to make an anchor inert and unfocusable) and
|
|
159
|
+
* says so with `aria-disabled`, which is what this paints against.
|
|
160
|
+
*
|
|
161
|
+
* `pointer-events-none` rather than `cursor-not-allowed`: without a
|
|
162
|
+
* real `:disabled`, the `hover:` classes still match — CSS `:hover`
|
|
163
|
+
* fires on disabled elements too — so the hover fill has to be taken
|
|
164
|
+
* off the table rather than merely overridden.
|
|
165
|
+
*/
|
|
166
|
+
export const ARIA_DISABLED_CLASS = "aria-disabled:pointer-events-none aria-disabled:border-border-subtle aria-disabled:bg-surface-sunken aria-disabled:text-content-disabled aria-disabled:shadow-none";
|
|
150
167
|
//# sourceMappingURL=intentStyles.js.map
|
package/dist/intentStyles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intentStyles.js","sourceRoot":"","sources":["../src/intentStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsBH,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,OAAO,EAAE;QACP,KAAK,EACH,wDAAwD;QAC1D,OAAO,EACL,yEAAyE;QAC3E,IAAI,EAAE,oFAAoF;QAC1F,KAAK,EACH,yEAAyE;KAC5E;IACD,MAAM,EAAE;QACN,KAAK,EACH,8DAA8D;QAChE,OAAO,EACL,uEAAuE;QACzE,IAAI,EAAE,iFAAiF;QACvF,KAAK,EACH,uEAAuE;KAC1E;IACD,OAAO,EAAE;QACP,KAAK,EACH,+DAA+D;QACjE,OAAO,EACL,yEAAyE;QAC3E,IAAI,EAAE,oFAAoF;QAC1F,KAAK,EACH,yEAAyE;KAC5E;IACD,OAAO,EAAE;QACP,KAAK,EACH,+DAA+D;QACjE,OAAO,EACL,yEAAyE;QAC3E,IAAI,EAAE,oFAAoF;QAC1F,KAAK,EACH,yEAAyE;KAC5E;IACD,MAAM,EAAE;QACN,KAAK,EACH,8DAA8D;QAChE,OAAO,EACL,uEAAuE;QACzE,IAAI,EAAE,iFAAiF;QACvF,KAAK,EACH,uEAAuE;KAC1E;IACD,IAAI,EAAE;QACJ,KAAK,EACH,4DAA4D;QAC9D,OAAO,EACL,mEAAmE;QACrE,IAAI,EAAE,2EAA2E;QACjF,KAAK,EACH,mEAAmE;KACtE;CACF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAG3B;IACF,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CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,mKAAmK,CAAA;AAErK;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GACzB,0IAA0I,CAAA"}
|
|
1
|
+
{"version":3,"file":"intentStyles.js","sourceRoot":"","sources":["../src/intentStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsBH,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,OAAO,EAAE;QACP,KAAK,EACH,wDAAwD;QAC1D,OAAO,EACL,yEAAyE;QAC3E,IAAI,EAAE,oFAAoF;QAC1F,KAAK,EACH,yEAAyE;KAC5E;IACD,MAAM,EAAE;QACN,KAAK,EACH,8DAA8D;QAChE,OAAO,EACL,uEAAuE;QACzE,IAAI,EAAE,iFAAiF;QACvF,KAAK,EACH,uEAAuE;KAC1E;IACD,OAAO,EAAE;QACP,KAAK,EACH,+DAA+D;QACjE,OAAO,EACL,yEAAyE;QAC3E,IAAI,EAAE,oFAAoF;QAC1F,KAAK,EACH,yEAAyE;KAC5E;IACD,OAAO,EAAE;QACP,KAAK,EACH,+DAA+D;QACjE,OAAO,EACL,yEAAyE;QAC3E,IAAI,EAAE,oFAAoF;QAC1F,KAAK,EACH,yEAAyE;KAC5E;IACD,MAAM,EAAE;QACN,KAAK,EACH,8DAA8D;QAChE,OAAO,EACL,uEAAuE;QACzE,IAAI,EAAE,iFAAiF;QACvF,KAAK,EACH,uEAAuE;KAC1E;IACD,IAAI,EAAE;QACJ,KAAK,EACH,4DAA4D;QAC9D,OAAO,EACL,mEAAmE;QACrE,IAAI,EAAE,2EAA2E;QACjF,KAAK,EACH,mEAAmE;KACtE;CACF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAG3B;IACF,OAAO,EAAE;QACP,KAAK,EAAE,iCAAiC;QACxC,OAAO,EAAE,iCAAiC;QAC1C,IAAI,EAAE,uCAAuC;Q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G;AACH,MAAM,CAAC,MAAM,cAAc,GACzB,0IAA0I,CAAA;AAE5I;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,oKAAoK,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mountStory.testHelpers.d.ts","sourceRoot":"","sources":["../src/mountStory.testHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAA;AAEvC;;;;;GAKG;AACH,KAAK,cAAc,GAAG;IACpB,GAAG,EAAE,CAAC,OAAO,EAAE;QACb,aAAa,EAAE,WAAW,CAAA;KAC3B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACpB,CAAA;
|
|
1
|
+
{"version":3,"file":"mountStory.testHelpers.d.ts","sourceRoot":"","sources":["../src/mountStory.testHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAA;AAEvC;;;;;GAKG;AACH,KAAK,cAAc,GAAG;IACpB,GAAG,EAAE,CAAC,OAAO,EAAE;QACb,aAAa,EAAE,WAAW,CAAA;KAC3B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACpB,CAAA;AA+GD,eAAO,MAAM,UAAU,GACrB,OAAO,cAAc,KACpB,OAAO,CAAC;IACT,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,WAAW,CAAA;CAC3B,CA0BA,CAAA"}
|
|
@@ -46,6 +46,61 @@ import { within } from "storybook/test";
|
|
|
46
46
|
* triggers still open from inside `canvas`.
|
|
47
47
|
*/
|
|
48
48
|
const mountedCanvases = [];
|
|
49
|
+
/**
|
|
50
|
+
* One frame past the mount, so post-mount effects have applied
|
|
51
|
+
* before anything reads the DOM.
|
|
52
|
+
*
|
|
53
|
+
* `storybook-addon-pseudo-states` applies its forced
|
|
54
|
+
* `:hover`/`:focus`/`:active` classes **a tick after render**, not
|
|
55
|
+
* during it — `vrtCapture.mjs` documents the same window and closes
|
|
56
|
+
* it with a settle, after "a real flake seen on `*--all-states`
|
|
57
|
+
* stories".
|
|
58
|
+
*
|
|
59
|
+
* This suite has the identical window and never closed it, and the
|
|
60
|
+
* consequence is worse here than a pixel diff: the a11y addon's
|
|
61
|
+
* `afterEach` runs axe the moment `run()` resolves, so a story
|
|
62
|
+
* whose forced state lands late is audited **un-forced**, and one
|
|
63
|
+
* whose state lands early is audited **hovered**. That is a
|
|
64
|
+
* contrast check reading `intent-accent-solid` on one run and
|
|
65
|
+
* `intent-accent-solid-hover` on the next — which is precisely the
|
|
66
|
+
* shape of `ButtonLink`'s intermittent `color-contrast` failure in
|
|
67
|
+
* CI, reported against `#6A64F0`, the daylight `solidHover`.
|
|
68
|
+
*
|
|
69
|
+
* Two frames rather than a fixed delay: React flushes effects and
|
|
70
|
+
* the addon applies classes within a frame, so this is a barrier
|
|
71
|
+
* tied to the browser's own scheduling instead of a millisecond
|
|
72
|
+
* count guessed against one machine. `vrtCapture` can afford its
|
|
73
|
+
* 400ms because it takes ~700 shots; this runs before every one of
|
|
74
|
+
* 222 tests.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* Captured at module load, **before any test can replace it**.
|
|
78
|
+
*
|
|
79
|
+
* `Toast.test.tsx` stubs `requestAnimationFrame` and *holds* the
|
|
80
|
+
* callbacks, deliberately, to prove that a dismiss arriving during
|
|
81
|
+
* the enter frame is not undone by it. A settle that called the
|
|
82
|
+
* live `globalThis.requestAnimationFrame` would hand its own
|
|
83
|
+
* continuation to that stub and never be released — which is
|
|
84
|
+
* exactly what happened: three Toast tests went from passing to a
|
|
85
|
+
* flat 15s timeout.
|
|
86
|
+
*
|
|
87
|
+
* Binding the native one keeps a true frame barrier while staying
|
|
88
|
+
* immune to a stub, and it does not disturb the test doing the
|
|
89
|
+
* stubbing: the component's frames still go to its stub, only this
|
|
90
|
+
* helper's do not.
|
|
91
|
+
*/
|
|
92
|
+
const requestNativeFrame = globalThis.requestAnimationFrame?.bind(globalThis);
|
|
93
|
+
const settlePostMountEffects = () => new Promise((resolve) => {
|
|
94
|
+
if (!requestNativeFrame) {
|
|
95
|
+
globalThis.setTimeout(resolve, 0);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
requestNativeFrame(() => {
|
|
99
|
+
requestNativeFrame(() => {
|
|
100
|
+
resolve();
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
});
|
|
49
104
|
export const mountStory = async (story) => {
|
|
50
105
|
for (const previous of mountedCanvases.splice(0)) {
|
|
51
106
|
previous.remove();
|
|
@@ -57,6 +112,7 @@ export const mountStory = async (story) => {
|
|
|
57
112
|
document.body.append(canvasElement);
|
|
58
113
|
mountedCanvases.push(canvasElement);
|
|
59
114
|
await story.run({ canvasElement });
|
|
115
|
+
await settlePostMountEffects();
|
|
60
116
|
return {
|
|
61
117
|
body: within(document.body),
|
|
62
118
|
canvas: within(canvasElement),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mountStory.testHelpers.js","sourceRoot":"","sources":["../src/mountStory.testHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAgBvC;;;;;;;;;;GAUG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,eAAe,GAAkB,EAAE,CAAA;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,KAAqB,EAKpB,EAAE;IACH,KAAK,MAAM,QAAQ,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,QAAQ,CAAC,MAAM,EAAE,CAAA;IACnB,CAAC;IAED,KAAK,MAAM,UAAU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CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,KAAqB,EAKpB,EAAE;IACH,KAAK,MAAM,QAAQ,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,QAAQ,CAAC,MAAM,EAAE,CAAA;IACnB,CAAC;IAED,KAAK,MAAM,UAAU,IAAI,QAAQ,CAAC,gBAAgB,CAChD,2BAA2B,CAC5B,EAAE,CAAC;QACF,UAAU,CAAC,MAAM,EAAE,CAAA;IACrB,CAAC;IAED,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAEnD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;IAEnC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAEnC,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,aAAa,EAAE,CAAC,CAAA;IAElC,MAAM,sBAAsB,EAAE,CAAA;IAE9B,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC3B,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;QAC7B,aAAa;KACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { RouterLinkProps } from "../RouterLink/routerLink.ts";
|
|
3
|
+
/**
|
|
4
|
+
* react-router's `<Link>`, wearing the seam's `href`.
|
|
5
|
+
*
|
|
6
|
+
* The entire adapter, and that is the point: the seam's contract is
|
|
7
|
+
* "a component that takes `href`", so an adapter is a rename. wouter,
|
|
8
|
+
* TanStack Router, and a hand-rolled router each get the same four
|
|
9
|
+
* lines, written in the app rather than here.
|
|
10
|
+
*
|
|
11
|
+
* `to` versus `href` is the only mismatch worth naming. Everything
|
|
12
|
+
* else — `className`, `rel`, `target`, `aria-*`, the ref — passes
|
|
13
|
+
* through untouched, because react-router renders a real `<a>` and
|
|
14
|
+
* forwards what it does not understand.
|
|
15
|
+
*
|
|
16
|
+
* Imported from `react-router`, not `react-router-dom`. v7 and v8
|
|
17
|
+
* both export `Link` from the former, and `react-router-dom` v7 (what
|
|
18
|
+
* bambuddy has) is a re-export shim over exactly that module — so one
|
|
19
|
+
* import covers both installs, while naming `react-router-dom` would
|
|
20
|
+
* cover only one.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ReactRouterLink: ({ href, ...linkProps }: RouterLinkProps) => ReactNode;
|
|
23
|
+
//# sourceMappingURL=ReactRouterLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactRouterLink.d.ts","sourceRoot":"","sources":["../../src/reactRouter/ReactRouterLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,GAAI,wBAG7B,eAAe,KAAG,SAEpB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from "react-router";
|
|
3
|
+
/**
|
|
4
|
+
* react-router's `<Link>`, wearing the seam's `href`.
|
|
5
|
+
*
|
|
6
|
+
* The entire adapter, and that is the point: the seam's contract is
|
|
7
|
+
* "a component that takes `href`", so an adapter is a rename. wouter,
|
|
8
|
+
* TanStack Router, and a hand-rolled router each get the same four
|
|
9
|
+
* lines, written in the app rather than here.
|
|
10
|
+
*
|
|
11
|
+
* `to` versus `href` is the only mismatch worth naming. Everything
|
|
12
|
+
* else — `className`, `rel`, `target`, `aria-*`, the ref — passes
|
|
13
|
+
* through untouched, because react-router renders a real `<a>` and
|
|
14
|
+
* forwards what it does not understand.
|
|
15
|
+
*
|
|
16
|
+
* Imported from `react-router`, not `react-router-dom`. v7 and v8
|
|
17
|
+
* both export `Link` from the former, and `react-router-dom` v7 (what
|
|
18
|
+
* bambuddy has) is a re-export shim over exactly that module — so one
|
|
19
|
+
* import covers both installs, while naming `react-router-dom` would
|
|
20
|
+
* cover only one.
|
|
21
|
+
*/
|
|
22
|
+
export const ReactRouterLink = ({ href, ...linkProps }) => (_jsx(Link, { ...linkProps, to: href }));
|
|
23
|
+
//# sourceMappingURL=ReactRouterLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactRouterLink.js","sourceRoot":"","sources":["../../src/reactRouter/ReactRouterLink.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAInC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,IAAI,EACJ,GAAG,SAAS,EACI,EAAa,EAAE,CAAC,CAChC,KAAC,IAAI,OAAK,SAAS,EAAE,EAAE,EAAE,IAAI,GAAI,CAClC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@charcuterie/ui/react-router` — the react-router adapter for the
|
|
3
|
+
* link seam.
|
|
4
|
+
*
|
|
5
|
+
* **A subpath export with an optional peer dependency**, and both
|
|
6
|
+
* halves of that matter. The base package must stay router-free: the
|
|
7
|
+
* fleet runs react-router v8, react-router-dom v7, wouter-preact, two
|
|
8
|
+
* hand-rolled routers, and five apps with no router at all, so a
|
|
9
|
+
* `react-router` in `@charcuterie/ui`'s dependencies would be a
|
|
10
|
+
* package eleven consumers install and six of them use. Optional
|
|
11
|
+
* peer + separate entry point means an app that never imports this
|
|
12
|
+
* path never resolves `react-router`, and `sourceRules.test.ts`
|
|
13
|
+
* asserts exactly that — the main entry is measured for what it
|
|
14
|
+
* reaches, so this cannot leak into it by accident.
|
|
15
|
+
*
|
|
16
|
+
* The wiring is one provider at the app root; `Guides/Routing` in
|
|
17
|
+
* Storybook is the copy-pasteable version.
|
|
18
|
+
*
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import { RouterLinkProvider } from "@charcuterie/ui"
|
|
21
|
+
* import { ReactRouterLink } from "@charcuterie/ui/react-router"
|
|
22
|
+
*
|
|
23
|
+
* <RouterLinkProvider link={ReactRouterLink}>
|
|
24
|
+
* <RouterProvider router={router} />
|
|
25
|
+
* </RouterLinkProvider>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export { ReactRouterLink } from "./ReactRouterLink.tsx";
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reactRouter/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@charcuterie/ui/react-router` — the react-router adapter for the
|
|
3
|
+
* link seam.
|
|
4
|
+
*
|
|
5
|
+
* **A subpath export with an optional peer dependency**, and both
|
|
6
|
+
* halves of that matter. The base package must stay router-free: the
|
|
7
|
+
* fleet runs react-router v8, react-router-dom v7, wouter-preact, two
|
|
8
|
+
* hand-rolled routers, and five apps with no router at all, so a
|
|
9
|
+
* `react-router` in `@charcuterie/ui`'s dependencies would be a
|
|
10
|
+
* package eleven consumers install and six of them use. Optional
|
|
11
|
+
* peer + separate entry point means an app that never imports this
|
|
12
|
+
* path never resolves `react-router`, and `sourceRules.test.ts`
|
|
13
|
+
* asserts exactly that — the main entry is measured for what it
|
|
14
|
+
* reaches, so this cannot leak into it by accident.
|
|
15
|
+
*
|
|
16
|
+
* The wiring is one provider at the app root; `Guides/Routing` in
|
|
17
|
+
* Storybook is the copy-pasteable version.
|
|
18
|
+
*
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import { RouterLinkProvider } from "@charcuterie/ui"
|
|
21
|
+
* import { ReactRouterLink } from "@charcuterie/ui/react-router"
|
|
22
|
+
*
|
|
23
|
+
* <RouterLinkProvider link={ReactRouterLink}>
|
|
24
|
+
* <RouterProvider router={router} />
|
|
25
|
+
* </RouterLinkProvider>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export { ReactRouterLink } from "./ReactRouterLink.js";
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reactRouter/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcuterie/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "The Charcuterie components. Tokens for look, @charcuterie/logic for state, ARIA that agents can actually drive.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"default": "./dist/index.js"
|
|
21
21
|
},
|
|
22
|
+
"./react-router": {
|
|
23
|
+
"source": "./src/reactRouter/index.ts",
|
|
24
|
+
"types": "./dist/reactRouter/index.d.ts",
|
|
25
|
+
"default": "./dist/reactRouter/index.js"
|
|
26
|
+
},
|
|
22
27
|
"./styles.css": "./dist/styles.css",
|
|
23
28
|
"./testing": {
|
|
24
29
|
"source": "./src/testing/index.ts",
|
|
@@ -44,13 +49,19 @@
|
|
|
44
49
|
},
|
|
45
50
|
"dependencies": {
|
|
46
51
|
"@charcuterie/logic": "1.2.0",
|
|
47
|
-
"@charcuterie/tokens": "1.
|
|
52
|
+
"@charcuterie/tokens": "1.3.0",
|
|
48
53
|
"@floating-ui/react": "^0.27.20",
|
|
49
54
|
"@tanstack/react-virtual": "^3.13.12"
|
|
50
55
|
},
|
|
51
56
|
"peerDependencies": {
|
|
52
57
|
"react": ">=19",
|
|
53
|
-
"react-dom": ">=19"
|
|
58
|
+
"react-dom": ">=19",
|
|
59
|
+
"react-router": ">=7"
|
|
60
|
+
},
|
|
61
|
+
"peerDependenciesMeta": {
|
|
62
|
+
"react-router": {
|
|
63
|
+
"optional": true
|
|
64
|
+
}
|
|
54
65
|
},
|
|
55
66
|
"devDependencies": {
|
|
56
67
|
"@storybook/react": "^10.3.6",
|
|
@@ -58,6 +69,7 @@
|
|
|
58
69
|
"@types/react-dom": "^19.2.3",
|
|
59
70
|
"react": "^19.2.8",
|
|
60
71
|
"react-dom": "^19.2.8",
|
|
72
|
+
"react-router": "^8.3.0",
|
|
61
73
|
"storybook": "^10.3.6",
|
|
62
74
|
"tailwindcss": "^4.3.0",
|
|
63
75
|
"typescript": "^6.0.3",
|