@kanso-labs/kanso-ui 0.45.34 → 0.46.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/button/index.js +13 -9
- package/dist/button/index.js.map +1 -1
- package/dist/calendar/styles.js +12 -7
- package/dist/calendar/styles.js.map +1 -1
- package/dist/chip/styles.js +1 -0
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/styles.js +1 -1
- package/dist/collection/styles.js.map +1 -1
- package/dist/components/breadcrumbs/index.js +4 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +16 -3
- package/dist/components/button-group/index.js +53 -86
- package/dist/components/button-group/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +3 -3
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/card/index.js +5 -1
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/carousel/index.js +162 -105
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +38 -15
- package/dist/components/chip/index.js +104 -8
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/color-area/index.d.ts +5 -3
- package/dist/components/color-area/index.js +5 -3
- package/dist/components/color-area/index.js.map +1 -1
- package/dist/components/color-picker/index.js +6 -3
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-swatch-picker/index.js +24 -9
- package/dist/components/color-swatch-picker/index.js.map +1 -1
- package/dist/components/combo-box/index.d.ts +11 -3
- package/dist/components/combo-box/index.js +66 -62
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/copy-field/index.js +1 -0
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/date-picker/index.d.ts +22 -3
- package/dist/components/date-picker/index.js +234 -45
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/date-range-picker/index.d.ts +3 -1
- package/dist/components/date-range-picker/index.js +6 -4
- package/dist/components/date-range-picker/index.js.map +1 -1
- package/dist/components/disclosure/index.d.ts +4 -3
- package/dist/components/disclosure/index.js +159 -101
- package/dist/components/disclosure/index.js.map +1 -1
- package/dist/components/fab/index.d.ts +3 -1
- package/dist/components/fab/index.js +25 -12
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/fab-menu/index.js +1 -1
- package/dist/components/fab-menu/index.js.map +1 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/navigation-rail/index.js +4 -4
- package/dist/components/navigation-rail/index.js.map +1 -1
- package/dist/components/navigation-tree/index.js +16 -13
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/popover/index.js +35 -33
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/range-calendar/index.js +41 -7
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +3 -2
- package/dist/components/segmented-button/index.js +46 -95
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/select/index.js +5 -2
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/slider/index.js +42 -10
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/time-picker/index.js +2 -0
- package/dist/components/time-picker/index.js.map +1 -1
- package/dist/components/token-field/index.js +89 -66
- package/dist/components/token-field/index.js.map +1 -1
- package/dist/components/toolbar/index.d.ts +4 -0
- package/dist/components/toolbar/index.js +16 -5
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree/index.js.map +1 -1
- package/dist/fab/styles.js +12 -0
- package/dist/fab/styles.js.map +1 -1
- package/dist/field/styles.js +2 -2
- package/dist/field/styles.js.map +1 -1
- package/dist/hooks/useDockedMonths.js +36 -0
- package/dist/hooks/useDockedMonths.js.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +34 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/navigation/index.js +5 -5
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/styles.js +4 -0
- package/dist/navigation/styles.js.map +1 -1
- package/dist/row/context.js +6 -0
- package/dist/row/context.js.map +1 -0
- package/dist/row/index.js +77 -66
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +15 -0
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/index.js +2 -1
- package/dist/segments/index.js.map +1 -1
- package/dist/segments/styles.js +4 -0
- package/dist/segments/styles.js.map +1 -1
- package/dist/styles/chequer.js +1 -0
- package/dist/styles/chequer.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles.css +158 -35
- package/dist/toggle-group/index.js +133 -0
- package/dist/toggle-group/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_c","stylex","useContext","useRef","Select","RACSelect","SelectStateContext","fieldStyles","invalidFrom","useFieldValidationBehavior","mergeStatefulStyles","overlay","popupOrigin","TRIGGER","chevronFor","isOpen","className","listClassName","state","props","popup","styles","list","placement","kWkggS","kaIpWk","kzqmXN","kskxy","ks0D6T","k7Eaqz","kORKVm","k8WAf4","$$css","container","description","error","floatingLabel","label","leadingIcon","options","variant","t0","$","t1","isDisabled","t2","t3","undefined","validationBehavior","boxRef","T0","t4","t5","root","t6","selectContent","t7","isInvalid","isRequired","isFocused","SelectedValue","isPlaceholder","selectionManager","selectedKeys","size","Symbol","for","RACPopover","ListBox","RACSelectValue"],"sources":["../../../src/components/select/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes, RefObject } from 'react';\nimport type { PopoverRenderProps, SelectProps as RACSelectProps, SelectRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useRef } from 'react';\nimport { Popover as RACPopover, Select as RACSelect, SelectValue as RACSelectValue, SelectStateContext } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldMessage, FieldTrigger, FieldValue } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { ChevronEndGlyph } from '../../glyphs';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing } from '../../tokens/design.tokens.stylex';\nimport ListBox from '../list-box';\n\n// The menus page's exposed dropdown menu: a text field that opens a list\n// rather than taking a keystroke. Everything above the list is the field\n// chrome in `src/field` — the same box, label, supporting line and error\n// treatment every other field draws — and the list is ListBox on the shared\n// overlay surface. What is here is React Aria's `Select` around the two, and\n// the three things that are this component's own.\n//\n// **The whole box opens the list.** The chrome's `FieldTrigger` covers the\n// box rather than sitting on the value's line, so the padding, the label and\n// the icons all open it, which is what the page draws and what a native\n// select does. It draws nothing itself: the box already carries the fill,\n// the underline and the focus indicator.\n//\n// **The chevron turns.** The page's trailing icon points down while the list\n// is closed and up while it is open. React Aria reports which through the\n// select's render state, so it is drawn from that rather than swapped for a\n// second glyph.\n//\n// **The list is the field's width.** The page draws it under the field and\n// as wide as it, which React Aria reports as `--trigger-width` — of whatever\n// it is anchored to. Left alone that is the button, which fills the box's\n// value column rather than the box, so the list came out narrower than the\n// field by the icons either side of it. Pointing the popover's `triggerRef`\n// at the box is what makes the two agree. The overlay's own 112 to 280 range\n// is a menu opened from a button rather than from a field, so it goes.\n//\n// A select's value is chosen rather than typed, which the chrome had no\n// notion of until this component: `useFieldPopulated` now reads the select's\n// own state, so the floating label floats once something is chosen.\n\n// Hoisted, and the chevron built by a call, so neither is a new element on\n// every render — which is what react-perf's jsx-no-jsx-as-prop is after.\nconst TRIGGER = <FieldTrigger />;\nfunction chevronFor(isOpen: boolean) {\n return <ChevronEndGlyph {...{\n 0: {\n className: \"x12w9bfk xxk0z11 xvy4d1p x1iffjtl xkzkux9 x11xpdln xpc4ca7\"\n },\n 1: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xkzkux9 x11xpdln xpc4ca7 x9tu13d\"\n }\n }[!!isOpen << 0]} />;\n}\n\n// The list's classes, from React Aria's render state: it grows from the\n// edge it is anchored by, as every anchored overlay does, so a list that\n// opens above the field grows upward.\nfunction listClassName(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.list, popupOrigin(state.placement)).className ?? '';\n}\nconst styles = {\n list: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n kzqmXN: \"xlvufjm\",\n kskxy: \"xedcshv\",\n ks0D6T: \"x1x1rfll\",\n k7Eaqz: \"xeuugli\",\n kORKVm: \"x1odjw0f\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n }\n};\ntype SelectProps<T extends object = object> = {\n /**\n * Where to portal the list. Defaults to the container of the `ThemeScope`\n * around it, which keeps the list on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the list\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n description?: string;\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state — the message, the red underline, and\n * `aria-invalid` all follow from it.\n *\n * Outside a `Form` the message line arrives with the message, so the\n * field grows when this does and moves what is under it. A `Form` holds\n * that space from the start; so does a permanent `description`.\n */\n error?: string;\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or something is chosen. `false` keeps it small at the\n * top in every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * What the field is for. Required rather than optional: a select with no\n * label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * An icon at the start of the box, before the label and the value: the\n * page's 24dp leading icon, in the muted role. An icon drawn in `em` takes\n * that size from the slot.\n */\n leadingIcon?: ReactNode;\n /**\n * The options. `ListBox.Item` for each, and `ListBox.Section` to group\n * them — the list inside is a ListBox, and takes everything one does.\n */\n options?: ReactNode;\n /**\n * The filled box, or the outlined one, as the text fields page draws them.\n * @default 'filled'\n */\n variant?: FieldVariant;\n} & Omit<RACSelectProps<T>, 'children' | 'defaultSelectedKey' | 'isInvalid' | 'onSelectionChange' | 'selectedKey' | 'validationBehavior'>;\n\n/**\n * A labelled field that opens a list to choose from. Its value is React\n * Aria's: pass `value` with `onChange` to control it, or `defaultValue` to\n * let it keep its own. The value is an option's `id`, so give every option\n * one. React Aria's older `selectedKey` names are deprecated and are left\n * out of this component's props rather than passed through.\n *\n * ```tsx\n * <Select\n * label=\"Label\"\n * options={\n * <>\n * <ListBox.Item id=\"first\">First item</ListBox.Item>\n * <ListBox.Item id=\"second\">Second item</ListBox.Item>\n * </>\n * }\n * />\n * ```\n *\n * The box, label, supporting line and error are the field chrome in\n * `src/field`, shared with every other field; the list is ListBox on the\n * overlay surface every anchored panel here draws.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions.\n */\nfunction Select<T extends object = object>({\n container,\n description,\n error,\n floatingLabel = true,\n isDisabled = false,\n label,\n leadingIcon,\n options,\n variant = 'filled',\n ...props\n}: RefAttributes<HTMLDivElement> & SelectProps<T>) {\n const validationBehavior = useFieldValidationBehavior();\n // What the list is anchored to and takes its width from — see the note at\n // the top of the file.\n const boxRef = useRef<HTMLDivElement>(null);\n return <RACSelect<T> isDisabled={isDisabled} isInvalid={invalidFrom(error)} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n {selectContent(label, leadingIcon, floatingLabel, variant, description, error, options, container, boxRef)}\n </RACSelect>;\n}\n\n// What the field draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\n//\n// The state is read for the chevron alone — which way it points — since\n// everything else the box shows it reads from its own focus and validity.\nfunction selectContent(label: string, leadingIcon: ReactNode, floatingLabel: boolean, variant: FieldVariant, description: string | undefined, error: string | undefined, options: ReactNode, container: Element | undefined, boxRef: RefObject<HTMLDivElement | null>) {\n return (state: SelectRenderProps) => <>\n <FieldBox floatingLabel={floatingLabel}\n // React Aria's `TextField` hands its group the field's disabled and\n // invalid state through context; its `Select` does not, so the box is\n // told outright or its label and its underline never turn.\n isDisabled={state.isDisabled}\n // Opening the list moves focus into it, out of the box, so the box\n // is told it is focused while the list is open — otherwise its label\n // fell back onto the placeholder the select still shows.\n isFocused={state.isOpen} isInvalid={state.isInvalid} isRequired={state.isRequired} label={label} leading={leadingIcon} ref={boxRef} trailing={chevronFor(state.isOpen)} trigger={TRIGGER} variant={variant}>\n <SelectedValue isFocused={state.isFocused} />\n </FieldBox>\n <FieldMessage description={description} error={error} />\n <RACPopover className={listClassName} triggerRef={boxRef}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container}>\n <ListBox>{options}</ListBox>\n </RACPopover>\n </>;\n}\n\n/**\n * What has been chosen, drawn on the value's line. The chrome's `FieldValue`\n * is the styled element and React Aria's `SelectValue` sits inside it, since\n * the wrapper is the box's flex item.\n */\nfunction SelectedValue({\n isFocused\n}: {\n isFocused: boolean;\n}) {\n const state = useContext(SelectStateContext);\n const isPlaceholder = (state?.selectionManager.selectedKeys.size ?? 0) === 0;\n return <FieldValue isFocused={isFocused} isPlaceholder={isPlaceholder}>\n <RACSelectValue />\n </FieldValue>;\n}\nexport type { SelectProps };\nexport default Select;"],"mappings":";;;;;;;;;;;;;AAiDA,MAAMa,UAAU,oBAAC,cAAD,CAAa,CAAA;AAC7B,SAASC,WAAWC,QAAiB;CACnC,OAAO,oBAAC,iBAAD,EAAiB,GAAI;EAC1B,GAAG,EACDC,WAAW,6DACb;EACA,GAAG,EACDA,WAAW,4DACb;CACF,EAAE,CAAC,CAACD,UAAU,GAAG,CAAA;AACnB;AAKA,SAASE,cAAcC,OAA2B;CAChD,OAAOjB,MAAaU,QAAQS,OAAOC,OAAOC,MAAMV,YAAYM,MAAMK,SAAS,CAAC,CAAC,CA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AAA,CAAA;AACJ;;;;;;AAOA,SAAAqB,cAAAnB,IAAA;CAAA,MAAAC,IAAA1C,EAAA,CAAA;CAAuB,MAAA,EAAA2D,cAAAlB;CAMrB,MAAAoB,iBADc3D,WAAWI,kBACFY,CAAK,EAAA4C,iBAA+BC,aAAKC,QAAzC,OAAoD;CAAE,IAAArB;CAAA,IAAAD,EAAA,OAAAuB,OAAAC,IAAA,2BAAA,GAAA;EAEzEvB,KAAA,oBAAC0B,aAAD,CAAe,CAAA;EAAG3B,EAAA,KAAAC;CAAA,OAAAA,KAAAD,EAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAiB,aAAAjB,EAAA,OAAAmB,eAAA;EADfhB,KAAA,oBAAC,YAAD;GAAuBc;GAA0BE;GACpDlB,UAAAA;EADc,CAAA;EAEHD,EAAA,KAAAiB;EAAAjB,EAAA,KAAAmB;EAAAnB,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAFRG;AAEQ"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","useContext","useRef","Select","RACSelect","SelectStateContext","fieldStyles","invalidFrom","useFieldValidationBehavior","mergeStatefulStyles","overlay","popupOrigin","TRIGGER","chevronFor","isOpen","className","listClassName","state","props","popup","styles","list","placement","kWkggS","kaIpWk","kzqmXN","kskxy","ks0D6T","k7Eaqz","kORKVm","$$css","container","description","error","floatingLabel","label","leadingIcon","options","variant","t0","$","t1","isDisabled","t2","t3","undefined","validationBehavior","boxRef","T0","t4","t5","root","t6","selectContent","t7","isInvalid","isRequired","isFocused","SelectedValue","isPlaceholder","selectionManager","selectedKeys","size","Symbol","for","RACPopover","ListBox","RACSelectValue"],"sources":["../../../src/components/select/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes, RefObject } from 'react';\nimport type { PopoverRenderProps, SelectProps as RACSelectProps, SelectRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useRef } from 'react';\nimport { Popover as RACPopover, Select as RACSelect, SelectValue as RACSelectValue, SelectStateContext } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldMessage, FieldTrigger, FieldValue } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { ChevronEndGlyph } from '../../glyphs';\nimport { RowOnValueLineContext } from '../../row/context';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii } from '../../tokens/design.tokens.stylex';\nimport ListBox from '../list-box';\n\n// The menus page's exposed dropdown menu: a text field that opens a list\n// rather than taking a keystroke. Everything above the list is the field\n// chrome in `src/field` — the same box, label, supporting line and error\n// treatment every other field draws — and the list is ListBox on the shared\n// overlay surface. What is here is React Aria's `Select` around the two, and\n// the three things that are this component's own.\n//\n// **The whole box opens the list.** The chrome's `FieldTrigger` covers the\n// box rather than sitting on the value's line, so the padding, the label and\n// the icons all open it, which is what the page draws and what a native\n// select does. It draws nothing itself: the box already carries the fill,\n// the underline and the focus indicator.\n//\n// **The chevron turns.** The page's trailing icon points down while the list\n// is closed and up while it is open. React Aria reports which through the\n// select's render state, so it is drawn from that rather than swapped for a\n// second glyph.\n//\n// **The list is the field's width.** The page draws it under the field and\n// as wide as it, which React Aria reports as `--trigger-width` — of whatever\n// it is anchored to. Left alone that is the button, which fills the box's\n// value column rather than the box, so the list came out narrower than the\n// field by the icons either side of it. Pointing the popover's `triggerRef`\n// at the box is what makes the two agree. The overlay's own 112 to 280 range\n// is a menu opened from a button rather than from a field, so it goes.\n//\n// A select's value is chosen rather than typed, which the chrome had no\n// notion of until this component: `useFieldPopulated` now reads the select's\n// own state, so the floating label floats once something is chosen.\n\n// Hoisted, and the chevron built by a call, so neither is a new element on\n// every render — which is what react-perf's jsx-no-jsx-as-prop is after.\nconst TRIGGER = <FieldTrigger />;\nfunction chevronFor(isOpen: boolean) {\n return <ChevronEndGlyph {...{\n 0: {\n className: \"x12w9bfk xxk0z11 xvy4d1p x1iffjtl xkzkux9 x11xpdln xpc4ca7\"\n },\n 1: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xkzkux9 x11xpdln xpc4ca7 x9tu13d\"\n }\n }[!!isOpen << 0]} />;\n}\n\n// The list's classes, from React Aria's render state: it grows from the\n// edge it is anchored by, as every anchored overlay does, so a list that\n// opens above the field grows upward.\nfunction listClassName(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.list, popupOrigin(state.placement)).className ?? '';\n}\nconst styles = {\n list: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n kzqmXN: \"xlvufjm\",\n kskxy: \"xedcshv\",\n ks0D6T: \"x1x1rfll\",\n k7Eaqz: \"xeuugli\",\n kORKVm: \"x1odjw0f\",\n $$css: true\n }\n};\ntype SelectProps<T extends object = object> = {\n /**\n * Where to portal the list. Defaults to the container of the `ThemeScope`\n * around it, which keeps the list on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the list\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n description?: string;\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state — the message, the red underline, and\n * `aria-invalid` all follow from it.\n *\n * Outside a `Form` the message line arrives with the message, so the\n * field grows when this does and moves what is under it. A `Form` holds\n * that space from the start; so does a permanent `description`.\n */\n error?: string;\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or something is chosen. `false` keeps it small at the\n * top in every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * What the field is for. Required rather than optional: a select with no\n * label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * An icon at the start of the box, before the label and the value: the\n * page's 24dp leading icon, in the muted role. An icon drawn in `em` takes\n * that size from the slot.\n */\n leadingIcon?: ReactNode;\n /**\n * The options. `ListBox.Item` for each, and `ListBox.Section` to group\n * them — the list inside is a ListBox, and takes everything one does.\n */\n options?: ReactNode;\n /**\n * The filled box, or the outlined one, as the text fields page draws them.\n * @default 'filled'\n */\n variant?: FieldVariant;\n} & Omit<RACSelectProps<T>, 'children' | 'defaultSelectedKey' | 'isInvalid' | 'onSelectionChange' | 'selectedKey' | 'validationBehavior'>;\n\n/**\n * A labelled field that opens a list to choose from. Its value is React\n * Aria's: pass `value` with `onChange` to control it, or `defaultValue` to\n * let it keep its own. The value is an option's `id`, so give every option\n * one. React Aria's older `selectedKey` names are deprecated and are left\n * out of this component's props rather than passed through.\n *\n * ```tsx\n * <Select\n * label=\"Label\"\n * options={\n * <>\n * <ListBox.Item id=\"first\">First item</ListBox.Item>\n * <ListBox.Item id=\"second\">Second item</ListBox.Item>\n * </>\n * }\n * />\n * ```\n *\n * The box, label, supporting line and error are the field chrome in\n * `src/field`, shared with every other field; the list is ListBox on the\n * overlay surface every anchored panel here draws.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions.\n */\nfunction Select<T extends object = object>({\n container,\n description,\n error,\n floatingLabel = true,\n isDisabled = false,\n label,\n leadingIcon,\n options,\n variant = 'filled',\n ...props\n}: RefAttributes<HTMLDivElement> & SelectProps<T>) {\n const validationBehavior = useFieldValidationBehavior();\n // What the list is anchored to and takes its width from — see the note at\n // the top of the file.\n const boxRef = useRef<HTMLDivElement>(null);\n return <RACSelect<T> isDisabled={isDisabled} isInvalid={invalidFrom(error)} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n {selectContent(label, leadingIcon, floatingLabel, variant, description, error, options, container, boxRef)}\n </RACSelect>;\n}\n\n// What the field draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\n//\n// The state is read for the chevron alone — which way it points — since\n// everything else the box shows it reads from its own focus and validity.\nfunction selectContent(label: string, leadingIcon: ReactNode, floatingLabel: boolean, variant: FieldVariant, description: string | undefined, error: string | undefined, options: ReactNode, container: Element | undefined, boxRef: RefObject<HTMLDivElement | null>) {\n return (state: SelectRenderProps) => <>\n <FieldBox floatingLabel={floatingLabel}\n // React Aria's `TextField` hands its group the field's disabled and\n // invalid state through context; its `Select` does not, so the box is\n // told outright or its label and its underline never turn.\n isDisabled={state.isDisabled}\n // Opening the list moves focus into it, out of the box, so the box\n // is told it is focused while the list is open — otherwise its label\n // fell back onto the placeholder the select still shows.\n isFocused={state.isOpen} isInvalid={state.isInvalid} isRequired={state.isRequired} label={label} leading={leadingIcon} ref={boxRef} trailing={chevronFor(state.isOpen)} trigger={TRIGGER} variant={variant}>\n <SelectedValue isFocused={state.isFocused} />\n </FieldBox>\n <FieldMessage description={description} error={error} />\n <RACPopover className={listClassName} triggerRef={boxRef}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container}>\n <ListBox>{options}</ListBox>\n </RACPopover>\n </>;\n}\n\n/**\n * What has been chosen, drawn on the value's line. The chrome's `FieldValue`\n * is the styled element and React Aria's `SelectValue` sits inside it, since\n * the wrapper is the box's flex item.\n */\nfunction SelectedValue({\n isFocused\n}: {\n isFocused: boolean;\n}) {\n const state = useContext(SelectStateContext);\n const isPlaceholder = (state?.selectionManager.selectedKeys.size ?? 0) === 0;\n return <FieldValue isFocused={isFocused} isPlaceholder={isPlaceholder}>\n <RowOnValueLineContext value>\n <RACSelectValue className=\"xb3r6kr xlyipyv xuxw1ft\" />\n </RowOnValueLineContext>\n </FieldValue>;\n}\nexport type { SelectProps };\nexport default Select;"],"mappings":";;;;;;;;;;;;;;AAkDA,MAAMa,UAAU,oBAAC,cAAD,CAAa,CAAA;AAC7B,SAASC,WAAWC,QAAiB;CACnC,OAAO,oBAAC,iBAAD,EAAiB,GAAI;EAC1B,GAAG,EACDC,WAAW,6DACb;EACA,GAAG,EACDA,WAAW,4DACb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,CAAA;EACrD,oBAACgC,SAAD;GAAY,WAAWjD;GAAe,YAAY+B;GAEpD,0BAA0BhB;GACtB,UAAA,oBAACmC,WAAD,EAAA,UAAU7B,QAAiB,CAAA;EACjB,CAAA;CACd,EAAA,CAAA;AACJ;;;;;;AAOA,SAAAqB,cAAAnB,IAAA;CAAA,MAAAC,IAAAzC,EAAA,CAAA;CAAuB,MAAA,EAAA0D,cAAAlB;CAMrB,MAAAoB,iBADc1D,WAAWI,kBACFY,CAAK,EAAA2C,iBAA+BC,aAAKC,QAAzC,OAAoD;CAAE,IAAArB;CAAA,IAAAD,EAAA,OAAAuB,OAAAC,IAAA,2BAAA,GAAA;EAEzEvB,KAAA,oBAAC,uBAAD;GAAuB,OAAA;GACrB,UAAA,oBAAC0B,aAAD,EAA0B,WAAA,0BAAyB,CAAA;EAD/B,CAAA;EAEE3B,EAAA,KAAAC;CAAA,OAAAA,KAAAD,EAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAiB,aAAAjB,EAAA,OAAAmB,eAAA;EAHrBhB,KAAA,oBAAC,YAAD;GAAuBc;GAA0BE;GACpDlB,UAAAA;EADc,CAAA;EAIHD,EAAA,KAAAiB;EAAAjB,EAAA,KAAAmB;EAAAnB,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAJRG;AAIQ"}
|
|
@@ -102,6 +102,37 @@ const styles = {
|
|
|
102
102
|
kWkggS: "x19v6zzp",
|
|
103
103
|
$$css: true
|
|
104
104
|
},
|
|
105
|
+
indicator: {
|
|
106
|
+
kGNEyG: "x6s0dn4",
|
|
107
|
+
kWkggS: "x1c5gpgi",
|
|
108
|
+
kZKoxP: "xn3w4p2",
|
|
109
|
+
kaIpWk: "x1dkaolv",
|
|
110
|
+
kB7OPa: "x9f619",
|
|
111
|
+
kMwMTN: "x1girmi0",
|
|
112
|
+
k1xSpc: "x78zum5",
|
|
113
|
+
kMv6JI: "xkknnkr",
|
|
114
|
+
kGuDYH: "x14zspaw",
|
|
115
|
+
k63SB2: "x1v9cpvo",
|
|
116
|
+
krVfgx: "x3mk9i",
|
|
117
|
+
kLqNvP: "xbudbmw",
|
|
118
|
+
kjj79g: "xl56j7k",
|
|
119
|
+
kb6lSQ: "x155f00i",
|
|
120
|
+
kLWn49: "x1lz68p4",
|
|
121
|
+
k7Eaqz: "x900493",
|
|
122
|
+
kg3NbH: "x18fpw6u",
|
|
123
|
+
kVAEAm: "x10l6tqk",
|
|
124
|
+
k3aq6I: "xc01soo x1gwzs1v",
|
|
125
|
+
khDVqt: "xuxw1ft",
|
|
126
|
+
$$css: true
|
|
127
|
+
},
|
|
128
|
+
indicatorVertical: {
|
|
129
|
+
krVfgx: "xdd4er5",
|
|
130
|
+
k87sOh: "xwa60dl",
|
|
131
|
+
kt4wiu: "x15zsqls",
|
|
132
|
+
kLqNvP: "xhi6v0a",
|
|
133
|
+
k3aq6I: "xj0i120",
|
|
134
|
+
$$css: true
|
|
135
|
+
},
|
|
105
136
|
innerBlockEnd: {
|
|
106
137
|
kT0f0o: "x1ui04y5",
|
|
107
138
|
kVL7Gh: "x6en5u8",
|
|
@@ -262,6 +293,10 @@ const placements = {
|
|
|
262
293
|
"--x-insetBlockEnd": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start),
|
|
263
294
|
"--x-insetBlockStart": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end)
|
|
264
295
|
}],
|
|
296
|
+
indicatorAt: (fraction) => [fraction !== void 0 && {
|
|
297
|
+
"--slider-at": fraction != null ? "x1knt7uz" : "",
|
|
298
|
+
$$css: true
|
|
299
|
+
}, { "--x---slider-at": fraction != null ? fraction : void 0 }],
|
|
265
300
|
inline: (start, end) => [
|
|
266
301
|
end !== void 0 && {
|
|
267
302
|
kt4wiu: end != null ? "xqxgn94" : "",
|
|
@@ -410,10 +445,10 @@ function Slider(t0) {
|
|
|
410
445
|
let t5;
|
|
411
446
|
if ($[13] !== vertical) {
|
|
412
447
|
t5 = mergeStatefulStyles((state) => ({
|
|
413
|
-
0: { className: "x16gdi9t x9f619 x1ypdohk xh8yej3 x1n2onr6" },
|
|
414
|
-
2: { className: "x9f619 x1ypdohk x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j" },
|
|
415
|
-
1: { className: "x16gdi9t x9f619 xh8yej3 x1n2onr6 x1h6gzvc" },
|
|
416
|
-
3: { className: "x9f619 x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j x1h6gzvc" }
|
|
448
|
+
0: { className: "x16gdi9t x9f619 x12h1iku x1ypdohk xh8yej3 xt6307q x1n2onr6" },
|
|
449
|
+
2: { className: "x9f619 x1ypdohk x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j" },
|
|
450
|
+
1: { className: "x16gdi9t x9f619 x12h1iku xh8yej3 xt6307q x1n2onr6 x1h6gzvc" },
|
|
451
|
+
3: { className: "x9f619 x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j x1h6gzvc" }
|
|
417
452
|
})[!!vertical << 1 | !!state.isDisabled << 0], {});
|
|
418
453
|
$[13] = vertical;
|
|
419
454
|
$[14] = t5;
|
|
@@ -471,10 +506,7 @@ function stepsOf(state) {
|
|
|
471
506
|
}
|
|
472
507
|
function thumbContent(index, vertical) {
|
|
473
508
|
return (state) => state.isDragging || state.isFocusVisible ? /* @__PURE__ */ jsx(SliderOutput, {
|
|
474
|
-
...
|
|
475
|
-
0: { className: "x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo x3mk9i xbudbmw xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xaf021q xuuh30 xuxw1ft" },
|
|
476
|
-
1: { className: "x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xuxw1ft xdd4er5 xwa60dl x15zsqls xhi6v0a x1cb1t30" }
|
|
477
|
-
}[!!vertical << 0],
|
|
509
|
+
...props(styles.indicator, placements.indicatorAt(state.state.getThumbPercent(index)), vertical && styles.indicatorVertical),
|
|
478
510
|
children: state.state.getThumbValueLabel(index)
|
|
479
511
|
}) : null;
|
|
480
512
|
}
|
|
@@ -511,8 +543,8 @@ function trackContent(extras, thumbLabels) {
|
|
|
511
543
|
const hasIcon = icon !== void 0 && icon !== null && !range && (size === "md" || size === "lg" || size === "xl");
|
|
512
544
|
const steps = showStops ? stepsOf(state) : [];
|
|
513
545
|
const place = vertical ? placements.block : placements.inline;
|
|
514
|
-
const innerStart = vertical ? styles.
|
|
515
|
-
const innerEnd = vertical ? styles.
|
|
546
|
+
const innerStart = vertical ? styles.innerBlockEnd : styles.innerInlineStart;
|
|
547
|
+
const innerEnd = vertical ? styles.innerBlockStart : styles.innerInlineEnd;
|
|
516
548
|
return /* @__PURE__ */ jsxs(Fragment, { children: [parts.map((part) => /* @__PURE__ */ jsx("span", {
|
|
517
549
|
...props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end))),
|
|
518
550
|
children: partContent(part, extras, isDisabled, steps, part.active && hasIcon)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_c","stylex","Slider","RACSlider","groupStyles","mergeStatefulStyles","GAP","CLEAR","STOP","sizes","lg","$$css","md","sm","xl","xs","styles","active","kWkggS","activeDisabled","activeHoldingIcon","k9g6sI","icon","kGNEyG","kZKoxP","kMwMTN","k1xSpc","kGuDYH","kzqmXN","k87sOh","kLqNvP","kjj79g","kVAEAm","iconDisabled","iconRoomBlock","iconRoomBlockXl","iconRoomInline","iconRoomInlineXl","iconVertical","krVfgx","inactiveDisabled","innerBlockEnd","kT0f0o","kVL7Gh","innerBlockStart","kfmiAY","krdFHd","innerInlineEnd","innerInlineStart","root","rootVertical","segment","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kB7OPa","kVQacm","segmentVertical","stop","stopActive","stopActiveDisabled","stopDisabled","stopEnd","kt4wiu","stopEndVertical","stopStart","stopStartVertical","stopVertical","thumb","k6CgDc","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","thumbActive","thumbActiveVertical","thumbDisabled","thumbDragging","thumbFocused","thumbVertical","kbCHJM","_temp","_temp2","placements","block","start","end","val","undefined","inline","stopBlock","offset","stopInline","showStops","size","vertical","fraction","px","name","label","orientation","thumbLabels","AT_END","after","before","iconRoom","insetIcon","isDisabled","room","props","insetOf","offsetIn","share","partContent","part","extras","steps","hasIcon","from","to","length","inside","filter","place","atStart","atEnd","map","t0","$","T0","t1","t2","t3","t4","t5","t6","t7","t8","t9","state","0","className","2","1","3","trackContent","stepsOf","min","getThumbMinValue","max","getThumbMaxValue","values","fractions","step","index","push","getValuePercent","thumbContent","isDragging","isFocusVisible","getThumbValueLabel","thumbStyles","_","getThumbPercent","first","last","at","range","parts","innerStart","innerEnd"],"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { SliderProps as RACSliderProps, SliderState, SliderThumbRenderProps, SliderTrackRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Slider as RACSlider, SliderOutput, SliderThumb, SliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { groupStyles } from '../../field/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page. At the size its tokens call extra-small, the default: a\n// 16dp track with an 8dp corner, the active part in primary and the inactive\n// part in secondary container, a 4dp stop in on secondary container 6dp from\n// the inactive end, and a handle 4dp wide and 44dp tall in primary that\n// narrows to 2dp while pressed or focused. The track parts on each side of\n// the handle, with 6dp of space between them and it, and their corners\n// against the handle are 2dp where their outer ends are full. Disabled, the\n// active part and the handle are on surface at the disabled content opacity\n// and the inactive part at the disabled container opacity.\n//\n// `size` takes the page's four larger sizes, which thicken the track and\n// round its ends more, and lengthen the handle from M up:\n//\n// | Size | Track | Corner | Handle | Inset icon |\n// | ---- | ----- | ------ | ------ | ---------- |\n// | xs | 16dp | 8dp | 44dp | |\n// | sm | 24dp | 8dp | 44dp | |\n// | md | 40dp | 12dp | 52dp | 24dp |\n// | lg | 56dp | 16dp | 68dp | 24dp |\n// | xl | 96dp | 28dp | 108dp | 32dp |\n//\n// The handle stays 4dp wide, the corners against it 2dp and the space beside\n// it 6dp at every size.\n//\n// `showStops` is the page's stops configuration, which it used to call the\n// discrete slider: a 4dp stop at every step, in on primary on the active part\n// and on secondary container on the inactive one, so the reader can see\n// where the handle can land. The stops at the two ends sit 6dp in from them,\n// as the single stop does. A part clips what it holds, which is what hides\n// the stops beside the handle: the part ends 6dp short of it.\n//\n// `icon` is the page's inset icon, at the start of the active part in on\n// primary, from M up: the page gives it a size at M, L and XL alone. It is\n// 10dp in from the part's start, which is MDC-Android's padding, since the\n// page gives none, and like MDC-Android it is drawn only while the part has\n// room for it and that padding on both sides, and for a single handle.\n//\n// The value indicator is the page's label: inverse surface under label-large\n// in inverse on surface, 44dp tall and at least 48dp wide, 12dp above the\n// handle. It shows while the handle is dragged or has keyboard focus, and it\n// is React Aria's `SliderOutput`, so what it shows is what the slider\n// announces.\n//\n// React Aria's `Slider` is the root, `SliderTrack` the strip the handles are\n// placed along by percent, and `SliderThumb` each handle around a visually\n// hidden range input. The track's parts are drawn here from those percents\n// rather than with `SliderFill`, since the page's parts stop short of the\n// handle on both sides and the fill runs up to it. A range slider is the\n// same track with two handles and the active part between them.\n//\n// Vertical, the same parts run along the block axis, with the active part\n// rising from the bottom and the indicator to the start side of the handle.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The sliders page's own measurements, which are constants of the component\n// rather than steps of the consumer's spacing scale. The clearance used to be\n// read off `spacing.sm` — true at its default 8, since 6 plus half the\n// handle comes to the same — so a theme moving that step opened the gap\n// beside the handle while the stop, written as the literal it is, stayed\n// where the page puts it.\nconst GAP = 6;\nconst HANDLE_WIDTH = 4;\n/** How far a part stops short of a handle's centre. */\nconst CLEAR = GAP + HANDLE_WIDTH / 2;\n/** A stop's size. */\nconst STOP = 4;\n/** MDC-Android's padding either side of the inset icon. */\nconst ICON_PADDING = 10;\ntype SliderSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs';\n\n// The sizes, as the custom properties every part reads: the track's\n// thickness, its outer corner and the handle's length, which the track\n// strip takes as its own thickness too.\nconst sizes = {\n lg: {\n \"--slider-corner\": \"x1hr852m\",\n \"--slider-handle\": \"x1i1s3m4\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xdrquod\",\n $$css: true\n },\n md: {\n \"--slider-corner\": \"x1welmdy\",\n \"--slider-handle\": \"x1290pjo\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xhx1aj5\",\n $$css: true\n },\n sm: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"xf334ng\",\n $$css: true\n },\n xl: {\n \"--slider-corner\": \"x1tzw2no\",\n \"--slider-handle\": \"x1aoofsu\",\n \"--slider-icon\": \"xmfnedx\",\n \"--slider-track\": \"x1s6dhuk\",\n $$css: true\n },\n xs: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"x16oikcs\",\n $$css: true\n }\n};\nconst styles = {\n active: {\n kWkggS: \"xnety89 x1jzqe4\",\n $$css: true\n },\n activeDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n activeHoldingIcon: {\n k9g6sI: \"xpqogu8\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xi7vqlm\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"xuu3ggl\",\n kzqmXN: \"xoxpges\",\n k87sOh: \"xdtafdd\",\n kLqNvP: \"xi5uv41\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1girmi0\",\n $$css: true\n },\n iconRoomBlock: {\n k1xSpc: \"x1uo08md x78zum5\",\n $$css: true\n },\n iconRoomBlockXl: {\n k1xSpc: \"x2mjljv x78zum5\",\n $$css: true\n },\n iconRoomInline: {\n k1xSpc: \"x1cueg3v x78zum5\",\n $$css: true\n },\n iconRoomInlineXl: {\n k1xSpc: \"x18ymn08 x78zum5\",\n $$css: true\n },\n iconVertical: {\n krVfgx: \"x1jn9clo\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x1m57d8a\",\n $$css: true\n },\n inactiveDisabled: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n innerBlockEnd: {\n kT0f0o: \"x1ui04y5\",\n kVL7Gh: \"x6en5u8\",\n $$css: true\n },\n innerBlockStart: {\n kfmiAY: \"x1e4oeot\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n innerInlineEnd: {\n kT0f0o: \"x1ui04y5\",\n kfmiAY: \"x1e4oeot\",\n $$css: true\n },\n innerInlineStart: {\n kVL7Gh: \"x6en5u8\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n root: {\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n rootVertical: {\n kGNEyG: \"x1cy8zhl\",\n kZKoxP: \"x1u5z0ei\",\n kzqmXN: \"x14atkfc\",\n $$css: true\n },\n segment: {\n kWkggS: \"x15dekr4 x9yvj25\",\n kZKoxP: \"x9w084k\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xpg3mf\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k87sOh: \"x1i1s66i\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n segmentVertical: {\n kZKoxP: \"xt7dq6l\",\n kzqmXN: \"x3fzmgt\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x9k4rl8\",\n $$css: true\n },\n stop: {\n kWkggS: \"x81krv7 x1tt9vl1\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"x17a0tka\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n stopActive: {\n kWkggS: \"x1ntwmx2 x1sir5s4\",\n $$css: true\n },\n stopActiveDisabled: {\n kWkggS: \"x1dbj914\",\n $$css: true\n },\n stopDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n stopEnd: {\n kt4wiu: \"x1f889gz\",\n $$css: true\n },\n stopEndVertical: {\n k87sOh: \"x1atx4j1\",\n kt4wiu: \"x1woyocn\",\n $$css: true\n },\n stopStart: {\n kLqNvP: \"xrr41r3\",\n $$css: true\n },\n stopStartVertical: {\n krVfgx: \"xrb244j\",\n k87sOh: \"x80663w\",\n kLqNvP: \"xhi6v0a\",\n $$css: true\n },\n stopVertical: {\n k87sOh: \"x80663w\",\n kLqNvP: \"xml7xvy\",\n $$css: true\n },\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x16gdi9t\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xdl150w\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbActive: {\n kzqmXN: \"xfo62xy\",\n $$css: true\n },\n thumbActiveVertical: {\n kZKoxP: \"x36qwtl\",\n kzqmXN: \"xluoxwi\",\n $$css: true\n },\n thumbDisabled: {\n kWkggS: \"x1crcgwy\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n thumbVertical: {\n kZKoxP: \"xqu0tyb\",\n kzqmXN: \"xluoxwi\",\n k87sOh: \"x80663w\",\n kbCHJM: \"x1nrll8i\",\n $$css: true\n }\n};\n\n// Where each part of the track starts and ends, as insets from the track's\n// two ends, and where a stop sits inside a part. Dynamic styles, since the\n// percents come from the value at render time and StyleX compiles its\n// classes ahead of time; each writes its insets to custom properties inline.\nconst _temp = {\n krVfgx: \"xiicpxy\",\n k87sOh: \"x5mnzd7\",\n \"$$css\": true\n};\nconst _temp2 = {\n krVfgx: \"xiicpxy\",\n \"$$css\": true\n};\nconst placements = {\n block: (start: string, end: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-insetBlockStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end)\n }],\n inline: (start: string, end: string) => [end !== undefined && {\n kt4wiu: end != null ? \"xqxgn94\" : \"\",\n $$css: true\n }, start !== undefined && {\n kLqNvP: start != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }],\n stopBlock: (offset: string) => [_temp2, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }],\n stopInline: (offset: string) => [offset !== undefined && {\n kLqNvP: offset != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }]\n};\n\n/** What a track draws besides its parts and handles. */\ntype Extras = {\n icon: ReactNode;\n showStops: boolean;\n size: SliderSize;\n vertical: boolean;\n};\n\n/** One end of a part: a fraction of the track's length, and pixels on top. */\ntype Inset = {\n fraction: number;\n px: number;\n};\n\n/**\n * A part of the track, by the insets of its two ends from the track's, and\n * which of the three it is: the inactive part before a range's first handle,\n * the active part, or the inactive part after the last handle.\n */\ntype Part = {\n active: boolean;\n end: Inset;\n name: 'active' | 'after' | 'before';\n start: Inset;\n};\ntype SliderProps = Omit<RACSliderProps, 'children' | 'orientation'> & {\n /**\n * The page's inset icon, at the start of the active part, from `md` up:\n * the page gives it a size at M, L and XL alone. Drawn for a single\n * handle, and only while the active part has room for it.\n */\n icon?: ReactNode;\n /**\n * What the slider sets. A slider that a row labels some other way leaves\n * it out and passes `aria-label` instead.\n */\n label?: string;\n /**\n * Along which axis the handle moves. A vertical slider is 240px tall until\n * `style` on the root says otherwise.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * A stop at every step, the page's stops configuration, so the reader can\n * see where the handle can land. Meant for a slider with a handful of\n * steps: each stop is a 4dp dot, and a fine step draws a crowd of them.\n * @default false\n */\n showStops?: boolean;\n /**\n * The page's sizes, by the track's thickness: 16dp at `xs`, 24dp at `sm`,\n * 40dp at `md`, 56dp at `lg` and 96dp at `xl`, with the handle 44dp long\n * up to `sm` and 52dp, 68dp and 108dp past it.\n * @default 'xs'\n */\n size?: SliderSize;\n /**\n * A name for each handle of a range slider, in order, since two handles\n * named by the same label cannot be told apart.\n */\n thumbLabels?: string[];\n};\nconst AT_END: Inset = {\n fraction: 0,\n px: 0\n};\n\n// A part's start inset, clear of a handle at `fraction` of the way along. The\n// fraction lands on the handle's centre, so half the handle's width joins the\n// page's gap to reach its edge.\nfunction after(fraction: number): Inset {\n return {\n fraction,\n px: CLEAR\n };\n}\n\n// A part's end inset, clear of a handle at `fraction` of the way along.\nfunction before(fraction: number): Inset {\n return {\n fraction: 1 - fraction,\n px: CLEAR\n };\n}\n\n// The container query that hides the inset icon for want of room: the part's\n// length along the track, against the icon and its padding at this size.\nfunction iconRoom(size: SliderSize, vertical: boolean) {\n if (vertical) {\n return size === 'xl' ? styles.iconRoomBlockXl : styles.iconRoomBlock;\n }\n return size === 'xl' ? styles.iconRoomInlineXl : styles.iconRoomInline;\n}\n\n// The inset icon, at the foot of the active part, while the part has room.\nfunction insetIcon({\n icon,\n size,\n vertical\n}: Extras, isDisabled: boolean): ReactNode {\n const room = iconRoom(size, vertical);\n return <span {...stylex.props(styles.icon, vertical && styles.iconVertical, room, isDisabled && styles.iconDisabled)}>\n {icon}\n </span>;\n}\nfunction insetOf({\n fraction,\n px\n}: Inset) {\n return `calc(${fraction * 100}% + ${px}px)`;\n}\n\n// Where a stop at `fraction` of the way along the track starts inside a part.\n// The part's own length is the `100%` the expression has to work from, and\n// the track's is that plus both insets, so a fraction of the track is a\n// share of the part's length plus their pixels.\nfunction offsetIn({\n end,\n start\n}: Part, fraction: number) {\n const share = 1 - start.fraction - end.fraction;\n const scale = (fraction - start.fraction) / share;\n return `calc(${scale} * (100% + ${start.px + end.px}px) - ${start.px + STOP / 2}px)`;\n}\n\n// What a part holds: a stop at each step inside it, the end stops where it\n// reaches the track's ends, and the inset icon.\nfunction partContent(part: Part, extras: Extras, isDisabled: boolean, steps: number[], hasIcon: boolean) {\n const {\n showStops,\n vertical\n } = extras;\n const stop = [styles.stop, vertical && styles.stopVertical, part.active && styles.stopActive, isDisabled && (part.active ? styles.stopActiveDisabled : styles.stopDisabled)];\n const from = part.start.fraction;\n const to = 1 - part.end.fraction;\n const length = 1 - part.start.fraction - part.end.fraction;\n const inside = showStops && length > 0 ? steps.filter(fraction => fraction >= from && fraction <= to) : [];\n const place = vertical ? placements.stopBlock : placements.stopInline;\n const atStart = part.start.fraction === 0 && part.start.px === 0;\n // The single stop at the inactive end is drawn with or without the stops\n // configuration; the one at the start is the configuration's own.\n const atEnd = part.end.fraction === 0 && part.end.px === 0 && !part.active;\n return <>\n {hasIcon ? insetIcon(extras, isDisabled) : null}\n {showStops && atStart ? <span {...stylex.props(...stop, vertical ? styles.stopStartVertical : styles.stopStart)} /> : null}\n {inside.map(fraction => <span key={fraction} {...stylex.props(...stop, place(offsetIn(part, fraction)))} />)}\n {atEnd ? <span {...stylex.props(...stop, vertical ? styles.stopEndVertical : styles.stopEnd)} /> : null}\n </>;\n}\n\n/**\n * A slider for one value, or for a range when the value is a pair. The value\n * is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own, with `minValue`, `maxValue` and\n * `step` to shape it and `formatOptions` to say how it reads. Arrow keys\n * move a handle by a step, Page Up and Page Down by ten, Home and End to\n * the ends.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions and the one that gives a vertical\n * slider its height.\n */\nfunction Slider({\n icon,\n label,\n orientation = 'horizontal',\n showStops = false,\n size = 'xs',\n thumbLabels,\n ...props\n}: RefAttributes<HTMLDivElement> & SliderProps) {\n const vertical = orientation === 'vertical';\n return <RACSlider orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(groupStyles.root, styles.root, sizes[size], vertical && styles.rootVertical), props)}>\n {label === undefined ? null : <FieldLabel variant=\"group\">{label}</FieldLabel>}\n <SliderTrack {...mergeStatefulStyles((state: SliderTrackRenderProps) => ({\n 0: {\n className: \"x16gdi9t x9f619 x1ypdohk xh8yej3 x1n2onr6\"\n },\n 2: {\n className: \"x9f619 x1ypdohk x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j\"\n },\n 1: {\n className: \"x16gdi9t x9f619 xh8yej3 x1n2onr6 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j x1h6gzvc\"\n }\n })[!!vertical << 1 | !!state.isDisabled << 0], {})}>\n {trackContent({\n icon,\n showStops,\n size,\n vertical\n }, thumbLabels)}\n </SliderTrack>\n </RACSlider>;\n}\n\n// The fractions of the way along the track that a step lands on, ends left\n// out: those are drawn as the end stops, the page's gap in from each end.\nfunction stepsOf(state: SliderState) {\n const min = state.getThumbMinValue(0);\n const max = state.getThumbMaxValue(state.values.length - 1);\n const fractions: number[] = [];\n if (state.step <= 0) {\n return fractions;\n }\n for (let index = 1; min + index * state.step < max; index++) {\n fractions.push(state.getValuePercent(min + index * state.step));\n }\n return fractions;\n}\n\n// What a handle draws: its value while it is dragged or has keyboard focus.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs.\nfunction thumbContent(index: number, vertical: boolean) {\n return (state: SliderThumbRenderProps) => state.isDragging || state.isFocusVisible ? <SliderOutput {...{\n 0: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo x3mk9i xbudbmw xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xaf021q xuuh30 xuxw1ft\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xuxw1ft xdd4er5 xwa60dl x15zsqls xhi6v0a x1cb1t30\"\n }\n }[!!vertical << 0]}>\n {state.state.getThumbValueLabel(index)}\n </SliderOutput> : null;\n}\nfunction thumbStyles(vertical: boolean) {\n return (state: SliderThumbRenderProps) => stylex.props(styles.thumb, vertical && styles.thumbVertical, (state.isDragging || state.isFocusVisible) && (vertical ? styles.thumbActiveVertical : styles.thumbActive), state.isDragging && styles.thumbDragging, state.isFocusVisible && styles.thumbFocused, state.isDisabled && styles.thumbDisabled);\n}\n\n// The track's parts and handles, from the slider's state: an inactive part\n// before the first handle of a range, the active part up to or between the\n// handles, and the inactive part after the last one carrying the stop.\nfunction trackContent(extras: Extras, thumbLabels: string[] | undefined) {\n return ({\n isDisabled,\n state\n }: SliderTrackRenderProps) => {\n const {\n icon,\n showStops,\n size,\n vertical\n } = extras;\n const fractions = state.values.map((_, index) => state.getThumbPercent(index));\n const first = fractions[0] ?? 0;\n const last = fractions.at(-1) ?? 0;\n const range = fractions.length > 1;\n const parts: Part[] = [...(range ? [{\n active: false,\n end: before(first),\n name: 'before',\n start: AT_END\n } as const] : []), {\n active: true,\n end: before(last),\n name: 'active',\n start: range ? after(first) : AT_END\n }, {\n active: false,\n end: AT_END,\n name: 'after',\n start: after(last)\n }];\n const hasIcon = icon !== undefined && icon !== null && !range && (size === 'md' || size === 'lg' || size === 'xl');\n const steps = showStops ? stepsOf(state) : [];\n const place = vertical ? placements.block : placements.inline;\n const innerStart = vertical ? styles.innerBlockStart : styles.innerInlineStart;\n const innerEnd = vertical ? styles.innerBlockEnd : styles.innerInlineEnd;\n return <>\n {parts.map(part => <span key={part.name} {...stylex.props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end)))}>\n {partContent(part, extras, isDisabled, steps, part.active && hasIcon)}\n </span>)}\n {fractions.map((_, index) => <SliderThumb aria-label={thumbLabels?.[index]} index={index}\n // oxlint-disable-next-line react/no-array-index-key -- a handle's position is its identity\n key={index} {...mergeStatefulStyles(thumbStyles(vertical), {})}>\n {thumbContent(index, vertical)}\n </SliderThumb>)}\n </>;\n };\n}\nexport type { SliderProps, SliderSize };\nexport default Slider;"],"mappings":";;;;;;;;;;AAgFA,MAAMO,QAAQD;;AAEd,MAAME,OAAO;AAQb,MAAMC,QAAQ;CACZC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBC,OAAO;CACT;CACAC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBD,OAAO;CACT;CACAE,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBF,OAAO;CACT;CACAG,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBH,OAAO;CACT;CACAI,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBJ,OAAO;CACT;AACF;AACA,MAAMK,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRP,OAAO;CACT;CACAQ,gBAAgB;EACdD,QAAQ;EACRP,OAAO;CACT;CACAS,mBAAmB;EACjBC,QAAQ;EACRV,OAAO;CACT;CACAW,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,cAAc;EACZR,QAAQ;EACRd,OAAO;CACT;CACAuB,eAAe;EACbR,QAAQ;EACRf,OAAO;CACT;CACAwB,iBAAiB;EACfT,QAAQ;EACRf,OAAO;CACT;CACAyB,gBAAgB;EACdV,QAAQ;EACRf,OAAO;CACT;CACA0B,kBAAkB;EAChBX,QAAQ;EACRf,OAAO;CACT;CACA2B,cAAc;EACZC,QAAQ;EACRV,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACA6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,CAAA;EAC3C,MAAMhB,QAAQ5B,WAAWZ,WAAWC,QAAQD,WAAWM;EACvD,MAAMgF,aAAa1E,WAAWpF,OAAO4B,kBAAkB5B,OAAOgC;EAC9D,MAAM+H,WAAW3E,WAAWpF,OAAOyB,gBAAgBzB,OAAO+B;EAC1D,OAAO,qBAAA,UAAA,EAAA,UAAA,CACF8H,MAAM1C,KAAIZ,SAAQ,oBAAC,QAAD;GAAsB,GAAItH,MAAae,OAAOmC,SAASiD,YAAYpF,OAAO0C,iBAAiB6D,KAAKtG,UAAUD,OAAOC,QAAQsG,KAAKtG,UAAUyG,WAAW1G,OAAOI,mBAAmB4F,eAAeO,KAAKtG,SAASD,OAAOG,iBAAiBH,OAAOwB,mBAAmB+E,KAAK7B,UAAUiB,UAAUmE,YAAYvD,KAAK5B,QAAQgB,UAAUoE,UAAU/C,MAAMb,QAAQI,KAAK7B,KAAK,GAAGyB,QAAQI,KAAK5B,GAAG,CAAC,CAAC;GAC7X2B,UAAAA,YAAYC,MAAMC,QAAQR,YAAYS,OAAOF,KAAKtG,UAAUyG,OAAO;EAChE,GAFsBH,KAAKhB,IAE3B,CAAC,GACRsD,UAAU1B,KAAKoC,GAAGR,UAAU,oBAAC,aAAD;GAAa,cAAYrD,cAAcqD;GAAeA;GAEzE,GAAI1J,oBAAoBiK,YAAYlE,QAAQ,GAAG,CAAC,CAAC;GACtD8D,UAAAA,aAAaH,OAAO3D,QAAQ;EAClB,GAFZ2D,KAEY,CAAC,CAClB,EAAA,CAAA;CACJ;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","Slider","RACSlider","groupStyles","mergeStatefulStyles","GAP","CLEAR","STOP","sizes","lg","$$css","md","sm","xl","xs","styles","active","kWkggS","activeDisabled","activeHoldingIcon","k9g6sI","icon","kGNEyG","kZKoxP","kMwMTN","k1xSpc","kGuDYH","kzqmXN","k87sOh","kLqNvP","kjj79g","kVAEAm","iconDisabled","iconRoomBlock","iconRoomBlockXl","iconRoomInline","iconRoomInlineXl","iconVertical","krVfgx","inactiveDisabled","indicator","kaIpWk","kB7OPa","kMv6JI","k63SB2","kb6lSQ","kLWn49","k7Eaqz","kg3NbH","k3aq6I","khDVqt","indicatorVertical","kt4wiu","innerBlockEnd","kT0f0o","kVL7Gh","innerBlockStart","kfmiAY","krdFHd","innerInlineEnd","innerInlineStart","root","rootVertical","segment","kVAM5u","ksu8eU","kMzoRj","kVQacm","segmentVertical","stop","stopActive","stopActiveDisabled","stopDisabled","stopEnd","stopEndVertical","stopStart","stopStartVertical","stopVertical","thumb","k6CgDc","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","thumbActive","thumbActiveVertical","thumbDisabled","thumbDragging","thumbFocused","thumbVertical","kbCHJM","_temp","_temp2","placements","block","start","end","val","undefined","indicatorAt","fraction","inline","stopBlock","offset","stopInline","showStops","size","vertical","px","name","label","orientation","thumbLabels","AT_END","after","before","iconRoom","insetIcon","isDisabled","room","props","insetOf","offsetIn","share","partContent","part","extras","steps","hasIcon","from","to","length","inside","filter","place","atStart","atEnd","map","t0","$","T0","t1","t2","t3","t4","t5","t6","t7","t8","t9","state","0","className","2","1","3","trackContent","stepsOf","min","getThumbMinValue","max","getThumbMaxValue","values","fractions","step","index","push","getValuePercent","thumbContent","isDragging","isFocusVisible","getThumbPercent","getThumbValueLabel","thumbStyles","_","first","last","at","range","parts","innerStart","innerEnd"],"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { SliderProps as RACSliderProps, SliderState, SliderThumbRenderProps, SliderTrackRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Slider as RACSlider, SliderOutput, SliderThumb, SliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { groupStyles } from '../../field/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page. At the size its tokens call extra-small, the default: a\n// 16dp track with an 8dp corner, the active part in primary and the inactive\n// part in secondary container, a 4dp stop in on secondary container 6dp from\n// the inactive end, and a handle 4dp wide and 44dp tall in primary that\n// narrows to 2dp while pressed or focused. The track parts on each side of\n// the handle, with 6dp of space between them and it, and their corners\n// against the handle are 2dp where their outer ends are full. Disabled, the\n// active part and the handle are on surface at the disabled content opacity\n// and the inactive part at the disabled container opacity.\n//\n// `size` takes the page's four larger sizes, which thicken the track and\n// round its ends more, and lengthen the handle from M up:\n//\n// | Size | Track | Corner | Handle | Inset icon |\n// | ---- | ----- | ------ | ------ | ---------- |\n// | xs | 16dp | 8dp | 44dp | |\n// | sm | 24dp | 8dp | 44dp | |\n// | md | 40dp | 12dp | 52dp | 24dp |\n// | lg | 56dp | 16dp | 68dp | 24dp |\n// | xl | 96dp | 28dp | 108dp | 32dp |\n//\n// The handle stays 4dp wide, the corners against it 2dp and the space beside\n// it 6dp at every size.\n//\n// `showStops` is the page's stops configuration, which it used to call the\n// discrete slider: a 4dp stop at every step, in on primary on the active part\n// and on secondary container on the inactive one, so the reader can see\n// where the handle can land. The stops at the two ends sit 6dp in from them,\n// as the single stop does. A part clips what it holds, which is what hides\n// the stops beside the handle: the part ends 6dp short of it.\n//\n// `icon` is the page's inset icon, at the start of the active part in on\n// primary, from M up: the page gives it a size at M, L and XL alone. It is\n// 10dp in from the part's start, which is MDC-Android's padding, since the\n// page gives none, and like MDC-Android it is drawn only while the part has\n// room for it and that padding on both sides, and for a single handle.\n//\n// The value indicator is the page's label: inverse surface under label-large\n// in inverse on surface, 44dp tall and at least 48dp wide, 12dp above the\n// handle. It shows while the handle is dragged or has keyboard focus, and it\n// is React Aria's `SliderOutput`, so what it shows is what the slider\n// announces.\n//\n// The indicator is drawn inside the slider, as MDC-Android's `withinBounds`\n// label behaviour draws it, rather than floating over whatever is above. A\n// horizontal slider keeps the indicator's 44dp and its 12dp of clearance\n// above the track, between the label and the track, since the indicator\n// shares that space with the label and would otherwise cover it. Along the\n// track it is centred on the handle until that would carry it past either\n// end, and is then held to the track's length, so at 0 and at 100 it sits\n// over the handle without running off the slider's edge.\n//\n// React Aria's `Slider` is the root, `SliderTrack` the strip the handles are\n// placed along by percent, and `SliderThumb` each handle around a visually\n// hidden range input. The track's parts are drawn here from those percents\n// rather than with `SliderFill`, since the page's parts stop short of the\n// handle on both sides and the fill runs up to it. A range slider is the\n// same track with two handles and the active part between them.\n//\n// Vertical, the same parts run along the block axis, with the active part\n// rising from the bottom and the indicator to the start side of the handle.\n// The slider keeps the indicator's least width and its 12dp of clearance on\n// that side of the track, as a horizontal one keeps its height above, and\n// the indicator is held to the track's length at the ends the same way, so\n// at 100 it stays below the label rather than reaching up beside it. A value\n// wider than three digits grows the indicator past that room, towards the\n// slider's start edge.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The sliders page's own measurements, which are constants of the component\n// rather than steps of the consumer's spacing scale. The clearance used to be\n// read off `spacing.sm` — true at its default 8, since 6 plus half the\n// handle comes to the same — so a theme moving that step opened the gap\n// beside the handle while the stop, written as the literal it is, stayed\n// where the page puts it.\nconst GAP = 6;\nconst HANDLE_WIDTH = 4;\n/** How far a part stops short of a handle's centre. */\nconst CLEAR = GAP + HANDLE_WIDTH / 2;\n/** A stop's size. */\nconst STOP = 4;\n/** MDC-Android's padding either side of the inset icon. */\nconst ICON_PADDING = 10;\n/** The value indicator's height. */\nconst INDICATOR = 44;\n/**\n * The value indicator's least width, which holds three digits at\n * label-large. A vertical slider keeps this much room beside its track.\n */\nconst INDICATOR_WIDTH = 48;\ntype SliderSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs';\n\n// The sizes, as the custom properties every part reads: the track's\n// thickness, its outer corner and the handle's length, which the track\n// strip takes as its own thickness too.\nconst sizes = {\n lg: {\n \"--slider-corner\": \"x1hr852m\",\n \"--slider-handle\": \"x1i1s3m4\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xdrquod\",\n $$css: true\n },\n md: {\n \"--slider-corner\": \"x1welmdy\",\n \"--slider-handle\": \"x1290pjo\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xhx1aj5\",\n $$css: true\n },\n sm: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"xf334ng\",\n $$css: true\n },\n xl: {\n \"--slider-corner\": \"x1tzw2no\",\n \"--slider-handle\": \"x1aoofsu\",\n \"--slider-icon\": \"xmfnedx\",\n \"--slider-track\": \"x1s6dhuk\",\n $$css: true\n },\n xs: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"x16oikcs\",\n $$css: true\n }\n};\nconst styles = {\n active: {\n kWkggS: \"xnety89 x1jzqe4\",\n $$css: true\n },\n activeDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n activeHoldingIcon: {\n k9g6sI: \"xpqogu8\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xi7vqlm\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"xuu3ggl\",\n kzqmXN: \"xoxpges\",\n k87sOh: \"xdtafdd\",\n kLqNvP: \"xi5uv41\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1girmi0\",\n $$css: true\n },\n iconRoomBlock: {\n k1xSpc: \"x1uo08md x78zum5\",\n $$css: true\n },\n iconRoomBlockXl: {\n k1xSpc: \"x2mjljv x78zum5\",\n $$css: true\n },\n iconRoomInline: {\n k1xSpc: \"x1cueg3v x78zum5\",\n $$css: true\n },\n iconRoomInlineXl: {\n k1xSpc: \"x18ymn08 x78zum5\",\n $$css: true\n },\n iconVertical: {\n krVfgx: \"x1jn9clo\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x1m57d8a\",\n $$css: true\n },\n inactiveDisabled: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1c5gpgi\",\n kZKoxP: \"xn3w4p2\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1girmi0\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n krVfgx: \"x3mk9i\",\n kLqNvP: \"xbudbmw\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n k7Eaqz: \"x900493\",\n kg3NbH: \"x18fpw6u\",\n kVAEAm: \"x10l6tqk\",\n k3aq6I: \"xc01soo x1gwzs1v\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n indicatorVertical: {\n krVfgx: \"xdd4er5\",\n k87sOh: \"xwa60dl\",\n kt4wiu: \"x15zsqls\",\n kLqNvP: \"xhi6v0a\",\n k3aq6I: \"xj0i120\",\n $$css: true\n },\n innerBlockEnd: {\n kT0f0o: \"x1ui04y5\",\n kVL7Gh: \"x6en5u8\",\n $$css: true\n },\n innerBlockStart: {\n kfmiAY: \"x1e4oeot\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n innerInlineEnd: {\n kT0f0o: \"x1ui04y5\",\n kfmiAY: \"x1e4oeot\",\n $$css: true\n },\n innerInlineStart: {\n kVL7Gh: \"x6en5u8\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n root: {\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n rootVertical: {\n kGNEyG: \"x1cy8zhl\",\n kZKoxP: \"x1u5z0ei\",\n kzqmXN: \"x14atkfc\",\n $$css: true\n },\n segment: {\n kWkggS: \"x15dekr4 x9yvj25\",\n kZKoxP: \"x9w084k\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xpg3mf\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k87sOh: \"x1i1s66i\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n segmentVertical: {\n kZKoxP: \"xt7dq6l\",\n kzqmXN: \"x3fzmgt\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x9k4rl8\",\n $$css: true\n },\n stop: {\n kWkggS: \"x81krv7 x1tt9vl1\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"x17a0tka\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n stopActive: {\n kWkggS: \"x1ntwmx2 x1sir5s4\",\n $$css: true\n },\n stopActiveDisabled: {\n kWkggS: \"x1dbj914\",\n $$css: true\n },\n stopDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n stopEnd: {\n kt4wiu: \"x1f889gz\",\n $$css: true\n },\n stopEndVertical: {\n k87sOh: \"x1atx4j1\",\n kt4wiu: \"x1woyocn\",\n $$css: true\n },\n stopStart: {\n kLqNvP: \"xrr41r3\",\n $$css: true\n },\n stopStartVertical: {\n krVfgx: \"xrb244j\",\n k87sOh: \"x80663w\",\n kLqNvP: \"xhi6v0a\",\n $$css: true\n },\n stopVertical: {\n k87sOh: \"x80663w\",\n kLqNvP: \"xml7xvy\",\n $$css: true\n },\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x16gdi9t\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xdl150w\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbActive: {\n kzqmXN: \"xfo62xy\",\n $$css: true\n },\n thumbActiveVertical: {\n kZKoxP: \"x36qwtl\",\n kzqmXN: \"xluoxwi\",\n $$css: true\n },\n thumbDisabled: {\n kWkggS: \"x1crcgwy\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n thumbVertical: {\n kZKoxP: \"xqu0tyb\",\n kzqmXN: \"xluoxwi\",\n k87sOh: \"x80663w\",\n kbCHJM: \"x1nrll8i\",\n $$css: true\n }\n};\n\n// Where each part of the track starts and ends, as insets from the track's\n// two ends, and where a stop sits inside a part. Dynamic styles, since the\n// percents come from the value at render time and StyleX compiles its\n// classes ahead of time; each writes its insets to custom properties inline.\n// `indicatorAt` is how far along the track a handle is, as a fraction, which\n// is what the value indicator over it is held to the track's ends by.\nconst _temp = {\n krVfgx: \"xiicpxy\",\n k87sOh: \"x5mnzd7\",\n \"$$css\": true\n};\nconst _temp2 = {\n krVfgx: \"xiicpxy\",\n \"$$css\": true\n};\nconst placements = {\n block: (start: string, end: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-insetBlockStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end)\n }],\n indicatorAt: (fraction: number) => [fraction !== undefined && {\n \"--slider-at\": fraction != null ? \"x1knt7uz\" : \"\",\n $$css: true\n }, {\n \"--x---slider-at\": fraction != null ? fraction : undefined\n }],\n inline: (start: string, end: string) => [end !== undefined && {\n kt4wiu: end != null ? \"xqxgn94\" : \"\",\n $$css: true\n }, start !== undefined && {\n kLqNvP: start != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }],\n stopBlock: (offset: string) => [_temp2, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }],\n stopInline: (offset: string) => [offset !== undefined && {\n kLqNvP: offset != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }]\n};\n\n/** What a track draws besides its parts and handles. */\ntype Extras = {\n icon: ReactNode;\n showStops: boolean;\n size: SliderSize;\n vertical: boolean;\n};\n\n/** One end of a part: a fraction of the track's length, and pixels on top. */\ntype Inset = {\n fraction: number;\n px: number;\n};\n\n/**\n * A part of the track, by the insets of its two ends from the track's, and\n * which of the three it is: the inactive part before a range's first handle,\n * the active part, or the inactive part after the last handle.\n */\ntype Part = {\n active: boolean;\n end: Inset;\n name: 'active' | 'after' | 'before';\n start: Inset;\n};\ntype SliderProps = Omit<RACSliderProps, 'children' | 'orientation'> & {\n /**\n * The page's inset icon, at the start of the active part, from `md` up:\n * the page gives it a size at M, L and XL alone. Drawn for a single\n * handle, and only while the active part has room for it.\n */\n icon?: ReactNode;\n /**\n * What the slider sets. A slider that a row labels some other way leaves\n * it out and passes `aria-label` instead.\n */\n label?: string;\n /**\n * Along which axis the handle moves. A vertical slider is 240px tall until\n * `style` on the root says otherwise.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * A stop at every step, the page's stops configuration, so the reader can\n * see where the handle can land. Meant for a slider with a handful of\n * steps: each stop is a 4dp dot, and a fine step draws a crowd of them.\n * @default false\n */\n showStops?: boolean;\n /**\n * The page's sizes, by the track's thickness: 16dp at `xs`, 24dp at `sm`,\n * 40dp at `md`, 56dp at `lg` and 96dp at `xl`, with the handle 44dp long\n * up to `sm` and 52dp, 68dp and 108dp past it.\n * @default 'xs'\n */\n size?: SliderSize;\n /**\n * A name for each handle of a range slider, in order, since two handles\n * named by the same label cannot be told apart.\n */\n thumbLabels?: string[];\n};\nconst AT_END: Inset = {\n fraction: 0,\n px: 0\n};\n\n// A part's start inset, clear of a handle at `fraction` of the way along. The\n// fraction lands on the handle's centre, so half the handle's width joins the\n// page's gap to reach its edge.\nfunction after(fraction: number): Inset {\n return {\n fraction,\n px: CLEAR\n };\n}\n\n// A part's end inset, clear of a handle at `fraction` of the way along.\nfunction before(fraction: number): Inset {\n return {\n fraction: 1 - fraction,\n px: CLEAR\n };\n}\n\n// The container query that hides the inset icon for want of room: the part's\n// length along the track, against the icon and its padding at this size.\nfunction iconRoom(size: SliderSize, vertical: boolean) {\n if (vertical) {\n return size === 'xl' ? styles.iconRoomBlockXl : styles.iconRoomBlock;\n }\n return size === 'xl' ? styles.iconRoomInlineXl : styles.iconRoomInline;\n}\n\n// The inset icon, at the foot of the active part, while the part has room.\nfunction insetIcon({\n icon,\n size,\n vertical\n}: Extras, isDisabled: boolean): ReactNode {\n const room = iconRoom(size, vertical);\n return <span {...stylex.props(styles.icon, vertical && styles.iconVertical, room, isDisabled && styles.iconDisabled)}>\n {icon}\n </span>;\n}\nfunction insetOf({\n fraction,\n px\n}: Inset) {\n return `calc(${fraction * 100}% + ${px}px)`;\n}\n\n// Where a stop at `fraction` of the way along the track starts inside a part.\n// The part's own length is the `100%` the expression has to work from, and\n// the track's is that plus both insets, so a fraction of the track is a\n// share of the part's length plus their pixels.\nfunction offsetIn({\n end,\n start\n}: Part, fraction: number) {\n const share = 1 - start.fraction - end.fraction;\n const scale = (fraction - start.fraction) / share;\n return `calc(${scale} * (100% + ${start.px + end.px}px) - ${start.px + STOP / 2}px)`;\n}\n\n// What a part holds: a stop at each step inside it, the end stops where it\n// reaches the track's ends, and the inset icon.\nfunction partContent(part: Part, extras: Extras, isDisabled: boolean, steps: number[], hasIcon: boolean) {\n const {\n showStops,\n vertical\n } = extras;\n const stop = [styles.stop, vertical && styles.stopVertical, part.active && styles.stopActive, isDisabled && (part.active ? styles.stopActiveDisabled : styles.stopDisabled)];\n const from = part.start.fraction;\n const to = 1 - part.end.fraction;\n const length = 1 - part.start.fraction - part.end.fraction;\n const inside = showStops && length > 0 ? steps.filter(fraction => fraction >= from && fraction <= to) : [];\n const place = vertical ? placements.stopBlock : placements.stopInline;\n const atStart = part.start.fraction === 0 && part.start.px === 0;\n // The single stop at the inactive end is drawn with or without the stops\n // configuration; the one at the start is the configuration's own.\n const atEnd = part.end.fraction === 0 && part.end.px === 0 && !part.active;\n return <>\n {hasIcon ? insetIcon(extras, isDisabled) : null}\n {showStops && atStart ? <span {...stylex.props(...stop, vertical ? styles.stopStartVertical : styles.stopStart)} /> : null}\n {inside.map(fraction => <span key={fraction} {...stylex.props(...stop, place(offsetIn(part, fraction)))} />)}\n {atEnd ? <span {...stylex.props(...stop, vertical ? styles.stopEndVertical : styles.stopEnd)} /> : null}\n </>;\n}\n\n/**\n * A slider for one value, or for a range when the value is a pair. The value\n * is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own, with `minValue`, `maxValue` and\n * `step` to shape it and `formatOptions` to say how it reads. Arrow keys\n * move a handle by a step, Page Up and Page Down by ten, Home and End to\n * the ends.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions and the one that gives a vertical\n * slider its height.\n */\nfunction Slider({\n icon,\n label,\n orientation = 'horizontal',\n showStops = false,\n size = 'xs',\n thumbLabels,\n ...props\n}: RefAttributes<HTMLDivElement> & SliderProps) {\n const vertical = orientation === 'vertical';\n return <RACSlider orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(groupStyles.root, styles.root, sizes[size], vertical && styles.rootVertical), props)}>\n {label === undefined ? null : <FieldLabel variant=\"group\">{label}</FieldLabel>}\n <SliderTrack {...mergeStatefulStyles((state: SliderTrackRenderProps) => ({\n 0: {\n className: \"x16gdi9t x9f619 x12h1iku x1ypdohk xh8yej3 xt6307q x1n2onr6\"\n },\n 2: {\n className: \"x9f619 x1ypdohk x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j\"\n },\n 1: {\n className: \"x16gdi9t x9f619 x12h1iku xh8yej3 xt6307q x1n2onr6 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j x1h6gzvc\"\n }\n })[!!vertical << 1 | !!state.isDisabled << 0], {})}>\n {trackContent({\n icon,\n showStops,\n size,\n vertical\n }, thumbLabels)}\n </SliderTrack>\n </RACSlider>;\n}\n\n// The fractions of the way along the track that a step lands on, ends left\n// out: those are drawn as the end stops, the page's gap in from each end.\nfunction stepsOf(state: SliderState) {\n const min = state.getThumbMinValue(0);\n const max = state.getThumbMaxValue(state.values.length - 1);\n const fractions: number[] = [];\n if (state.step <= 0) {\n return fractions;\n }\n for (let index = 1; min + index * state.step < max; index++) {\n fractions.push(state.getValuePercent(min + index * state.step));\n }\n return fractions;\n}\n\n// What a handle draws: its value while it is dragged or has keyboard focus.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs.\nfunction thumbContent(index: number, vertical: boolean) {\n return (state: SliderThumbRenderProps) => state.isDragging || state.isFocusVisible ? <SliderOutput {...stylex.props(styles.indicator, placements.indicatorAt(state.state.getThumbPercent(index)), vertical && styles.indicatorVertical)}>\n {state.state.getThumbValueLabel(index)}\n </SliderOutput> : null;\n}\nfunction thumbStyles(vertical: boolean) {\n return (state: SliderThumbRenderProps) => stylex.props(styles.thumb, vertical && styles.thumbVertical, (state.isDragging || state.isFocusVisible) && (vertical ? styles.thumbActiveVertical : styles.thumbActive), state.isDragging && styles.thumbDragging, state.isFocusVisible && styles.thumbFocused, state.isDisabled && styles.thumbDisabled);\n}\n\n// The track's parts and handles, from the slider's state: an inactive part\n// before the first handle of a range, the active part up to or between the\n// handles, and the inactive part after the last one carrying the stop.\nfunction trackContent(extras: Extras, thumbLabels: string[] | undefined) {\n return ({\n isDisabled,\n state\n }: SliderTrackRenderProps) => {\n const {\n icon,\n showStops,\n size,\n vertical\n } = extras;\n const fractions = state.values.map((_, index) => state.getThumbPercent(index));\n const first = fractions[0] ?? 0;\n const last = fractions.at(-1) ?? 0;\n const range = fractions.length > 1;\n const parts: Part[] = [...(range ? [{\n active: false,\n end: before(first),\n name: 'before',\n start: AT_END\n } as const] : []), {\n active: true,\n end: before(last),\n name: 'active',\n start: range ? after(first) : AT_END\n }, {\n active: false,\n end: AT_END,\n name: 'after',\n start: after(last)\n }];\n const hasIcon = icon !== undefined && icon !== null && !range && (size === 'md' || size === 'lg' || size === 'xl');\n const steps = showStops ? stepsOf(state) : [];\n const place = vertical ? placements.block : placements.inline;\n // Vertical, a part starts at its block end, since the value grows from\n // the bottom — `placements.block` turns the axis over the same way — so\n // the corners it turns to a handle at its start are the block end's.\n const innerStart = vertical ? styles.innerBlockEnd : styles.innerInlineStart;\n const innerEnd = vertical ? styles.innerBlockStart : styles.innerInlineEnd;\n return <>\n {parts.map(part => <span key={part.name} {...stylex.props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end)))}>\n {partContent(part, extras, isDisabled, steps, part.active && hasIcon)}\n </span>)}\n {fractions.map((_, index) => <SliderThumb aria-label={thumbLabels?.[index]} index={index}\n // oxlint-disable-next-line react/no-array-index-key -- a handle's position is its identity\n key={index} {...mergeStatefulStyles(thumbStyles(vertical), {})}>\n {thumbContent(index, vertical)}\n </SliderThumb>)}\n </>;\n };\n}\nexport type { SliderProps, SliderSize };\nexport default Slider;"],"mappings":";;;;;;;;;;AA+FA,MAAMO,QAAQD;;AAEd,MAAME,OAAO;AAeb,MAAMC,QAAQ;CACZC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBC,OAAO;CACT;CACAC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBD,OAAO;CACT;CACAE,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBF,OAAO;CACT;CACAG,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBH,OAAO;CACT;CACAI,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBJ,OAAO;CACT;AACF;AACA,MAAMK,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRP,OAAO;CACT;CACAQ,gBAAgB;EACdD,QAAQ;EACRP,OAAO;CACT;CACAS,mBAAmB;EACjBC,QAAQ;EACRV,OAAO;CACT;CACAW,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,cAAc;EACZR,QAAQ;EACRd,OAAO;CACT;CACAuB,eAAe;EACbR,QAAQ;EACRf,OAAO;CACT;CACAwB,iBAAiB;EACfT,QAAQ;EACRf,OAAO;CACT;CACAyB,gBAAgB;EACdV,QAAQ;EACRf,OAAO;CACT;CACA0B,kBAAkB;EAChBX,QAAQ;EACRf,OAAO;CACT;CACA2B,cAAc;EACZC,QAAQ;EACRV,QAAQ;EACRC,QAAQ;EACRn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,UAAAA,YAAYC,MAAMC,QAAQR,YAAYS,OAAOF,KAAKjH,UAAUoH,OAAO;EAChE,GAFsBH,KAAKhB,IAE3B,CAAC,GACRsD,UAAU1B,KAAKqC,GAAGT,UAAU,oBAAC,aAAD;GAAa,cAAYrD,cAAcqD;GAAeA;GAEzE,GAAIrK,oBAAoB6K,YAAYlE,QAAQ,GAAG,CAAC,CAAC;GACtD6D,UAAAA,aAAaH,OAAO1D,QAAQ;EAClB,GAFZ0D,KAEY,CAAC,CAClB,EAAA,CAAA;CACJ;AACF"}
|
|
@@ -74,6 +74,7 @@ const styles = {
|
|
|
74
74
|
periodSelected: {
|
|
75
75
|
kWkggS: "xs6yvni x1jzqe4",
|
|
76
76
|
kMwMTN: "x3cbcwg x1k5gbb1",
|
|
77
|
+
kAXs8y: "x1g12otp",
|
|
77
78
|
$$css: true
|
|
78
79
|
},
|
|
79
80
|
periodSelectedHovered: {
|
|
@@ -133,6 +134,7 @@ const styles = {
|
|
|
133
134
|
selectorSelected: {
|
|
134
135
|
kWkggS: "xp89om9 x1jzqe4",
|
|
135
136
|
kMwMTN: "xscdzaa x1k5gbb1",
|
|
137
|
+
kAXs8y: "x1g12otp",
|
|
136
138
|
$$css: true
|
|
137
139
|
},
|
|
138
140
|
selectorSelectedHovered: {
|