@common-origin/design-system 3.1.0 → 3.3.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/dist/client.js +1050 -722
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.mts +2 -2
- package/dist/components/atoms/Badge/Badge.d.ts +2 -2
- package/dist/components/atoms/Badge/Badge.mjs +15 -9
- package/dist/components/atoms/Box/Box.d.mts +3 -2
- package/dist/components/atoms/Box/Box.d.ts +3 -2
- package/dist/components/atoms/Button/Button.mjs +1 -1
- package/dist/components/atoms/Chip/shared/ChipBase.mjs +1 -1
- package/dist/components/atoms/Icon/Icon.d.mts +1 -1
- package/dist/components/atoms/Icon/Icon.d.ts +1 -1
- package/dist/components/atoms/Icon/Icon.mjs +35 -10
- package/dist/components/atoms/IconButton/IconButton.mjs +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/atoms/Tag/Tag.d.mts +1 -1
- package/dist/components/atoms/Tag/Tag.d.ts +1 -1
- package/dist/components/atoms/Tooltip/Tooltip.d.mts +7 -1
- package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -1
- package/dist/components/atoms/Tooltip/Tooltip.mjs +18 -8
- package/dist/components/molecules/ActionSheet/ActionSheet.mjs +2 -2
- package/dist/components/molecules/Alert/Alert.mjs +1 -1
- package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.mjs +1 -1
- package/dist/components/molecules/List/ListItem.mjs +3 -3
- package/dist/components/molecules/Menu/Menu.d.mts +8 -1
- package/dist/components/molecules/Menu/Menu.d.ts +8 -1
- package/dist/components/molecules/Menu/Menu.mjs +12 -9
- package/dist/components/molecules/Modal/Modal.mjs +1 -1
- package/dist/components/molecules/NumberInput/NumberInput.mjs +2 -1
- package/dist/components/molecules/PasswordField/PasswordField.mjs +3 -2
- package/dist/components/molecules/SearchField/SearchField.mjs +3 -3
- package/dist/components/molecules/Sheet/Sheet.mjs +3 -3
- package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.mts +3 -2
- package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.ts +3 -2
- package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs +128 -41
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.mts +30 -0
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.ts +30 -0
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs +69 -0
- package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs.map +1 -0
- package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs +57 -43
- package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
- package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs +3 -1
- package/dist/components/organisms/SidebarNav/SidebarNav.mjs +173 -62
- package/dist/data.js +2680 -190
- package/dist/data.js.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/lib/statusShapes.mjs +1 -1
- package/dist/lib/statusShapes.mjs.map +1 -1
- package/dist/lib/styleUtils.d.mts +4 -0
- package/dist/lib/styleUtils.d.ts +4 -0
- package/dist/lib/styleUtils.mjs +5 -1
- package/dist/lib/styleUtils.mjs.map +1 -1
- package/dist/lib/tokenAliases.mjs +1 -0
- package/dist/lib/tokenAliases.mjs.map +1 -1
- package/dist/lib/useFloatingLayer.d.mts +8 -1
- package/dist/lib/useFloatingLayer.d.ts +8 -1
- package/dist/lib/useFloatingLayer.mjs +11 -2
- package/dist/lib/useFloatingLayer.mjs.map +1 -1
- package/dist/styles/iconSet.json.mjs +2442 -0
- package/dist/styles/iconSet.json.mjs.map +1 -0
- package/dist/styles/tokens.d.mts +93 -24
- package/dist/styles/tokens.d.ts +93 -24
- package/dist/styles/tokens.json +96 -59
- package/dist/styles/tokens.json.mjs +96 -59
- package/dist/styles/tokens.json.mjs.map +1 -1
- package/dist/tokens/index.js +96 -59
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/index.mjs +96 -59
- package/dist/tokens/index.mjs.map +1 -1
- package/dist/tokens/styles/tokens.d.mts +93 -24
- package/dist/tokens/styles/tokens.d.ts +93 -24
- package/dist/tokens.css +1105 -74
- package/dist/types/iconSet.d.mts +6 -0
- package/dist/types/iconSet.d.ts +6 -0
- package/dist/types/iconSet.mjs +12 -0
- package/dist/types/iconSet.mjs.map +1 -0
- package/dist/types/icons.d.mts +58 -6
- package/dist/types/icons.d.ts +58 -6
- package/dist/types/icons.mjs +5 -0
- package/dist/types/icons.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +7 -3
package/dist/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sources":["../src/types/tokens.ts","../src/types/icons.ts"],"sourcesContent":["import tokensJson from '../styles/tokens.json'\nimport type { Tokens } from '../styles/tokens'\n\n// The published types come from the generated `src/styles/tokens.ts`, which carries each token's\n// description as JSDoc and `@deprecated` on deprecated tokens (decision 0033, #199). Declaring the\n// constant with that type also keeps emitted .d.ts files free of JSON imports, which consumers can\n// only resolve with `resolveJsonModule`.\nexport const tokens: Tokens = tokensJson\n\nexport type { Tokens }\nexport type TokensBase = Tokens['base']\nexport type TokensSemantic = Tokens['semantic']\nexport type TokensComponent = Tokens['component']\n","// Icon type definitions for external consumption\n// This is a self-contained type that doesn't depend on JSON imports\n// to ensure it works correctly in consuming projects\n\nimport iconsJson from '../styles/icons.json'\n\nexport type IconName =\n | 'add'\n | 'ai'\n | 'addRing'\n | 'arrowDown'\n | 'arrowLeft'\n | 'arrowRight'\n | 'arrowUp'\n | 'back'\n | 'bell'\n | 'cancel'\n | 'caret'\n | 'caretDown'\n | 'caretUp'\n | 'check'\n | 'checkRing'\n | 'close'\n | 'copy'\n | 'creditCard'\n | 'crossCircle'\n | 'directionRight'\n | 'directionUp'\n | 'edit'\n | 'export'\n | 'fileDocSearch'\n | 'filter'\n | 'home'\n | 'info'\n | 'kebab'\n | 'lamp'\n | 'lineOut'\n | 'link'\n | 'meatballs'\n | 'menu'\n | 'message'\n | 'move'\n | 'mic'\n | 'order'\n | 'paper'\n | 'pause'\n | 'play'\n | 'playBack'\n | 'refresh'\n | 'remove'\n | 'search'\n | 'sidebar'\n | 'star'\n | 'starFilled'\n | 'statusCancelled'\n | 'statusError'\n | 'statusInProgress'\n | 'statusInfo'\n | 'statusNotStarted'\n | 'statusPending'\n | 'statusScheduled'\n | 'statusSerious'\n | 'statusSuccess'\n | 'statusWarning'\n | 'stop'\n | 'table'\n | 'trash'\n | 'userBox'\n | 'view'\n | 'viewHide'\n | 'wallet'\n\n/** Semantic category for grouping icons by purpose */\nexport type IconCategory =\n | 'action'\n | 'communication'\n | 'content'\n | 'feedback'\n | 'media'\n | 'navigation'\n | 'object'\n | 'status'\n | 'user'\n\n/** Enriched metadata for each icon entry in icons.json */\nexport interface IconMetadata {\n /** SVG path data */\n path: string\n /** Display name of the icon */\n name: string\n /** What the icon visually depicts */\n description: string\n /** Semantic category for grouping */\n category: IconCategory\n /** Alternative names and search terms */\n aliases: string[]\n /** When and why to use this icon */\n intent: string\n /** Whether the icon is typically decorative (true) or informative (false) */\n decorativeDefault: boolean\n /** Suggested accessible label when the icon conveys meaning */\n ariaLabelDefault: string\n}\n\n/** The full icon registry keyed by IconName */\nexport type IconRegistry = Record<IconName, IconMetadata>\n\n// Typed as IconRegistry so emitted .d.ts files don't import JSON (needs `resolveJsonModule` in consumers).\nexport const iconsData = iconsJson as IconRegistry\n"],"names":["tokens","tokensJson","iconsData","iconsJson"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACO,IAAMA,MAAM,GAAWC;;ACP9B;AACA;AACA;AAyGA;AACO,IAAMC,SAAS,GAAGC;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"data.js","sources":["../src/types/iconSet.ts","../src/types/tokens.ts","../src/types/icons.ts"],"sourcesContent":["import iconSetJson from '../styles/iconSet.json'\nimport type { IconSet } from './icons'\n\n/**\n * Every icon `Icon` draws, keyed by `IconName`, with its metadata, its source and its shapes\n * (decision 0058). Read it to list icons or to draw one outside `Icon`.\n */\n// Cast through unknown: JSON imports infer arrays, not the element tuples. iconSet.test.ts checks\n// the data really has this shape. Typed so emitted .d.ts files don't import JSON.\nexport const iconSet = iconSetJson as unknown as IconSet\n","import tokensJson from '../styles/tokens.json'\nimport type { Tokens } from '../styles/tokens'\n\n// The published types come from the generated `src/styles/tokens.ts`, which carries each token's\n// description as JSDoc and `@deprecated` on deprecated tokens (decision 0033, #199). Declaring the\n// constant with that type also keeps emitted .d.ts files free of JSON imports, which consumers can\n// only resolve with `resolveJsonModule`.\nexport const tokens: Tokens = tokensJson\n\nexport type { Tokens }\nexport type TokensBase = Tokens['base']\nexport type TokensSemantic = Tokens['semantic']\nexport type TokensComponent = Tokens['component']\n","// Icon type definitions for external consumption\n// This is a self-contained type that doesn't depend on JSON imports\n// to ensure it works correctly in consuming projects\n\nimport iconsJson from '../styles/icons.json'\n\n/**\n * Every icon `Icon` can draw: the keys of `iconSet` (decision 0058). Generated by\n * `npm run icon:add` from `iconSet.json`; don't edit it by hand.\n */\nexport type IconName =\n | 'add'\n | 'addRing'\n | 'ai'\n | 'arrowDown'\n | 'arrowLeft'\n | 'arrowRight'\n | 'arrowUp'\n | 'back'\n | 'bell'\n | 'cancel'\n | 'caret'\n | 'caretDown'\n | 'caretUp'\n | 'check'\n | 'checkRing'\n | 'close'\n | 'copy'\n | 'creditCard'\n | 'crossCircle'\n | 'directionRight'\n | 'directionUp'\n | 'edit'\n | 'export'\n | 'fileDocSearch'\n | 'filter'\n | 'home'\n | 'info'\n | 'kebab'\n | 'lamp'\n | 'lineOut'\n | 'link'\n | 'meatballs'\n | 'menu'\n | 'message'\n | 'mic'\n | 'move'\n | 'order'\n | 'paper'\n | 'pause'\n | 'play'\n | 'playBack'\n | 'refresh'\n | 'remove'\n | 'search'\n | 'sidebar'\n | 'star'\n | 'starFilled'\n | 'statusCancelled'\n | 'statusError'\n | 'statusInProgress'\n | 'statusInfo'\n | 'statusNotStarted'\n | 'statusPending'\n | 'statusScheduled'\n | 'statusSerious'\n | 'statusSuccess'\n | 'statusWarning'\n | 'stop'\n | 'table'\n | 'trash'\n | 'userBox'\n | 'view'\n | 'viewHide'\n | 'wallet'\n\n/** Semantic category for grouping icons by purpose */\nexport type IconCategory =\n | 'action'\n | 'communication'\n | 'content'\n | 'feedback'\n | 'media'\n | 'navigation'\n | 'object'\n | 'status'\n | 'user'\n\n/** Metadata every icon carries, whatever its format */\nexport interface IconDescription {\n /** Display name of the icon */\n name: string\n /** What the icon visually depicts */\n description: string\n /** Semantic category for grouping */\n category: IconCategory\n /** Alternative names and search terms */\n aliases: string[]\n /** When and why to use this icon */\n intent: string\n /** Whether the icon is typically decorative (true) or informative (false) */\n decorativeDefault: boolean\n /** Suggested accessible label when the icon conveys meaning */\n ariaLabelDefault: string\n}\n\n/** The SVG shapes an icon is drawn from */\nexport type IconElementTag = 'path' | 'circle' | 'ellipse' | 'rect' | 'line' | 'polyline' | 'polygon'\n\n/**\n * One shape of an icon: its tag and its geometry attributes (`d`, `cx`, `points`…), on a 24px\n * grid, plus `fill: 'currentColor'` for a filled dot. Lucide's own format, so icons copy across\n * unchanged.\n */\nexport type IconElement = [tag: IconElementTag, attributes: Record<string, string>]\n\n/**\n * How an icon is painted, always in `currentColor`:\n * - `stroke`: 2px lines with round caps and joins, no fill (Lucide icons)\n * - `fill`: solid shapes, no line\n * - `both`: lines and a fill, such as a filled star\n */\nexport type IconPaint = 'stroke' | 'fill' | 'both'\n\n/**\n * Where an icon comes from (decision 0058): copied from Lucide, with its Lucide name, or\n * maintained in this repository. Icons carried over from 3.2.0 are `common-origin` until they move\n * to Lucide.\n */\nexport type IconSource = { library: 'lucide'; name: string } | { library: 'common-origin' }\n\n/** An icon in `iconSet`: its metadata, where it comes from, and how to draw it */\nexport interface IconDefinition extends IconDescription {\n source: IconSource\n paint: IconPaint\n elements: IconElement[]\n}\n\n/** The icon set keyed by IconName */\nexport type IconSet = Record<IconName, IconDefinition>\n\n/**\n * An entry in the frozen `iconsData`: one filled path and its metadata.\n * @deprecated Use `IconDefinition` and `iconSet`. Removed in 4.0 (decision 0058).\n */\nexport interface IconMetadata extends IconDescription {\n /** SVG path data */\n path: string\n}\n\n/**\n * The type of the frozen `iconsData`.\n * @deprecated Use `IconSet` and `iconSet`. Removed in 4.0 (decision 0058).\n */\nexport type IconRegistry = Record<IconName, IconMetadata>\n\n/**\n * The 64 icons as they were in 3.2.0, each one filled path. Frozen: icons added since have no\n * entry here, and `Icon` no longer reads it.\n * @deprecated Use `iconSet`, which holds every icon `Icon` draws. Removed in 4.0 (decision 0058).\n */\n// Typed as IconRegistry so emitted .d.ts files don't import JSON (needs `resolveJsonModule` in consumers).\nexport const iconsData = iconsJson as IconRegistry\n"],"names":["iconSet","iconSetJson","tokens","tokensJson","iconsData","iconsJson"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACP9B;AACA;AACA;AA0JA;;;;AAIG;AACH;AACO,IAAMC,SAAS,GAAGC;;;;;;;"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './components/index.mjs';
|
|
2
2
|
export { tokens, type Tokens, type TokensBase, type TokensSemantic, type TokensComponent, } from './types/tokens.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { iconSet } from './types/iconSet.mjs';
|
|
4
|
+
export { iconsData, type IconName, type IconCategory, type IconDescription, type IconDefinition, type IconElement, type IconElementTag, type IconPaint, type IconSet, type IconSource, type IconMetadata, type IconRegistry, } from './types/icons.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export { tokens, type Tokens, type TokensBase, type TokensSemantic, type TokensComponent, } from './types/tokens';
|
|
3
|
-
export {
|
|
3
|
+
export { iconSet } from './types/iconSet';
|
|
4
|
+
export { iconsData, type IconName, type IconCategory, type IconDescription, type IconDefinition, type IconElement, type IconElementTag, type IconPaint, type IconSet, type IconSource, type IconMetadata, type IconRegistry, } from './types/icons';
|
package/dist/index.js
CHANGED
|
@@ -74,6 +74,7 @@ exports.Tooltip = client.Tooltip;
|
|
|
74
74
|
exports.TransactionListItem = client.TransactionListItem;
|
|
75
75
|
exports.Typography = client.Typography;
|
|
76
76
|
exports.WorkspaceSwitcher = client.WorkspaceSwitcher;
|
|
77
|
+
exports.iconSet = data.iconSet;
|
|
77
78
|
exports.iconsData = data.iconsData;
|
|
78
79
|
exports.tokens = data.tokens;
|
|
79
80
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -55,5 +55,6 @@ export { WorkspaceSwitcher } from './components/molecules/WorkspaceSwitcher/Work
|
|
|
55
55
|
export { SidebarNav } from './components/organisms/SidebarNav/SidebarNav.mjs';
|
|
56
56
|
export { Grid, GridCol, ResponsiveGrid } from './components/layout/GridSystem/GridSystem.mjs';
|
|
57
57
|
export { tokens } from './types/tokens.mjs';
|
|
58
|
+
export { iconSet } from './types/iconSet.mjs';
|
|
58
59
|
export { iconsData } from './types/icons.mjs';
|
|
59
60
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
// Shape indicators for the six coloured statuses (decision 0045): filled silhouettes on the
|
|
3
|
-
// 24px grid
|
|
3
|
+
// 24px grid. Each status icon draws its outline along the same path as a 2px line (decision 0058). Internal: they aren't public icons, so a
|
|
4
4
|
// bare shape can't be shown without its label. The shape indicator (#264) and the small
|
|
5
5
|
// StatusLabel and InlineAlert sizes render them at 12px or more, with a darker edge.
|
|
6
6
|
var statusShapes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusShapes.mjs","sources":["../../src/lib/statusShapes.ts"],"sourcesContent":["// Shape indicators for the six coloured statuses (decision 0045): filled silhouettes on the\n// 24px grid
|
|
1
|
+
{"version":3,"file":"statusShapes.mjs","sources":["../../src/lib/statusShapes.ts"],"sourcesContent":["// Shape indicators for the six coloured statuses (decision 0045): filled silhouettes on the\n// 24px grid. Each status icon draws its outline along the same path as a 2px line (decision 0058). Internal: they aren't public icons, so a\n// bare shape can't be shown without its label. The shape indicator (#264) and the small\n// StatusLabel and InlineAlert sizes render them at 12px or more, with a darker edge.\n\nexport type StatusShape = 'error' | 'serious' | 'warning' | 'success' | 'info' | 'inProgress'\n\nexport const statusShapes: Record<StatusShape, string> = {\n error: 'M22.5 12L17.25 21.0933L6.75 21.0933L1.5 12L6.75 2.9067L17.25 2.9067Z',\n serious: 'M12 2L22 12L12 22L2 12Z',\n warning: 'M12 2.5L22 20.5L2 20.5Z',\n success: 'M12 2A10 10 0 1 1 12 22A10 10 0 1 1 12 2Z',\n info: 'M7 2H17A5 5 0 0 1 22 7V17A5 5 0 0 1 17 22H7A5 5 0 0 1 2 17V7A5 5 0 0 1 7 2Z',\n inProgress: 'M12 2A10 10 0 1 1 12 22A10 10 0 1 1 12 2ZM12 4A8 8 0 1 0 12 20A8 8 0 1 0 12 4ZM12 6A6 6 0 0 1 12 18Z',\n}\n"],"names":["statusShapes","error","serious","warning","success","info","inProgress"],"mappings":";AAAA;AACA;AACA;AACA;AAIO,IAAMA,YAAY,GAAgC;AACvDC,EAAAA,KAAK,EAAE,sEAAsE;AAC7EC,EAAAA,OAAO,EAAE,yBAAyB;AAClCC,EAAAA,OAAO,EAAE,yBAAyB;AAClCC,EAAAA,OAAO,EAAE,2CAA2C;AACpDC,EAAAA,IAAI,EAAE,6EAA6E;AACnFC,EAAAA,UAAU,EAAE,sGAAA;;;;;"}
|
|
@@ -21,6 +21,10 @@ export declare const forcedColorsEdge: string;
|
|
|
21
21
|
export declare const reducedMotion = "@media (prefers-reduced-motion: reduce)";
|
|
22
22
|
export declare const exitAnimation: import("styled-components").RuleSet<object>;
|
|
23
23
|
export declare const visuallyHidden: import("styled-components").RuleSet<object>;
|
|
24
|
+
/** Corner radius of a button inside a field (a stepper, a clear or show-password button): one step tighter than the field, so its corner nests (decision 0055). */
|
|
25
|
+
export declare const fieldButtonRadius: string;
|
|
26
|
+
/** Corner radius every row and tab shares: the control radius (decision 0055). */
|
|
27
|
+
export declare const rowRadius: string;
|
|
24
28
|
export interface RowState {
|
|
25
29
|
background: string;
|
|
26
30
|
text?: string;
|
package/dist/lib/styleUtils.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export declare const forcedColorsEdge: string;
|
|
|
21
21
|
export declare const reducedMotion = "@media (prefers-reduced-motion: reduce)";
|
|
22
22
|
export declare const exitAnimation: import("styled-components").RuleSet<object>;
|
|
23
23
|
export declare const visuallyHidden: import("styled-components").RuleSet<object>;
|
|
24
|
+
/** Corner radius of a button inside a field (a stepper, a clear or show-password button): one step tighter than the field, so its corner nests (decision 0055). */
|
|
25
|
+
export declare const fieldButtonRadius: string;
|
|
26
|
+
/** Corner radius every row and tab shares: the control radius (decision 0055). */
|
|
27
|
+
export declare const rowRadius: string;
|
|
24
28
|
export interface RowState {
|
|
25
29
|
background: string;
|
|
26
30
|
text?: string;
|
package/dist/lib/styleUtils.mjs
CHANGED
|
@@ -69,6 +69,10 @@ var visuallyHidden = css(templateObject_3 || (templateObject_3 = __makeTemplateO
|
|
|
69
69
|
var _a = tokens.semantic.color,
|
|
70
70
|
rowFill = _a.fill,
|
|
71
71
|
rowText = _a.text;
|
|
72
|
+
/** Corner radius of a button inside a field (a stepper, a clear or show-password button): one step tighter than the field, so its corner nests (decision 0055). */
|
|
73
|
+
var fieldButtonRadius = tokens.semantic.radius.sm;
|
|
74
|
+
/** Corner radius every row and tab shares: the control radius (decision 0055). */
|
|
75
|
+
var rowRadius = tokens.semantic.radius.md;
|
|
72
76
|
var rowStates = {
|
|
73
77
|
unselected: {
|
|
74
78
|
rest: {
|
|
@@ -156,5 +160,5 @@ var rowForcedColors = function rowForcedColors(_a) {
|
|
|
156
160
|
};
|
|
157
161
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
158
162
|
|
|
159
|
-
export { breakpoints, exitAnimation, forcedColors, forcedColorsEdge, interactiveRow, media, reducedMotion, rowStates, visuallyHidden };
|
|
163
|
+
export { breakpoints, exitAnimation, fieldButtonRadius, forcedColors, forcedColorsEdge, interactiveRow, media, reducedMotion, rowRadius, rowStates, visuallyHidden };
|
|
160
164
|
//# sourceMappingURL=styleUtils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styleUtils.mjs","sources":["../../src/lib/styleUtils.ts"],"sourcesContent":["import { css, keyframes } from 'styled-components'\nimport tokens from './cssTokens'\n\n// Breakpoints from the semantic tokens (decision 0014)\nexport const breakpoints = {\n xs: tokens.semantic.breakpoint.xs,\n sm: tokens.semantic.breakpoint.sm,\n md: tokens.semantic.breakpoint.md,\n lg: tokens.semantic.breakpoint.lg,\n xl: tokens.semantic.breakpoint.xl,\n '2xl': tokens.semantic.breakpoint['2xl'],\n}\n\n// Media query helpers\nexport const media = {\n xs: `@media (min-width: ${breakpoints.xs})`,\n sm: `@media (min-width: ${breakpoints.sm})`,\n md: `@media (min-width: ${breakpoints.md})`,\n lg: `@media (min-width: ${breakpoints.lg})`,\n xl: `@media (min-width: ${breakpoints.xl})`,\n '2xl': `@media (min-width: ${breakpoints['2xl']})`,\n}\n\n// Windows Contrast Themes and other forced-colours modes (decision 0038). The browser swaps in\n// the user's system colours, drops background colours and box-shadows, and keeps borders and\n// outlines. Inside this query, give a control that shows its edge with a fill alone a border,\n// and draw selected and checked states with system colours: ButtonText for control edges,\n// Highlight and HighlightText for selected and checked, GrayText for disabled, CanvasText for\n// content. Use forced-color-adjust: none only on a fill that carries state.\nexport const forcedColors = '@media (forced-colors: active)'\n\n/** A control's edge in forced colours, for a control that shows its edge with a fill alone. The\n * border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */\nexport const forcedColorsEdge = `${forcedColors} {\n border: ${tokens.semantic.border.width.thin} solid currentColor;\n}`\n\n// Wrap fallbacks for people who ask for less motion (decision 0005): movement becomes\n// an instant change or a simple fade. Colour and opacity transitions need no fallback.\nexport const reducedMotion = '@media (prefers-reduced-motion: reduce)'\n\n// No `from` keyframe: the fade starts from the element's current opacity, including a\n// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.\nconst fadeOut = keyframes`\n to { opacity: 0; }\n`\n\n// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of\n// the element's `animation` declarations while it exits: the entrance stays in the list,\n// so it isn't restarted, and the fade runs on top of it. A fade is already the\n// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop\n// still catches clicks (so they can't reach the page behind it) and the panel is inert.\n// Exits accelerate: things leaving speed up as they go (decision 0037).\nexport const exitAnimation = css`, ${fadeOut} ${tokens.semantic.motion.duration.fast} ${tokens.semantic.motion.easing.accelerate} forwards`\n\n// Content for screen readers only. The 1px size and -1px margin are part of the standard\n// visually-hidden technique, not design values, so they aren't tokens.\nexport const visuallyHidden = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`\n\n// One interaction pattern for rows and items: list items, menu and listbox options, sidebars\n// (decision 0030). Unselected rows follow the naked Button's ladder; selected rows follow the\n// light-blue selected ladder, with the text darkening with its fill (decision 0016). Unselected\n// rows leave their text colour to the component, so a destructive row can stay red.\nconst { fill: rowFill, text: rowText } = tokens.semantic.color\n\nexport interface RowState {\n background: string\n text?: string\n}\n\nexport const rowStates: Record<'unselected' | 'selected', Record<'rest' | 'hover' | 'pressed', RowState>> = {\n unselected: {\n rest: { background: 'transparent' },\n hover: { background: rowFill.muted },\n pressed: { background: rowFill.default },\n },\n selected: {\n rest: { background: rowFill['accent-muted'], text: rowText.accent },\n hover: { background: rowFill['accent-muted-hover'], text: rowText.accent },\n pressed: { background: rowFill['accent-muted-pressed'], text: rowText.accent },\n },\n}\n\nconst rowDeclarations = ({ background, text }: RowState, textSelector?: string) => {\n if (!text) return `background-color: ${background};`\n return textSelector\n ? `background-color: ${background};\\n ${textSelector} { color: ${text}; }`\n : `background-color: ${background};\\n color: ${text};`\n}\n\n/**\n * The background (and, when selected, text) of an interactive row in every state.\n * - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under\n * aria-activedescendant. It shows the hover state.\n * - `disabled`: shows the resting state, with no hover or press.\n * - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example\n * text set by Typography. Pass it without `&`.\n */\nexport const interactiveRow = ({\n selected = false,\n focused = false,\n disabled = false,\n textSelector,\n}: {\n selected?: boolean\n focused?: boolean\n disabled?: boolean\n textSelector?: string\n} = {}) => {\n const states = selected ? rowStates.selected : rowStates.unselected\n if (disabled) return `${rowDeclarations(states.rest, textSelector)}\\n${rowForcedColors({ selected, focused, disabled, textSelector })}`\n return `\n ${rowDeclarations(focused ? states.hover : states.rest, textSelector)}\n\n &:hover {\n ${rowDeclarations(states.hover, textSelector)}\n }\n\n &:active {\n ${rowDeclarations(states.pressed, textSelector)}\n }\n\n ${rowForcedColors({ selected, focused, disabled, textSelector })}\n`\n}\n\n// Rows in forced colours (decision 0038): fills are dropped, so a selected row takes the system\n// selection colours, and a hovered or keyboard-active row is outlined in Highlight.\nconst rowForcedColors = ({\n selected,\n focused,\n disabled,\n textSelector,\n}: {\n selected: boolean\n focused: boolean\n disabled: boolean\n textSelector?: string\n}) => {\n const text = (color: string) => (textSelector ? `color: ${color};\\n ${textSelector} { color: ${color}; }` : `color: ${color};`)\n const hover = `outline: ${tokens.semantic.border.width.thin} solid Highlight;\\n outline-offset: calc(-1 * ${tokens.semantic.border.width.thin});`\n // A row that doesn't respond (disabled, or not interactive at all) keeps its selection but has\n // no hover outline. Disabled text is the component's to colour: callers also pass this for\n // static rows, which must stay CanvasText.\n // A selected row keeps forced-color-adjust: auto: the browser keeps system colours an author\n // sets, so the row stays Highlight with HighlightText. Its descendants' own colours would be\n // forced to CanvasText, so they inherit HighlightText, and anything drawn with a fill inside\n // (a chip or tag as the row's badge) drops it and keeps its edge. The doubled class outranks\n // the descendants' own rules.\n return `${forcedColors} {\n ${selected ? `background-color: Highlight;\\n ${text('HighlightText')}\\n && * {\\n color: inherit;\\n background-color: transparent;\\n }` : ''}\n ${!disabled && focused ? hover : ''}\n ${disabled ? '' : `&:hover {\\n ${hover}\\n }`}\n }`\n}\n"],"names":["breakpoints","xs","tokens","semantic","breakpoint","sm","md","lg","xl","media","concat","forcedColors","forcedColorsEdge","border","width","thin","reducedMotion","fadeOut","keyframes","templateObject_1","__makeTemplateObject","exitAnimation","css","templateObject_2","motion","duration","fast","easing","accelerate","visuallyHidden","_a","color","rowFill","fill","rowText","text","rowStates","unselected","rest","background","hover","muted","pressed","selected","accent","rowDeclarations","textSelector","interactiveRow","_b","_c","_d","focused","_e","disabled","states","rowForcedColors"],"mappings":";;;;;AAGA;AACO,IAAMA,WAAW,GAAG;AACzBC,EAAAA,EAAE,EAAEC,MAAM,CAACC,QAAQ,CAACC,UAAU,CAACH,EAAE;AACjCI,EAAAA,EAAE,EAAEH,MAAM,CAACC,QAAQ,CAACC,UAAU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AhB,EAAA,CAAAgB,YAAA,CAAA;AAOZ,EAAA,IAAMX,IAAI,GAAG,SAAPA,IAAIA,CAAIJ,KAAa,EAAA;AAAK,IAAA,OAACe,YAAY,GAAG,SAAU,CAAApC,MAAA,CAAAqB,KAAK,EAAU,SAAA,CAAA,CAAArB,MAAA,CAAAoC,YAAY,EAAa,YAAA,CAAA,CAAApC,MAAA,CAAAqB,KAAK,EAAK,KAAA,CAAA,GAAG,SAAU,CAAArB,MAAA,CAAAqB,KAAK,EAAG,GAAA,CAAA,CAAA;GAAC,CAAA;AAClI,EAAA,IAAMS,KAAK,GAAG,WAAY,CAAA9B,MAAA,CAAAR,MAAM,CAACC,QAAQ,CAACU,MAAM,CAACC,KAAK,CAACC,IAAI,EAAsD,qDAAA,CAAA,CAAAL,MAAA,CAAAR,MAAM,CAACC,QAAQ,CAACU,MAAM,CAACC,KAAK,CAACC,IAAI,EAAA,IAAA,CAAI,CAAA;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,OAAO,UAAGJ,YAAY,EAAA,UAAA,CAAA,CAAAD,MAAA,CAClBiC,QAAQ,GAAG,oCAAqC,CAAAjC,MAAA,CAAAyB,IAAI,CAAC,eAAe,CAAC,qFAAkF,GAAG,EAAE,EAAA,QAAA,CAAA,CAAAzB,MAAA,CAC5J,CAAC2C,QAAQ,IAAIF,OAAO,GAAGX,KAAK,GAAG,EAAE,mBACjCa,QAAQ,GAAG,EAAE,GAAG,2BAAoBb,KAAK,EAAA,SAAA,CAAS,UACpD,CAAA;AACJ,CAAC,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"styleUtils.mjs","sources":["../../src/lib/styleUtils.ts"],"sourcesContent":["import { css, keyframes } from 'styled-components'\nimport tokens from './cssTokens'\n\n// Breakpoints from the semantic tokens (decision 0014)\nexport const breakpoints = {\n xs: tokens.semantic.breakpoint.xs,\n sm: tokens.semantic.breakpoint.sm,\n md: tokens.semantic.breakpoint.md,\n lg: tokens.semantic.breakpoint.lg,\n xl: tokens.semantic.breakpoint.xl,\n '2xl': tokens.semantic.breakpoint['2xl'],\n}\n\n// Media query helpers\nexport const media = {\n xs: `@media (min-width: ${breakpoints.xs})`,\n sm: `@media (min-width: ${breakpoints.sm})`,\n md: `@media (min-width: ${breakpoints.md})`,\n lg: `@media (min-width: ${breakpoints.lg})`,\n xl: `@media (min-width: ${breakpoints.xl})`,\n '2xl': `@media (min-width: ${breakpoints['2xl']})`,\n}\n\n// Windows Contrast Themes and other forced-colours modes (decision 0038). The browser swaps in\n// the user's system colours, drops background colours and box-shadows, and keeps borders and\n// outlines. Inside this query, give a control that shows its edge with a fill alone a border,\n// and draw selected and checked states with system colours: ButtonText for control edges,\n// Highlight and HighlightText for selected and checked, GrayText for disabled, CanvasText for\n// content. Use forced-color-adjust: none only on a fill that carries state.\nexport const forcedColors = '@media (forced-colors: active)'\n\n/** A control's edge in forced colours, for a control that shows its edge with a fill alone. The\n * border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */\nexport const forcedColorsEdge = `${forcedColors} {\n border: ${tokens.semantic.border.width.thin} solid currentColor;\n}`\n\n// Wrap fallbacks for people who ask for less motion (decision 0005): movement becomes\n// an instant change or a simple fade. Colour and opacity transitions need no fallback.\nexport const reducedMotion = '@media (prefers-reduced-motion: reduce)'\n\n// No `from` keyframe: the fade starts from the element's current opacity, including a\n// still-running entrance, so closing mid-entrance doesn't jump back to fully visible.\nconst fadeOut = keyframes`\n to { opacity: 0; }\n`\n\n// Exit for overlays that unmount (use with usePresence). Append `exitAnimation` to each of\n// the element's `animation` declarations while it exits: the entrance stays in the list,\n// so it isn't restarted, and the fade runs on top of it. A fade is already the\n// reduced-motion form, so it needs no fallback of its own. While it fades, the backdrop\n// still catches clicks (so they can't reach the page behind it) and the panel is inert.\n// Exits accelerate: things leaving speed up as they go (decision 0037).\nexport const exitAnimation = css`, ${fadeOut} ${tokens.semantic.motion.duration.fast} ${tokens.semantic.motion.easing.accelerate} forwards`\n\n// Content for screen readers only. The 1px size and -1px margin are part of the standard\n// visually-hidden technique, not design values, so they aren't tokens.\nexport const visuallyHidden = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`\n\n// One interaction pattern for rows and items: list items, menu and listbox options, sidebars\n// (decision 0030). Unselected rows follow the naked Button's ladder; selected rows follow the\n// light-blue selected ladder, with the text darkening with its fill (decision 0016). Unselected\n// rows leave their text colour to the component, so a destructive row can stay red.\nconst { fill: rowFill, text: rowText } = tokens.semantic.color\n\n/** Corner radius of a button inside a field (a stepper, a clear or show-password button): one step tighter than the field, so its corner nests (decision 0055). */\nexport const fieldButtonRadius = tokens.semantic.radius.sm\n\n/** Corner radius every row and tab shares: the control radius (decision 0055). */\nexport const rowRadius = tokens.semantic.radius.md\n\nexport interface RowState {\n background: string\n text?: string\n}\n\nexport const rowStates: Record<'unselected' | 'selected', Record<'rest' | 'hover' | 'pressed', RowState>> = {\n unselected: {\n rest: { background: 'transparent' },\n hover: { background: rowFill.muted },\n pressed: { background: rowFill.default },\n },\n selected: {\n rest: { background: rowFill['accent-muted'], text: rowText.accent },\n hover: { background: rowFill['accent-muted-hover'], text: rowText.accent },\n pressed: { background: rowFill['accent-muted-pressed'], text: rowText.accent },\n },\n}\n\nconst rowDeclarations = ({ background, text }: RowState, textSelector?: string) => {\n if (!text) return `background-color: ${background};`\n return textSelector\n ? `background-color: ${background};\\n ${textSelector} { color: ${text}; }`\n : `background-color: ${background};\\n color: ${text};`\n}\n\n/**\n * The background (and, when selected, text) of an interactive row in every state.\n * - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under\n * aria-activedescendant. It shows the hover state.\n * - `disabled`: shows the resting state, with no hover or press.\n * - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example\n * text set by Typography. Pass it without `&`.\n */\nexport const interactiveRow = ({\n selected = false,\n focused = false,\n disabled = false,\n textSelector,\n}: {\n selected?: boolean\n focused?: boolean\n disabled?: boolean\n textSelector?: string\n} = {}) => {\n const states = selected ? rowStates.selected : rowStates.unselected\n if (disabled) return `${rowDeclarations(states.rest, textSelector)}\\n${rowForcedColors({ selected, focused, disabled, textSelector })}`\n return `\n ${rowDeclarations(focused ? states.hover : states.rest, textSelector)}\n\n &:hover {\n ${rowDeclarations(states.hover, textSelector)}\n }\n\n &:active {\n ${rowDeclarations(states.pressed, textSelector)}\n }\n\n ${rowForcedColors({ selected, focused, disabled, textSelector })}\n`\n}\n\n// Rows in forced colours (decision 0038): fills are dropped, so a selected row takes the system\n// selection colours, and a hovered or keyboard-active row is outlined in Highlight.\nconst rowForcedColors = ({\n selected,\n focused,\n disabled,\n textSelector,\n}: {\n selected: boolean\n focused: boolean\n disabled: boolean\n textSelector?: string\n}) => {\n const text = (color: string) => (textSelector ? `color: ${color};\\n ${textSelector} { color: ${color}; }` : `color: ${color};`)\n const hover = `outline: ${tokens.semantic.border.width.thin} solid Highlight;\\n outline-offset: calc(-1 * ${tokens.semantic.border.width.thin});`\n // A row that doesn't respond (disabled, or not interactive at all) keeps its selection but has\n // no hover outline. Disabled text is the component's to colour: callers also pass this for\n // static rows, which must stay CanvasText.\n // A selected row keeps forced-color-adjust: auto: the browser keeps system colours an author\n // sets, so the row stays Highlight with HighlightText. Its descendants' own colours would be\n // forced to CanvasText, so they inherit HighlightText, and anything drawn with a fill inside\n // (a chip or tag as the row's badge) drops it and keeps its edge. The doubled class outranks\n // the descendants' own rules.\n return `${forcedColors} {\n ${selected ? `background-color: Highlight;\\n ${text('HighlightText')}\\n && * {\\n color: inherit;\\n background-color: transparent;\\n }` : ''}\n ${!disabled && focused ? hover : ''}\n ${disabled ? '' : `&:hover {\\n ${hover}\\n }`}\n }`\n}\n"],"names":["breakpoints","xs","tokens","semantic","breakpoint","sm","md","lg","xl","media","concat","forcedColors","forcedColorsEdge","border","width","thin","reducedMotion","fadeOut","keyframes","templateObject_1","__makeTemplateObject","exitAnimation","css","templateObject_2","motion","duration","fast","easing","accelerate","visuallyHidden","_a","color","rowFill","fill","rowText","text","fieldButtonRadius","radius","rowRadius","rowStates","unselected","rest","background","hover","muted","pressed","selected","accent","rowDeclarations","textSelector","interactiveRow","_b","_c","_d","focused","_e","disabled","states","rowForcedColors"],"mappings":";;;;;AAGA;AACO,IAAMA,WAAW,GAAG;AACzBC,EAAAA,EAAE,EAAEC,MAAM,CAACC,QAAQ,CAACC,UAAU,CAACH,EAAE;AACjCI,EAAAA,EAAE,EAAEH,MAAM,CAACC,QAAQ,CAACC,UAAU,CAACC,EAAE;AACjCC,EAAAA,EAAE,EAAEJ,MAAM,CAACC,QAAQ,CAACC,UAAU,CAACE,EAAE;AACjCC,EAAAA,EAAE,EAAEL,MAAM,CAACC,QAAQ,CAACC,UAAU,CAACG,EAAE;AACjCC,EAAAA,EAAE,EAAEN,MAAM,CAACC,QAAQ,CAACC,UAAU,CAACI,EAAE;AACjC,EAAA,KAAK,EAAEN,MAAM,CAACC,QAAQ,CAACC,UAAU,CAAC,KAAK,CAAA;EACxC;AAED;AACO,IAAMK,KAAK,GAAG;EACnBR,EAAE,EAAE,qBAAA,CAAAS,MAAA,CAAsBV,WAAW,CAACC,EAAE,EAAG,GAAA,CAAA;EAC3CI,EAAE,EAAE,qBAAA,CAAAK,MAAA,CAAsBV,WAAW,CAACK,EAAE,EAAG,GAAA,CAAA;EAC3CC,EAAE,EAAE,qBAAA,CAAAI,MAAA,CAAsBV,WAAW,CAACM,EAAE,EAAG,GAAA,CAAA;EAC3CC,EAAE,EAAE,qBAAA,CAAAG,MAAA,CAAsBV,WAAW,CAACO,EAAE,EAAG,GAAA,CAAA;EAC3CC,EAAE,EAAE,qBAAA,CAAAE,MAAA,CAAsBV,WAAW,CAACQ,EAAE,EAAG,GAAA,CAAA;EAC3C,KAAK,EAAE,qBAAsB,CAAAE,MAAA,CAAAV,WAAW,CAAC,KAAK,CAAC,EAAG,GAAA,CAAA;EACnD;AAED;AACA;AACA;AACA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AQ,GAAG,oCAAqC,CAAApC,MAAA,CAAAyB,IAAI,CAAC,eAAe,CAAC,qFAAkF,GAAG,EAAE,EAAA,QAAA,CAAA,CAAAzB,MAAA,CAC5J,CAAC8C,QAAQ,IAAIF,OAAO,GAAGX,KAAK,GAAG,EAAE,mBACjCa,QAAQ,GAAG,EAAE,GAAG,2BAAoBb,KAAK,EAAA,SAAA,CAAS,UACpD,CAAA;AACJ,CAAC,CAAA;;;;;"}
|
|
@@ -47,6 +47,7 @@ var radiusByKey = {
|
|
|
47
47
|
var backgroundByPath = {
|
|
48
48
|
'surface.base': surface.base,
|
|
49
49
|
'surface.raised': surface.raised,
|
|
50
|
+
'surface.overlay': surface.overlay,
|
|
50
51
|
'surface.scrim': surface.scrim,
|
|
51
52
|
'color.fill.emphasis': color.fill.emphasis,
|
|
52
53
|
'color.fill.muted': color.fill.muted,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenAliases.mjs","sources":["../../src/lib/tokenAliases.ts"],"sourcesContent":["import tokens from './cssTokens'\nimport type { Tokens } from '../types/tokens'\n\n// Box's spacing and radius props keep their own names, which 3.0 decoupled from the removed\n// spacing.layout and border.radius tokens (P7, #99), and read the semantic grammar's tokens\n// (decision 0031). Each map covers every key the prop type allows, so TypeScript fails here if a\n// key is added without a mapping.\nconst { semantic } = tokens\nconst { color, space, radius, surface } = semantic\n\ntype Semantic = Tokens['semantic']\n\n/** Box's spacing values (`p`, `m`, `gap`…), each a `space` step, plus `auto`. */\nexport type BoxSpace =\n | 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | '10xl' | '11xl'\n | 'auto'\n\n/** Box's spacing props: each name maps to the space step that replaced its spacing.layout token. */\nexport const spaceByLayoutKey: Record<BoxSpace, string> = {\n none: space[0],\n xs: space[100],\n sm: space[200],\n md: space[300],\n lg: space[400],\n xl: space[500],\n '2xl': space[600],\n '3xl': space[700],\n '4xl': space[800],\n '5xl': space[900],\n '6xl': space[1000],\n '7xl': space[1200],\n '8xl': space[1400],\n '9xl': space[1600],\n '10xl': space[2000],\n '11xl': space[2400],\n // A keyword, not a step (0031)\n auto: semantic.spacing.layout.auto,\n}\n\n/** Box's `borderRadius` values: the `radius` steps, with `circle` for `full`. */\nexport type BoxRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'circle'\n\n/** Box's `borderRadius` prop, read from `radius`. */\nexport const radiusByKey: Record<BoxRadius, string> = {\n none: radius.none,\n xs: radius.xs,\n sm: radius.sm,\n md: radius.md,\n lg: radius.lg,\n xl: radius.xl,\n '2xl': radius['2xl'],\n '3xl': radius['3xl'],\n circle: radius.full,\n}\n\n/**\n * Box's `bg` values in the semantic grammar (decision 0031, #304): the token's path below\n * `semantic`, such as `surface.raised` or `color.fill.muted`.\n */\nexport type BackgroundPath =\n | `surface.${keyof Semantic['surface']}`\n | `color.fill.${keyof Semantic['color']['fill']}`\n\n/** Box's `bg` prop: the grammar's token paths, read from the token at that path. */\nexport const backgroundByPath: Record<BackgroundPath, string> = {\n 'surface.base': surface.base,\n 'surface.raised': surface.raised,\n 'surface.scrim': surface.scrim,\n 'color.fill.emphasis': color.fill.emphasis,\n 'color.fill.muted': color.fill.muted,\n 'color.fill.inverse': color.fill.inverse,\n 'color.fill.accent': color.fill.accent,\n 'color.fill.accent-hover': color.fill['accent-hover'],\n 'color.fill.accent-pressed': color.fill['accent-pressed'],\n 'color.fill.accent-muted': color.fill['accent-muted'],\n 'color.fill.accent-muted-hover': color.fill['accent-muted-hover'],\n 'color.fill.accent-muted-pressed': color.fill['accent-muted-pressed'],\n 'color.fill.danger': color.fill.danger,\n 'color.fill.danger-hover': color.fill['danger-hover'],\n 'color.fill.danger-pressed': color.fill['danger-pressed'],\n 'color.fill.danger-muted': color.fill['danger-muted'],\n 'color.fill.success': color.fill.success,\n 'color.fill.success-muted': color.fill['success-muted'],\n 'color.fill.warning': color.fill.warning,\n 'color.fill.warning-muted': color.fill['warning-muted'],\n 'color.fill.serious': color.fill.serious,\n 'color.fill.serious-muted': color.fill['serious-muted'],\n 'color.fill.ai-muted': color.fill['ai-muted'],\n 'color.fill.disabled': color.fill.disabled,\n 'color.fill.default': color.fill.default,\n 'color.fill.default-hover': color.fill['default-hover'],\n 'color.fill.default-pressed': color.fill['default-pressed'],\n 'color.fill.none': color.fill.none,\n 'color.fill.none-hover': color.fill['none-hover'],\n 'color.fill.none-pressed': color.fill['none-pressed'],\n 'color.fill.inverse-none-hover': color.fill['inverse-none-hover'],\n}\n\n/** Box's `color` prop: the text colours. */\nexport const textColorByKey: Record<keyof Semantic['color']['text'], string> = color.text\n\n/** Box's border props: the border colours. */\nexport const borderColorByKey: Record<keyof Semantic['color']['border'], string> = color.border\n"],"names":["semantic","tokens","color","space","radius","surface","spaceByLayoutKey","none","xs","sm","md","lg","xl","auto","spacing","layout","radiusByKey","circle","full","backgroundByPath","base","raised","scrim","fill","emphasis","muted","inverse","accent","danger","success","warning","serious","disabled","textColorByKey","text","borderColorByKey","border"],"mappings":";;;AAGA;AACA;AACA;AACA;AACQ,IAAAA,QAAQ,GAAKC,MAAM,CAAAD,QAAX,CAAA;AACR,IAAAE,KAAK,GAA6BF,QAAQ,MAArC;EAAEG,KAAK,GAAsBH,QAAQ,CAAAG,KAA9B;EAAEC,MAAM,GAAcJ,QAAQ,CAAtBI,MAAA;EAAEC,OAAO,GAAKL,QAAQ,QAAb,CAAA;AAUrC;AACO,IAAMM,gBAAgB,GAA6B;AACxDC,EAAAA,IAAI,EAAEJ,KAAK,CAAC,CAAC,CAAC;AACdK,EAAAA,EAAE,EAAEL,KAAK,CAAC,GAAG,CAAC;AACdM,EAAAA,EAAE,EAAEN,KAAK,CAAC,GAAG,CAAC;AACdO,EAAAA,EAAE,EAAEP,KAAK,CAAC,GAAG,CAAC;AACdQ,EAAAA,EAAE,EAAER,KAAK,CAAC,GAAG,CAAC;AACdS,EAAAA,EAAE,EAAET,KAAK,CAAC,GAAG,CAAC;AACd,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,MAAM,EAAEA,KAAK,CAAC,IAAI,CAAC;AACnB,EAAA,MAAM,EAAEA,KAAK,CAAC,IAAI,CAAC;AACnB;AACAU,EAAAA,IAAI,EAAEb,QAAQ,CAACc,OAAO,CAACC,MAAM,CAACF,IAAAA;EAC/B;AAKD;AACO,IAAMG,WAAW,GAA8B;EACpDT,IAAI,EAAEH,MAAM,CAACG,IAAI;EACjBC,EAAE,EAAEJ,MAAM,CAACI,EAAE;EACbC,EAAE,EAAEL,MAAM,CAACK,EAAE;EACbC,EAAE,EAAEN,MAAM,CAACM,EAAE;EACbC,EAAE,EAAEP,MAAM,CAACO,EAAE;EACbC,EAAE,EAAER,MAAM,CAACQ,EAAE;AACb,EAAA,KAAK,EAAER,MAAM,CAAC,KAAK,CAAC;AACpB,EAAA,KAAK,EAAEA,MAAM,CAAC,KAAK,CAAC;EACpBa,MAAM,EAAEb,MAAM,CAACc,IAAAA;EAChB;AAUD;AACO,IAAMC,gBAAgB,GAAmC;EAC9D,cAAc,EAAEd,OAAO,CAACe,IAAI;EAC5B,gBAAgB,EAAEf,OAAO,CAACgB,MAAM;EAChC,
|
|
1
|
+
{"version":3,"file":"tokenAliases.mjs","sources":["../../src/lib/tokenAliases.ts"],"sourcesContent":["import tokens from './cssTokens'\nimport type { Tokens } from '../types/tokens'\n\n// Box's spacing and radius props keep their own names, which 3.0 decoupled from the removed\n// spacing.layout and border.radius tokens (P7, #99), and read the semantic grammar's tokens\n// (decision 0031). Each map covers every key the prop type allows, so TypeScript fails here if a\n// key is added without a mapping.\nconst { semantic } = tokens\nconst { color, space, radius, surface } = semantic\n\ntype Semantic = Tokens['semantic']\n\n/** Box's spacing values (`p`, `m`, `gap`…), each a `space` step, plus `auto`. */\nexport type BoxSpace =\n | 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | '10xl' | '11xl'\n | 'auto'\n\n/** Box's spacing props: each name maps to the space step that replaced its spacing.layout token. */\nexport const spaceByLayoutKey: Record<BoxSpace, string> = {\n none: space[0],\n xs: space[100],\n sm: space[200],\n md: space[300],\n lg: space[400],\n xl: space[500],\n '2xl': space[600],\n '3xl': space[700],\n '4xl': space[800],\n '5xl': space[900],\n '6xl': space[1000],\n '7xl': space[1200],\n '8xl': space[1400],\n '9xl': space[1600],\n '10xl': space[2000],\n '11xl': space[2400],\n // A keyword, not a step (0031)\n auto: semantic.spacing.layout.auto,\n}\n\n/** Box's `borderRadius` values: the `radius` steps, with `circle` for `full`. */\nexport type BoxRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'circle'\n\n/** Box's `borderRadius` prop, read from `radius`. */\nexport const radiusByKey: Record<BoxRadius, string> = {\n none: radius.none,\n xs: radius.xs,\n sm: radius.sm,\n md: radius.md,\n lg: radius.lg,\n xl: radius.xl,\n '2xl': radius['2xl'],\n '3xl': radius['3xl'],\n circle: radius.full,\n}\n\n/**\n * Box's `bg` values in the semantic grammar (decision 0031, #304): the token's path below\n * `semantic`, such as `surface.raised` or `color.fill.muted`.\n */\nexport type BackgroundPath =\n | `surface.${keyof Semantic['surface']}`\n | `color.fill.${keyof Semantic['color']['fill']}`\n\n/** Box's `bg` prop: the grammar's token paths, read from the token at that path. */\nexport const backgroundByPath: Record<BackgroundPath, string> = {\n 'surface.base': surface.base,\n 'surface.raised': surface.raised,\n 'surface.overlay': surface.overlay,\n 'surface.scrim': surface.scrim,\n 'color.fill.emphasis': color.fill.emphasis,\n 'color.fill.muted': color.fill.muted,\n 'color.fill.inverse': color.fill.inverse,\n 'color.fill.accent': color.fill.accent,\n 'color.fill.accent-hover': color.fill['accent-hover'],\n 'color.fill.accent-pressed': color.fill['accent-pressed'],\n 'color.fill.accent-muted': color.fill['accent-muted'],\n 'color.fill.accent-muted-hover': color.fill['accent-muted-hover'],\n 'color.fill.accent-muted-pressed': color.fill['accent-muted-pressed'],\n 'color.fill.danger': color.fill.danger,\n 'color.fill.danger-hover': color.fill['danger-hover'],\n 'color.fill.danger-pressed': color.fill['danger-pressed'],\n 'color.fill.danger-muted': color.fill['danger-muted'],\n 'color.fill.success': color.fill.success,\n 'color.fill.success-muted': color.fill['success-muted'],\n 'color.fill.warning': color.fill.warning,\n 'color.fill.warning-muted': color.fill['warning-muted'],\n 'color.fill.serious': color.fill.serious,\n 'color.fill.serious-muted': color.fill['serious-muted'],\n 'color.fill.ai-muted': color.fill['ai-muted'],\n 'color.fill.disabled': color.fill.disabled,\n 'color.fill.default': color.fill.default,\n 'color.fill.default-hover': color.fill['default-hover'],\n 'color.fill.default-pressed': color.fill['default-pressed'],\n 'color.fill.none': color.fill.none,\n 'color.fill.none-hover': color.fill['none-hover'],\n 'color.fill.none-pressed': color.fill['none-pressed'],\n 'color.fill.inverse-none-hover': color.fill['inverse-none-hover'],\n}\n\n/** Box's `color` prop: the text colours. */\nexport const textColorByKey: Record<keyof Semantic['color']['text'], string> = color.text\n\n/** Box's border props: the border colours. */\nexport const borderColorByKey: Record<keyof Semantic['color']['border'], string> = color.border\n"],"names":["semantic","tokens","color","space","radius","surface","spaceByLayoutKey","none","xs","sm","md","lg","xl","auto","spacing","layout","radiusByKey","circle","full","backgroundByPath","base","raised","overlay","scrim","fill","emphasis","muted","inverse","accent","danger","success","warning","serious","disabled","textColorByKey","text","borderColorByKey","border"],"mappings":";;;AAGA;AACA;AACA;AACA;AACQ,IAAAA,QAAQ,GAAKC,MAAM,CAAAD,QAAX,CAAA;AACR,IAAAE,KAAK,GAA6BF,QAAQ,MAArC;EAAEG,KAAK,GAAsBH,QAAQ,CAAAG,KAA9B;EAAEC,MAAM,GAAcJ,QAAQ,CAAtBI,MAAA;EAAEC,OAAO,GAAKL,QAAQ,QAAb,CAAA;AAUrC;AACO,IAAMM,gBAAgB,GAA6B;AACxDC,EAAAA,IAAI,EAAEJ,KAAK,CAAC,CAAC,CAAC;AACdK,EAAAA,EAAE,EAAEL,KAAK,CAAC,GAAG,CAAC;AACdM,EAAAA,EAAE,EAAEN,KAAK,CAAC,GAAG,CAAC;AACdO,EAAAA,EAAE,EAAEP,KAAK,CAAC,GAAG,CAAC;AACdQ,EAAAA,EAAE,EAAER,KAAK,CAAC,GAAG,CAAC;AACdS,EAAAA,EAAE,EAAET,KAAK,CAAC,GAAG,CAAC;AACd,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,GAAG,CAAC;AACjB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,KAAK,EAAEA,KAAK,CAAC,IAAI,CAAC;AAClB,EAAA,MAAM,EAAEA,KAAK,CAAC,IAAI,CAAC;AACnB,EAAA,MAAM,EAAEA,KAAK,CAAC,IAAI,CAAC;AACnB;AACAU,EAAAA,IAAI,EAAEb,QAAQ,CAACc,OAAO,CAACC,MAAM,CAACF,IAAAA;EAC/B;AA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AAI;AAEzF;AACaC,IAAAA,gBAAgB,GAAsDlC,KAAK,CAACmC;;;;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useEffect, type RefObject } from 'react';
|
|
2
2
|
import { type FloatingAlign, type FloatingSide } from './floatingPosition.mjs';
|
|
3
3
|
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
4
|
+
/** The trigger's width in px, set on the floating element when `matchAnchorWidth` is on */
|
|
5
|
+
export declare const ANCHOR_WIDTH_VAR = "--co-floating-anchor-width";
|
|
4
6
|
interface FloatingLayerOptions {
|
|
5
7
|
/** Whether the floating element is rendered */
|
|
6
8
|
isPresent: boolean;
|
|
@@ -10,6 +12,11 @@ interface FloatingLayerOptions {
|
|
|
10
12
|
anchorRef: RefObject<Element | null>;
|
|
11
13
|
side: FloatingSide;
|
|
12
14
|
align: FloatingAlign;
|
|
15
|
+
/**
|
|
16
|
+
* Writes the trigger's width to `ANCHOR_WIDTH_VAR` on the floating element before each placement,
|
|
17
|
+
* so its CSS can be at least as wide as the trigger
|
|
18
|
+
*/
|
|
19
|
+
matchAnchorWidth?: boolean;
|
|
13
20
|
/**
|
|
14
21
|
* Called when the trigger may have moved away from the floating element: the page or a container
|
|
15
22
|
* scrolled (anything but the floating element itself), or the window resized
|
|
@@ -21,5 +28,5 @@ interface FloatingLayerOptions {
|
|
|
21
28
|
* paints, and places it again whenever its size changes. A gap of `space.100` separates it from the
|
|
22
29
|
* trigger, and it keeps `space.200` from the viewport's edges.
|
|
23
30
|
*/
|
|
24
|
-
export declare function useFloatingLayer({ isPresent, floatingRef, anchorRef, side, align, onDetach }: FloatingLayerOptions): void;
|
|
31
|
+
export declare function useFloatingLayer({ isPresent, floatingRef, anchorRef, side, align, matchAnchorWidth, onDetach, }: FloatingLayerOptions): void;
|
|
25
32
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useEffect, type RefObject } from 'react';
|
|
2
2
|
import { type FloatingAlign, type FloatingSide } from './floatingPosition';
|
|
3
3
|
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
4
|
+
/** The trigger's width in px, set on the floating element when `matchAnchorWidth` is on */
|
|
5
|
+
export declare const ANCHOR_WIDTH_VAR = "--co-floating-anchor-width";
|
|
4
6
|
interface FloatingLayerOptions {
|
|
5
7
|
/** Whether the floating element is rendered */
|
|
6
8
|
isPresent: boolean;
|
|
@@ -10,6 +12,11 @@ interface FloatingLayerOptions {
|
|
|
10
12
|
anchorRef: RefObject<Element | null>;
|
|
11
13
|
side: FloatingSide;
|
|
12
14
|
align: FloatingAlign;
|
|
15
|
+
/**
|
|
16
|
+
* Writes the trigger's width to `ANCHOR_WIDTH_VAR` on the floating element before each placement,
|
|
17
|
+
* so its CSS can be at least as wide as the trigger
|
|
18
|
+
*/
|
|
19
|
+
matchAnchorWidth?: boolean;
|
|
13
20
|
/**
|
|
14
21
|
* Called when the trigger may have moved away from the floating element: the page or a container
|
|
15
22
|
* scrolled (anything but the floating element itself), or the window resized
|
|
@@ -21,5 +28,5 @@ interface FloatingLayerOptions {
|
|
|
21
28
|
* paints, and places it again whenever its size changes. A gap of `space.100` separates it from the
|
|
22
29
|
* trigger, and it keeps `space.200` from the viewport's edges.
|
|
23
30
|
*/
|
|
24
|
-
export declare function useFloatingLayer({ isPresent, floatingRef, anchorRef, side, align, onDetach }: FloatingLayerOptions): void;
|
|
31
|
+
export declare function useFloatingLayer({ isPresent, floatingRef, anchorRef, side, align, matchAnchorWidth, onDetach, }: FloatingLayerOptions): void;
|
|
25
32
|
export {};
|
|
@@ -10,6 +10,8 @@ var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect
|
|
|
10
10
|
var supportsPopover = function supportsPopover() {
|
|
11
11
|
return typeof HTMLElement !== 'undefined' && 'showPopover' in HTMLElement.prototype;
|
|
12
12
|
};
|
|
13
|
+
/** The trigger's width in px, set on the floating element when `matchAnchorWidth` is on */
|
|
14
|
+
var ANCHOR_WIDTH_VAR = '--co-floating-anchor-width';
|
|
13
15
|
var remToPx = function remToPx(value) {
|
|
14
16
|
return parseFloat(value) * (parseFloat(getComputedStyle(document.documentElement).fontSize) || 16);
|
|
15
17
|
};
|
|
@@ -24,6 +26,8 @@ function useFloatingLayer(_a) {
|
|
|
24
26
|
anchorRef = _a.anchorRef,
|
|
25
27
|
side = _a.side,
|
|
26
28
|
align = _a.align,
|
|
29
|
+
_b = _a.matchAnchorWidth,
|
|
30
|
+
matchAnchorWidth = _b === void 0 ? false : _b,
|
|
27
31
|
onDetach = _a.onDetach;
|
|
28
32
|
useIsomorphicLayoutEffect(function () {
|
|
29
33
|
var floating = floatingRef.current;
|
|
@@ -36,6 +40,8 @@ function useFloatingLayer(_a) {
|
|
|
36
40
|
var trigger = laidOutElement(anchorRef.current);
|
|
37
41
|
if (!trigger) return;
|
|
38
42
|
var anchor = trigger.getBoundingClientRect();
|
|
43
|
+
// Before measuring, since it can widen the floating element
|
|
44
|
+
if (matchAnchorWidth) floating.style.setProperty(ANCHOR_WIDTH_VAR, "".concat(anchor.width, "px"));else floating.style.removeProperty(ANCHOR_WIDTH_VAR);
|
|
39
45
|
var _a = floating.getBoundingClientRect(),
|
|
40
46
|
width = _a.width,
|
|
41
47
|
height = _a.height;
|
|
@@ -62,10 +68,13 @@ function useFloatingLayer(_a) {
|
|
|
62
68
|
if (typeof ResizeObserver === 'undefined') return;
|
|
63
69
|
var observer = new ResizeObserver(place);
|
|
64
70
|
observer.observe(floating);
|
|
71
|
+
// Its width follows the trigger's, so a trigger that resizes while it's open places it again
|
|
72
|
+
var trigger = matchAnchorWidth ? laidOutElement(anchorRef.current) : null;
|
|
73
|
+
if (trigger) observer.observe(trigger);
|
|
65
74
|
return function () {
|
|
66
75
|
return observer.disconnect();
|
|
67
76
|
};
|
|
68
|
-
}, [isPresent, side, align, floatingRef, anchorRef]);
|
|
77
|
+
}, [isPresent, side, align, matchAnchorWidth, floatingRef, anchorRef]);
|
|
69
78
|
useEffect(function () {
|
|
70
79
|
if (!isPresent) return;
|
|
71
80
|
var onScroll = function onScroll(event) {
|
|
@@ -82,5 +91,5 @@ function useFloatingLayer(_a) {
|
|
|
82
91
|
}, [isPresent, floatingRef, onDetach]);
|
|
83
92
|
}
|
|
84
93
|
|
|
85
|
-
export { useFloatingLayer, useIsomorphicLayoutEffect };
|
|
94
|
+
export { ANCHOR_WIDTH_VAR, useFloatingLayer, useIsomorphicLayoutEffect };
|
|
86
95
|
//# sourceMappingURL=useFloatingLayer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFloatingLayer.mjs","sources":["../../src/lib/useFloatingLayer.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, type RefObject } from 'react'\n// Placement needs resolved lengths, not CSS variables (decision 0041)\nimport tokenValues from '../styles/tokens.json'\nimport { laidOutElement, placeFloating, type FloatingAlign, type FloatingSide } from './floatingPosition'\n\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\n// The Popover API puts a floating element in the top layer: above everything, Modal included,\n// never clipped by a scroll container, with no z-index (#326). It's in every current browser;\n// without it the element is still position: fixed, so it escapes overflow clipping.\nconst supportsPopover = () => typeof HTMLElement !== 'undefined' && 'showPopover' in HTMLElement.prototype\n\nconst remToPx = (value: string) =>\n parseFloat(value) * (parseFloat(getComputedStyle(document.documentElement).fontSize) || 16)\n\ninterface FloatingLayerOptions {\n /** Whether the floating element is rendered */\n isPresent: boolean\n /** The floating element: `position: fixed`, placed with top and left */\n floatingRef: RefObject<HTMLElement | null>\n /** The `display: contents` wrapper around the trigger */\n anchorRef: RefObject<Element | null>\n side: FloatingSide\n align: FloatingAlign\n /**\n * Called when the trigger may have moved away from the floating element: the page or a container\n * scrolled (anything but the floating element itself), or the window resized\n */\n onDetach: () => void\n}\n\n/**\n * Shows a floating element (Tooltip, Menu) in the top layer beside its trigger, before the browser\n * paints, and places it again whenever its size changes. A gap of `space.100` separates it from the\n * trigger, and it keeps `space.200` from the viewport's edges.\n */\nexport function useFloatingLayer({
|
|
1
|
+
{"version":3,"file":"useFloatingLayer.mjs","sources":["../../src/lib/useFloatingLayer.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, type RefObject } from 'react'\n// Placement needs resolved lengths, not CSS variables (decision 0041)\nimport tokenValues from '../styles/tokens.json'\nimport { laidOutElement, placeFloating, type FloatingAlign, type FloatingSide } from './floatingPosition'\n\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\n// The Popover API puts a floating element in the top layer: above everything, Modal included,\n// never clipped by a scroll container, with no z-index (#326). It's in every current browser;\n// without it the element is still position: fixed, so it escapes overflow clipping.\nconst supportsPopover = () => typeof HTMLElement !== 'undefined' && 'showPopover' in HTMLElement.prototype\n\n/** The trigger's width in px, set on the floating element when `matchAnchorWidth` is on */\nexport const ANCHOR_WIDTH_VAR = '--co-floating-anchor-width'\n\nconst remToPx = (value: string) =>\n parseFloat(value) * (parseFloat(getComputedStyle(document.documentElement).fontSize) || 16)\n\ninterface FloatingLayerOptions {\n /** Whether the floating element is rendered */\n isPresent: boolean\n /** The floating element: `position: fixed`, placed with top and left */\n floatingRef: RefObject<HTMLElement | null>\n /** The `display: contents` wrapper around the trigger */\n anchorRef: RefObject<Element | null>\n side: FloatingSide\n align: FloatingAlign\n /**\n * Writes the trigger's width to `ANCHOR_WIDTH_VAR` on the floating element before each placement,\n * so its CSS can be at least as wide as the trigger\n */\n matchAnchorWidth?: boolean\n /**\n * Called when the trigger may have moved away from the floating element: the page or a container\n * scrolled (anything but the floating element itself), or the window resized\n */\n onDetach: () => void\n}\n\n/**\n * Shows a floating element (Tooltip, Menu) in the top layer beside its trigger, before the browser\n * paints, and places it again whenever its size changes. A gap of `space.100` separates it from the\n * trigger, and it keeps `space.200` from the viewport's edges.\n */\nexport function useFloatingLayer({\n isPresent,\n floatingRef,\n anchorRef,\n side,\n align,\n matchAnchorWidth = false,\n onDetach,\n}: FloatingLayerOptions) {\n useIsomorphicLayoutEffect(() => {\n const floating = floatingRef.current\n if (!isPresent || !floating) return\n if (supportsPopover() && !floating.matches(':popover-open')) {\n floating.setAttribute('popover', 'manual')\n floating.showPopover()\n }\n const place = () => {\n const trigger = laidOutElement(anchorRef.current)\n if (!trigger) return\n const anchor = trigger.getBoundingClientRect()\n // Before measuring, since it can widen the floating element\n if (matchAnchorWidth) floating.style.setProperty(ANCHOR_WIDTH_VAR, `${anchor.width}px`)\n else floating.style.removeProperty(ANCHOR_WIDTH_VAR)\n const { width, height } = floating.getBoundingClientRect()\n const position = placeFloating({\n anchor,\n floating: { width, height },\n side,\n align,\n offset: remToPx(tokenValues.semantic.space[100]),\n viewport: { width: window.innerWidth, height: window.innerHeight },\n margin: remToPx(tokenValues.semantic.space[200]),\n })\n floating.style.top = `${position.top}px`\n floating.style.left = `${position.left}px`\n floating.dataset.side = position.side\n }\n place()\n if (typeof ResizeObserver === 'undefined') return\n const observer = new ResizeObserver(place)\n observer.observe(floating)\n // Its width follows the trigger's, so a trigger that resizes while it's open places it again\n const trigger = matchAnchorWidth ? laidOutElement(anchorRef.current) : null\n if (trigger) observer.observe(trigger)\n return () => observer.disconnect()\n }, [isPresent, side, align, matchAnchorWidth, floatingRef, anchorRef])\n\n useEffect(() => {\n if (!isPresent) return\n const onScroll = (event: Event) => {\n if (event.target instanceof Node && floatingRef.current?.contains(event.target)) return\n onDetach()\n }\n window.addEventListener('scroll', onScroll, true)\n window.addEventListener('resize', onDetach)\n return () => {\n window.removeEventListener('scroll', onScroll, true)\n window.removeEventListener('resize', onDetach)\n }\n }, [isPresent, floatingRef, onDetach])\n}\n"],"names":["useIsomorphicLayoutEffect","window","useLayoutEffect","useEffect","supportsPopover","HTMLElement","prototype","ANCHOR_WIDTH_VAR","remToPx","value","parseFloat","getComputedStyle","document","documentElement","fontSize","useFloatingLayer","_a","isPresent","floatingRef","anchorRef","side","align","_b","matchAnchorWidth","onDetach","floating","current","matches","setAttribute","showPopover","place","trigger","laidOutElement","anchor","getBoundingClientRect","style","setProperty","concat","width","removeProperty","height","position","placeFloating","offset","tokenValues","semantic","space","viewport","innerWidth","innerHeight","margin","top","left","dataset","ResizeObserver","observer","observe","disconnect","onScroll","event","target","Node","contains","addEventListener","removeEventListener"],"mappings":";;;;;AAKO,IAAMA,yBAAyB,GAAG,OAAOC,MAAM,KAAK,WAAW,GAAGC,eAAe,GAAGC,UAAS;AAEpG;AACA;AACA;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAG;EAAM,OAAA,OAAOC,WAAW,KAAK,WAAW,IAAI,aAAa,IAAIA,WAAW,CAACC,SAAS,CAAA;AAA5E,CAA4E,CAAA;AAE1G;AACO,IAAMC,gBAAgB,GAAG,6BAA4B;AAE5D,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAIC,KAAa,EAAA;AAC5B,EAAA,OAAAC,UAAU,CAACD,KAAK,CAAC,IAAIC,UAAU,CAACC,gBAAgB,CAACC,QAAQ,CAACC,eAAe,CAAC,CAACC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;AAA3F,CAA2F,CAAA;AAuB7F;;;;AAIG;AACG,SAAUC,gBAAgBA,CAACC,EAQV,EAAA;MAPrBC,SAAS,GAAAD,EAAA,CAAAC,SAAA;IACTC,WAAW,GAAAF,EAAA,CAAAE,WAAA;IACXC,SAAS,GAAAH,EAAA,CAAAG,SAAA;IACTC,IAAI,GAAAJ,EAAA,CAAAI,IAAA;IACJC,KAAK,GAAAL,EAAA,CAAAK,KAAA;IACLC,wBAAwB;IAAxBC,gBAAgB,mBAAG,KAAK,GAAAD,EAAA;IACxBE,QAAQ,GAAAR,EAAA,CAAAQ,QAAA,CAAA;AAERxB,EAAAA,yBAAyB,CAAC,YAAA;AACxB,IAAA,IAAMyB,QAAQ,GAAGP,WAAW,CAACQ,OAAO,CAAA;AACpC,IAAA,IAAI,CAACT,SAAS,IAAI,CAACQ,QAAQ,EAAE,OAAA;IAC7B,IAAIrB,eAAe,EAAE,IAAI,CAACqB,QAAQ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