@hjmds/design-contracts 1.1.1 → 1.2.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/agreement.d.ts +183 -0
- package/dist/agreement.d.ts.map +1 -0
- package/dist/agreement.js +137 -0
- package/dist/agreement.js.map +1 -0
- package/dist/anchor.d.ts +62 -0
- package/dist/anchor.d.ts.map +1 -0
- package/dist/anchor.js +43 -0
- package/dist/anchor.js.map +1 -0
- package/dist/asset.d.ts +94 -0
- package/dist/asset.d.ts.map +1 -0
- package/dist/asset.js +60 -0
- package/dist/asset.js.map +1 -0
- package/dist/base-recipes.d.ts +19 -0
- package/dist/base-recipes.d.ts.map +1 -1
- package/dist/base-recipes.js +17 -0
- package/dist/base-recipes.js.map +1 -1
- package/dist/behaviors.d.ts +346 -3
- package/dist/behaviors.d.ts.map +1 -1
- package/dist/behaviors.js +35 -1
- package/dist/behaviors.js.map +1 -1
- package/dist/bottom-info.d.ts +58 -0
- package/dist/bottom-info.d.ts.map +1 -0
- package/dist/bottom-info.js +48 -0
- package/dist/bottom-info.js.map +1 -0
- package/dist/carousel.d.ts +3 -3
- package/dist/carousel.js +1 -1
- package/dist/carousel.js.map +1 -1
- package/dist/catalog.d.ts +1250 -239
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +65 -25
- package/dist/catalog.js.map +1 -1
- package/dist/collapsible.d.ts +56 -0
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +37 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/component-definitions.d.ts +16 -0
- package/dist/component-definitions.d.ts.map +1 -1
- package/dist/component-definitions.js +16 -0
- package/dist/component-definitions.js.map +1 -1
- package/dist/component-recipes.d.ts +20 -3
- package/dist/component-recipes.d.ts.map +1 -1
- package/dist/component-recipes.js +24 -1
- package/dist/component-recipes.js.map +1 -1
- package/dist/context-menu.d.ts +53 -0
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +44 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/counter-badge-recipe.d.ts +5 -0
- package/dist/counter-badge-recipe.d.ts.map +1 -1
- package/dist/counter-badge-recipe.js +5 -0
- package/dist/counter-badge-recipe.js.map +1 -1
- package/dist/dataviz.d.ts +76 -0
- package/dist/dataviz.d.ts.map +1 -0
- package/dist/dataviz.js +58 -0
- package/dist/dataviz.js.map +1 -0
- package/dist/date-range.d.ts +56 -0
- package/dist/date-range.d.ts.map +1 -0
- package/dist/date-range.js +79 -0
- package/dist/date-range.js.map +1 -0
- package/dist/design-system-provider.d.ts +24 -0
- package/dist/design-system-provider.d.ts.map +1 -1
- package/dist/design-system-provider.js +21 -0
- package/dist/design-system-provider.js.map +1 -1
- package/dist/floating-action-button.d.ts +1 -1
- package/dist/floating-action-button.d.ts.map +1 -1
- package/dist/floating-action-button.js +3 -1
- package/dist/floating-action-button.js.map +1 -1
- package/dist/formatters.d.ts +37 -0
- package/dist/formatters.d.ts.map +1 -0
- package/dist/formatters.js +69 -0
- package/dist/formatters.js.map +1 -0
- package/dist/heading.d.ts +82 -0
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +48 -0
- package/dist/heading.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/menubar.d.ts +133 -0
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +80 -0
- package/dist/menubar.js.map +1 -0
- package/dist/native-platform.d.ts +88 -0
- package/dist/native-platform.d.ts.map +1 -0
- package/dist/native-platform.js +70 -0
- package/dist/native-platform.js.map +1 -0
- package/dist/popover.d.ts +19 -4
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +3 -0
- package/dist/popover.js.map +1 -1
- package/dist/progress-recipe.d.ts +14 -0
- package/dist/progress-recipe.d.ts.map +1 -1
- package/dist/progress-recipe.js +14 -1
- package/dist/progress-recipe.js.map +1 -1
- package/dist/provider-button.d.ts +140 -0
- package/dist/provider-button.d.ts.map +1 -0
- package/dist/provider-button.js +83 -0
- package/dist/provider-button.js.map +1 -0
- package/dist/recipes.d.ts +15 -1
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +14 -0
- package/dist/recipes.js.map +1 -1
- package/dist/sheet.d.ts +16 -0
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +33 -0
- package/dist/sheet.js.map +1 -1
- package/dist/sidebar.d.ts +168 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +98 -0
- package/dist/sidebar.js.map +1 -0
- package/dist/skip-nav.d.ts +67 -0
- package/dist/skip-nav.d.ts.map +1 -0
- package/dist/skip-nav.js +47 -0
- package/dist/skip-nav.js.map +1 -0
- package/dist/tags-input.d.ts +157 -0
- package/dist/tags-input.d.ts.map +1 -0
- package/dist/tags-input.js +108 -0
- package/dist/tags-input.js.map +1 -0
- package/dist/text-formats.d.ts +85 -0
- package/dist/text-formats.d.ts.map +1 -0
- package/dist/text-formats.js +43 -0
- package/dist/text-formats.js.map +1 -0
- package/dist/toggle-group.d.ts +111 -0
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +78 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/top.d.ts +113 -0
- package/dist/top.d.ts.map +1 -0
- package/dist/top.js +72 -0
- package/dist/top.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/agreement.md +33 -0
- package/docs/anchor.md +59 -59
- package/docs/ant-design-coverage.md +5 -3
- package/docs/asset.md +26 -0
- package/docs/bottom-info.md +15 -0
- package/docs/breadcrumb.md +15 -15
- package/docs/button-label.md +20 -0
- package/docs/calendar.md +82 -154
- package/docs/carousel.md +27 -2
- package/docs/cascader.md +17 -0
- package/docs/chart.md +33 -0
- package/docs/clipboard.md +13 -0
- package/docs/collapsible.md +19 -0
- package/docs/command-palette.md +19 -0
- package/docs/confirm-popover.md +11 -1
- package/docs/context-menu.md +23 -0
- package/docs/data-table.md +22 -0
- package/docs/date-range.md +31 -0
- package/docs/density.md +23 -0
- package/docs/expansion-roadmap.md +16 -3
- package/docs/floating-action-button.md +35 -3
- package/docs/formatters.md +18 -0
- package/docs/generated/component-maturity.md +39 -23
- package/docs/generated/renderer-evidence.json +2921 -642
- package/docs/generated/renderer-evidence.md +53 -6
- package/docs/generated/showcase-manifest.json +1087 -64
- package/docs/heading.md +25 -0
- package/docs/identity.md +5 -0
- package/docs/layout.md +1 -1
- package/docs/library-gap-analysis.md +29 -9
- package/docs/list-row.md +14 -0
- package/docs/mentions.md +18 -0
- package/docs/menubar.md +22 -0
- package/docs/native-platform.md +36 -0
- package/docs/overlay-stack.md +24 -0
- package/docs/pagination.md +16 -8
- package/docs/popover.md +42 -13
- package/docs/product-audit-2026-09-15.md +88 -0
- package/docs/progress.md +16 -0
- package/docs/provider-button.md +33 -0
- package/docs/rating.md +19 -0
- package/docs/react-native-completion.md +347 -0
- package/docs/screen-chrome.md +52 -0
- package/docs/side-panel.md +23 -2
- package/docs/sidebar.md +30 -0
- package/docs/skip-nav.md +20 -0
- package/docs/splitter.md +22 -2
- package/docs/stable-promotion.md +51 -0
- package/docs/tags-input.md +25 -0
- package/docs/text-formats.md +15 -0
- package/docs/theming.md +84 -0
- package/docs/time-picker.md +22 -1
- package/docs/toast.md +18 -0
- package/docs/toggle-group.md +21 -0
- package/docs/top.md +32 -0
- package/docs/tour.md +23 -2
- package/docs/transfer-list.md +20 -0
- package/docs/tree-select.md +18 -0
- package/docs/tree.md +21 -0
- package/package.json +120 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-system-provider.js","sourceRoot":"","sources":["../src/design-system-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,iBAAiB,GAIlB,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EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,GAAG,aAAa,EAAE;YACtD,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC;YACzC,iBAAiB,EAAE,UAAU;SAC9B;KACF,CAAC;IACF,iCAAiC,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { ColorReferencePalette } from \"./color-references.js\";\nimport { control, largeTextThreshold } from \"./foundations.js\";\nimport {\n ACCENTS,\n THEMES,\n accentFill,\n isThemePreference,\n type ResolvedTheme,\n type ThemeColors,\n type ThemePreference,\n} from \"./colors.js\";\n\n/**\n * Canonical logical direction. Existing public component-specific names stay\n * source-compatible as aliases of this type instead of redeclaring the union.\n */\nexport type DesignSystemDirection = \"ltr\" | \"rtl\";\n\n/**\n * A continuous OS/user font-scale multiplier (iOS Dynamic Type, Android font\n * size, browser zoom) — not `ShowcaseTextScale`'s closed `1 | 1.5 | 2`, which\n * only names Showcase's five fixture stories, or `description-list.ts`'s\n * local layout clamp. This is the single upstream signal both now consume.\n */\nexport type DesignSystemTextScale = number;\n\n/**\n * Whether a resolved `textScale` has crossed into large-text layout. A\n * stylesheet cannot compare numbers, so the provider resolves the axis once and\n * publishes the result for surfaces that can only match a flag (#20).\n */\nexport function isLargeTextScale(textScale: DesignSystemTextScale): boolean {\n return Number.isFinite(textScale) && textScale >= largeTextThreshold;\n}\n\n/**\n * Visible height a compact control paints under a product's target-size policy.\n *\n * The compact recipes stay at 36 and reach the 44pt target through hit slop,\n * which satisfies WCAG 2.5.8 but not the stricter iOS/Android guidance some\n * products commit to. `minimumVisualTarget` turns that commitment into one\n * resolved axis, so both renderers compute the same geometry instead of each\n * consumer re-adding `minHeight` in product styles. It lives beside the axis\n * rather than in `foundations` because it is a policy over a token, not a token.\n */\nexport function visibleControlHeight(\n recipeHeight: number,\n minimumVisualTarget: boolean,\n): number {\n return minimumVisualTarget ? Math.max(recipeHeight, control.minTouchTarget) : recipeHeight;\n}\n\nexport type DesignSystemEnvironmentInput = Readonly<{\n theme?: ThemePreference;\n direction?: DesignSystemDirection;\n textScale?: DesignSystemTextScale;\n reducedMotion?: boolean;\n /**\n * Paint the minimum touch target as visible control geometry instead of\n * reaching it with hit slop. This is a product accessibility stance, not an\n * OS signal, so it has no `system*` counterpart.\n */\n minimumVisualTarget?: boolean;\n}>;\n\nexport const designSystemEnvironmentDefaults = {\n theme: \"system\",\n direction: \"ltr\",\n textScale: 1,\n reducedMotion: false,\n minimumVisualTarget: false,\n} as const satisfies Readonly<{\n theme: ThemePreference;\n direction: DesignSystemDirection;\n textScale: DesignSystemTextScale;\n reducedMotion: boolean;\n minimumVisualTarget: boolean;\n}>;\n\nexport type ResolvedDesignSystemEnvironment = Readonly<{\n theme: ResolvedTheme;\n direction: DesignSystemDirection;\n textScale: DesignSystemTextScale;\n reducedMotion: boolean;\n minimumVisualTarget: boolean;\n}>;\n\nexport type ResolveDesignSystemEnvironmentOptions = Readonly<{\n /**\n * The platform's current OS-level scheme, consulted only when `theme`\n * resolves to `\"system\"`. Renderers detect this themselves\n * (`Appearance.getColorScheme()`, `matchMedia('(prefers-color-scheme)')`)\n * — this package never queries the OS.\n */\n systemTheme: ResolvedTheme;\n /** Optional OS/renderer signals used when neither input nor a parent supplies the axis. */\n systemDirection?: DesignSystemDirection;\n systemTextScale?: DesignSystemTextScale;\n systemReducedMotion?: boolean;\n /**\n * Product brand colors layered over the HJM semantic keys. The key set is\n * unchanged, so recipes and contrast rules keep applying. Without this entry\n * point a consumer has to build its own token layer and override the CSS\n * variables, which is a copy of the canonical palette. Only the supplied\n * keys are replaced; the rest keep the HJM defaults.\n */\n brandPalette?: Readonly<Partial<Record<ResolvedTheme, Readonly<Partial<ThemeColors>>>>>;\n /** A nested renderer inherits the already-resolved parent before consulting OS defaults. */\n parent?: ResolvedDesignSystemEnvironment;\n}>;\n\nexport type DesignSystemProviderValue = Readonly<{\n environment: ResolvedDesignSystemEnvironment;\n /** Palette consumed directly by `resolveColorReference`. */\n palette: ColorReferencePalette;\n}>;\n\nconst themeColorKeys = Object.keys(THEMES.light) as readonly (keyof typeof THEMES.light)[];\nconst accentColorKeys = Object.keys(ACCENTS.light) as readonly (keyof typeof ACCENTS.light)[];\nconst sixDigitHexColor = /^#[0-9a-f]{6}$/i;\n\nfunction assertColorRecord(\n value: unknown,\n keys: readonly string[],\n field: string,\n): asserts value is Readonly<Record<string, string>> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new TypeError(`DesignSystemProviderValue ${field} must be a color record`);\n }\n const record = value as Readonly<Record<string, unknown>>;\n for (const key of keys) {\n const color = record[key];\n if (typeof color !== \"string\" || !sixDigitHexColor.test(color)) {\n throw new TypeError(\n `DesignSystemProviderValue ${field}.${key} must be a six-digit hex color`,\n );\n }\n }\n}\n\n/**\n * Runtime boundary for reviewed full product palettes supplied to a renderer.\n * Partial token overrides remain unsupported: every semantic role required by\n * a recipe must be present, and alpha composition requires six-digit hex.\n */\nexport function validateDesignSystemProviderValue(\n value: DesignSystemProviderValue,\n): void {\n if (value === null || typeof value !== \"object\") {\n throw new TypeError(\"DesignSystemProviderValue must be an object\");\n }\n if (value.environment === null || typeof value.environment !== \"object\") {\n throw new TypeError(\"DesignSystemProviderValue environment must be an object\");\n }\n validateResolvedDesignSystemEnvironment(value.environment);\n const palette = value.palette;\n if (palette === null || typeof palette !== \"object\") {\n throw new TypeError(\"DesignSystemProviderValue palette must be an object\");\n }\n assertColorRecord(palette.theme, themeColorKeys, \"palette.theme\");\n assertColorRecord(\n palette.statusAccents,\n accentColorKeys,\n \"palette.statusAccents\",\n );\n assertColorRecord(\n palette.statusAccentFills,\n accentColorKeys,\n \"palette.statusAccentFills\",\n );\n}\n\nfunction assertBoolean(value: boolean, field: string): void {\n if (typeof value !== \"boolean\") {\n throw new TypeError(`DesignSystemEnvironment ${field} must be a boolean`);\n }\n}\n\nfunction assertDirection(value: DesignSystemDirection, field: string): void {\n if (value !== \"ltr\" && value !== \"rtl\") {\n throw new TypeError(`Unsupported DesignSystemEnvironment ${field}: ${String(value)}`);\n }\n}\n\nfunction assertTextScale(value: DesignSystemTextScale, field: string): void {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value <= 0) {\n throw new RangeError(\n `DesignSystemEnvironment ${field} must be a finite number greater than 0`,\n );\n }\n}\n\nexport function validateDesignSystemEnvironmentInput(\n input: DesignSystemEnvironmentInput,\n): void {\n if (input.theme !== undefined && !isThemePreference(input.theme)) {\n throw new TypeError(`Unsupported DesignSystemEnvironment theme: ${String(input.theme)}`);\n }\n if (\n input.direction !== undefined &&\n input.direction !== \"ltr\" &&\n input.direction !== \"rtl\"\n ) {\n throw new TypeError(\n `Unsupported DesignSystemEnvironment direction: ${String(input.direction)}`,\n );\n }\n if (input.textScale !== undefined) {\n assertTextScale(input.textScale, \"textScale\");\n }\n if (input.reducedMotion !== undefined) {\n assertBoolean(input.reducedMotion, \"reducedMotion\");\n }\n if (input.minimumVisualTarget !== undefined) {\n assertBoolean(input.minimumVisualTarget, \"minimumVisualTarget\");\n }\n}\n\n/**\n * A parent has already crossed the system-preference boundary. Unlike the\n * partial input validator, this rejects `\"system\"`, missing axes, and every\n * malformed resolved value instead of silently resolving them again.\n */\nexport function validateResolvedDesignSystemEnvironment(\n environment: ResolvedDesignSystemEnvironment,\n): void {\n if (environment.theme !== \"light\" && environment.theme !== \"dark\") {\n throw new TypeError(\n `Unsupported ResolvedDesignSystemEnvironment theme: ${String(environment.theme)}`,\n );\n }\n assertDirection(environment.direction, \"parent direction\");\n assertTextScale(environment.textScale, \"parent textScale\");\n assertBoolean(environment.reducedMotion, \"parent reducedMotion\");\n assertBoolean(environment.minimumVisualTarget, \"parent minimumVisualTarget\");\n}\n\n/**\n * Merges partial signals with safe defaults and resolves `\"system\"` against\n * the renderer-supplied `systemTheme`. This — not a React/RN context, which\n * this package cannot own — is the entire portable contract behind antd\n * `ConfigProvider`: see docs/design-system-provider.md for what was\n * deliberately left to the renderer.\n */\nexport function resolveDesignSystemEnvironment(\n input: DesignSystemEnvironmentInput,\n options: ResolveDesignSystemEnvironmentOptions,\n): ResolvedDesignSystemEnvironment {\n validateDesignSystemEnvironmentInput(input);\n if (options.systemTheme !== \"light\" && options.systemTheme !== \"dark\") {\n throw new TypeError(`Unsupported DesignSystemEnvironment systemTheme: ${String(options.systemTheme)}`);\n }\n if (options.systemDirection !== undefined) {\n assertDirection(options.systemDirection, \"systemDirection\");\n }\n if (options.systemTextScale !== undefined) {\n assertTextScale(options.systemTextScale, \"systemTextScale\");\n }\n if (options.systemReducedMotion !== undefined) {\n assertBoolean(options.systemReducedMotion, \"systemReducedMotion\");\n }\n if (options.parent !== undefined) {\n validateResolvedDesignSystemEnvironment(options.parent);\n }\n\n const theme =\n input.theme ?? options.parent?.theme ?? designSystemEnvironmentDefaults.theme;\n return {\n theme: theme === \"system\" ? options.systemTheme : theme,\n direction:\n input.direction ??\n options.parent?.direction ??\n options.systemDirection ??\n designSystemEnvironmentDefaults.direction,\n textScale:\n input.textScale ??\n options.parent?.textScale ??\n options.systemTextScale ??\n designSystemEnvironmentDefaults.textScale,\n reducedMotion:\n input.reducedMotion ??\n options.parent?.reducedMotion ??\n options.systemReducedMotion ??\n designSystemEnvironmentDefaults.reducedMotion,\n minimumVisualTarget:\n input.minimumVisualTarget ??\n options.parent?.minimumVisualTarget ??\n designSystemEnvironmentDefaults.minimumVisualTarget,\n };\n}\n\n/**\n * Resolves the portable Provider value without owning React/RN Context. A\n * renderer stores this object in its own context and feeds `palette` directly\n * to recipe color resolution.\n */\nexport function resolveDesignSystemProviderValue(\n input: DesignSystemEnvironmentInput,\n options: ResolveDesignSystemEnvironmentOptions,\n): DesignSystemProviderValue {\n const environment = resolveDesignSystemEnvironment(input, options);\n const brandOverride = options.brandPalette?.[environment.theme];\n const value = {\n environment,\n palette: {\n theme: brandOverride === undefined\n ? THEMES[environment.theme]\n : { ...THEMES[environment.theme], ...brandOverride },\n statusAccents: ACCENTS[environment.theme],\n statusAccentFills: accentFill,\n },\n };\n validateDesignSystemProviderValue(value);\n return value;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"design-system-provider.js","sourceRoot":"","sources":["../src/design-system-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,iBAAiB,GAIlB,MAAM,aAAa,CAAC;AAgBrB;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAgC;IAC/D,OAAO,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,kBAAkB,CAAC;AACvE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,YAAoB,EACpB,mBAA4B;IAE5B,OAAO,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;AAC7F,CAAC;AAcD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAA4B,EAC5B,UAAoE;IAEpE,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC;AAC7E,CAAC;AAiBD,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,CAAC;IACZ,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,OAAO,EAAE,aAAa;CAQtB,CAAC;AAyCH,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAA2C,CAAC;AAC3F,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAA4C,CAAC;AAC9F,M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AAK,CAAC;AACf,CAAC","sourcesContent":["import type { ColorReferencePalette } from \"./color-references.js\";\nimport { control, largeTextThreshold } from \"./foundations.js\";\nimport {\n ACCENTS,\n THEMES,\n accentFill,\n isThemePreference,\n type ResolvedTheme,\n type ThemeColors,\n type ThemePreference,\n} from \"./colors.js\";\n\n/**\n * Canonical logical direction. Existing public component-specific names stay\n * source-compatible as aliases of this type instead of redeclaring the union.\n */\nexport type DesignSystemDirection = \"ltr\" | \"rtl\";\n\n/**\n * A continuous OS/user font-scale multiplier (iOS Dynamic Type, Android font\n * size, browser zoom) — not `ShowcaseTextScale`'s closed `1 | 1.5 | 2`, which\n * only names Showcase's five fixture stories, or `description-list.ts`'s\n * local layout clamp. This is the single upstream signal both now consume.\n */\nexport type DesignSystemTextScale = number;\n\n/**\n * Whether a resolved `textScale` has crossed into large-text layout. A\n * stylesheet cannot compare numbers, so the provider resolves the axis once and\n * publishes the result for surfaces that can only match a flag (#20).\n */\nexport function isLargeTextScale(textScale: DesignSystemTextScale): boolean {\n return Number.isFinite(textScale) && textScale >= largeTextThreshold;\n}\n\n/**\n * Visible height a compact control paints under a product's target-size policy.\n *\n * The compact recipes stay at 36 and reach the 44pt target through hit slop,\n * which satisfies WCAG 2.5.8 but not the stricter iOS/Android guidance some\n * products commit to. `minimumVisualTarget` turns that commitment into one\n * resolved axis, so both renderers compute the same geometry instead of each\n * consumer re-adding `minHeight` in product styles. It lives beside the axis\n * rather than in `foundations` because it is a policy over a token, not a token.\n */\nexport function visibleControlHeight(\n recipeHeight: number,\n minimumVisualTarget: boolean,\n): number {\n return minimumVisualTarget ? Math.max(recipeHeight, control.minTouchTarget) : recipeHeight;\n}\n\n/**\n * 한 화면 안에서 목록·메뉴·표가 각각 다른 밀도로 그려지던 문제를 하나의 축으로 모은다.\n * 지금까지는 `ListRow density`, `Menu density`, DataTable의 행 높이가 서로 모르는 값이라\n * 제품이 세 군데를 따로 맞췄다. 컴포넌트의 명시적 prop이 언제나 이 축을 이긴다 —\n * 전역값은 기본이지 강제가 아니다.\n *\n * OS 신호가 없다. 밀도는 제품의 입장(같은 화면에 얼마나 담을 것인가)이지 사용자 설정이\n * 아니라서 `system*` 짝을 두지 않았다. 반대로 큰 글자 설정은 사용자 설정이므로\n * `textScale`이 큰 상태에서 `compact`를 쓰는 것은 제품이 스스로 막아야 한다.\n */\nexport type DesignSystemDensity = \"comfortable\" | \"compact\";\n\n/**\n * 전역 밀도를 컴포넌트마다 다른 밀도 어휘로 옮긴다. 컴포넌트의 명시적 prop이 언제나\n * 이긴다 — 전역값은 기본이지 강제가 아니다. 어휘를 하나로 통일하지 않은 이유: 목록의\n * `relaxed`와 표의 `regular`는 같은 말이 아니고, 억지로 합치면 둘 중 하나가 거짓말을 한다.\n */\nexport function resolveDensityDefault<Comfortable extends string, Compact extends string>(\n density: DesignSystemDensity,\n vocabulary: Readonly<{ comfortable: Comfortable; compact: Compact }>,\n): Comfortable | Compact {\n return density === \"compact\" ? vocabulary.compact : vocabulary.comfortable;\n}\n\nexport type DesignSystemEnvironmentInput = Readonly<{\n theme?: ThemePreference;\n direction?: DesignSystemDirection;\n textScale?: DesignSystemTextScale;\n reducedMotion?: boolean;\n /**\n * Paint the minimum touch target as visible control geometry instead of\n * reaching it with hit slop. This is a product accessibility stance, not an\n * OS signal, so it has no `system*` counterpart.\n */\n minimumVisualTarget?: boolean;\n /** Default row/menu/table density for everything below this provider. */\n density?: DesignSystemDensity;\n}>;\n\nexport const designSystemEnvironmentDefaults = {\n theme: \"system\",\n direction: \"ltr\",\n textScale: 1,\n reducedMotion: false,\n minimumVisualTarget: false,\n density: \"comfortable\",\n} as const satisfies Readonly<{\n theme: ThemePreference;\n direction: DesignSystemDirection;\n textScale: DesignSystemTextScale;\n reducedMotion: boolean;\n minimumVisualTarget: boolean;\n density: DesignSystemDensity;\n}>;\n\nexport type ResolvedDesignSystemEnvironment = Readonly<{\n theme: ResolvedTheme;\n direction: DesignSystemDirection;\n textScale: DesignSystemTextScale;\n reducedMotion: boolean;\n minimumVisualTarget: boolean;\n density: DesignSystemDensity;\n}>;\n\nexport type ResolveDesignSystemEnvironmentOptions = Readonly<{\n /**\n * The platform's current OS-level scheme, consulted only when `theme`\n * resolves to `\"system\"`. Renderers detect this themselves\n * (`Appearance.getColorScheme()`, `matchMedia('(prefers-color-scheme)')`)\n * — this package never queries the OS.\n */\n systemTheme: ResolvedTheme;\n /** Optional OS/renderer signals used when neither input nor a parent supplies the axis. */\n systemDirection?: DesignSystemDirection;\n systemTextScale?: DesignSystemTextScale;\n systemReducedMotion?: boolean;\n /**\n * Product brand colors layered over the HJM semantic keys. The key set is\n * unchanged, so recipes and contrast rules keep applying. Without this entry\n * point a consumer has to build its own token layer and override the CSS\n * variables, which is a copy of the canonical palette. Only the supplied\n * keys are replaced; the rest keep the HJM defaults.\n */\n brandPalette?: Readonly<Partial<Record<ResolvedTheme, Readonly<Partial<ThemeColors>>>>>;\n /** A nested renderer inherits the already-resolved parent before consulting OS defaults. */\n parent?: ResolvedDesignSystemEnvironment;\n}>;\n\nexport type DesignSystemProviderValue = Readonly<{\n environment: ResolvedDesignSystemEnvironment;\n /** Palette consumed directly by `resolveColorReference`. */\n palette: ColorReferencePalette;\n}>;\n\nconst themeColorKeys = Object.keys(THEMES.light) as readonly (keyof typeof THEMES.light)[];\nconst accentColorKeys = Object.keys(ACCENTS.light) as readonly (keyof typeof ACCENTS.light)[];\nconst sixDigitHexColor = /^#[0-9a-f]{6}$/i;\n\nfunction assertColorRecord(\n value: unknown,\n keys: readonly string[],\n field: string,\n): asserts value is Readonly<Record<string, string>> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new TypeError(`DesignSystemProviderValue ${field} must be a color record`);\n }\n const record = value as Readonly<Record<string, unknown>>;\n for (const key of keys) {\n const color = record[key];\n if (typeof color !== \"string\" || !sixDigitHexColor.test(color)) {\n throw new TypeError(\n `DesignSystemProviderValue ${field}.${key} must be a six-digit hex color`,\n );\n }\n }\n}\n\n/**\n * Runtime boundary for reviewed full product palettes supplied to a renderer.\n * Partial token overrides remain unsupported: every semantic role required by\n * a recipe must be present, and alpha composition requires six-digit hex.\n */\nexport function validateDesignSystemProviderValue(\n value: DesignSystemProviderValue,\n): void {\n if (value === null || typeof value !== \"object\") {\n throw new TypeError(\"DesignSystemProviderValue must be an object\");\n }\n if (value.environment === null || typeof value.environment !== \"object\") {\n throw new TypeError(\"DesignSystemProviderValue environment must be an object\");\n }\n validateResolvedDesignSystemEnvironment(value.environment);\n const palette = value.palette;\n if (palette === null || typeof palette !== \"object\") {\n throw new TypeError(\"DesignSystemProviderValue palette must be an object\");\n }\n assertColorRecord(palette.theme, themeColorKeys, \"palette.theme\");\n assertColorRecord(\n palette.statusAccents,\n accentColorKeys,\n \"palette.statusAccents\",\n );\n assertColorRecord(\n palette.statusAccentFills,\n accentColorKeys,\n \"palette.statusAccentFills\",\n );\n}\n\nfunction assertBoolean(value: boolean, field: string): void {\n if (typeof value !== \"boolean\") {\n throw new TypeError(`DesignSystemEnvironment ${field} must be a boolean`);\n }\n}\n\nfunction assertDirection(value: DesignSystemDirection, field: string): void {\n if (value !== \"ltr\" && value !== \"rtl\") {\n throw new TypeError(`Unsupported DesignSystemEnvironment ${field}: ${String(value)}`);\n }\n}\n\nfunction assertTextScale(value: DesignSystemTextScale, field: string): void {\n if (typeof value !== \"number\" || !Number.isFinite(value) || value <= 0) {\n throw new RangeError(\n `DesignSystemEnvironment ${field} must be a finite number greater than 0`,\n );\n }\n}\n\nfunction assertDensity(value: unknown, field: string): asserts value is DesignSystemDensity {\n if (value !== \"comfortable\" && value !== \"compact\") {\n throw new TypeError(`Unsupported DesignSystemEnvironment ${field}: ${String(value)}`);\n }\n}\n\nexport function validateDesignSystemEnvironmentInput(\n input: DesignSystemEnvironmentInput,\n): void {\n if (input.theme !== undefined && !isThemePreference(input.theme)) {\n throw new TypeError(`Unsupported DesignSystemEnvironment theme: ${String(input.theme)}`);\n }\n if (\n input.direction !== undefined &&\n input.direction !== \"ltr\" &&\n input.direction !== \"rtl\"\n ) {\n throw new TypeError(\n `Unsupported DesignSystemEnvironment direction: ${String(input.direction)}`,\n );\n }\n if (input.textScale !== undefined) {\n assertTextScale(input.textScale, \"textScale\");\n }\n if (input.reducedMotion !== undefined) {\n assertBoolean(input.reducedMotion, \"reducedMotion\");\n }\n if (input.minimumVisualTarget !== undefined) {\n assertBoolean(input.minimumVisualTarget, \"minimumVisualTarget\");\n }\n if (input.density !== undefined) {\n assertDensity(input.density, \"density\");\n }\n}\n\n/**\n * A parent has already crossed the system-preference boundary. Unlike the\n * partial input validator, this rejects `\"system\"`, missing axes, and every\n * malformed resolved value instead of silently resolving them again.\n */\nexport function validateResolvedDesignSystemEnvironment(\n environment: ResolvedDesignSystemEnvironment,\n): void {\n if (environment.theme !== \"light\" && environment.theme !== \"dark\") {\n throw new TypeError(\n `Unsupported ResolvedDesignSystemEnvironment theme: ${String(environment.theme)}`,\n );\n }\n assertDirection(environment.direction, \"parent direction\");\n assertTextScale(environment.textScale, \"parent textScale\");\n assertBoolean(environment.reducedMotion, \"parent reducedMotion\");\n assertBoolean(environment.minimumVisualTarget, \"parent minimumVisualTarget\");\n assertDensity(environment.density, \"parent density\");\n}\n\n/**\n * Merges partial signals with safe defaults and resolves `\"system\"` against\n * the renderer-supplied `systemTheme`. This — not a React/RN context, which\n * this package cannot own — is the entire portable contract behind antd\n * `ConfigProvider`: see docs/design-system-provider.md for what was\n * deliberately left to the renderer.\n */\nexport function resolveDesignSystemEnvironment(\n input: DesignSystemEnvironmentInput,\n options: ResolveDesignSystemEnvironmentOptions,\n): ResolvedDesignSystemEnvironment {\n validateDesignSystemEnvironmentInput(input);\n if (options.systemTheme !== \"light\" && options.systemTheme !== \"dark\") {\n throw new TypeError(`Unsupported DesignSystemEnvironment systemTheme: ${String(options.systemTheme)}`);\n }\n if (options.systemDirection !== undefined) {\n assertDirection(options.systemDirection, \"systemDirection\");\n }\n if (options.systemTextScale !== undefined) {\n assertTextScale(options.systemTextScale, \"systemTextScale\");\n }\n if (options.systemReducedMotion !== undefined) {\n assertBoolean(options.systemReducedMotion, \"systemReducedMotion\");\n }\n if (options.parent !== undefined) {\n validateResolvedDesignSystemEnvironment(options.parent);\n }\n\n const theme =\n input.theme ?? options.parent?.theme ?? designSystemEnvironmentDefaults.theme;\n return {\n theme: theme === \"system\" ? options.systemTheme : theme,\n direction:\n input.direction ??\n options.parent?.direction ??\n options.systemDirection ??\n designSystemEnvironmentDefaults.direction,\n textScale:\n input.textScale ??\n options.parent?.textScale ??\n options.systemTextScale ??\n designSystemEnvironmentDefaults.textScale,\n reducedMotion:\n input.reducedMotion ??\n options.parent?.reducedMotion ??\n options.systemReducedMotion ??\n designSystemEnvironmentDefaults.reducedMotion,\n minimumVisualTarget:\n input.minimumVisualTarget ??\n options.parent?.minimumVisualTarget ??\n designSystemEnvironmentDefaults.minimumVisualTarget,\n density:\n input.density ??\n options.parent?.density ??\n designSystemEnvironmentDefaults.density,\n };\n}\n\n/**\n * Resolves the portable Provider value without owning React/RN Context. A\n * renderer stores this object in its own context and feeds `palette` directly\n * to recipe color resolution.\n */\nexport function resolveDesignSystemProviderValue(\n input: DesignSystemEnvironmentInput,\n options: ResolveDesignSystemEnvironmentOptions,\n): DesignSystemProviderValue {\n const environment = resolveDesignSystemEnvironment(input, options);\n const brandOverride = options.brandPalette?.[environment.theme];\n const value = {\n environment,\n palette: {\n theme: brandOverride === undefined\n ? THEMES[environment.theme]\n : { ...THEMES[environment.theme], ...brandOverride },\n statusAccents: ACCENTS[environment.theme],\n statusAccentFills: accentFill,\n },\n };\n validateDesignSystemProviderValue(value);\n return value;\n}\n"]}
|
|
@@ -139,5 +139,5 @@ export declare const floatingActionButtonRecipe: {
|
|
|
139
139
|
* wires into src/behaviors.ts). Kept here, not there, so this module stays
|
|
140
140
|
* self-contained per the authoring brief.
|
|
141
141
|
*/
|
|
142
|
-
export declare const floatingActionButtonBehaviorScenarios: readonly ["collapses-on-scroll-away-from-start-without-losing-the-44-unit-target", "expands-on-scroll-toward-start", "idle-scroll-signal-does-not-change-the-current-mode", "accessible-name-is-the-full-label-in-both-layout-modes", "content-clearance-accounts-for-the-safe-area-inset-additively", "root-sits-after-scrollable-content-in-reading-and-tab-order", "reduced-motion-
|
|
142
|
+
export declare const floatingActionButtonBehaviorScenarios: readonly ["collapses-on-scroll-away-from-start-without-losing-the-44-unit-target", "expands-on-scroll-toward-start", "idle-scroll-signal-does-not-change-the-current-mode", "accessible-name-is-the-full-label-in-both-layout-modes", "content-clearance-accounts-for-the-safe-area-inset-additively", "root-sits-after-scrollable-content-in-reading-and-tab-order", "reduced-motion-switches-instantly-without-a-shape-tween"];
|
|
143
143
|
//# sourceMappingURL=floating-action-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-action-button.d.ts","sourceRoot":"","sources":["../src/floating-action-button.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,MAAM,8BAA8B,GAAG,UAAU,GAAG,WAAW,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,MAAM,gCAAgC,GACxC,iBAAiB,GACjB,cAAc,GACd,MAAM,CAAC;AAEX,MAAM,MAAM,kCAAkC,CAC5C,QAAQ,SAAS,MAAM,GAAG,gBAAgB,IACxC,QAAQ,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,kBAAkB,CAAC,EAAE,KAAK,CAAC;IAC3B,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,MAAM,0CAA0C,CACpD,QAAQ,SAAS,MAAM,GAAG,gBAAgB,IACxC,QAAQ,CAAC;IAAE,IAAI,EAAE,QAAQ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,EAAE,8BAA8B,CAAC;IAC3C,0BAA0B,EAAE,MAAM,CAAC;CACpC,CAAC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;CAE4B,CAAC;AAoC9E,wBAAgB,sCAAsC,CAAC,QAAQ,SAAS,MAAM,EAC5E,UAAU,EAAE,8BAA8B,CAAC,QAAQ,CAAC,GACnD,IAAI,CAsBN;AAED;;;;GAIG;AACH,wBAAgB,qCAAqC,CAAC,QAAQ,SAAS,MAAM,EAC3E,UAAU,EAAE,8BAA8B,CAAC,QAAQ,CAAC,GACnD,sCAAsC,CAAC,QAAQ,CAAC,CASlD;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,gCAAgC,EACxC,YAAY,GAAE,8BAAgF,GAC7F,8BAA8B,CAYhC;AAED;;;;;;GAMG;AACH,wBAAgB,2CAA2C,CACzD,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAWR;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;IAMrC;;;;;;;;;OASG;;;;;;;;;;;;IAOH;;;;;OAKG;;;;;;CAEK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,kaAUxC,CAAC"}
|
|
@@ -144,6 +144,8 @@ export const floatingActionButtonBehaviorScenarios = [
|
|
|
144
144
|
"accessible-name-is-the-full-label-in-both-layout-modes",
|
|
145
145
|
"content-clearance-accounts-for-the-safe-area-inset-additively",
|
|
146
146
|
"root-sits-after-scrollable-content-in-reading-and-tab-order",
|
|
147
|
-
|
|
147
|
+
// The micro recipe already specifies instant reduced motion; the old
|
|
148
|
+
// crossfade scenario contradicted that choice. See docs/floating-action-button.md.
|
|
149
|
+
"reduced-motion-switches-instantly-without-a-shape-tween",
|
|
148
150
|
];
|
|
149
151
|
//# sourceMappingURL=floating-action-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-action-button.js","sourceRoot":"","sources":["../src/floating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M,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU;IACzC,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAW;IAC7C,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK;IACpC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAO;IACpC,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM;IACrC;;;;;;;;;OASG;IACH,aAAa,EAAE;QACb,WAAW,EAAE,WAAW;QACxB,iBAAiB,EAAE,OAAO,CAAC,EAAE;KAC9B;IACD,MAAM,EAAE,OAAO,CAAC,EAAE;IAClB,MAAM,EAAE,MAAM,CAAC,QAAQ;IACvB;;;;;OAKG;IACH,UAAU,EAAE,YAAY,CAAC,KAAK;CACtB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,uEAAuE;IACvE,gCAAgC;IAChC,qDAAqD;IACrD,wDAAwD;IACxD,+DAA+D;IAC/D,6DAA6D;IAC7D,gEAAgE;CACxD,CAAC","sourcesContent":["import { iconButtonRecipe } from \"./icon-button-recipe.js\";\nimport { motionPreset, shadow, spacing } from \"./foundations.js\";\nimport type { SemanticIconName } from \"./icon.js\";\n\n/**\n * FloatingActionButton is not a smaller BottomCTA. BottomCTA is the screen's\n * conclusion (full-width, end of a flow, `bottomCtaRecipe`'s full-bleed\n * anatomy). FloatingActionButton is a single create action that floats above\n * scrollable content the user is still browsing — it never spans the width\n * and never claims to be the screen's only action. That is the entire\n * justification for a second contract instead of a BottomCTA variant.\n */\nexport type FloatingActionButtonLayoutMode = \"expanded\" | \"collapsed\";\n\n/**\n * The renderer owns scroll listening and thresholding (same boundary as\n * LoadMore's IntersectionObserver/onEndReached and Popover's AnchoredOverlay —\n * this package never touches a scroll container). It only reports a discrete\n * signal; `resolveFloatingActionButtonLayoutMode` turns that into the next\n * mode without the renderer re-deriving the collapse/expand rule itself.\n */\nexport type FloatingActionButtonScrollSignal =\n | \"away-from-start\"\n | \"toward-start\"\n | \"idle\";\n\nexport type FloatingActionButtonIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n name: IconName;\n decorative?: true;\n accessibilityLabel?: never;\n size?: never;\n tone?: never;\n weight?: never;\n directionality?: never;\n}>;\n\nexport type ResolvedFloatingActionButtonIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{ name: IconName; decorative: true }>;\n\n/**\n * `label` is required even though `collapsed` mode shows only the icon.\n * The action's name must never shrink to nothing just because its visible\n * chrome did — `resolveFloatingActionButtonDescriptor` always reports the\n * full label as the accessible name in both layout modes.\n */\nexport type FloatingActionButtonDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n icon: FloatingActionButtonIconDescriptor<IconName>;\n label: string;\n layoutMode?: FloatingActionButtonLayoutMode;\n}>;\n\nexport type ResolvedFloatingActionButtonDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n icon: ResolvedFloatingActionButtonIconDescriptor<IconName>;\n label: string;\n layoutMode: FloatingActionButtonLayoutMode;\n resolvedAccessibilityLabel: string;\n}>;\n\nexport const floatingActionButtonBehaviorDefaults = {\n layoutMode: \"expanded\",\n} as const satisfies Readonly<{ layoutMode: FloatingActionButtonLayoutMode }>;\n\nfunction validateTrimmedCopy(value: unknown, field: string): asserts value is string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`${field} must not be empty`);\n }\n if (value !== value.trim()) {\n throw new TypeError(`${field} must not start or end with whitespace`);\n }\n}\n\nfunction isObject(value: unknown): value is Readonly<Record<string, unknown>> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction rejectUnknownKeys(\n value: Readonly<Record<string, unknown>>,\n allowed: ReadonlySet<string>,\n field: string,\n): void {\n for (const key of Object.keys(value)) {\n if (!allowed.has(key)) {\n throw new TypeError(`Unsupported FloatingActionButton ${field} field: ${key}`);\n }\n }\n}\n\nconst descriptorKeys = new Set([\"icon\", \"label\", \"layoutMode\"]);\nconst iconKeys = new Set([\"name\", \"decorative\"]);\nconst layoutModes = new Set<FloatingActionButtonLayoutMode>([\"expanded\", \"collapsed\"]);\nconst scrollSignals = new Set<FloatingActionButtonScrollSignal>([\n \"away-from-start\",\n \"toward-start\",\n \"idle\",\n]);\n\nexport function validateFloatingActionButtonDescriptor<IconName extends string>(\n descriptor: FloatingActionButtonDescriptor<IconName>,\n): void {\n if (!isObject(descriptor)) {\n throw new TypeError(\"FloatingActionButton descriptor must be an object\");\n }\n rejectUnknownKeys(descriptor, descriptorKeys, \"descriptor\");\n validateTrimmedCopy(descriptor.label, \"FloatingActionButton label\");\n if (!isObject(descriptor.icon)) {\n throw new TypeError(\"FloatingActionButton icon must be an object\");\n }\n rejectUnknownKeys(descriptor.icon, iconKeys, \"icon\");\n if (descriptor.icon.decorative !== undefined && descriptor.icon.decorative !== true) {\n throw new TypeError(\"FloatingActionButton icon must be decorative\");\n }\n validateTrimmedCopy(descriptor.icon.name, \"FloatingActionButton icon name\");\n if (\n descriptor.layoutMode !== undefined &&\n !layoutModes.has(descriptor.layoutMode)\n ) {\n throw new TypeError(\n `Unsupported FloatingActionButton layoutMode: ${String(descriptor.layoutMode)}`,\n );\n }\n}\n\n/**\n * The label is the accessible name in every mode — `collapsed` never falls\n * back to the icon name, because an icon-only glyph is not a stable\n * accessible name across products or locales.\n */\nexport function resolveFloatingActionButtonDescriptor<IconName extends string>(\n descriptor: FloatingActionButtonDescriptor<IconName>,\n): ResolvedFloatingActionButtonDescriptor<IconName> {\n validateFloatingActionButtonDescriptor(descriptor);\n return {\n icon: { name: descriptor.icon.name, decorative: true },\n label: descriptor.label,\n layoutMode:\n descriptor.layoutMode ?? floatingActionButtonBehaviorDefaults.layoutMode,\n resolvedAccessibilityLabel: descriptor.label,\n };\n}\n\n/**\n * Collapsing on `away-from-start` and expanding on `toward-start` mirrors the\n * common list-scroll convention (hide the label while the user reads,\n * reintroduce it once they scroll back toward the top). `idle` intentionally\n * keeps whatever mode is already active instead of guessing, so a renderer\n * that reports \"no delta since last frame\" cannot cause the button to flicker.\n */\nexport function resolveFloatingActionButtonLayoutMode(\n signal: FloatingActionButtonScrollSignal,\n previousMode: FloatingActionButtonLayoutMode = floatingActionButtonBehaviorDefaults.layoutMode,\n): FloatingActionButtonLayoutMode {\n if (!scrollSignals.has(signal)) {\n throw new TypeError(`Unsupported FloatingActionButton scroll signal: ${String(signal)}`);\n }\n if (!layoutModes.has(previousMode)) {\n throw new TypeError(\n `Unsupported FloatingActionButton layoutMode: ${String(previousMode)}`,\n );\n }\n if (signal === \"away-from-start\") return \"collapsed\";\n if (signal === \"toward-start\") return \"expanded\";\n return previousMode;\n}\n\n/**\n * Answers \"who reserves the content's bottom padding\" so both platform\n * renderers compute the same number instead of each re-deriving\n * diameter + margin arithmetic independently and drifting apart. The safe-area\n * inset is additive, matching every other bottom-anchored recipe in this\n * package (BottomNavigation, Sheet, Toast) rather than a `max()` clamp.\n */\nexport function resolveFloatingActionButtonContentClearance(\n safeAreaBottomInset: number,\n): number {\n if (!Number.isFinite(safeAreaBottomInset) || safeAreaBottomInset < 0) {\n throw new RangeError(\n \"FloatingActionButton safeAreaBottomInset must be a non-negative finite number\",\n );\n }\n return (\n floatingActionButtonRecipe.circle.diameter +\n floatingActionButtonRecipe.margin * 2 +\n safeAreaBottomInset\n );\n}\n\n/**\n * Both layout modes reuse Button/IconButton's `large` tier so the control\n * never changes height while morphing between a circle and a pill — only\n * shape and content change, per the brief's \"don't fork the Button recipe.\"\n */\nexport const floatingActionButtonRecipe = {\n slots: [\"root\", \"icon\", \"label\"] as const,\n defaults: { layoutMode: \"expanded\" } as const,\n circle: iconButtonRecipe.sizes.large,\n tone: iconButtonRecipe.tones.primary,\n shape: iconButtonRecipe.shapes.circle,\n /**\n * Button의 large 티어와 같은 값이다. 그런데 `buttonRecipe`를 import하지는 않는다 —\n * 그것은 `recipes.ts`에 있고 그 파일은 `component-recipes.ts`를 import하는 **하류**라,\n * 여기서 거슬러 올라가면 순환이 된다(ESM은 재수출을 본문보다 먼저 평가해서\n * `buttonRecipe`가 undefined인 채로 이 모듈이 실행된다).\n *\n * 대신 같은 foundations 토큰을 직접 읽고, **두 값이 어긋나지 않는다는 것은\n * `test/floating-action-button.test.ts`의 불변식으로 강제한다.** 이 저장소가 규칙을\n * 다루는 방식대로 — 지켜야 할 것은 import가 아니라 테스트로 묶는다.\n */\n expandedLabel: {\n textVariant: \"bodyLarge\",\n paddingHorizontal: spacing.lg,\n },\n margin: spacing.md,\n shadow: shadow.floating,\n /**\n * `micro` (120ms, instant under Reduce Motion) rather than `enter`/`exit`:\n * this transition can fire on every scroll-direction change, and a state\n * driven by continuous scrolling should use the fastest state-change tier\n * so it cannot visibly queue behind fast scroll gestures.\n */\n transition: motionPreset.micro,\n} as const;\n\n/**\n * Literal scenario names for behaviorRegistry.floatingActionButton (lead\n * wires into src/behaviors.ts). Kept here, not there, so this module stays\n * self-contained per the authoring brief.\n */\nexport const floatingActionButtonBehaviorScenarios = [\n \"collapses-on-scroll-away-from-start-without-losing-the-44-unit-target\",\n \"expands-on-scroll-toward-start\",\n \"idle-scroll-signal-does-not-change-the-current-mode\",\n \"accessible-name-is-the-full-label-in-both-layout-modes\",\n \"content-clearance-accounts-for-the-safe-area-inset-additively\",\n \"root-sits-after-scrollable-content-in-reading-and-tab-order\",\n \"reduced-motion-crossfades-icon-and-label-without-a-shape-tween\",\n] as const;\n"]}
|
|
1
|
+
{"version":3,"file":"floating-action-button.js","sourceRoot":"","sources":["../src/floating-action-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAgEjE,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,UAAU,EAAE,UAAU;CACqD,CAAC;AAE9E,SAAS,mBAA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AAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM;IACrC;;;;;;;;;OASG;IACH,aAAa,EAAE;QACb,WAAW,EAAE,WAAW;QACxB,iBAAiB,EAAE,OAAO,CAAC,EAAE;KAC9B;IACD,MAAM,EAAE,OAAO,CAAC,EAAE;IAClB,MAAM,EAAE,MAAM,CAAC,QAAQ;IACvB;;;;;OAKG;IACH,UAAU,EAAE,YAAY,CAAC,KAAK;CACtB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,uEAAuE;IACvE,gCAAgC;IAChC,qDAAqD;IACrD,wDAAwD;IACxD,+DAA+D;IAC/D,6DAA6D;IAC7D,qEAAqE;IACrE,mFAAmF;IACnF,yDAAyD;CACjD,CAAC","sourcesContent":["import { iconButtonRecipe } from \"./icon-button-recipe.js\";\nimport { motionPreset, shadow, spacing } from \"./foundations.js\";\nimport type { SemanticIconName } from \"./icon.js\";\n\n/**\n * FloatingActionButton is not a smaller BottomCTA. BottomCTA is the screen's\n * conclusion (full-width, end of a flow, `bottomCtaRecipe`'s full-bleed\n * anatomy). FloatingActionButton is a single create action that floats above\n * scrollable content the user is still browsing — it never spans the width\n * and never claims to be the screen's only action. That is the entire\n * justification for a second contract instead of a BottomCTA variant.\n */\nexport type FloatingActionButtonLayoutMode = \"expanded\" | \"collapsed\";\n\n/**\n * The renderer owns scroll listening and thresholding (same boundary as\n * LoadMore's IntersectionObserver/onEndReached and Popover's AnchoredOverlay —\n * this package never touches a scroll container). It only reports a discrete\n * signal; `resolveFloatingActionButtonLayoutMode` turns that into the next\n * mode without the renderer re-deriving the collapse/expand rule itself.\n */\nexport type FloatingActionButtonScrollSignal =\n | \"away-from-start\"\n | \"toward-start\"\n | \"idle\";\n\nexport type FloatingActionButtonIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n name: IconName;\n decorative?: true;\n accessibilityLabel?: never;\n size?: never;\n tone?: never;\n weight?: never;\n directionality?: never;\n}>;\n\nexport type ResolvedFloatingActionButtonIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{ name: IconName; decorative: true }>;\n\n/**\n * `label` is required even though `collapsed` mode shows only the icon.\n * The action's name must never shrink to nothing just because its visible\n * chrome did — `resolveFloatingActionButtonDescriptor` always reports the\n * full label as the accessible name in both layout modes.\n */\nexport type FloatingActionButtonDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n icon: FloatingActionButtonIconDescriptor<IconName>;\n label: string;\n layoutMode?: FloatingActionButtonLayoutMode;\n}>;\n\nexport type ResolvedFloatingActionButtonDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n icon: ResolvedFloatingActionButtonIconDescriptor<IconName>;\n label: string;\n layoutMode: FloatingActionButtonLayoutMode;\n resolvedAccessibilityLabel: string;\n}>;\n\nexport const floatingActionButtonBehaviorDefaults = {\n layoutMode: \"expanded\",\n} as const satisfies Readonly<{ layoutMode: FloatingActionButtonLayoutMode }>;\n\nfunction validateTrimmedCopy(value: unknown, field: string): asserts value is string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`${field} must not be empty`);\n }\n if (value !== value.trim()) {\n throw new TypeError(`${field} must not start or end with whitespace`);\n }\n}\n\nfunction isObject(value: unknown): value is Readonly<Record<string, unknown>> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction rejectUnknownKeys(\n value: Readonly<Record<string, unknown>>,\n allowed: ReadonlySet<string>,\n field: string,\n): void {\n for (const key of Object.keys(value)) {\n if (!allowed.has(key)) {\n throw new TypeError(`Unsupported FloatingActionButton ${field} field: ${key}`);\n }\n }\n}\n\nconst descriptorKeys = new Set([\"icon\", \"label\", \"layoutMode\"]);\nconst iconKeys = new Set([\"name\", \"decorative\"]);\nconst layoutModes = new Set<FloatingActionButtonLayoutMode>([\"expanded\", \"collapsed\"]);\nconst scrollSignals = new Set<FloatingActionButtonScrollSignal>([\n \"away-from-start\",\n \"toward-start\",\n \"idle\",\n]);\n\nexport function validateFloatingActionButtonDescriptor<IconName extends string>(\n descriptor: FloatingActionButtonDescriptor<IconName>,\n): void {\n if (!isObject(descriptor)) {\n throw new TypeError(\"FloatingActionButton descriptor must be an object\");\n }\n rejectUnknownKeys(descriptor, descriptorKeys, \"descriptor\");\n validateTrimmedCopy(descriptor.label, \"FloatingActionButton label\");\n if (!isObject(descriptor.icon)) {\n throw new TypeError(\"FloatingActionButton icon must be an object\");\n }\n rejectUnknownKeys(descriptor.icon, iconKeys, \"icon\");\n if (descriptor.icon.decorative !== undefined && descriptor.icon.decorative !== true) {\n throw new TypeError(\"FloatingActionButton icon must be decorative\");\n }\n validateTrimmedCopy(descriptor.icon.name, \"FloatingActionButton icon name\");\n if (\n descriptor.layoutMode !== undefined &&\n !layoutModes.has(descriptor.layoutMode)\n ) {\n throw new TypeError(\n `Unsupported FloatingActionButton layoutMode: ${String(descriptor.layoutMode)}`,\n );\n }\n}\n\n/**\n * The label is the accessible name in every mode — `collapsed` never falls\n * back to the icon name, because an icon-only glyph is not a stable\n * accessible name across products or locales.\n */\nexport function resolveFloatingActionButtonDescriptor<IconName extends string>(\n descriptor: FloatingActionButtonDescriptor<IconName>,\n): ResolvedFloatingActionButtonDescriptor<IconName> {\n validateFloatingActionButtonDescriptor(descriptor);\n return {\n icon: { name: descriptor.icon.name, decorative: true },\n label: descriptor.label,\n layoutMode:\n descriptor.layoutMode ?? floatingActionButtonBehaviorDefaults.layoutMode,\n resolvedAccessibilityLabel: descriptor.label,\n };\n}\n\n/**\n * Collapsing on `away-from-start` and expanding on `toward-start` mirrors the\n * common list-scroll convention (hide the label while the user reads,\n * reintroduce it once they scroll back toward the top). `idle` intentionally\n * keeps whatever mode is already active instead of guessing, so a renderer\n * that reports \"no delta since last frame\" cannot cause the button to flicker.\n */\nexport function resolveFloatingActionButtonLayoutMode(\n signal: FloatingActionButtonScrollSignal,\n previousMode: FloatingActionButtonLayoutMode = floatingActionButtonBehaviorDefaults.layoutMode,\n): FloatingActionButtonLayoutMode {\n if (!scrollSignals.has(signal)) {\n throw new TypeError(`Unsupported FloatingActionButton scroll signal: ${String(signal)}`);\n }\n if (!layoutModes.has(previousMode)) {\n throw new TypeError(\n `Unsupported FloatingActionButton layoutMode: ${String(previousMode)}`,\n );\n }\n if (signal === \"away-from-start\") return \"collapsed\";\n if (signal === \"toward-start\") return \"expanded\";\n return previousMode;\n}\n\n/**\n * Answers \"who reserves the content's bottom padding\" so both platform\n * renderers compute the same number instead of each re-deriving\n * diameter + margin arithmetic independently and drifting apart. The safe-area\n * inset is additive, matching every other bottom-anchored recipe in this\n * package (BottomNavigation, Sheet, Toast) rather than a `max()` clamp.\n */\nexport function resolveFloatingActionButtonContentClearance(\n safeAreaBottomInset: number,\n): number {\n if (!Number.isFinite(safeAreaBottomInset) || safeAreaBottomInset < 0) {\n throw new RangeError(\n \"FloatingActionButton safeAreaBottomInset must be a non-negative finite number\",\n );\n }\n return (\n floatingActionButtonRecipe.circle.diameter +\n floatingActionButtonRecipe.margin * 2 +\n safeAreaBottomInset\n );\n}\n\n/**\n * Both layout modes reuse Button/IconButton's `large` tier so the control\n * never changes height while morphing between a circle and a pill — only\n * shape and content change, per the brief's \"don't fork the Button recipe.\"\n */\nexport const floatingActionButtonRecipe = {\n slots: [\"root\", \"icon\", \"label\"] as const,\n defaults: { layoutMode: \"expanded\" } as const,\n circle: iconButtonRecipe.sizes.large,\n tone: iconButtonRecipe.tones.primary,\n shape: iconButtonRecipe.shapes.circle,\n /**\n * Button의 large 티어와 같은 값이다. 그런데 `buttonRecipe`를 import하지는 않는다 —\n * 그것은 `recipes.ts`에 있고 그 파일은 `component-recipes.ts`를 import하는 **하류**라,\n * 여기서 거슬러 올라가면 순환이 된다(ESM은 재수출을 본문보다 먼저 평가해서\n * `buttonRecipe`가 undefined인 채로 이 모듈이 실행된다).\n *\n * 대신 같은 foundations 토큰을 직접 읽고, **두 값이 어긋나지 않는다는 것은\n * `test/floating-action-button.test.ts`의 불변식으로 강제한다.** 이 저장소가 규칙을\n * 다루는 방식대로 — 지켜야 할 것은 import가 아니라 테스트로 묶는다.\n */\n expandedLabel: {\n textVariant: \"bodyLarge\",\n paddingHorizontal: spacing.lg,\n },\n margin: spacing.md,\n shadow: shadow.floating,\n /**\n * `micro` (120ms, instant under Reduce Motion) rather than `enter`/`exit`:\n * this transition can fire on every scroll-direction change, and a state\n * driven by continuous scrolling should use the fastest state-change tier\n * so it cannot visibly queue behind fast scroll gestures.\n */\n transition: motionPreset.micro,\n} as const;\n\n/**\n * Literal scenario names for behaviorRegistry.floatingActionButton (lead\n * wires into src/behaviors.ts). Kept here, not there, so this module stays\n * self-contained per the authoring brief.\n */\nexport const floatingActionButtonBehaviorScenarios = [\n \"collapses-on-scroll-away-from-start-without-losing-the-44-unit-target\",\n \"expands-on-scroll-toward-start\",\n \"idle-scroll-signal-does-not-change-the-current-mode\",\n \"accessible-name-is-the-full-label-in-both-layout-modes\",\n \"content-clearance-accounts-for-the-safe-area-inset-additively\",\n \"root-sits-after-scrollable-content-in-reading-and-tab-order\",\n // The micro recipe already specifies instant reduced motion; the old\n // crossfade scenario contradicted that choice. See docs/floating-action-button.md.\n \"reduced-motion-switches-instantly-without-a-shape-tween\",\n] as const;\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 숫자·통화·용량을 화면에 쓰는 형식으로 바꾼다. 컴포넌트가 아니라 **판정 helper**다.
|
|
3
|
+
*
|
|
4
|
+
* 왜 계약에 있나: `Statistic`, `DataTable`, `Slider`의 `valueText`, `Progress`의 발표
|
|
5
|
+
* 문구가 전부 "이 숫자를 어떻게 읽나"를 제품에 떠넘기고 있었다. 각 제품이 `Intl`을 다시
|
|
6
|
+
* 감싸면서 로케일 전달을 빠뜨리거나(브라우저 기본값으로 새어 나감) 통화 소수 자리를
|
|
7
|
+
* 임의로 정했다. 형식 자체는 플랫폼이 이미 알고 있으므로 HJM은 **로케일을 반드시 받게
|
|
8
|
+
* 하는 얇은 층**만 둔다.
|
|
9
|
+
*
|
|
10
|
+
* 문구 조립("3개 중 2개")은 여전히 제품 몫이다 — 어순이 언어마다 다르다.
|
|
11
|
+
*/
|
|
12
|
+
export type NumberFormatOptions = Readonly<{
|
|
13
|
+
/** 필수다. 생략 가능하게 두면 환경 기본값으로 조용히 새어 나간다. */
|
|
14
|
+
locale: string | readonly string[];
|
|
15
|
+
minimumFractionDigits?: number;
|
|
16
|
+
maximumFractionDigits?: number;
|
|
17
|
+
/** 1,234 → "1.2천"처럼 짧게. 지원 여부는 플랫폼이 정한다. */
|
|
18
|
+
compact?: boolean;
|
|
19
|
+
signDisplay?: "auto" | "always" | "never";
|
|
20
|
+
}>;
|
|
21
|
+
export declare function formatNumber(value: number, options: NumberFormatOptions): string;
|
|
22
|
+
export type CurrencyFormatOptions = NumberFormatOptions & Readonly<{
|
|
23
|
+
/** ISO 4217 코드. 통화 기호의 자리·소수 자리는 로케일과 코드가 함께 정한다. */
|
|
24
|
+
currency: string;
|
|
25
|
+
/** 기호 대신 코드로 표기. 같은 기호를 쓰는 통화가 섞인 화면에서 쓴다. */
|
|
26
|
+
display?: "symbol" | "code" | "name";
|
|
27
|
+
}>;
|
|
28
|
+
export declare function formatCurrency(value: number, options: CurrencyFormatOptions): string;
|
|
29
|
+
export type PercentFormatOptions = NumberFormatOptions;
|
|
30
|
+
/** 0.35 → "35%". 값은 **비율**이지 이미 곱해진 숫자가 아니다. */
|
|
31
|
+
export declare function formatPercent(ratio: number, options: PercentFormatOptions): string;
|
|
32
|
+
/**
|
|
33
|
+
* 파일 크기. `Intl`에 바이트 단위가 없어 계산은 여기서 하고 **숫자 표기만** 로케일에
|
|
34
|
+
* 맡긴다. 1000 기준(KB)을 쓰는 이유는 OS 파일 관리자와 스토어가 그렇게 보여 주기 때문이다.
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatBytes(bytes: number, options: NumberFormatOptions): string;
|
|
37
|
+
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../src/formatters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,2CAA2C;IAC3C,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACnC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC3C,CAAC,CAAC;AAeH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAShF;AAED,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GACrD,QAAQ,CAAC;IACP,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;CACtC,CAAC,CAAC;AAEL,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAcpF;AAED,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAEvD,gDAAgD;AAChD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAQlF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAgB/E"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function assertLocale(locale) {
|
|
2
|
+
const values = typeof locale === "string" ? [locale] : locale;
|
|
3
|
+
if (values.length === 0 || values.some((value) => typeof value !== "string" || value.trim().length === 0)) {
|
|
4
|
+
throw new TypeError("Formatter locale must be a non-empty BCP 47 tag");
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
function assertFinite(value, field) {
|
|
8
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
9
|
+
throw new TypeError(`${field} must be a finite number`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function formatNumber(value, options) {
|
|
13
|
+
assertFinite(value, "formatNumber value");
|
|
14
|
+
assertLocale(options.locale);
|
|
15
|
+
return new Intl.NumberFormat(options.locale, {
|
|
16
|
+
...(options.minimumFractionDigits === undefined ? {} : { minimumFractionDigits: options.minimumFractionDigits }),
|
|
17
|
+
...(options.maximumFractionDigits === undefined ? {} : { maximumFractionDigits: options.maximumFractionDigits }),
|
|
18
|
+
...(options.compact === true ? { notation: "compact" } : {}),
|
|
19
|
+
...(options.signDisplay === undefined ? {} : { signDisplay: options.signDisplay }),
|
|
20
|
+
}).format(value);
|
|
21
|
+
}
|
|
22
|
+
export function formatCurrency(value, options) {
|
|
23
|
+
assertFinite(value, "formatCurrency value");
|
|
24
|
+
assertLocale(options.locale);
|
|
25
|
+
if (typeof options.currency !== "string" || !/^[A-Z]{3}$/u.test(options.currency)) {
|
|
26
|
+
throw new TypeError(`formatCurrency currency must be an ISO 4217 code: ${String(options.currency)}`);
|
|
27
|
+
}
|
|
28
|
+
return new Intl.NumberFormat(options.locale, {
|
|
29
|
+
style: "currency",
|
|
30
|
+
currency: options.currency,
|
|
31
|
+
currencyDisplay: options.display ?? "symbol",
|
|
32
|
+
...(options.minimumFractionDigits === undefined ? {} : { minimumFractionDigits: options.minimumFractionDigits }),
|
|
33
|
+
...(options.maximumFractionDigits === undefined ? {} : { maximumFractionDigits: options.maximumFractionDigits }),
|
|
34
|
+
...(options.compact === true ? { notation: "compact" } : {}),
|
|
35
|
+
}).format(value);
|
|
36
|
+
}
|
|
37
|
+
/** 0.35 → "35%". 값은 **비율**이지 이미 곱해진 숫자가 아니다. */
|
|
38
|
+
export function formatPercent(ratio, options) {
|
|
39
|
+
assertFinite(ratio, "formatPercent ratio");
|
|
40
|
+
assertLocale(options.locale);
|
|
41
|
+
return new Intl.NumberFormat(options.locale, {
|
|
42
|
+
style: "percent",
|
|
43
|
+
...(options.minimumFractionDigits === undefined ? {} : { minimumFractionDigits: options.minimumFractionDigits }),
|
|
44
|
+
...(options.maximumFractionDigits === undefined ? {} : { maximumFractionDigits: options.maximumFractionDigits }),
|
|
45
|
+
}).format(ratio);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 파일 크기. `Intl`에 바이트 단위가 없어 계산은 여기서 하고 **숫자 표기만** 로케일에
|
|
49
|
+
* 맡긴다. 1000 기준(KB)을 쓰는 이유는 OS 파일 관리자와 스토어가 그렇게 보여 주기 때문이다.
|
|
50
|
+
*/
|
|
51
|
+
export function formatBytes(bytes, options) {
|
|
52
|
+
assertFinite(bytes, "formatBytes bytes");
|
|
53
|
+
if (bytes < 0)
|
|
54
|
+
throw new RangeError("formatBytes bytes must not be negative");
|
|
55
|
+
assertLocale(options.locale);
|
|
56
|
+
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
57
|
+
let index = 0;
|
|
58
|
+
let value = bytes;
|
|
59
|
+
while (value >= 1000 && index < units.length - 1) {
|
|
60
|
+
value /= 1000;
|
|
61
|
+
index += 1;
|
|
62
|
+
}
|
|
63
|
+
const formatted = formatNumber(value, {
|
|
64
|
+
...options,
|
|
65
|
+
maximumFractionDigits: options.maximumFractionDigits ?? (index === 0 ? 0 : 1),
|
|
66
|
+
});
|
|
67
|
+
return `${formatted} ${units[index]}`;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=formatters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../src/formatters.ts"],"names":[],"mappings":"AAqBA,SAAS,YAAY,CAAC,MAAkC;IACtD,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CA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,OAAO,CAAC,qBAAqB,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9E,CAAC,CAAC;IACH,OAAO,GAAG,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;AACxC,CAAC","sourcesContent":["/**\n * 숫자·통화·용량을 화면에 쓰는 형식으로 바꾼다. 컴포넌트가 아니라 **판정 helper**다.\n *\n * 왜 계약에 있나: `Statistic`, `DataTable`, `Slider`의 `valueText`, `Progress`의 발표\n * 문구가 전부 \"이 숫자를 어떻게 읽나\"를 제품에 떠넘기고 있었다. 각 제품이 `Intl`을 다시\n * 감싸면서 로케일 전달을 빠뜨리거나(브라우저 기본값으로 새어 나감) 통화 소수 자리를\n * 임의로 정했다. 형식 자체는 플랫폼이 이미 알고 있으므로 HJM은 **로케일을 반드시 받게\n * 하는 얇은 층**만 둔다.\n *\n * 문구 조립(\"3개 중 2개\")은 여전히 제품 몫이다 — 어순이 언어마다 다르다.\n */\nexport type NumberFormatOptions = Readonly<{\n /** 필수다. 생략 가능하게 두면 환경 기본값으로 조용히 새어 나간다. */\n locale: string | readonly string[];\n minimumFractionDigits?: number;\n maximumFractionDigits?: number;\n /** 1,234 → \"1.2천\"처럼 짧게. 지원 여부는 플랫폼이 정한다. */\n compact?: boolean;\n signDisplay?: \"auto\" | \"always\" | \"never\";\n}>;\n\nfunction assertLocale(locale: string | readonly string[]): void {\n const values = typeof locale === \"string\" ? [locale] : locale;\n if (values.length === 0 || values.some((value) => typeof value !== \"string\" || value.trim().length === 0)) {\n throw new TypeError(\"Formatter locale must be a non-empty BCP 47 tag\");\n }\n}\n\nfunction assertFinite(value: number, field: string): void {\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new TypeError(`${field} must be a finite number`);\n }\n}\n\nexport function formatNumber(value: number, options: NumberFormatOptions): string {\n assertFinite(value, \"formatNumber value\");\n assertLocale(options.locale);\n return new Intl.NumberFormat(options.locale as string | string[], {\n ...(options.minimumFractionDigits === undefined ? {} : { minimumFractionDigits: options.minimumFractionDigits }),\n ...(options.maximumFractionDigits === undefined ? {} : { maximumFractionDigits: options.maximumFractionDigits }),\n ...(options.compact === true ? { notation: \"compact\" as const } : {}),\n ...(options.signDisplay === undefined ? {} : { signDisplay: options.signDisplay }),\n }).format(value);\n}\n\nexport type CurrencyFormatOptions = NumberFormatOptions &\n Readonly<{\n /** ISO 4217 코드. 통화 기호의 자리·소수 자리는 로케일과 코드가 함께 정한다. */\n currency: string;\n /** 기호 대신 코드로 표기. 같은 기호를 쓰는 통화가 섞인 화면에서 쓴다. */\n display?: \"symbol\" | \"code\" | \"name\";\n }>;\n\nexport function formatCurrency(value: number, options: CurrencyFormatOptions): string {\n assertFinite(value, \"formatCurrency value\");\n assertLocale(options.locale);\n if (typeof options.currency !== \"string\" || !/^[A-Z]{3}$/u.test(options.currency)) {\n throw new TypeError(`formatCurrency currency must be an ISO 4217 code: ${String(options.currency)}`);\n }\n return new Intl.NumberFormat(options.locale as string | string[], {\n style: \"currency\",\n currency: options.currency,\n currencyDisplay: options.display ?? \"symbol\",\n ...(options.minimumFractionDigits === undefined ? {} : { minimumFractionDigits: options.minimumFractionDigits }),\n ...(options.maximumFractionDigits === undefined ? {} : { maximumFractionDigits: options.maximumFractionDigits }),\n ...(options.compact === true ? { notation: \"compact\" as const } : {}),\n }).format(value);\n}\n\nexport type PercentFormatOptions = NumberFormatOptions;\n\n/** 0.35 → \"35%\". 값은 **비율**이지 이미 곱해진 숫자가 아니다. */\nexport function formatPercent(ratio: number, options: PercentFormatOptions): string {\n assertFinite(ratio, \"formatPercent ratio\");\n assertLocale(options.locale);\n return new Intl.NumberFormat(options.locale as string | string[], {\n style: \"percent\",\n ...(options.minimumFractionDigits === undefined ? {} : { minimumFractionDigits: options.minimumFractionDigits }),\n ...(options.maximumFractionDigits === undefined ? {} : { maximumFractionDigits: options.maximumFractionDigits }),\n }).format(ratio);\n}\n\n/**\n * 파일 크기. `Intl`에 바이트 단위가 없어 계산은 여기서 하고 **숫자 표기만** 로케일에\n * 맡긴다. 1000 기준(KB)을 쓰는 이유는 OS 파일 관리자와 스토어가 그렇게 보여 주기 때문이다.\n */\nexport function formatBytes(bytes: number, options: NumberFormatOptions): string {\n assertFinite(bytes, \"formatBytes bytes\");\n if (bytes < 0) throw new RangeError(\"formatBytes bytes must not be negative\");\n assertLocale(options.locale);\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"] as const;\n let index = 0;\n let value = bytes;\n while (value >= 1000 && index < units.length - 1) {\n value /= 1000;\n index += 1;\n }\n const formatted = formatNumber(value, {\n ...options,\n maximumFractionDigits: options.maximumFractionDigits ?? (index === 0 ? 0 : 1),\n });\n return `${formatted} ${units[index]}`;\n}\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type HeadingLevel } from "./foundations.js";
|
|
2
|
+
/**
|
|
3
|
+
* 문서 제목 단계를 실제로 그리는 primitive다.
|
|
4
|
+
*
|
|
5
|
+
* `heading`(foundations)에는 이미 level1 40px부터 level5 18px까지 다섯 단계가 있었지만
|
|
6
|
+
* **어떤 renderer도 노출하지 않았다** — `Text`는 `TextVariant`(최대 24px)만 받는다.
|
|
7
|
+
* 그래서 랜딩 히어로나 큰 숫자가 필요한 화면은 매번 제품 CSS로 폰트 크기를 직접 썼다.
|
|
8
|
+
* 이 계약은 새 크기를 만들지 않는다. 있던 스케일을 꺼내 쓸 수 있게 하는 것이 전부다.
|
|
9
|
+
*
|
|
10
|
+
* `Top`(화면 첫 제목)·`Section`(본문 묶음 제목)과 겹치지 않는다. 그 둘은 **자리**를
|
|
11
|
+
* 아는 블록이고 자기 여백·보조 문장·보조 행동을 갖는다. `Heading`은 자리를 모르는
|
|
12
|
+
* 글자 하나다 — 카드 안, 표 위, 빈 상태 안 어디에나 놓인다.
|
|
13
|
+
*/
|
|
14
|
+
export type HeadingDescriptor = Readonly<{
|
|
15
|
+
/** 시각적 크기. 문서 구조상의 단계와 분리돼 있다. */
|
|
16
|
+
level: HeadingLevel;
|
|
17
|
+
/**
|
|
18
|
+
* 실제로 낼 요소 단계. 생략하면 `level`의 숫자를 따른다. 시각적 크기와 문서 구조가
|
|
19
|
+
* 어긋나는 경우(카드 제목이 크지만 h4인 경우)에 따로 지정한다.
|
|
20
|
+
*/
|
|
21
|
+
semanticLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function validateHeadingDescriptor(descriptor: HeadingDescriptor): void;
|
|
24
|
+
/** 시각적 단계에서 문서 단계를 뽑되, 명시된 값이 있으면 그것이 이긴다. */
|
|
25
|
+
export declare function resolveHeadingSemanticLevel(descriptor: HeadingDescriptor): 1 | 2 | 3 | 4 | 5 | 6;
|
|
26
|
+
export declare const headingRecipe: {
|
|
27
|
+
readonly slots: readonly ["root"];
|
|
28
|
+
readonly defaults: {
|
|
29
|
+
readonly level: HeadingLevel;
|
|
30
|
+
};
|
|
31
|
+
readonly levels: {
|
|
32
|
+
readonly level1: {
|
|
33
|
+
readonly fontSize: 40;
|
|
34
|
+
readonly lineHeight: 48;
|
|
35
|
+
readonly fontWeight: "800";
|
|
36
|
+
};
|
|
37
|
+
readonly level2: {
|
|
38
|
+
readonly fontSize: 32;
|
|
39
|
+
readonly lineHeight: 40;
|
|
40
|
+
readonly fontWeight: "800";
|
|
41
|
+
};
|
|
42
|
+
readonly level3: {
|
|
43
|
+
readonly fontSize: 24;
|
|
44
|
+
readonly lineHeight: 32;
|
|
45
|
+
readonly fontWeight: "800";
|
|
46
|
+
};
|
|
47
|
+
readonly level4: {
|
|
48
|
+
readonly fontSize: 20;
|
|
49
|
+
readonly lineHeight: 28;
|
|
50
|
+
readonly fontWeight: "800";
|
|
51
|
+
};
|
|
52
|
+
readonly level5: {
|
|
53
|
+
readonly fontSize: 18;
|
|
54
|
+
readonly lineHeight: 26;
|
|
55
|
+
readonly fontWeight: "700";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly color: Readonly<{
|
|
59
|
+
source: "theme";
|
|
60
|
+
key: "text";
|
|
61
|
+
alpha?: number;
|
|
62
|
+
}>;
|
|
63
|
+
/** 제목 아래 간격은 제목이 아니라 그것을 담는 블록이 정한다. */
|
|
64
|
+
readonly marginBottom: 8;
|
|
65
|
+
};
|
|
66
|
+
export declare const headingBehavior: {
|
|
67
|
+
readonly controlled: readonly [];
|
|
68
|
+
readonly inputs: readonly ["level", "semanticLevel"];
|
|
69
|
+
readonly stateAxes: {};
|
|
70
|
+
readonly web: {
|
|
71
|
+
readonly roles: readonly ["heading"];
|
|
72
|
+
readonly keyboard: readonly [];
|
|
73
|
+
readonly focus: "none";
|
|
74
|
+
};
|
|
75
|
+
readonly native: {
|
|
76
|
+
readonly roles: readonly ["header"];
|
|
77
|
+
readonly states: readonly [];
|
|
78
|
+
readonly actions: readonly [];
|
|
79
|
+
};
|
|
80
|
+
readonly scenarios: readonly ["visual-size-and-document-level-are-separate-axes-that-may-disagree-on-purpose", "the-element-is-a-real-heading-so-the-rotor-and-skip-links-find-it", "no-new-type-sizes-are-introduced-the-existing-heading-scale-is-what-is-exposed", "heading-owns-no-surrounding-layout-the-block-that-contains-it-does"];
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../src/heading.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGvE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,kCAAkC;IAClC,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACvC,CAAC,CAAC;AAUH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAa7E;AAED,8CAA8C;AAC9C,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,iBAAiB,GAC5B,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAGvB;AAED,eAAO,MAAM,aAAa;;;wBAEO,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG3C,wCAAwC;;CAQzC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAYS,CAAC"}
|
package/dist/heading.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { heading, spacing } from "./foundations.js";
|
|
2
|
+
import { semanticColors } from "./semantic-colors.js";
|
|
3
|
+
const levelNumbers = {
|
|
4
|
+
level1: 1,
|
|
5
|
+
level2: 2,
|
|
6
|
+
level3: 3,
|
|
7
|
+
level4: 4,
|
|
8
|
+
level5: 5,
|
|
9
|
+
};
|
|
10
|
+
export function validateHeadingDescriptor(descriptor) {
|
|
11
|
+
if (descriptor === null || typeof descriptor !== "object") {
|
|
12
|
+
throw new TypeError("Heading descriptor must be an object");
|
|
13
|
+
}
|
|
14
|
+
if (!Object.prototype.hasOwnProperty.call(heading, descriptor.level)) {
|
|
15
|
+
throw new TypeError(`Unsupported Heading level: ${String(descriptor.level)}`);
|
|
16
|
+
}
|
|
17
|
+
if (descriptor.semanticLevel !== undefined &&
|
|
18
|
+
![1, 2, 3, 4, 5, 6].includes(descriptor.semanticLevel)) {
|
|
19
|
+
throw new TypeError(`Unsupported Heading semanticLevel: ${String(descriptor.semanticLevel)}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** 시각적 단계에서 문서 단계를 뽑되, 명시된 값이 있으면 그것이 이긴다. */
|
|
23
|
+
export function resolveHeadingSemanticLevel(descriptor) {
|
|
24
|
+
validateHeadingDescriptor(descriptor);
|
|
25
|
+
return descriptor.semanticLevel ?? levelNumbers[descriptor.level];
|
|
26
|
+
}
|
|
27
|
+
export const headingRecipe = {
|
|
28
|
+
slots: ["root"],
|
|
29
|
+
defaults: { level: "level3" },
|
|
30
|
+
levels: heading,
|
|
31
|
+
color: semanticColors.content.primary,
|
|
32
|
+
/** 제목 아래 간격은 제목이 아니라 그것을 담는 블록이 정한다. */
|
|
33
|
+
marginBottom: spacing.xs,
|
|
34
|
+
};
|
|
35
|
+
export const headingBehavior = {
|
|
36
|
+
controlled: [],
|
|
37
|
+
inputs: ["level", "semanticLevel"],
|
|
38
|
+
stateAxes: {},
|
|
39
|
+
web: { roles: ["heading"], keyboard: [], focus: "none" },
|
|
40
|
+
native: { roles: ["header"], states: [], actions: [] },
|
|
41
|
+
scenarios: [
|
|
42
|
+
"visual-size-and-document-level-are-separate-axes-that-may-disagree-on-purpose",
|
|
43
|
+
"the-element-is-a-real-heading-so-the-rotor-and-skip-links-find-it",
|
|
44
|
+
"no-new-type-sizes-are-introduced-the-existing-heading-scale-is-what-is-exposed",
|
|
45
|
+
"heading-owns-no-surrounding-layout-the-block-that-contains-it-does",
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.js","sourceRoot":"","sources":["../src/heading.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,YAAY,GAAsD;IACtE,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,UAA6B;IACrE,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC1D,MAAM,IAAI,SAAS,CA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EAAE;IACxD,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IACtD,SAAS,EAAE;QACT,+EAA+E;QAC/E,mEAAmE;QACnE,gFAAgF;QAChF,oEAAoE;KACrE;CACkC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport { heading, spacing, type HeadingLevel } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * 문서 제목 단계를 실제로 그리는 primitive다.\n *\n * `heading`(foundations)에는 이미 level1 40px부터 level5 18px까지 다섯 단계가 있었지만\n * **어떤 renderer도 노출하지 않았다** — `Text`는 `TextVariant`(최대 24px)만 받는다.\n * 그래서 랜딩 히어로나 큰 숫자가 필요한 화면은 매번 제품 CSS로 폰트 크기를 직접 썼다.\n * 이 계약은 새 크기를 만들지 않는다. 있던 스케일을 꺼내 쓸 수 있게 하는 것이 전부다.\n *\n * `Top`(화면 첫 제목)·`Section`(본문 묶음 제목)과 겹치지 않는다. 그 둘은 **자리**를\n * 아는 블록이고 자기 여백·보조 문장·보조 행동을 갖는다. `Heading`은 자리를 모르는\n * 글자 하나다 — 카드 안, 표 위, 빈 상태 안 어디에나 놓인다.\n */\nexport type HeadingDescriptor = Readonly<{\n /** 시각적 크기. 문서 구조상의 단계와 분리돼 있다. */\n level: HeadingLevel;\n /**\n * 실제로 낼 요소 단계. 생략하면 `level`의 숫자를 따른다. 시각적 크기와 문서 구조가\n * 어긋나는 경우(카드 제목이 크지만 h4인 경우)에 따로 지정한다.\n */\n semanticLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n}>;\n\nconst levelNumbers: Readonly<Record<HeadingLevel, 1 | 2 | 3 | 4 | 5>> = {\n level1: 1,\n level2: 2,\n level3: 3,\n level4: 4,\n level5: 5,\n};\n\nexport function validateHeadingDescriptor(descriptor: HeadingDescriptor): void {\n if (descriptor === null || typeof descriptor !== \"object\") {\n throw new TypeError(\"Heading descriptor must be an object\");\n }\n if (!Object.prototype.hasOwnProperty.call(heading, descriptor.level)) {\n throw new TypeError(`Unsupported Heading level: ${String(descriptor.level)}`);\n }\n if (\n descriptor.semanticLevel !== undefined &&\n ![1, 2, 3, 4, 5, 6].includes(descriptor.semanticLevel)\n ) {\n throw new TypeError(`Unsupported Heading semanticLevel: ${String(descriptor.semanticLevel)}`);\n }\n}\n\n/** 시각적 단계에서 문서 단계를 뽑되, 명시된 값이 있으면 그것이 이긴다. */\nexport function resolveHeadingSemanticLevel(\n descriptor: HeadingDescriptor,\n): 1 | 2 | 3 | 4 | 5 | 6 {\n validateHeadingDescriptor(descriptor);\n return descriptor.semanticLevel ?? levelNumbers[descriptor.level];\n}\n\nexport const headingRecipe = {\n slots: [\"root\"] as const,\n defaults: { level: \"level3\" as HeadingLevel },\n levels: heading,\n color: semanticColors.content.primary,\n /** 제목 아래 간격은 제목이 아니라 그것을 담는 블록이 정한다. */\n marginBottom: spacing.xs,\n} as const satisfies {\n slots: readonly [\"root\"];\n defaults: { level: HeadingLevel };\n levels: typeof heading;\n color: ColorReference;\n marginBottom: number;\n};\n\nexport const headingBehavior = {\n controlled: [],\n inputs: [\"level\", \"semanticLevel\"],\n stateAxes: {},\n web: { roles: [\"heading\"], keyboard: [], focus: \"none\" },\n native: { roles: [\"header\"], states: [], actions: [] },\n scenarios: [\n \"visual-size-and-document-level-are-separate-axes-that-may-disagree-on-purpose\",\n \"the-element-is-a-real-heading-so-the-rotor-and-skip-links-find-it\",\n \"no-new-type-sizes-are-introduced-the-existing-heading-scale-is-what-is-exposed\",\n \"heading-owns-no-surrounding-layout-the-block-that-contains-it-does\",\n ],\n} as const satisfies BehaviorContract;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -58,4 +58,23 @@ export * from "./tag.js";
|
|
|
58
58
|
export * from "./description-list.js";
|
|
59
59
|
export * from "./result.js";
|
|
60
60
|
export * from "./image.js";
|
|
61
|
+
export * from "./anchor.js";
|
|
62
|
+
export * from "./agreement.js";
|
|
63
|
+
export * from "./top.js";
|
|
64
|
+
export * from "./provider-button.js";
|
|
65
|
+
export * from "./heading.js";
|
|
66
|
+
export * from "./toggle-group.js";
|
|
67
|
+
export * from "./tags-input.js";
|
|
68
|
+
export * from "./skip-nav.js";
|
|
69
|
+
export * from "./bottom-info.js";
|
|
70
|
+
export * from "./sidebar.js";
|
|
71
|
+
export * from "./formatters.js";
|
|
72
|
+
export * from "./native-platform.js";
|
|
73
|
+
export * from "./date-range.js";
|
|
74
|
+
export * from "./text-formats.js";
|
|
75
|
+
export * from "./collapsible.js";
|
|
76
|
+
export * from "./asset.js";
|
|
77
|
+
export * from "./dataviz.js";
|
|
78
|
+
export * from "./menubar.js";
|
|
79
|
+
export * from "./context-menu.js";
|
|
61
80
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,GACnC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC3B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK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AC1B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAE3B,cAAc,aAAa,CAAC;AAE5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AAEzB,cAAc,sBAAsB,CAAC;AAErC,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,sBAAsB,CAAC;AAErC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -66,4 +66,23 @@ export * from "./tag.js";
|
|
|
66
66
|
export * from "./description-list.js";
|
|
67
67
|
export * from "./result.js";
|
|
68
68
|
export * from "./image.js";
|
|
69
|
+
export * from "./anchor.js";
|
|
70
|
+
export * from "./agreement.js";
|
|
71
|
+
export * from "./top.js";
|
|
72
|
+
export * from "./provider-button.js";
|
|
73
|
+
export * from "./heading.js";
|
|
74
|
+
export * from "./toggle-group.js";
|
|
75
|
+
export * from "./tags-input.js";
|
|
76
|
+
export * from "./skip-nav.js";
|
|
77
|
+
export * from "./bottom-info.js";
|
|
78
|
+
export * from "./sidebar.js";
|
|
79
|
+
export * from "./formatters.js";
|
|
80
|
+
export * from "./native-platform.js";
|
|
81
|
+
export * from "./date-range.js";
|
|
82
|
+
export * from "./text-formats.js";
|
|
83
|
+
export * from "./collapsible.js";
|
|
84
|
+
export * from "./asset.js";
|
|
85
|
+
export * from "./dataviz.js";
|
|
86
|
+
export * from "./menubar.js";
|
|
87
|
+
export * from "./context-menu.js";
|
|
69
88
|
//# sourceMappingURL=index.js.map
|