[{"data":1,"prerenderedAt":2680},["ShallowReactive",2],{"cmdk-index":3,"content:\u002Fheadless\u002Fuse-color-picker":236},[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232],{"path":5,"title":6,"description":7},"\u002Fcomponents\u002Faccordion","Accordion","A disclosure list built entirely on native \u003Cdetails>\u002F\u003Csummary> elements — zero JavaScript, zero\nARIA reinvention. The browser supplies the disclosure role, aria-expanded, Enter\u002FSpace toggling,\nfocus, and find-in-page expansion for free. Single-open (exclusive) mode uses the platform\nexclusive-accordion feature (Baseline 2024): every \u003Cdetails> shares one auto-generated name, so\nthe browser closes siblings when one opens. multiple drops the shared name so each item opens\nindependently.",{"path":9,"title":10,"description":11},"\u002Fcomponents\u002Falert","Alert","A styled, accessible notification banner. Its live-region politeness is derived from the color —\nurgent danger \u002F warn render role=\"alert\" (assertive), everything else role=\"status\" (polite) —\nso a non-urgent banner isn't announced assertively (override with the live prop). It supports an\noptional icon, a title, body text, an actions row, and a dismiss button.",{"path":13,"title":14,"description":15},"\u002Fcomponents\u002Favatar","Avatar","A data-display component that shows an image, or initials derived from text when there is no\nimage (or while it loads). Supports a title \u002F subtitle column for list and profile UIs.",{"path":17,"title":18,"description":19},"\u002Fcomponents\u002Fbadge","Badge","A small status or count indicator. Attach it to any element as a floating pip, drop it inline next\nto text, or render it standalone — all three modes share the same class surface.",{"path":21,"title":22,"description":23},"\u002Fcomponents\u002Fbutton","Button","A styled, accessible button. Dynamic state is expressed through real attributes — disabled becomes\na true disabled (or aria-disabled for link buttons), loading sets aria-busy, and it ships a\nvisible :focus-visible ring.",{"path":25,"title":26,"description":27},"\u002Fcomponents\u002Fcard","Card","A surface container for grouping related content — a header (prepend slot · title · subtitle ·\nappend slot), a body, and optional action rows. It is the most composed styled component, yet the\nstandalone markup is just nested .ori-card__* elements, so it works without Vue.",{"path":29,"title":30,"description":31},"\u002Fcomponents\u002Fcheckbox","Checkbox","A styled, accessible checkbox built on a real \u003Cinput type=\"checkbox\"> — kept in the DOM\n(visually hidden over a custom box) so keyboard, focus, and native form submission work for free.\nThe accent color and :focus-visible ring are driven by the ori-color token; invalid sets\naria-invalid; disabled is the native attribute.",{"path":33,"title":34,"description":35},"\u002Fcomponents\u002Fcolor-picker","Color picker","An accessible color picker: a 2D saturation × brightness area, a hue slider, a hex field, and\noptional preset swatches — an inline panel you compose into an OriPopover for a\nswatch-triggered flow. Behaviour lives in the framework-agnostic useColorPicker (a zero-dependency sRGB +\n2D-area engine, no adapter or machine); the styled component reuses OriSlider for the\nhue channel and OriInput for the hex field. v-model carries a lowercase color\nstring; the internal working model is HSVA, so the hue survives when you drag into a corner and back.",{"path":37,"title":38,"description":39},"\u002Fcomponents\u002Fcombobox","Combobox","A filterable single-select listbox — type to filter, navigate with the keyboard, pick one. It is the\nfirst component driven end-to-end by @oriui\u002Fheadless: the state machine + prop-getters own the\nbehaviour (open\u002Fclose, filtering, the active-descendant highlight, selection, and the full\nWAI-ARIA keyboard), and OriCombobox renders the styled shell on top. Unlike the pure-CSS\ncomponents, the behaviour needs JavaScript — the standalone classes give you the look, and\nuseCombobox gives you the behaviour for any UI.",{"path":41,"title":42,"description":43},"\u002Fcomponents\u002Fdialog","Dialog","A modal dialog — the library's first genuinely interactive component, built on the native\n\u003Cdialog> element. Unlike the styled-only components, a dialog needs behaviour: focus trap, scroll\nlock, Esc-to-close, click-outside dismissal, and the full WAI-ARIA keyboard contract. All of it comes\nfrom the platform via showModal() — no state-machine dependency and no adapter to wire. The styled\nOriDialog supplies only the markup and tokens.",{"path":45,"title":46,"description":47},"\u002Fcomponents\u002Fdivider","Divider","A horizontal (default) or vertical rule that separates content. An optional centered label turns it\ninto a visual break like the classic \"OR\" between form sections. A pure layout\u002Fstructure primitive —\nno interactive behaviour, no variants, no size scale.",{"path":49,"title":50,"description":51},"\u002Fcomponents\u002Ffield","Field","The shared shell for form controls — one source of truth for the label \u002F hint \u002F error \u002F\nrequired contract that Input, Select,\nTextarea, Combobox, Slider,\nRadioGroup, and ColorPicker otherwise each wire\nby hand. Wrap a control in OriField and it adopts the field's id, aria-describedby,\naria-invalid, required, disabled, and size — and stops rendering its own label and helper, so\nthere is exactly one of each, wired identically every time. Group and composite controls (RadioGroup,\nCombobox's listbox, ColorPicker) name themselves via aria-labelledby pointing at the field's label.",{"path":53,"title":54,"description":55},"\u002Fcomponents\u002Ficon","Icon","A styled, accessible SVG icon. Decorative by default — renders with aria-hidden=\"true\" and no\nrole. Pass a label to expose it to assistive technology as an image: the icon switches to\nrole=\"img\" + aria-label automatically.",{"path":57,"title":58,"description":59},"\u002Fcomponents\u002Finput","Input","A labelled, accessible text field with v-model. State is expressed through real attributes — the\nnative disabled, aria-invalid when there is an error, and an aria-describedby that points at\nthe rendered hint or error. The label is wired to the field with for\u002Fid (auto-generated via\nuseId when you don't pass one), and arbitrary native attributes (name, autocomplete,\ninputmode, …) fall through to the underlying \u003Cinput>.",{"path":61,"title":62,"description":63},"\u002Fcomponents\u002Fjoin","Join","A thin wrapper that collapses the shared radii and borders of adjacent controls so they read as one\nsegmented unit — button groups, input+button combos, segmented toolbars. No visual styling of its\nown: all colour, size, and variant tokens live on the children.",{"path":65,"title":66,"description":67},"\u002Fcomponents\u002Fkbd","Kbd","A keyboard-key chip — a semantic \u003Ckbd> element styled as a monospace bordered chip. Use it to\nrepresent individual keys, modifier keys, or multi-key shortcuts inline in prose or UI hints.",{"path":69,"title":70,"description":71},"\u002Fcomponents\u002Flink","Link","An inline prose link — the right choice when a destination lives in running text. Distinct from\nOriButton rendered as=\"a\": a button that navigates is still a button; a link in a sentence is\nOriLink. Underlined by default (the affordance survives without color), with a _hover mode that\nhides the underline at rest and reveals it on hover. A visible :focus-visible ring uses the same\ncolor as the text.",{"path":73,"title":74,"description":75},"\u002Fcomponents\u002Fmenu","Menu","A WAI-ARIA menu button: a trigger opens a roving-tabindex action list. Unlike the Popover, open\u002Fclose,\nfocus movement, and click-outside dismissal are driven entirely by the @oriui\u002Fheadless menu\nmachine in JavaScript, not the Popover API — so the panel is not top-layer and carries a z-index. The\npanel is still placed with the same CSS Anchor Positioning primitive as the Popover (ori-anchored),\nzero positioning JS.",{"path":77,"title":78,"description":79},"\u002Fcomponents\u002Fpopover","Popover","A positioned overlay for supplementary content — a menu, a filter panel, a rich hint — tethered to a\ntrigger. It runs entirely on the platform: the trigger opens the panel through the Popover API\n(top-layer, light-dismiss, Esc — zero JS), and the panel is placed with CSS Anchor Positioning\n(anchor-name \u002F position-anchor + position-area, with a collision flip via\nposition-try-fallbacks) — zero positioning JS, no scroll\u002Fresize listeners. Baseline 2026, with\ngraceful degradation: an older engine still opens the panel and places it, just without the\ncollision-aware flip.",{"path":81,"title":82,"description":83},"\u002Fcomponents\u002Fprogress","Progress","A horizontal progress bar that communicates task completion. It supports a determinate mode (a\nknown value out of a max) and an indeterminate mode (animated sweep) for tasks with no\nmeasurable progress. State is expressed through ARIA attributes — aria-valuenow is omitted when\nindeterminate, giving screen readers the correct cue automatically.",{"path":85,"title":86,"description":87},"\u002Fcomponents\u002Fradio","Radio","A \"choose one\" compound control. A role=\"radiogroup\" container names the set via\naria-labelledby; each option is a real \u003Cinput type=\"radio\"> sharing a single name — so the\nbrowser enforces single-select and native form submission — visually hidden behind a styled circle.\nPass the options as an array; per-option disabled is supported.",{"path":89,"title":90,"description":91},"\u002Fcomponents\u002Fselect","Select","A native-first styled select control with v-model. The browser owns the dropdown, full keyboard\ninteraction, type-ahead, and all ARIA semantics — oriUI only styles the closed control and draws a\ndecorative chevron. It shares the form-control contract of Input and\nTextarea: a built-in label, hint, error, and required asterisk, all\nwired for accessibility. State is expressed through real attributes — native disabled and\naria-invalid=\"true\" (not classes) — and arbitrary native attrs (name, autocomplete, …) fall\nthrough to the \u003Cselect> via inheritAttrs:false.",{"path":93,"title":94,"description":95},"\u002Fcomponents\u002Fskeleton","Skeleton","A loading placeholder that signals content is on its way. An animated shimmer sweep sweeps across the\nblock; on devices that request reduced motion the shimmer stops and the tinted block alone signals the\nloading state. Size it with an inline style or a utility class — the skeleton itself carries no\nintrinsic width or height beyond a 1em minimum height.",{"path":97,"title":98,"description":99},"\u002Fcomponents\u002Fslider","Slider","A styled, accessible range control built on a native \u003Cinput type=\"range\">. Because the\nunderlying element is real HTML, the browser supplies role=\"slider\", the full keyboard contract\n(arrow keys, Home\u002FEnd, PageUp\u002FPageDown), and screen-reader value announcements for free — no\nJavaScript bridge needed. Colour and the filled-track portion are driven by CSS custom properties;\nv-model carries a number.",{"path":101,"title":102,"description":103},"\u002Fcomponents\u002Fspinner","Spinner","An accessible loading indicator — renders role=\"status\" with an aria-label (default \"Loading\")\nso assistive technology announces the busy state without any extra work. Use it standalone for a\npage-level or section-level loader, or embed it inline inside a button or label.",{"path":105,"title":106,"description":107},"\u002Fcomponents\u002Fstack","Stack","The workhorse layout primitive — two flex modes in one component. A stack (ori-stack) is a\nflex column: children flow top-to-bottom with a consistent gap. A cluster (ori-cluster) is a\nwrapping flex row: children flow left-to-right, wrap onto new lines, and are centered on the\ncross-axis — ideal for tag clouds, button groups, and badge sets.",{"path":109,"title":110,"description":111},"\u002Fcomponents\u002Fsurface","Surface","An elevated floating surface — a lifted panel with a surface background, an optional hairline, a\ncorner radius, and a mode-aware shadow, and nothing else. No padding, no header\u002Ftitle semantics: it\nis just the box, and the caller owns the layout inside. It's the building block for chrome that floats\nover content — a toolbar island, a zoom control, a side panel, a menu popout's container — and the\nelevation counterpart to Card, which is a content card (padding + header \u002F\ntitle \u002F body \u002F actions).",{"path":113,"title":114,"description":115},"\u002Fcomponents\u002Fswitch","Switch","An on\u002Foff toggle built on a real \u003Cinput type=\"checkbox\" role=\"switch\"> — kept in the DOM\n(visually hidden over a track + thumb) so keyboard, focus, and form submission work for free, and\nassistive technology announces it as a switch. v-model is a boolean. The \"on\" track color and the\n:focus-visible ring both come from the ori-color token; the track and thumb scale with\nori-font-size so size is a single prop.",{"path":117,"title":118,"description":119},"\u002Fcomponents\u002Ftabs","Tabs","An accessible tabs widget with automatic activation. The tablist holds a roving tabindex so\nTab \u002F Shift+Tab enter and leave the group as a single keyboard stop; arrow keys move between\ntabs and immediately select them. State is expressed through real ARIA attributes — aria-selected\ndrives both the active indicator and the label colour; disabled is the native button attribute.",{"path":121,"title":122,"description":123},"\u002Fcomponents\u002Ftag","Tag","A compact label for categorising, filtering, or annotating content — status chips, keyword\nbadges, and removable filter pills. State is expressed through real attributes: aria-disabled\ndisables the tag and its close button without removing it from the DOM.",{"path":125,"title":126,"description":127},"\u002Fcomponents\u002Ftextarea","Textarea","A labelled, accessible multiline text field with v-model. State is expressed through real\nattributes — the native disabled, aria-invalid when there is an error, and an aria-describedby\nthat points at the rendered hint or error. The label is wired to the field with for\u002Fid\n(auto-generated via useId when you don't pass one). Unlike a single-line input the field has no\nfixed height — it grows from a rows-based min-height and stays user-resizable.",{"path":129,"title":130,"description":131},"\u002Fcomponents\u002Ftoast","Toast","An imperative notification system. Push a toast from anywhere with useToast() and render\n\u003COriToaster \u002F> once near the app root to display the queue. No event bus, no Vuex, no provide\u002Finject —\njust a module-level reactive queue that every call site shares.",{"path":133,"title":134,"description":135},"\u002Fcomponents\u002Ftoolbar","Toolbar","A WAI-ARIA toolbar: a set of related controls that share a single Tab stop, navigated internally\nwith the arrow keys via roving tabindex (real DOM focus, not aria-activedescendant). Five\ncomponents make it up — OriToolbar (the root, role=\"toolbar\"), OriToolbarButton (an item —\ncomposes OriButton), OriToolbarSeparator (a perpendicular divider), and a paired\nOriToolbarToggleGroup \u002F OriToolbarToggleItem for a segmented single- or multi-select toggle.\nUnlike the data-driven OriMenu (an items array plus a machine), a toolbar is compositional —\nyou assemble it from slotted components in whatever order and combination you need — so the behaviour\nunderneath, useToolbar from @oriui\u002Fheadless, is a provide\u002Finject\nroving-focus context rather than a state machine over an array.",{"path":137,"title":138,"description":139},"\u002Fcomponents\u002Ftooltip","Tooltip","A CSS-driven tooltip that shows additional context when a control is focused or hovered. The bubble\nis always in the DOM (so the aria-describedby reference is never dangling) and shown\u002Fhidden\nentirely in CSS — no JS state machine, no positioning engine. Show is pure :focus-within (keyboard)\nand :hover wrapped in @media (hover: hover) (pointer, without sticking open on touch).",{"path":141,"title":142,"description":143},"\u002Fguides\u002Fcss","Using the CSS layer","oriUI is three independent layers woven around one set of design tokens. The @oriui\u002Fcss layer is\njust standalone .ori-* classes plus the token theming — no Vue, no build step, no Tailwind. You\nship the stylesheet and write classes. This is how oriUI works with htmx, Astro, or plain HTML —\nthe DaisyUI niche, minus Tailwind.",{"path":145,"title":146,"description":147},"\u002Fguides\u002Fcustomization","Customization","Make it yours — without authoring a whole skin. Most products need one thing: their brand color and\ntheir corner radius on top of accessible, ready-made components. oriUI lets you do that by repointing\na handful of design tokens — a few CSS custom properties in your own stylesheet, no rewrite, no fork.\nThis is the prototype fast, scale without rewriting payoff: the same \u003COriButton> you shipped on\nday one becomes on-brand by the time you ship to users, and nothing about the component changes.",{"path":149,"title":150,"description":151},"\u002Fguides\u002Fdesign-tokens","Design tokens","oriUI is three independent layers woven around one set of design tokens. This page is the\ncatalog — every token, and the resolution model that turns a raw value into the colour a component\npaints. The chain is short and deliberate: a primitive feeds a semantic role, a role feeds a\nper-instance alias, and components read only the alias. That indirection is what lets a single\nclass repoint a single token — the whole zero-runtime theming story rests on it.",{"path":153,"title":154,"description":155},"\u002Fguides\u002Fskins","Skin gallery","A skin is a named palette — a set of token overrides applied with one attribute on \u003Chtml>\n(data-ori-skin). Every skin repoints only the four skinnable roles (primary · secondary ·\nsurface · background, each with a -light and -dark source); the status hues (success ·\nwarn · danger · info) stay shared, and every pairing targets WCAG AA for body text. Switching\na skin is a single attribute write — zero runtime, no recompute, no flash.",{"path":157,"title":158,"description":159},"\u002Fguides\u002Ftheming","Theming","A theme is a mode (light or dark) layered over a skin (a named palette). Both are pure\nattribute toggles on \u003Chtml> — flipping either repoints the active --ori-color-* aliases through\nCSS custom properties, so everything reskins at once with no JavaScript, no recompute, no flash.\nThis is the same zero-runtime story across every layer: a Vue app, the standalone @oriui\u002Fcss\nclasses, htmx fragments, or hand-written HTML all theme identically.",{"path":161,"title":162,"description":163},"\u002Fheadless\u002Fcore","Core","The framework-agnostic heart of the headless layer: a behaviour contract plus a zero-dependency\nnative engine, written in vanilla TypeScript. Every framework binding consumes the same contract,\nso a primitive behaves identically wherever it runs — and the behaviour stays swappable per primitive,\nwithout touching markup.",{"path":165,"title":166,"description":167},"\u002Fheadless\u002Fuse-color-picker","useColorPicker","A headless sRGB color picker — a 2D saturation × brightness area, a hue channel, an optional\nalpha channel, a hex field, and optional preset swatches, assembled from ready-to-bind\nprop-getters. It owns the working color as an internal HSVA object (so the hue survives a grayscale\nround-trip when you drag into a corner and back) and composes a zero-dependency sRGB engine plus pure\n2D-area math from the core: parseColor \u002F formatColor (loose parse in, lowercase string out),\nhsvToRgb \u002F rgbToHex \u002F rgbToHsl (hex \u002F rgb \u002F hsv \u002F hsl conversion), readableInk (WCAG-luminance\nink over a swatch), and resolveAreaPosition \u002F stepAreaPosition (pointer → coordinate and keyboard\nstepping across the two axes).",{"path":169,"title":170,"description":171},"\u002Fheadless\u002Fuse-combobox","useCombobox","A headless combobox primitive — an editable text input paired with a popup listbox — implementing\nthe WAI-ARIA combobox with listbox popup pattern: type to filter, navigate with the keyboard via\nactive-descendant, and pick a single option. It owns the behaviour (open\u002Fclose, filtering, the\nhighlight, selection, and the full keyboard) and the ARIA wiring as ready-to-bind prop bags; you own\nthe markup and styles.",{"path":173,"title":174,"description":175},"\u002Fheadless\u002Fuse-dialog","useDialog","A headless modal dialog primitive built on the native \u003Cdialog> element — focus trap, scroll lock,\nEscape to close, focus return, and aria-modal semantics all come from the platform via\nshowModal(). It owns the open state and the ARIA wiring as ready-to-bind prop bags; you own the\nmarkup and styles (you render the \u003Cdialog> and drive showModal() \u002F close() from open).",{"path":177,"title":178,"description":179},"\u002Fheadless\u002Fuse-disclosure","useDisclosure","A headless show \u002F hide primitive for disclosure widgets — expandable panels, accordions, menus,\nthe collapsible sidebar groups on this very site. It owns the open state, the WAI-ARIA wiring, and the\ntoggle handler; you own the markup and the styles.",{"path":181,"title":182,"description":183},"\u002Fheadless\u002Fuse-dismissable","useDismissable","A headless dismiss layer — the \"close the overlay on an outside interaction\" glue a non-platform\noverlay needs, the pattern Radix DismissableLayer \u002F Floating-UI useDismiss standardise. While\nenabled, it attaches document listeners and calls onDismiss() when an interaction lands outside\nthe overlay's own elements. Each overlay picks the strategy that fits it:",{"path":185,"title":186,"description":187},"\u002Fheadless\u002Fuse-menu","useMenu","A headless menu button primitive built on the WAI-ARIA menu-button pattern — a trigger that opens a\npopup menu of actions, with roving tabindex, arrow \u002F Home \u002F End navigation, and Enter \u002F Space\nactivation. It owns the open state and the highlighted item and exposes the ARIA wiring as ready-to-bind\nprop bags; you own the markup, the styles, and the DOM focus (roving needs real focus, and\nclick-outside \u002F focus-return are host concerns a state projection can't reach).",{"path":189,"title":190,"description":191},"\u002Fheadless\u002Fuse-tabs","useTabs","A headless WAI-ARIA tabs widget with automatic activation — a tablist of tabs behind a single\nTab stop, navigated with the arrow keys via roving tabindex (real DOM focus, not\naria-activedescendant), where moving focus also selects. It is data-driven: you pass the tabs\narray plus the selected value, and it returns the tablist prop bag plus per-tab and per-panel\nprop-getters (ids, aria-selected, aria-controls, aria-labelledby, roving tabindex, hidden).",{"path":193,"title":194,"description":195},"\u002Fheadless\u002Fuse-theme","useTheme","A headless light \u002F dark theme controller — it owns the mode setting, resolves auto against the OS\nscheme live, persists the choice, and applies it to the DOM. It applies through applyTheme, which sets\nthe ori-theme_{light,dark} class (removing the opposite — exactly one is on at a time) and works\naround a bug in current Chromium where a runtime theme toggle otherwise leaves styled components\npainting the previous theme's colours until they re-render.",{"path":197,"title":198,"description":199},"\u002Fheadless\u002Fuse-toast","useToast","A headless toast queue — an imperative notification store you call from anywhere (toast('Saved'))\nand render once near the app root. The behaviour is a framework-agnostic engine (a plain array + a Set\nof listeners + auto-dismiss timers) projected into the host framework's reactivity: a Vue reactive\narray and a Svelte readable store. It is a client-side singleton — every useToast() call\nshares the one queue, so a push from anywhere reaches the single renderer.",{"path":201,"title":202,"description":203},"\u002Fheadless\u002Fuse-token","useToken","A reactive token bridge — it resolves an --ori-* design token to its computed value in JS, for\ncanvas \u002F WebGL \u002F chart painters (Konva, ECharts, …) that draw outside the CSS cascade yet must follow the\nactive skin. It reads through a hidden probe, because the obvious API is a trap: getComputedStyle(el).getPropertyValue('--x') hands back the unresolved var() chain (oriUI aliases chain), not a color —\nsubstitution only happens at a real property's computed-value time.",{"path":205,"title":206,"description":207},"\u002Fheadless\u002Fuse-toolbar","useToolbar","A headless WAI-ARIA toolbar — a set of related controls behind a single Tab stop, navigated\ninternally with the arrow keys via roving tabindex (real DOM focus, not aria-activedescendant).\nThe root owns orientation \u002F loop \u002F direction and a single keydown handler; each item registers itself\nand receives its roving tabindex, so a toolbar is assembled from arbitrary slotted components\nrather than a fixed data array.",{"path":209,"title":210,"description":211},"\u002Foverview\u002Faccessibility","Accessibility","Accessibility in oriUI is structural, not a coat of polish on top. The same decisions that make\nthe components correct for assistive technology also make them themeable and framework-agnostic — they\nare the same source of truth, not a separate effort.",{"path":213,"title":214,"description":215},"\u002Foverview\u002Fapplicability","Applicability","oriUI is three independently-consumable layers woven around one token contract. The promise is\nprototype fast, scale without rewriting: reach for the styled Vue components first, drop to the\nheadless behaviour when you need control, or drop to the standalone CSS when you leave Vue entirely —\nwithout changing your design tokens. This page maps each layer to where it runs.",{"path":217,"title":218,"description":219},"\u002Foverview\u002Fcheat-sheet","Cheat sheet","Everything in one page — install, the class model, every component, and the design tokens. For the\nmachine-readable version (e.g. to paste into an AI), fetch \u002Fllms.txt (index) or\n\u002Fllms-full.txt (every page concatenated).",{"path":221,"title":222,"description":223},"\u002Foverview\u002Fcomparisons","Idea & comparisons","oriUI's one-line idea — prototype fast, scale without rewriting — falls out of a single\narchitectural choice: three layers woven around one token contract, so you can change depth\n(styled → headless → CSS) without changing your design system. This page sets that idea next to the\nlibraries oriUI learns from, and is honest about where it does and doesn't compete.",{"path":225,"title":226,"description":227},"\u002Foverview\u002Fget-started","Get started","oriUI is a layered Vue 3 UI library. Install it and import only what you need.",{"path":229,"title":230,"description":231},"\u002Foverview\u002Finstallation","Installation","oriUI is three layers in two packages. Install only the layer you need — they share one token\ncontract, so you can add another later without reworking what you built.",{"path":233,"title":234,"description":235},"\u002Foverview\u002Fintroduction","Introduction","oriUI (織り, ori — \"weaving\") is a layered Vue 3 UI library. The idea in one line:\nprototype fast, scale without rewriting. Start with ready-made styled components; when you need\nmore control, drop down to the behavior or the raw CSS — without throwing away your work, because\nevery layer is woven around the same design tokens.",{"id":237,"title":166,"body":238,"description":167,"extension":2675,"meta":2676,"navigation":1380,"path":165,"seo":2677,"stem":2678,"__hash__":2679},"docs\u002Fheadless\u002Fuse-color-picker.md",{"type":239,"value":240,"toc":2663},"minimark",[241,245,308,361,366,397,401,451,694,698,723,728,925,929,1126,1130,1271,1275,1298,2243,2276,2322,2436,2439,2442,2541,2547,2630,2634,2659],[242,243,166],"h1",{"id":244},"usecolorpicker",[246,247,248,249,253,254,257,258,261,262,265,266,269,270,273,274,277,278,282,283,286,287,282,290,282,293,296,297,300,301,282,304,307],"p",{},"A headless ",[250,251,252],"strong",{},"sRGB color picker"," — a 2D ",[250,255,256],{},"saturation × brightness"," area, a ",[250,259,260],{},"hue"," channel, an optional\n",[250,263,264],{},"alpha"," channel, a ",[250,267,268],{},"hex"," field, and optional ",[250,271,272],{},"preset"," swatches, assembled from ready-to-bind\nprop-getters. It owns the working color as an internal ",[250,275,276],{},"HSVA"," object (so the hue survives a grayscale\nround-trip when you drag into a corner and back) and composes a zero-dependency sRGB engine plus pure\n2D-area math from the core: ",[279,280,281],"code",{},"parseColor"," \u002F ",[279,284,285],{},"formatColor"," (loose parse in, lowercase string out),\n",[279,288,289],{},"hsvToRgb",[279,291,292],{},"rgbToHex",[279,294,295],{},"rgbToHsl"," (hex \u002F rgb \u002F hsv \u002F hsl conversion), ",[279,298,299],{},"readableInk"," (WCAG-luminance\nink over a swatch), and ",[279,302,303],{},"resolveAreaPosition",[279,305,306],{},"stepAreaPosition"," (pointer → coordinate and keyboard\nstepping across the two axes).",[246,309,310,311,314,315,321,322,327,328,332,333,336,337,340,341,345,346,349,350,282,353,356,357,360],{},"This is the ",[250,312,313],{},"Vue"," binding; the framework-agnostic core lives in ",[316,317,318],"a",{"href":161},[279,319,320],{},"@oriui\u002Fheadless",",\nand the styled ",[316,323,324],{"href":33},[279,325,326],{},"OriColorPicker"," is built on it. Like\n",[316,329,330],{"href":205},[279,331,206],{},", this is a ",[250,334,335],{},"compositional"," helper — deterministic sRGB + 2D-area\nmath exposed as prop-getters and setters — ",[250,338,339],{},"not"," the OriHeadless adapter contract: a color picker has\nno swappable engine and no async state to project, so (unlike ",[316,342,343],{"href":173},[279,344,174],{},"'s\nmachine-behind-a-swappable-adapter shape) there is nothing to swap. It does reuse the same core ",[250,347,348],{},"roving","\nhelpers as the toolbar (",[279,351,352],{},"rovingIntent",[279,354,355],{},"resolveRovingIndex",") for the preset listbox — see the\n",[316,358,359],{"href":205},"roving taxonomy"," framing.",[362,363,365],"h2",{"id":364},"import","Import",[367,368,373],"pre",{"className":369,"code":370,"language":371,"meta":372,"style":372},"language-ts shiki shiki-themes github-light github-dark","import { useColorPicker } from '@oriui\u002Fheadless\u002Fvue';\n","ts","",[279,374,375],{"__ignoreMap":372},[376,377,380,383,387,390,394],"span",{"class":378,"line":379},"line",1,[376,381,364],{"class":382},"szBVR",[376,384,386],{"class":385},"sVt8B"," { useColorPicker } ",[376,388,389],{"class":382},"from",[376,391,393],{"class":392},"sZZnC"," '@oriui\u002Fheadless\u002Fvue'",[376,395,396],{"class":385},";\n",[362,398,400],{"id":399},"options","Options",[246,402,403,406,407,410,411,414,415,282,419,423,424,282,427,430,431,434,435,438,439,442,443,446,447,450],{},[279,404,405],{},"useColorPicker(options)"," takes its options as a ",[250,408,409],{},"getter"," — ",[279,412,413],{},"useColorPicker(() => ({ … }))",", like\n",[316,416,417],{"href":205},[279,418,206],{},[316,420,421],{"href":185},[279,422,186],{}," — so ",[279,425,426],{},"value",[279,428,429],{},"format"," \u002F\n",[279,432,433],{},"disabled"," stay reactive. The color crosses the boundary as a ",[250,436,437],{},"lowercase string"," (bind to ",[279,440,441],{},"v-model","),\nwith the dual-event convention: ",[279,444,445],{},"onInput"," streams live on every interaction tick, ",[279,448,449],{},"onChange"," commits once\non release \u002F keyboard settle (one undo entry).",[452,453,454,473],"table",{},[455,456,457],"thead",{},[458,459,460,464,467,470],"tr",{},[461,462,463],"th",{},"Option",[461,465,466],{},"Type",[461,468,469],{},"Default",[461,471,472],{},"Description",[474,475,476,505,535,564,593,617,634,651,673],"tbody",{},[458,477,478,483,488,491],{},[479,480,481],"td",{},[279,482,426],{},[479,484,485],{},[279,486,487],{},"string | undefined",[479,489,490],{},"—",[479,492,493,494,496,497,500,501,504],{},"The controlled color (the ",[279,495,441],{}," value). Parsed loosely: hex, ",[279,498,499],{},"rgb()\u002Frgba()",", ",[279,502,503],{},"hsl()\u002Fhsla()",".",[458,506,507,511,516,521],{},[479,508,509],{},[279,510,429],{},[479,512,513],{},[279,514,515],{},"'hex' | 'rgb' | 'hsl'",[479,517,518],{},[279,519,520],{},"'hex'",[479,522,523,524,527,528,282,531,534],{},"Output format of the emitted string (",[279,525,526],{},"ColorFormat","). ",[279,529,530],{},"rgb",[279,532,533],{},"hsl"," emit function notation; output is lowercase.",[458,536,537,541,546,551],{},[479,538,539],{},[279,540,264],{},[479,542,543],{},[279,544,545],{},"boolean",[479,547,548],{},[279,549,550],{},"false",[479,552,553,554,282,557,282,560,563],{},"Include an alpha channel — the emitted string carries it (",[279,555,556],{},"#rrggbbaa",[279,558,559],{},"rgba()",[279,561,562],{},"hsla()",").",[458,565,566,571,575,579],{},[479,567,568],{},[279,569,570],{},"eyedropper",[479,572,573],{},[279,574,545],{},[479,576,577],{},[279,578,550],{},[479,580,581,582,585,586,589,590,592],{},"Expose an eyedropper action (the ",[279,583,584],{},"EyeDropper"," API); ",[279,587,588],{},"eyedropperSupported"," is ",[279,591,550],{}," where the browser lacks it.",[458,594,595,600,605,607],{},[479,596,597],{},[279,598,599],{},"label",[479,601,602],{},[279,603,604],{},"string",[479,606,490],{},[479,608,609,610,613,614,563],{},"Accessible name for the whole control (→ ",[279,611,612],{},"aria-label"," on the root ",[279,615,616],{},"role=\"group\"",[458,618,619,623,627,631],{},[479,620,621],{},[279,622,433],{},[479,624,625],{},[279,626,545],{},[479,628,629],{},[279,630,550],{},[479,632,633],{},"Blocks the area pointer drag \u002F keyboard and disables the channel inputs.",[458,635,636,641,646,648],{},[479,637,638],{},[279,639,640],{},"presets",[479,642,643],{},[279,644,645],{},"string[]",[479,647,490],{},[479,649,650],{},"Preset swatch colors, rendered as a single-select roving listbox.",[458,652,653,657,662,664],{},[479,654,655],{},[279,656,445],{},[479,658,659],{},[279,660,661],{},"(next: string) => void",[479,663,490],{},[479,665,666,669,670,504],{},[250,667,668],{},"Required."," Live value on every interaction tick — wire to ",[279,671,672],{},"update:modelValue",[458,674,675,679,683,685],{},[479,676,677],{},[279,678,449],{},[479,680,681],{},[279,682,661],{},[479,684,490],{},[479,686,687,689,690,693],{},[250,688,668],{}," Committed value on pointer-release \u002F keyboard settle — wire to ",[279,691,692],{},"change"," (one undo entry).",[362,695,697],{"id":696},"returns","Returns",[246,699,700,701,704,705,707,708,711,712,715,716,589,719,722],{},"Reactive state, prop-getters (spread with ",[279,702,703],{},"v-bind","), and imperative setters. ",[279,706,276],{}," is\n",[279,709,710],{},"{ h, s, v, a }"," (h ∈ [0, 360), s \u002F v \u002F a ∈ ",[376,713,714],{},"0, 1","); ",[279,717,718],{},"RGB",[279,720,721],{},"{ r, g, b }"," (0–255).",[724,725,727],"h3",{"id":726},"reactive-state","Reactive state",[452,729,730,741],{},[455,731,732],{},[458,733,734,737,739],{},[461,735,736],{},"Property",[461,738,466],{},[461,740,472],{},[474,742,743,758,774,797,819,833,846,860,874,891,909],{},[458,744,745,750,755],{},[479,746,747],{},[279,748,749],{},"hsva",[479,751,752],{},[279,753,754],{},"ComputedRef\u003CHSVA>",[479,756,757],{},"The working color — the source of truth during interaction (hue preserved across a grayscale trip).",[458,759,760,764,769],{},[479,761,762],{},[279,763,530],{},[479,765,766],{},[279,767,768],{},"ComputedRef\u003CRGB>",[479,770,771,772,504],{},"The working color as RGB (0–255), derived from ",[279,773,749],{},[458,775,776,780,785],{},[479,777,778],{},[279,779,268],{},[479,781,782],{},[279,783,784],{},"ComputedRef\u003Cstring>",[479,786,787,788,790,791,793,794,504],{},"The hex the field shows: ",[279,789,556],{}," when ",[279,792,264],{}," is on, else ",[279,795,796],{},"#rrggbb",[458,798,799,803,807],{},[479,800,801],{},[279,802,426],{},[479,804,805],{},[279,806,784],{},[479,808,809,810,812,813,815,816,818],{},"The current color in the emitted ",[279,811,429],{}," — the value a form submits; matches ",[279,814,441],{}," after any emit (an initial value in another format still reports in ",[279,817,429],{},"). Never empty.",[458,820,821,825,830],{},[479,822,823],{},[279,824,260],{},[479,826,827],{},[279,828,829],{},"ComputedRef\u003Cnumber>",[479,831,832],{},"The current hue, 0–360 (bind to the hue slider).",[458,834,835,839,843],{},[479,836,837],{},[279,838,264],{},[479,840,841],{},[279,842,829],{},[479,844,845],{},"The current alpha, 0–1 (bind to the alpha slider).",[458,847,848,853,857],{},[479,849,850],{},[279,851,852],{},"swatchColor",[479,854,855],{},[279,856,784],{},[479,858,859],{},"The preview color — carries alpha, so a checkerboard shows through.",[458,861,862,867,871],{},[479,863,864],{},[279,865,866],{},"opaqueColor",[479,868,869],{},[279,870,784],{},[479,872,873],{},"The opaque current color, for the alpha slider's transparent → color track.",[458,875,876,881,886],{},[479,877,878],{},[279,879,880],{},"ink",[479,882,883],{},[279,884,885],{},"ComputedRef\u003C'#000000' | '#ffffff'>",[479,887,888,889,563],{},"Readable ink over the current color, per WCAG luminance (",[279,890,299],{},[458,892,893,898,902],{},[479,894,895],{},[279,896,897],{},"hueColor",[479,899,900],{},[279,901,784],{},[479,903,904,905,908],{},"The fully-saturated hue color — the area's ",[279,906,907],{},"--ori-hue"," gradient anchor.",[458,910,911,915,919],{},[479,912,913],{},[279,914,588],{},[479,916,917],{},[279,918,545],{},[479,920,921,922,924],{},"Whether the ",[279,923,584],{}," API exists (a plain, non-reactive boolean — gate the eyedropper trigger on it).",[724,926,928],{"id":927},"prop-getters","Prop-getters",[452,930,931,941],{},[455,932,933],{},[458,934,935,937,939],{},[461,936,736],{},[461,938,466],{},[461,940,472],{},[474,942,943,977,1000,1042,1065,1108],{},[458,944,945,950,955],{},[479,946,947],{},[279,948,949],{},"areaProps",[479,951,952],{},[279,953,954],{},"ComputedRef\u003Cobject>",[479,956,957,958,500,960,500,963,966,967,969,970,973,974,504],{},"The 2D area's bag: ",[279,959,616],{},[279,961,962],{},"aria-label=\"Saturation and brightness\"",[279,964,965],{},"aria-disabled",", the inline ",[279,968,907],{}," style, and the drag ",[279,971,972],{},"onPointerdown"," + 2D ",[279,975,976],{},"onKeydown",[458,978,979,984,989],{},[479,980,981],{},[279,982,983],{},"areaThumbStyle",[479,985,986],{},[279,987,988],{},"ComputedRef\u003C{ left: string; top: string }>",[479,990,991,992,995,996,999],{},"Inline position for the area thumb: ",[279,993,994],{},"left"," = saturation, ",[279,997,998],{},"top"," = inverted value (1 = top).",[458,1001,1002,1007,1012],{},[479,1003,1004],{},[279,1005,1006],{},"getChannelInputProps(channel)",[479,1008,1009],{},[279,1010,1011],{},"(channel: 'saturation' | 'value') => object",[479,1013,1014,1015,1018,1019,500,1022,1025,1026,1025,1029,500,1032,1034,1035,500,1037,500,1040,504],{},"Props for one of the two visually-hidden ",[279,1016,1017],{},"\u003Cinput type=\"range\">"," (the a11y surface): ",[279,1020,1021],{},"type=\"range\"",[279,1023,1024],{},"min","\u002F",[279,1027,1028],{},"max",[279,1030,1031],{},"step",[279,1033,426],{}," (0–100), ",[279,1036,612],{},[279,1038,1039],{},"aria-valuetext",[279,1041,445],{},[458,1043,1044,1049,1053],{},[479,1045,1046],{},[279,1047,1048],{},"presetGroupProps",[479,1050,1051],{},[279,1052,954],{},[479,1054,1055,1056,500,1059,500,1062,504],{},"The preset listbox bag: ",[279,1057,1058],{},"role=\"listbox\"",[279,1060,1061],{},"aria-label=\"Preset colors\"",[279,1063,1064],{},"aria-orientation=\"horizontal\"",[458,1066,1067,1072,1077],{},[479,1068,1069],{},[279,1070,1071],{},"getPresetProps(color, index)",[479,1073,1074],{},[279,1075,1076],{},"(color: string, index: number) => object",[479,1078,1079,1080,500,1083,500,1086,500,1089,500,1091,1094,1095,966,1098,1101,1102,282,1105,504],{},"Props for one preset chip: ",[279,1081,1082],{},"data-ori-preset",[279,1084,1085],{},"type=\"button\"",[279,1087,1088],{},"role=\"option\"",[279,1090,612],{},[279,1092,1093],{},"aria-selected",", the roving ",[279,1096,1097],{},"tabindex",[279,1099,1100],{},"--ori-color"," style, and ",[279,1103,1104],{},"onClick",[279,1106,1107],{},"onFocus",[458,1109,1110,1115,1120],{},[479,1111,1112],{},[279,1113,1114],{},"onPresetKeydown",[479,1116,1117],{},[279,1118,1119],{},"(event: KeyboardEvent) => void",[479,1121,1122,1123,504],{},"The roving arrow-key handler for the preset listbox — bind to the group's ",[279,1124,1125],{},"@keydown",[724,1127,1129],{"id":1128},"setters-actions","Setters & actions",[452,1131,1132,1142],{},[455,1133,1134],{},[458,1135,1136,1138,1140],{},[461,1137,736],{},[461,1139,466],{},[461,1141,472],{},[474,1143,1144,1161,1178,1196,1217,1235,1253],{},[458,1145,1146,1151,1156],{},[479,1147,1148],{},[279,1149,1150],{},"setHue(h)",[479,1152,1153],{},[279,1154,1155],{},"(h: number) => void",[479,1157,1158,1159,504],{},"Set the hue (wrapped into [0, 360)); emits ",[279,1160,445],{},[458,1162,1163,1168,1173],{},[479,1164,1165],{},[279,1166,1167],{},"setAlpha(a)",[479,1169,1170],{},[279,1171,1172],{},"(a: number) => void",[479,1174,1175,1176,504],{},"Set alpha (clamped 0–1); emits ",[279,1177,445],{},[458,1179,1180,1185,1190],{},[479,1181,1182],{},[279,1183,1184],{},"setSaturationValue(s, v)",[479,1186,1187],{},[279,1188,1189],{},"(s: number, v: number) => void",[479,1191,1192,1193,1195],{},"Set saturation + value (0–1 each); emits ",[279,1194,445],{},". The area's pointer \u002F keyboard math calls this.",[458,1197,1198,1203,1208],{},[479,1199,1200],{},[279,1201,1202],{},"setColor(next)",[479,1204,1205],{},[279,1206,1207],{},"(next: string) => boolean",[479,1209,1210,1211,1213,1214,1216],{},"Parse a full color string (hex entry, preset click) and apply — a commit (emits ",[279,1212,445],{}," + ",[279,1215,449],{},"). Returns whether it parsed.",[458,1218,1219,1224,1228],{},[479,1220,1221],{},[279,1222,1223],{},"setHex",[479,1225,1226],{},[279,1227,1207],{},[479,1229,1230,1231,1234],{},"Alias of ",[279,1232,1233],{},"setColor"," — the name the hex field reads by.",[458,1236,1237,1242,1247],{},[479,1238,1239],{},[279,1240,1241],{},"openEyeDropper()",[479,1243,1244],{},[279,1245,1246],{},"() => Promise\u003Cvoid>",[479,1248,1249,1250,1252],{},"Open the ",[279,1251,584],{},"; on pick, apply the color (keeping the current alpha) and commit. No-op when unsupported \u002F disabled \u002F dismissed.",[458,1254,1255,1260,1265],{},[479,1256,1257],{},[279,1258,1259],{},"commit()",[479,1261,1262],{},[279,1263,1264],{},"() => void",[479,1266,1267,1268,1270],{},"Commit the current color (emits ",[279,1269,449],{},") — one undo entry per pointer-release \u002F keyboard settle.",[362,1272,1274],{"id":1273},"usage","Usage",[246,1276,1277,1278,1282,1283,1285,1286,282,1288,1291,1292,1294,1295,1297],{},"The picker is assembled from the parts you spread its getters onto — exactly what the styled\n",[316,1279,1280],{"href":33},[279,1281,326],{}," wraps. Bind ",[279,1284,949],{}," on the 2D surface with its two\nvisually-hidden range inputs, drive a slider off ",[279,1287,260],{},[279,1289,1290],{},"setHue",", feed the hex field through ",[279,1293,1223],{},",\nand render ",[279,1296,640],{}," as the roving listbox.",[367,1299,1303],{"className":1300,"code":1301,"language":1302,"meta":372,"style":372},"language-vue shiki shiki-themes github-light github-dark","\u003Cscript setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport { useColorPicker } from '@oriui\u002Fheadless\u002Fvue';\nimport type { ColorFormat } from '@oriui\u002Fheadless\u002Fvue';\n\nconst { format = 'hex', presets } = defineProps\u003C{ format?: ColorFormat; presets?: string[] }>();\n\nconst model = defineModel\u003Cstring>();\nconst emit = defineEmits\u003C{ change: [value: string] }>();\n\n\u002F\u002F Options are a GETTER, so value \u002F format stay reactive. onInput drives v-model (live),\n\u002F\u002F onChange commits (one undo entry).\nconst cp = useColorPicker(() => ({\n    value: model.value,\n    format,\n    presets,\n    onInput: (next) => {\n        model.value = next;\n    },\n    onChange: (next) => emit('change', next)\n}));\n\n\u002F\u002F The hex field holds a local draft so a partial entry isn't reformatted mid-type; cp.hex re-seeds it.\nconst hexDraft = ref(cp.hex.value);\nwatch(\n    () => cp.hex.value,\n    (hex) => {\n        hexDraft.value = hex;\n    }\n);\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n    \u003Cdiv role=\"group\" :aria-label=\"label\">\n        \u003C!-- 2D saturation × value area. The two visually-hidden range inputs are the a11y surface\n             (role=slider, focusable, form value); the area's keydown routes the arrows across both axes. -->\n        \u003Cdiv v-bind=\"cp.areaProps.value\">\n            \u003Cspan :style=\"cp.areaThumbStyle.value\" aria-hidden=\"true\">\u003C\u002Fspan>\n            \u003Cinput class=\"sr-only\" v-bind=\"cp.getChannelInputProps('saturation')\" \u002F>\n            \u003Cinput class=\"sr-only\" v-bind=\"cp.getChannelInputProps('value')\" \u002F>\n        \u003C\u002Fdiv>\n\n        \u003C!-- Preview swatch — role=img named by the current color, ink chosen for contrast. -->\n        \u003Cspan\n            role=\"img\"\n            :aria-label=\"cp.hex.value\"\n            :style=\"{ background: cp.swatchColor.value, color: cp.ink.value }\"\n        \u002F>\n\n        \u003C!-- Hue slider — a native range in [0, 360); commit on release. -->\n        \u003Cinput\n            type=\"range\"\n            :min=\"0\"\n            :max=\"360\"\n            :step=\"1\"\n            :value=\"cp.hue.value\"\n            aria-label=\"Hue\"\n            @input=\"cp.setHue(Number(($event.target as HTMLInputElement).value))\"\n            @change=\"cp.commit\"\n        \u002F>\n\n        \u003C!-- Hex field — setHex parses and commits, returning false on a bad hex. -->\n        \u003Cinput\n            :value=\"hexDraft\"\n            aria-label=\"Hex color\"\n            spellcheck=\"false\"\n            @input=\"hexDraft = ($event.target as HTMLInputElement).value\"\n            @blur=\"cp.setHex(hexDraft)\"\n            @keydown.enter=\"cp.setHex(hexDraft)\"\n        \u002F>\n\n        \u003C!-- Presets — a single-select roving listbox (one tab stop; arrows move focus). -->\n        \u003Cdiv v-if=\"presets?.length\" v-bind=\"cp.presetGroupProps.value\" @keydown=\"cp.onPresetKeydown\">\n            \u003Cbutton v-for=\"(preset, i) in presets\" :key=\"preset\" v-bind=\"cp.getPresetProps(preset, i)\">\u003C\u002Fbutton>\n        \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n","vue",[279,1304,1305,1330,1345,1358,1375,1382,1437,1442,1462,1495,1500,1507,1513,1535,1541,1547,1553,1573,1584,1590,1615,1621,1626,1632,1648,1657,1668,1682,1693,1699,1705,1715,1720,1730,1757,1763,1769,1787,1818,1844,1866,1876,1881,1887,1895,1906,1917,1928,1937,1942,1948,1956,1967,1978,1989,2000,2011,2022,2033,2044,2050,2055,2061,2068,2078,2088,2099,2109,2120,2130,2135,2140,2146,2178,2215,2224,2234],{"__ignoreMap":372},[376,1306,1307,1310,1314,1318,1321,1324,1327],{"class":378,"line":379},[376,1308,1309],{"class":385},"\u003C",[376,1311,1313],{"class":1312},"s9eBZ","script",[376,1315,1317],{"class":1316},"sScJk"," setup",[376,1319,1320],{"class":1316}," lang",[376,1322,1323],{"class":385},"=",[376,1325,1326],{"class":392},"\"ts\"",[376,1328,1329],{"class":385},">\n",[376,1331,1333,1335,1338,1340,1343],{"class":378,"line":1332},2,[376,1334,364],{"class":382},[376,1336,1337],{"class":385}," { ref, watch } ",[376,1339,389],{"class":382},[376,1341,1342],{"class":392}," 'vue'",[376,1344,396],{"class":385},[376,1346,1348,1350,1352,1354,1356],{"class":378,"line":1347},3,[376,1349,364],{"class":382},[376,1351,386],{"class":385},[376,1353,389],{"class":382},[376,1355,393],{"class":392},[376,1357,396],{"class":385},[376,1359,1361,1363,1366,1369,1371,1373],{"class":378,"line":1360},4,[376,1362,364],{"class":382},[376,1364,1365],{"class":382}," type",[376,1367,1368],{"class":385}," { ColorFormat } ",[376,1370,389],{"class":382},[376,1372,393],{"class":392},[376,1374,396],{"class":385},[376,1376,1378],{"class":378,"line":1377},5,[376,1379,1381],{"emptyLinePlaceholder":1380},true,"\n",[376,1383,1385,1388,1391,1394,1397,1400,1402,1404,1407,1409,1412,1415,1418,1421,1424,1427,1429,1431,1434],{"class":378,"line":1384},6,[376,1386,1387],{"class":382},"const",[376,1389,1390],{"class":385}," { ",[376,1392,429],{"class":1393},"sj4cs",[376,1395,1396],{"class":382}," =",[376,1398,1399],{"class":392}," 'hex'",[376,1401,500],{"class":385},[376,1403,640],{"class":1393},[376,1405,1406],{"class":385}," } ",[376,1408,1323],{"class":382},[376,1410,1411],{"class":1316}," defineProps",[376,1413,1414],{"class":385},"\u003C{ ",[376,1416,429],{"class":1417},"s4XuR",[376,1419,1420],{"class":382},"?:",[376,1422,1423],{"class":1316}," ColorFormat",[376,1425,1426],{"class":385},"; ",[376,1428,640],{"class":1417},[376,1430,1420],{"class":382},[376,1432,1433],{"class":1393}," string",[376,1435,1436],{"class":385},"[] }>();\n",[376,1438,1440],{"class":378,"line":1439},7,[376,1441,1381],{"emptyLinePlaceholder":1380},[376,1443,1445,1447,1450,1452,1455,1457,1459],{"class":378,"line":1444},8,[376,1446,1387],{"class":382},[376,1448,1449],{"class":1393}," model",[376,1451,1396],{"class":382},[376,1453,1454],{"class":1316}," defineModel",[376,1456,1309],{"class":385},[376,1458,604],{"class":1393},[376,1460,1461],{"class":385},">();\n",[376,1463,1465,1467,1470,1472,1475,1477,1479,1482,1485,1487,1490,1492],{"class":378,"line":1464},9,[376,1466,1387],{"class":382},[376,1468,1469],{"class":1393}," emit",[376,1471,1396],{"class":382},[376,1473,1474],{"class":1316}," defineEmits",[376,1476,1414],{"class":385},[376,1478,692],{"class":1417},[376,1480,1481],{"class":382},":",[376,1483,1484],{"class":385}," [",[376,1486,426],{"class":1316},[376,1488,1489],{"class":385},": ",[376,1491,604],{"class":1393},[376,1493,1494],{"class":385},"] }>();\n",[376,1496,1498],{"class":378,"line":1497},10,[376,1499,1381],{"emptyLinePlaceholder":1380},[376,1501,1503],{"class":378,"line":1502},11,[376,1504,1506],{"class":1505},"sJ8bj","\u002F\u002F Options are a GETTER, so value \u002F format stay reactive. onInput drives v-model (live),\n",[376,1508,1510],{"class":378,"line":1509},12,[376,1511,1512],{"class":1505},"\u002F\u002F onChange commits (one undo entry).\n",[376,1514,1516,1518,1521,1523,1526,1529,1532],{"class":378,"line":1515},13,[376,1517,1387],{"class":382},[376,1519,1520],{"class":1393}," cp",[376,1522,1396],{"class":382},[376,1524,1525],{"class":1316}," useColorPicker",[376,1527,1528],{"class":385},"(() ",[376,1530,1531],{"class":382},"=>",[376,1533,1534],{"class":385}," ({\n",[376,1536,1538],{"class":378,"line":1537},14,[376,1539,1540],{"class":385},"    value: model.value,\n",[376,1542,1544],{"class":378,"line":1543},15,[376,1545,1546],{"class":385},"    format,\n",[376,1548,1550],{"class":378,"line":1549},16,[376,1551,1552],{"class":385},"    presets,\n",[376,1554,1556,1559,1562,1565,1568,1570],{"class":378,"line":1555},17,[376,1557,1558],{"class":1316},"    onInput",[376,1560,1561],{"class":385},": (",[376,1563,1564],{"class":1417},"next",[376,1566,1567],{"class":385},") ",[376,1569,1531],{"class":382},[376,1571,1572],{"class":385}," {\n",[376,1574,1576,1579,1581],{"class":378,"line":1575},18,[376,1577,1578],{"class":385},"        model.value ",[376,1580,1323],{"class":382},[376,1582,1583],{"class":385}," next;\n",[376,1585,1587],{"class":378,"line":1586},19,[376,1588,1589],{"class":385},"    },\n",[376,1591,1593,1596,1598,1600,1602,1604,1606,1609,1612],{"class":378,"line":1592},20,[376,1594,1595],{"class":1316},"    onChange",[376,1597,1561],{"class":385},[376,1599,1564],{"class":1417},[376,1601,1567],{"class":385},[376,1603,1531],{"class":382},[376,1605,1469],{"class":1316},[376,1607,1608],{"class":385},"(",[376,1610,1611],{"class":392},"'change'",[376,1613,1614],{"class":385},", next)\n",[376,1616,1618],{"class":378,"line":1617},21,[376,1619,1620],{"class":385},"}));\n",[376,1622,1624],{"class":378,"line":1623},22,[376,1625,1381],{"emptyLinePlaceholder":1380},[376,1627,1629],{"class":378,"line":1628},23,[376,1630,1631],{"class":1505},"\u002F\u002F The hex field holds a local draft so a partial entry isn't reformatted mid-type; cp.hex re-seeds it.\n",[376,1633,1635,1637,1640,1642,1645],{"class":378,"line":1634},24,[376,1636,1387],{"class":382},[376,1638,1639],{"class":1393}," hexDraft",[376,1641,1396],{"class":382},[376,1643,1644],{"class":1316}," ref",[376,1646,1647],{"class":385},"(cp.hex.value);\n",[376,1649,1651,1654],{"class":378,"line":1650},25,[376,1652,1653],{"class":1316},"watch",[376,1655,1656],{"class":385},"(\n",[376,1658,1660,1663,1665],{"class":378,"line":1659},26,[376,1661,1662],{"class":385},"    () ",[376,1664,1531],{"class":382},[376,1666,1667],{"class":385}," cp.hex.value,\n",[376,1669,1671,1674,1676,1678,1680],{"class":378,"line":1670},27,[376,1672,1673],{"class":385},"    (",[376,1675,268],{"class":1417},[376,1677,1567],{"class":385},[376,1679,1531],{"class":382},[376,1681,1572],{"class":385},[376,1683,1685,1688,1690],{"class":378,"line":1684},28,[376,1686,1687],{"class":385},"        hexDraft.value ",[376,1689,1323],{"class":382},[376,1691,1692],{"class":385}," hex;\n",[376,1694,1696],{"class":378,"line":1695},29,[376,1697,1698],{"class":385},"    }\n",[376,1700,1702],{"class":378,"line":1701},30,[376,1703,1704],{"class":385},");\n",[376,1706,1708,1711,1713],{"class":378,"line":1707},31,[376,1709,1710],{"class":385},"\u003C\u002F",[376,1712,1313],{"class":1312},[376,1714,1329],{"class":385},[376,1716,1718],{"class":378,"line":1717},32,[376,1719,1381],{"emptyLinePlaceholder":1380},[376,1721,1723,1725,1728],{"class":378,"line":1722},33,[376,1724,1309],{"class":385},[376,1726,1727],{"class":1312},"template",[376,1729,1329],{"class":385},[376,1731,1733,1736,1739,1742,1744,1747,1750,1752,1755],{"class":378,"line":1732},34,[376,1734,1735],{"class":385},"    \u003C",[376,1737,1738],{"class":1312},"div",[376,1740,1741],{"class":1316}," role",[376,1743,1323],{"class":385},[376,1745,1746],{"class":392},"\"group\"",[376,1748,1749],{"class":1316}," :aria-label",[376,1751,1323],{"class":385},[376,1753,1754],{"class":392},"\"label\"",[376,1756,1329],{"class":385},[376,1758,1760],{"class":378,"line":1759},35,[376,1761,1762],{"class":1505},"        \u003C!-- 2D saturation × value area. The two visually-hidden range inputs are the a11y surface\n",[376,1764,1766],{"class":378,"line":1765},36,[376,1767,1768],{"class":1505},"             (role=slider, focusable, form value); the area's keydown routes the arrows across both axes. -->\n",[376,1770,1772,1775,1777,1780,1782,1785],{"class":378,"line":1771},37,[376,1773,1774],{"class":385},"        \u003C",[376,1776,1738],{"class":1312},[376,1778,1779],{"class":1316}," v-bind",[376,1781,1323],{"class":385},[376,1783,1784],{"class":392},"\"cp.areaProps.value\"",[376,1786,1329],{"class":385},[376,1788,1790,1793,1795,1798,1800,1803,1806,1808,1811,1814,1816],{"class":378,"line":1789},38,[376,1791,1792],{"class":385},"            \u003C",[376,1794,376],{"class":1312},[376,1796,1797],{"class":1316}," :style",[376,1799,1323],{"class":385},[376,1801,1802],{"class":392},"\"cp.areaThumbStyle.value\"",[376,1804,1805],{"class":1316}," aria-hidden",[376,1807,1323],{"class":385},[376,1809,1810],{"class":392},"\"true\"",[376,1812,1813],{"class":385},">\u003C\u002F",[376,1815,376],{"class":1312},[376,1817,1329],{"class":385},[376,1819,1821,1823,1826,1829,1831,1834,1836,1838,1841],{"class":378,"line":1820},39,[376,1822,1792],{"class":385},[376,1824,1825],{"class":1312},"input",[376,1827,1828],{"class":1316}," class",[376,1830,1323],{"class":385},[376,1832,1833],{"class":392},"\"sr-only\"",[376,1835,1779],{"class":1316},[376,1837,1323],{"class":385},[376,1839,1840],{"class":392},"\"cp.getChannelInputProps('saturation')\"",[376,1842,1843],{"class":385}," \u002F>\n",[376,1845,1847,1849,1851,1853,1855,1857,1859,1861,1864],{"class":378,"line":1846},40,[376,1848,1792],{"class":385},[376,1850,1825],{"class":1312},[376,1852,1828],{"class":1316},[376,1854,1323],{"class":385},[376,1856,1833],{"class":392},[376,1858,1779],{"class":1316},[376,1860,1323],{"class":385},[376,1862,1863],{"class":392},"\"cp.getChannelInputProps('value')\"",[376,1865,1843],{"class":385},[376,1867,1869,1872,1874],{"class":378,"line":1868},41,[376,1870,1871],{"class":385},"        \u003C\u002F",[376,1873,1738],{"class":1312},[376,1875,1329],{"class":385},[376,1877,1879],{"class":378,"line":1878},42,[376,1880,1381],{"emptyLinePlaceholder":1380},[376,1882,1884],{"class":378,"line":1883},43,[376,1885,1886],{"class":1505},"        \u003C!-- Preview swatch — role=img named by the current color, ink chosen for contrast. -->\n",[376,1888,1890,1892],{"class":378,"line":1889},44,[376,1891,1774],{"class":385},[376,1893,1894],{"class":1312},"span\n",[376,1896,1898,1901,1903],{"class":378,"line":1897},45,[376,1899,1900],{"class":1316},"            role",[376,1902,1323],{"class":385},[376,1904,1905],{"class":392},"\"img\"\n",[376,1907,1909,1912,1914],{"class":378,"line":1908},46,[376,1910,1911],{"class":1316},"            :aria-label",[376,1913,1323],{"class":385},[376,1915,1916],{"class":392},"\"cp.hex.value\"\n",[376,1918,1920,1923,1925],{"class":378,"line":1919},47,[376,1921,1922],{"class":1316},"            :style",[376,1924,1323],{"class":385},[376,1926,1927],{"class":392},"\"{ background: cp.swatchColor.value, color: cp.ink.value }\"\n",[376,1929,1931,1935],{"class":378,"line":1930},48,[376,1932,1934],{"class":1933},"s7hpK","        \u002F",[376,1936,1329],{"class":385},[376,1938,1940],{"class":378,"line":1939},49,[376,1941,1381],{"emptyLinePlaceholder":1380},[376,1943,1945],{"class":378,"line":1944},50,[376,1946,1947],{"class":1505},"        \u003C!-- Hue slider — a native range in [0, 360); commit on release. -->\n",[376,1949,1951,1953],{"class":378,"line":1950},51,[376,1952,1774],{"class":385},[376,1954,1955],{"class":1312},"input\n",[376,1957,1959,1962,1964],{"class":378,"line":1958},52,[376,1960,1961],{"class":1316},"            type",[376,1963,1323],{"class":385},[376,1965,1966],{"class":392},"\"range\"\n",[376,1968,1970,1973,1975],{"class":378,"line":1969},53,[376,1971,1972],{"class":1316},"            :min",[376,1974,1323],{"class":385},[376,1976,1977],{"class":392},"\"0\"\n",[376,1979,1981,1984,1986],{"class":378,"line":1980},54,[376,1982,1983],{"class":1316},"            :max",[376,1985,1323],{"class":385},[376,1987,1988],{"class":392},"\"360\"\n",[376,1990,1992,1995,1997],{"class":378,"line":1991},55,[376,1993,1994],{"class":1316},"            :step",[376,1996,1323],{"class":385},[376,1998,1999],{"class":392},"\"1\"\n",[376,2001,2003,2006,2008],{"class":378,"line":2002},56,[376,2004,2005],{"class":1316},"            :value",[376,2007,1323],{"class":385},[376,2009,2010],{"class":392},"\"cp.hue.value\"\n",[376,2012,2014,2017,2019],{"class":378,"line":2013},57,[376,2015,2016],{"class":1316},"            aria-label",[376,2018,1323],{"class":385},[376,2020,2021],{"class":392},"\"Hue\"\n",[376,2023,2025,2028,2030],{"class":378,"line":2024},58,[376,2026,2027],{"class":1316},"            @input",[376,2029,1323],{"class":385},[376,2031,2032],{"class":392},"\"cp.setHue(Number(($event.target as HTMLInputElement).value))\"\n",[376,2034,2036,2039,2041],{"class":378,"line":2035},59,[376,2037,2038],{"class":1316},"            @change",[376,2040,1323],{"class":385},[376,2042,2043],{"class":392},"\"cp.commit\"\n",[376,2045,2047],{"class":378,"line":2046},60,[376,2048,2049],{"class":385},"        \u002F>\n",[376,2051,2053],{"class":378,"line":2052},61,[376,2054,1381],{"emptyLinePlaceholder":1380},[376,2056,2058],{"class":378,"line":2057},62,[376,2059,2060],{"class":1505},"        \u003C!-- Hex field — setHex parses and commits, returning false on a bad hex. -->\n",[376,2062,2064,2066],{"class":378,"line":2063},63,[376,2065,1774],{"class":385},[376,2067,1955],{"class":1312},[376,2069,2071,2073,2075],{"class":378,"line":2070},64,[376,2072,2005],{"class":1316},[376,2074,1323],{"class":385},[376,2076,2077],{"class":392},"\"hexDraft\"\n",[376,2079,2081,2083,2085],{"class":378,"line":2080},65,[376,2082,2016],{"class":1316},[376,2084,1323],{"class":385},[376,2086,2087],{"class":392},"\"Hex color\"\n",[376,2089,2091,2094,2096],{"class":378,"line":2090},66,[376,2092,2093],{"class":1316},"            spellcheck",[376,2095,1323],{"class":385},[376,2097,2098],{"class":392},"\"false\"\n",[376,2100,2102,2104,2106],{"class":378,"line":2101},67,[376,2103,2027],{"class":1316},[376,2105,1323],{"class":385},[376,2107,2108],{"class":392},"\"hexDraft = ($event.target as HTMLInputElement).value\"\n",[376,2110,2112,2115,2117],{"class":378,"line":2111},68,[376,2113,2114],{"class":1316},"            @blur",[376,2116,1323],{"class":385},[376,2118,2119],{"class":392},"\"cp.setHex(hexDraft)\"\n",[376,2121,2123,2126,2128],{"class":378,"line":2122},69,[376,2124,2125],{"class":1316},"            @keydown.enter",[376,2127,1323],{"class":385},[376,2129,2119],{"class":392},[376,2131,2133],{"class":378,"line":2132},70,[376,2134,2049],{"class":385},[376,2136,2138],{"class":378,"line":2137},71,[376,2139,1381],{"emptyLinePlaceholder":1380},[376,2141,2143],{"class":378,"line":2142},72,[376,2144,2145],{"class":1505},"        \u003C!-- Presets — a single-select roving listbox (one tab stop; arrows move focus). -->\n",[376,2147,2149,2151,2153,2156,2158,2161,2163,2165,2168,2171,2173,2176],{"class":378,"line":2148},73,[376,2150,1774],{"class":385},[376,2152,1738],{"class":1312},[376,2154,2155],{"class":1316}," v-if",[376,2157,1323],{"class":385},[376,2159,2160],{"class":392},"\"presets?.length\"",[376,2162,1779],{"class":1316},[376,2164,1323],{"class":385},[376,2166,2167],{"class":392},"\"cp.presetGroupProps.value\"",[376,2169,2170],{"class":1316}," @keydown",[376,2172,1323],{"class":385},[376,2174,2175],{"class":392},"\"cp.onPresetKeydown\"",[376,2177,1329],{"class":385},[376,2179,2181,2183,2186,2189,2191,2194,2197,2199,2202,2204,2206,2209,2211,2213],{"class":378,"line":2180},74,[376,2182,1792],{"class":385},[376,2184,2185],{"class":1312},"button",[376,2187,2188],{"class":1316}," v-for",[376,2190,1323],{"class":385},[376,2192,2193],{"class":392},"\"(preset, i) in presets\"",[376,2195,2196],{"class":1316}," :key",[376,2198,1323],{"class":385},[376,2200,2201],{"class":392},"\"preset\"",[376,2203,1779],{"class":1316},[376,2205,1323],{"class":385},[376,2207,2208],{"class":392},"\"cp.getPresetProps(preset, i)\"",[376,2210,1813],{"class":385},[376,2212,2185],{"class":1312},[376,2214,1329],{"class":385},[376,2216,2218,2220,2222],{"class":378,"line":2217},75,[376,2219,1871],{"class":385},[376,2221,1738],{"class":1312},[376,2223,1329],{"class":385},[376,2225,2227,2230,2232],{"class":378,"line":2226},76,[376,2228,2229],{"class":385},"    \u003C\u002F",[376,2231,1738],{"class":1312},[376,2233,1329],{"class":385},[376,2235,2237,2239,2241],{"class":378,"line":2236},77,[376,2238,1710],{"class":385},[376,2240,1727],{"class":1312},[376,2242,1329],{"class":385},[246,2244,2245,2246,2249,2250,282,2252,2255,2256,2258,2259,2262,2263,2266,2267,2270,2271,2275],{},"Passing ",[279,2247,2248],{},"alpha: true"," adds the alpha channel (bind a second slider to ",[279,2251,264],{},[279,2253,2254],{},"setAlpha",", using\n",[279,2257,866],{}," for its track), and ",[279,2260,2261],{},"eyedropper: true"," enables ",[279,2264,2265],{},"openEyeDropper"," (gate its trigger on\n",[279,2268,2269],{},"cp.eyedropperSupported",") — see how the styled ",[316,2272,2273],{"href":33},[279,2274,326],{}," wires both.",[246,2277,2278,2279,2282,2283,2286,2287,2290,2291,2294,2295,2298,2299,500,2302,2305,2306,282,2309,282,2312,282,2315,282,2318,2321],{},"The ",[250,2280,2281],{},"Svelte"," binding is the store twin (",[279,2284,2285],{},"@oriui\u002Fheadless\u002Fsvelte",") over the same core engine — the prop\nbags are ",[279,2288,2289],{},"Readable"," stores you auto-subscribe with ",[279,2292,2293],{},"$",", the per-part getters are ",[250,2296,2297],{},"stores of functions","\n(",[279,2300,2301],{},"$getChannelInputProps('saturation')",[279,2303,2304],{},"$getPresetProps(color, i)","), and event handlers are lowercased\n(",[279,2307,2308],{},"onpointerdown",[279,2310,2311],{},"onkeydown",[279,2313,2314],{},"oninput",[279,2316,2317],{},"onclick",[279,2319,2320],{},"onfocus","). Options are a plain object or a store:",[367,2323,2327],{"className":2324,"code":2325,"language":2326,"meta":372,"style":372},"language-svelte shiki shiki-themes github-light github-dark","\u003C!-- MyColorPicker.svelte -->\n\u003Cscript>\n    import { writable } from 'svelte\u002Fstore';\n    import { useColorPicker } from '@oriui\u002Fheadless\u002Fsvelte';\n\n    export let color = '#3366ff';\n    \u002F\u002F Pass a STORE (not a snapshot object) so an external `color` change re-syncs into the picker — a plain\n    \u002F\u002F object becomes a constant store (`toReadable`) and would only seed the initial value.\n    const options = writable({ value: color, onInput: (v) => (color = v), onChange: (v) => (color = v) });\n    $: options.set({ value: color, onInput: (v) => (color = v), onChange: (v) => (color = v) });\n\n    const cp = useColorPicker(options);\n    const { areaProps, areaThumbStyle, getChannelInputProps, hue, hex } = cp;\n\u003C\u002Fscript>\n\n\u003Cdiv {...$areaProps}>\n    \u003Cspan style:left={$areaThumbStyle.left} style:top={$areaThumbStyle.top} aria-hidden=\"true\">\u003C\u002Fspan>\n    \u003Cinput {...$getChannelInputProps('saturation')} \u002F>\n    \u003Cinput {...$getChannelInputProps('value')} \u002F>\n\u003C\u002Fdiv>\n\u003Cinput type=\"range\" min=\"0\" max=\"359\" value={$hue} on:input={(e) => cp.setHue(+e.currentTarget.value)} on:change={cp.commit} \u002F>\n\u003Cinput value={$hex} aria-label=\"Hex color\" on:blur={(e) => cp.setHex(e.currentTarget.value)} \u002F>\n","svelte",[279,2328,2329,2334,2339,2344,2349,2353,2358,2363,2368,2373,2378,2382,2387,2392,2397,2401,2406,2411,2416,2421,2426,2431],{"__ignoreMap":372},[376,2330,2331],{"class":378,"line":379},[376,2332,2333],{},"\u003C!-- MyColorPicker.svelte -->\n",[376,2335,2336],{"class":378,"line":1332},[376,2337,2338],{},"\u003Cscript>\n",[376,2340,2341],{"class":378,"line":1347},[376,2342,2343],{},"    import { writable } from 'svelte\u002Fstore';\n",[376,2345,2346],{"class":378,"line":1360},[376,2347,2348],{},"    import { useColorPicker } from '@oriui\u002Fheadless\u002Fsvelte';\n",[376,2350,2351],{"class":378,"line":1377},[376,2352,1381],{"emptyLinePlaceholder":1380},[376,2354,2355],{"class":378,"line":1384},[376,2356,2357],{},"    export let color = '#3366ff';\n",[376,2359,2360],{"class":378,"line":1439},[376,2361,2362],{},"    \u002F\u002F Pass a STORE (not a snapshot object) so an external `color` change re-syncs into the picker — a plain\n",[376,2364,2365],{"class":378,"line":1444},[376,2366,2367],{},"    \u002F\u002F object becomes a constant store (`toReadable`) and would only seed the initial value.\n",[376,2369,2370],{"class":378,"line":1464},[376,2371,2372],{},"    const options = writable({ value: color, onInput: (v) => (color = v), onChange: (v) => (color = v) });\n",[376,2374,2375],{"class":378,"line":1497},[376,2376,2377],{},"    $: options.set({ value: color, onInput: (v) => (color = v), onChange: (v) => (color = v) });\n",[376,2379,2380],{"class":378,"line":1502},[376,2381,1381],{"emptyLinePlaceholder":1380},[376,2383,2384],{"class":378,"line":1509},[376,2385,2386],{},"    const cp = useColorPicker(options);\n",[376,2388,2389],{"class":378,"line":1515},[376,2390,2391],{},"    const { areaProps, areaThumbStyle, getChannelInputProps, hue, hex } = cp;\n",[376,2393,2394],{"class":378,"line":1537},[376,2395,2396],{},"\u003C\u002Fscript>\n",[376,2398,2399],{"class":378,"line":1543},[376,2400,1381],{"emptyLinePlaceholder":1380},[376,2402,2403],{"class":378,"line":1549},[376,2404,2405],{},"\u003Cdiv {...$areaProps}>\n",[376,2407,2408],{"class":378,"line":1555},[376,2409,2410],{},"    \u003Cspan style:left={$areaThumbStyle.left} style:top={$areaThumbStyle.top} aria-hidden=\"true\">\u003C\u002Fspan>\n",[376,2412,2413],{"class":378,"line":1575},[376,2414,2415],{},"    \u003Cinput {...$getChannelInputProps('saturation')} \u002F>\n",[376,2417,2418],{"class":378,"line":1586},[376,2419,2420],{},"    \u003Cinput {...$getChannelInputProps('value')} \u002F>\n",[376,2422,2423],{"class":378,"line":1592},[376,2424,2425],{},"\u003C\u002Fdiv>\n",[376,2427,2428],{"class":378,"line":1617},[376,2429,2430],{},"\u003Cinput type=\"range\" min=\"0\" max=\"359\" value={$hue} on:input={(e) => cp.setHue(+e.currentTarget.value)} on:change={cp.commit} \u002F>\n",[376,2432,2433],{"class":378,"line":1623},[376,2434,2435],{},"\u003Cinput value={$hex} aria-label=\"Hex color\" on:blur={(e) => cp.setHex(e.currentTarget.value)} \u002F>\n",[362,2437,210],{"id":2438},"accessibility",[246,2440,2441],{},"The prop-getters carry the ARIA and keyboard contract; nothing is hand-rolled that a native control\nalready provides.",[2443,2444,2445,2492,2504,2527],"ul",{},[2446,2447,2448,2453,2454,282,2457,2460,2461,2464,2465,2467,2468,2470,2471,2474,2475,2477,2478,2480,2481,2484,2485,2488,2489,2491],"li",{},[250,2449,2450,2451],{},"The 2D area is two visually-hidden native ",[279,2452,1017],{}," — one per axis\n(",[279,2455,2456],{},"getChannelInputProps('saturation')",[279,2458,2459],{},"('value')","). Each is a real ",[279,2462,2463],{},"role=\"slider\""," with its own\n",[279,2466,612],{}," and ",[279,2469,1039],{}," (",[279,2472,2473],{},"\"60%\"","), focusable, announced, and form-associable. The arrow keys\nare routed across both axes by ",[279,2476,949],{},"' ",[279,2479,976],{}," (a single native range spans only one axis); it\n",[279,2482,2483],{},"preventDefault","s the navigation keys and bubbles from the focused channel input. ",[279,2486,2487],{},"getChannelInputProps","'\nown ",[279,2490,445],{}," still covers an assistive technology that sets a channel value directly.",[2446,2493,2494,2500,2501,2503],{},[250,2495,2496,2497],{},"The preview swatch is ",[279,2498,2499],{},"role=\"img\"",", named by the current color; ",[279,2502,880],{}," picks black or white content\nfor WCAG contrast over it.",[2446,2505,2506,2470,2511,2513,2514,2517,2518,2520,2521,2523,2524,2526],{},[250,2507,2508,2509],{},"Presets are a single-select ",[279,2510,1058],{},[279,2512,1048],{},") with ",[250,2515,2516],{},"roving tabindex"," — one tab\nstop, arrow keys move real DOM focus (",[279,2519,1114],{},", wrapping), ",[279,2522,1093],{}," marks the active\ncolor. Each chip is a ",[279,2525,1088],{}," button labelled by its color.",[2446,2528,2529,2533,2534,715,2536,2540],{},[250,2530,2531],{},[279,2532,599],{}," names the whole control (",[279,2535,616],{},[250,2537,2538],{},[279,2539,433],{}," blocks the area drag \u002F keyboard and\ndisables the channel inputs.",[246,2542,2543,2546],{},[250,2544,2545],{},"Area keyboard"," (focus is on a channel input; the area routes the key):",[452,2548,2549,2559],{},[455,2550,2551],{},[458,2552,2553,2556],{},[461,2554,2555],{},"Key",[461,2557,2558],{},"Action",[474,2560,2561,2582,2599,2614],{},[458,2562,2563,2571],{},[479,2564,2565,282,2568],{},[279,2566,2567],{},"ArrowLeft",[279,2569,2570],{},"ArrowRight",[479,2572,2573,2574,2577,2578,2581],{},"Decrease \u002F increase ",[250,2575,2576],{},"saturation"," by 1% (",[279,2579,2580],{},"Shift"," = ×10).",[458,2583,2584,2592],{},[479,2585,2586,282,2589],{},[279,2587,2588],{},"ArrowDown",[279,2590,2591],{},"ArrowUp",[479,2593,2573,2594,2577,2597,2581],{},[250,2595,2596],{},"brightness",[279,2598,2580],{},[458,2600,2601,2609],{},[479,2602,2603,282,2606],{},[279,2604,2605],{},"PageDown",[279,2607,2608],{},"PageUp",[479,2610,2573,2611,2613],{},[250,2612,2596],{}," by 10%.",[458,2615,2616,2624],{},[479,2617,2618,282,2621],{},[279,2619,2620],{},"Home",[279,2622,2623],{},"End",[479,2625,2626,2627,2629],{},"Jump ",[250,2628,2576],{}," to 0% \u002F 100%.",[362,2631,2633],{"id":2632},"see-also","See also",[2443,2635,2636,2641,2649,2654],{},[2446,2637,2638,2640],{},[316,2639,320],{"href":161}," — the framework-agnostic core: the zero-dependency sRGB engine and the\npure 2D-area math behind this binding.",[2446,2642,2643,2645,2646,2648],{},[316,2644,34],{"href":33}," — the styled ",[279,2647,326],{}," built on this composable.",[2446,2650,2651,2653],{},[316,2652,98],{"href":97}," — the native-range primitive the styled picker reuses for the hue \u002F alpha channels.",[2446,2655,2656,2658],{},[316,2657,78],{"href":77}," — compose the inline picker into a popover for a swatch-triggered flow.",[2660,2661,2662],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s7hpK, html code.shiki .s7hpK{--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":372,"searchDepth":1332,"depth":1332,"links":2664},[2665,2666,2667,2672,2673,2674],{"id":364,"depth":1332,"text":365},{"id":399,"depth":1332,"text":400},{"id":696,"depth":1332,"text":697,"children":2668},[2669,2670,2671],{"id":726,"depth":1347,"text":727},{"id":927,"depth":1347,"text":928},{"id":1128,"depth":1347,"text":1129},{"id":1273,"depth":1332,"text":1274},{"id":2438,"depth":1332,"text":210},{"id":2632,"depth":1332,"text":2633},"md",{},{"title":166,"description":167},"headless\u002Fuse-color-picker","hZpBbKkP9vG8joTsehXmCQuW55EBFrfr2bDJvm4dQd8",1783874707150]