@manakind/ui-core 0.29.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/accordion/accordion.css +89 -0
- package/dist/accordion/accordion.css.d.ts +2 -0
- package/dist/accordion/accordion.d.ts +79 -0
- package/dist/accordion/accordion.d.ts.map +1 -0
- package/dist/accordion/accordion.js +44 -0
- package/dist/accordion/accordion.js.map +1 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/calendar/calendar.d.ts +3 -4
- package/dist/calendar/calendar.d.ts.map +1 -1
- package/dist/calendar/calendar.js +5 -2
- package/dist/calendar/calendar.js.map +1 -1
- package/dist/checkbox/checkbox.d.ts +2 -4
- package/dist/checkbox/checkbox.d.ts.map +1 -1
- package/dist/checkbox/checkbox.js +4 -2
- package/dist/checkbox/checkbox.js.map +1 -1
- package/dist/combobox/combobox.d.ts +3 -3
- package/dist/combobox/combobox.d.ts.map +1 -1
- package/dist/combobox/combobox.js +5 -2
- package/dist/combobox/combobox.js.map +1 -1
- package/dist/dialog/dialog.d.ts +3 -4
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +4 -2
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/fallback-glyphs.js +3 -3
- package/dist/fallback-glyphs.js.map +1 -1
- package/dist/icon-defaults.d.ts +45 -0
- package/dist/icon-defaults.d.ts.map +1 -0
- package/dist/icon-defaults.js +43 -0
- package/dist/icon-defaults.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/menu/action-menu.d.ts +3 -3
- package/dist/menu/action-menu.d.ts.map +1 -1
- package/dist/menu/action-menu.js +4 -2
- package/dist/menu/action-menu.js.map +1 -1
- package/dist/menu/menu.d.ts +5 -7
- package/dist/menu/menu.d.ts.map +1 -1
- package/dist/menu/menu.js +7 -3
- package/dist/menu/menu.js.map +1 -1
- package/dist/radio-group/index.d.ts +2 -0
- package/dist/radio-group/index.d.ts.map +1 -0
- package/dist/radio-group/index.js +2 -0
- package/dist/radio-group/index.js.map +1 -0
- package/dist/radio-group/radio-group.css +70 -0
- package/dist/radio-group/radio-group.css.d.ts +2 -0
- package/dist/radio-group/radio-group.d.ts +74 -0
- package/dist/radio-group/radio-group.d.ts.map +1 -0
- package/dist/radio-group/radio-group.js +57 -0
- package/dist/radio-group/radio-group.js.map +1 -0
- package/dist/select/select.d.ts +3 -3
- package/dist/select/select.d.ts.map +1 -1
- package/dist/select/select.js +5 -2
- package/dist/select/select.js.map +1 -1
- package/dist/sticky/sticky.css +3 -1
- package/package.json +18 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAkB,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAkI5D,SAAS,WAAW,CAAC,EAAE,IAAI,EAAwB;IACjD,OAAO,CACL,gBAAM,SAAS,EAAC,yBAAyB,aACtC,IAAI,CAAC,IAAI,IAAI,eAAM,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I,EACV,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAE/B,KAAK,IAAI,KAAC,SAAS,CAAC,KAAK,IAAC,SAAS,EAAC,kBAAkB,YAAE,KAAK,GAAmB,EAEjF,KAAC,SAAS,CAAC,OAAO,cAChB,MAAC,SAAS,CAAC,OAAO,IAChB,SAAS,EAAC,oBAAoB,gBAClB,SAAS,eACV,OAAO,IAAI,SAAS,aAE/B,KAAC,SAAS,CAAC,OAAO,cACf,CAAC,MAAM,EAAE,EAAE,CAAC,CACX,KAAC,SAAS,CAAC,SAAS,IAClB,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,EAChD,SAAS,EAAC,uBAAuB,YAEhC,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GACpB,CACvB,GACiB,EACpB,KAAC,SAAS,CAAC,SAAS,IAAC,SAAS,EAAC,sBAAsB,YACnD,KAAC,IAAI,IAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC5B,IACJ,GACF,EAEpB,KAAC,MAAM,IAAC,SAAS,EAAE,eAAe,YAChC,KAAC,SAAS,CAAC,UAAU,cACnB,KAAC,SAAS,CAAC,OAAO,IAAC,SAAS,EAAC,oBAAoB,YAC9C,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,GACN,GACC,GAChB,EAET,KAAC,SAAS,CAAC,YAAY,KAAG,IACX,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import { Portal } from '@ark-ui/react/portal';\nimport { Select as ArkSelect, createListCollection } from '@ark-ui/react/select';\nimport { type ReactNode, useCallback, useContext, useMemo } from 'react';\nimport { Icon, type IconSource } from '../icon/icon';\nimport { PortalContainerContext } from '../portal-container';\nimport './select.css';\nimport { cx } from '../cx';\nimport { Check, ChevronRight } from '../fallback-glyphs';\nimport { groupItems, type ItemGroup } from '../group-items';\n\nexport type SelectSize = 'sm' | 'md' | 'lg';\n\nexport interface SelectItem {\n /** Stable value submitted and compared. */\n value: string;\n /** Text shown in the list and in the trigger once chosen. */\n label: string;\n /**\n * Optional secondary line under the label in the list, shown muted, such as\n * the category a project is filed under. Part of the option's name. On a\n * highlighted row it takes the row's text colour, which the muted colour\n * was never measured against.\n */\n description?: string;\n /**\n * Decorative mark before the label, in the list and in the trigger once\n * chosen: a category's colour dot or its glyph. The label carries the\n * meaning, so mark it `aria-hidden` or decorative.\n */\n icon?: ReactNode;\n /**\n * The group the option is listed under, by its heading. Options sharing a\n * group are listed together under it, groups in the order they first\n * appear; options without one (or with an empty name) are listed before\n * any group. Same rule as `ComboboxItem.group`.\n */\n group?: string;\n /** Individually disable this option without removing it. */\n disabled?: boolean;\n}\n\nexport interface SelectProps {\n /** Options to choose from. */\n items: SelectItem[];\n /**\n * Visible label. Strongly preferred over `aria-label` — a visible label\n * helps everyone, not only screen reader users, and gives the control a\n * larger hit area.\n */\n label?: ReactNode;\n /** Text shown before anything is chosen. */\n placeholder?: string;\n /**\n * Controlled value.\n *\n * Three states, and the difference between the last two matters:\n * - a string — that option is selected;\n * - `null` — controlled, with nothing selected. The trigger shows the\n * `placeholder`. Use this to reset the field programmatically;\n * - `undefined` — **uncontrolled**. The component owns its own value, from\n * `defaultValue` onward.\n *\n * Passing `undefined` to clear a controlled Select would silently hand\n * ownership back to the component mid-life, which React warns about and\n * which leaves the old selection on screen. Pass `null` instead.\n *\n * A value with no matching entry in `items` — a category deleted since it\n * was stored — is treated as `null` rather than as a selection, so the\n * trigger and the submitted form value agree that nothing is chosen.\n */\n value?: string | null;\n /** Initial value when uncontrolled. */\n defaultValue?: string;\n /**\n * Fired with the newly selected value, or `undefined` when the selection is\n * emptied.\n *\n * `undefined` is reachable by exactly one route, and it is not the obvious\n * one. Ark's `deselectable` behaviour — click the selected row to unselect\n * it — is deliberately **not** enabled: a filter that needs an empty state\n * should offer it as a real option (\"All categories\") rather than as a\n * second, invisible way to reach the same place.\n *\n * What does empty the value is a native **form reset**. Ark tracks the\n * enclosing form unconditionally and restores the initial value on reset,\n * which for a Select mounted without a `defaultValue` is nothing selected.\n * Handle `undefined` if this Select lives in a resettable form; a consumer\n * that mirrors the value into its own state and ignores the empty payload\n * will keep showing a selection the control no longer has.\n */\n onValueChange?: (value: string | undefined) => void;\n /** Control height and type scale. */\n size?: SelectSize;\n /** Disable the whole control. */\n disabled?: boolean;\n /**\n * Options are still being fetched.\n *\n * Renders the control inert with `aria-busy`, so it cannot be opened onto\n * an empty list. Prefer this over passing `items={[]}` while a query is in\n * flight — an empty dropdown reads as \"no options exist\", which is a\n * different and wrong message.\n */\n loading?: boolean;\n /** Text shown in place of the placeholder while `loading`. */\n loadingText?: string;\n /** Marks the field invalid for assistive tech and styling. */\n invalid?: boolean;\n /** Name for native form participation. */\n name?: string;\n /** Extra class names appended after `ds-select` modifiers. */\n className?: string;\n /**\n * Render an option's content. Defaults to its `label`.\n *\n * The escape hatch for rows that `icon` and `description` don't cover.\n * Whatever you return must still convey the option in text; do not return\n * colour or an icon alone. It replaces the label, icon and description in\n * the list, not in the trigger.\n */\n renderItem?: (item: SelectItem) => ReactNode;\n /**\n * Glyph for the trigger's open/close affordance.\n *\n * Must point RIGHT — the component rotates it down when closed and up when\n * open, so one glyph serves both states. Pass `ChevronRight`, not a\n * `ChevronDown`: the slot turns what it is given.\n *\n * Defaults to a plain built-in chevron so `@manakind/ui-core` installs and\n * renders on its own. Products override it with their own icon set.\n */\n indicator?: IconSource;\n /** Glyph marking the selected option. Same defaulting rule as {@link SelectProps.indicator}. */\n itemIndicator?: IconSource;\n /** Accessible name when no visible `label` is supplied. */\n 'aria-label'?: string;\n}\n\nfunction ItemContent({ item }: { item: SelectItem }) {\n return (\n <span className=\"ds-select__item-content\">\n {item.icon && <span className=\"ds-select__item-icon\">{item.icon}</span>}\n <span className=\"ds-select__item-text\">\n <span>{item.label}</span>\n {item.description && (\n <>\n {' '}\n <span className=\"ds-select__item-description\">{item.description}</span>\n </>\n )}\n </span>\n </span>\n );\n}\n\n// The trigger shows a chosen option's icon too. Without one it returns\n// nothing, so Ark falls back to the label or the placeholder.\nfunction chosenWithIcon(item: SelectItem | undefined): ReactNode {\n if (!item?.icon) return undefined;\n return (\n <span className=\"ds-select__item-content\">\n <span className=\"ds-select__item-icon\">{item.icon}</span>\n <span>{item.label}</span>\n </span>\n );\n}\n\n/**\n * Single-select dropdown, built on Ark UI.\n *\n * Ark owns the hard parts: listbox semantics, typeahead, keyboard\n * navigation, focus return on close, and dismiss behaviour. This wrapper\n * contributes `ds-` classes, the `--ds-select-*` bindings, and a flat\n * `items` API in place of Ark's lower-level collection anatomy.\n *\n * ```tsx\n * <Select\n * label=\"Category\"\n * placeholder=\"Filter by category\"\n * items={[{ value: 'all', label: 'All Categories' }]}\n * value={selected}\n * onValueChange={setSelected}\n * />\n * ```\n *\n * Give it a `label` or an `aria-label` — a select with neither is announced\n * as an unnamed combobox. Options can carry a leading `icon`, a muted\n * `description` line and a `group` heading; for multi-select, compose Ark's\n * anatomy directly in a product package rather than widening this API.\n *\n * The listbox renders in a portal, so it escapes ancestor `overflow: hidden`\n * rather than being clipped inside a card. It sits at `z-index: 60`, a step\n * above the products' overlay layer (50), so it paints above the page or\n * dialog it opens from. Inside a ui-core `Dialog` it portals into the\n * dialog's panel instead of `<body>`, so the modal does not hide it from\n * assistive tech.\n */\nexport function Select({\n items,\n label,\n placeholder,\n value,\n defaultValue,\n onValueChange,\n size = 'md',\n disabled,\n loading = false,\n loadingText = 'Loading…',\n invalid,\n name,\n className,\n renderItem,\n indicator = ChevronRight,\n itemIndicator = Check,\n 'aria-label': ariaLabel,\n}: SelectProps) {\n // The collection holds the options in drawn order, so arrows, typeahead and\n // the hidden native select all follow the list on screen.\n const groups = useMemo(() => groupItems(items), [items]);\n const collection = useMemo(\n () =>\n createListCollection({\n items: groups.flatMap((group) => group.items),\n itemToValue: (item) => item.value,\n itemToString: (item) => item.label,\n isItemDisabled: (item) => item.disabled ?? false,\n }),\n [groups],\n );\n\n /*\n * A controlled value that no longer matches an option resolves to empty, so\n * the trigger and the form agree about it.\n *\n * Left unresolved they disagree: the trigger already falls back to the\n * placeholder (Ark drives that off whether a value is *set*, not whether it\n * *resolves*), but the hidden native select ends up with no option marked\n * selected — and a single `<select>` in that state reports its **first**\n * option. Measured: with the value `deleted-category`, the field submits\n * `all`. Reading the placeholder and posting a real, different value is the\n * worse half of the mismatch, and it is silent.\n */\n const controlledValue = useMemo(() => {\n if (value === undefined) return undefined;\n if (value === null) return [];\n return items.some((item) => item.value === value) ? [value] : [];\n }, [value, items]);\n\n // Same resolution for the uncontrolled path: an unresolvable `defaultValue`\n // produces the identical trigger-says-placeholder / form-submits-`all` split.\n const initialValue = useMemo(() => {\n if (defaultValue === undefined) return undefined;\n return items.some((item) => item.value === defaultValue) ? [defaultValue] : [];\n }, [defaultValue, items]);\n\n const portalContainer = useContext(PortalContainerContext);\n\n const handleValueChange = useCallback(\n (details: { value: string[] }) => onValueChange?.(details.value[0]),\n [onValueChange],\n );\n\n const renderOption = (item: SelectItem) => (\n <ArkSelect.Item key={item.value} item={item} className=\"ds-select__item\">\n <ArkSelect.ItemText>\n {renderItem ? renderItem(item) : <ItemContent item={item} />}\n </ArkSelect.ItemText>\n <ArkSelect.ItemIndicator className=\"ds-select__item-indicator\">\n <Icon source={itemIndicator} size=\"sm\" decorative />\n </ArkSelect.ItemIndicator>\n </ArkSelect.Item>\n );\n\n const renderGroup = (group: ItemGroup<SelectItem>) =>\n group.label === undefined ? (\n group.items.map(renderOption)\n ) : (\n <ArkSelect.ItemGroup key={group.label} className=\"ds-select__group\">\n <ArkSelect.ItemGroupLabel className=\"ds-select__group-label\">\n {group.label}\n </ArkSelect.ItemGroupLabel>\n {group.items.map(renderOption)}\n </ArkSelect.ItemGroup>\n );\n\n return (\n <ArkSelect.Root\n collection={collection}\n className={cx('ds-select', `ds-select--${size}`, className)}\n value={controlledValue}\n defaultValue={initialValue}\n onValueChange={handleValueChange}\n disabled={disabled || loading}\n invalid={invalid}\n name={name}\n positioning={{ sameWidth: true }}\n >\n {label && <ArkSelect.Label className=\"ds-select__label\">{label}</ArkSelect.Label>}\n\n <ArkSelect.Control>\n <ArkSelect.Trigger\n className=\"ds-select__trigger\"\n aria-label={ariaLabel}\n aria-busy={loading || undefined}\n >\n <ArkSelect.Context<SelectItem>>\n {(select) => (\n <ArkSelect.ValueText\n placeholder={loading ? loadingText : placeholder}\n className=\"ds-select__value-text\"\n >\n {chosenWithIcon(select.selectedItems[0])}\n </ArkSelect.ValueText>\n )}\n </ArkSelect.Context>\n <ArkSelect.Indicator className=\"ds-select__indicator\">\n <Icon source={indicator} size=\"sm\" decorative />\n </ArkSelect.Indicator>\n </ArkSelect.Trigger>\n </ArkSelect.Control>\n\n <Portal container={portalContainer}>\n <ArkSelect.Positioner>\n <ArkSelect.Content className=\"ds-select__content\">\n {groups.map(renderGroup)}\n </ArkSelect.Content>\n </ArkSelect.Positioner>\n </Portal>\n\n <ArkSelect.HiddenSelect />\n </ArkSelect.Root>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAkB,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAkInD,SAAS,WAAW,CAAC,E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@ark-ui/react/portal';\nimport { Select as ArkSelect, createListCollection } from '@ark-ui/react/select';\nimport { type ReactNode, useCallback, useContext, useMemo } from 'react';\nimport { Icon, type IconSource } from '../icon/icon';\nimport { PortalContainerContext } from '../portal-container';\nimport './select.css';\nimport { cx } from '../cx';\nimport { groupItems, type ItemGroup } from '../group-items';\nimport { useIconDefaults } from '../icon-defaults';\n\nexport type SelectSize = 'sm' | 'md' | 'lg';\n\nexport interface SelectItem {\n /** Stable value submitted and compared. */\n value: string;\n /** Text shown in the list and in the trigger once chosen. */\n label: string;\n /**\n * Optional secondary line under the label in the list, shown muted, such as\n * the category a project is filed under. Part of the option's name. On a\n * highlighted row it takes the row's text colour, which the muted colour\n * was never measured against.\n */\n description?: string;\n /**\n * Decorative mark before the label, in the list and in the trigger once\n * chosen: a category's colour dot or its glyph. The label carries the\n * meaning, so mark it `aria-hidden` or decorative.\n */\n icon?: ReactNode;\n /**\n * The group the option is listed under, by its heading. Options sharing a\n * group are listed together under it, groups in the order they first\n * appear; options without one (or with an empty name) are listed before\n * any group. Same rule as `ComboboxItem.group`.\n */\n group?: string;\n /** Individually disable this option without removing it. */\n disabled?: boolean;\n}\n\nexport interface SelectProps {\n /** Options to choose from. */\n items: SelectItem[];\n /**\n * Visible label. Strongly preferred over `aria-label` — a visible label\n * helps everyone, not only screen reader users, and gives the control a\n * larger hit area.\n */\n label?: ReactNode;\n /** Text shown before anything is chosen. */\n placeholder?: string;\n /**\n * Controlled value.\n *\n * Three states, and the difference between the last two matters:\n * - a string — that option is selected;\n * - `null` — controlled, with nothing selected. The trigger shows the\n * `placeholder`. Use this to reset the field programmatically;\n * - `undefined` — **uncontrolled**. The component owns its own value, from\n * `defaultValue` onward.\n *\n * Passing `undefined` to clear a controlled Select would silently hand\n * ownership back to the component mid-life, which React warns about and\n * which leaves the old selection on screen. Pass `null` instead.\n *\n * A value with no matching entry in `items` — a category deleted since it\n * was stored — is treated as `null` rather than as a selection, so the\n * trigger and the submitted form value agree that nothing is chosen.\n */\n value?: string | null;\n /** Initial value when uncontrolled. */\n defaultValue?: string;\n /**\n * Fired with the newly selected value, or `undefined` when the selection is\n * emptied.\n *\n * `undefined` is reachable by exactly one route, and it is not the obvious\n * one. Ark's `deselectable` behaviour — click the selected row to unselect\n * it — is deliberately **not** enabled: a filter that needs an empty state\n * should offer it as a real option (\"All categories\") rather than as a\n * second, invisible way to reach the same place.\n *\n * What does empty the value is a native **form reset**. Ark tracks the\n * enclosing form unconditionally and restores the initial value on reset,\n * which for a Select mounted without a `defaultValue` is nothing selected.\n * Handle `undefined` if this Select lives in a resettable form; a consumer\n * that mirrors the value into its own state and ignores the empty payload\n * will keep showing a selection the control no longer has.\n */\n onValueChange?: (value: string | undefined) => void;\n /** Control height and type scale. */\n size?: SelectSize;\n /** Disable the whole control. */\n disabled?: boolean;\n /**\n * Options are still being fetched.\n *\n * Renders the control inert with `aria-busy`, so it cannot be opened onto\n * an empty list. Prefer this over passing `items={[]}` while a query is in\n * flight — an empty dropdown reads as \"no options exist\", which is a\n * different and wrong message.\n */\n loading?: boolean;\n /** Text shown in place of the placeholder while `loading`. */\n loadingText?: string;\n /** Marks the field invalid for assistive tech and styling. */\n invalid?: boolean;\n /** Name for native form participation. */\n name?: string;\n /** Extra class names appended after `ds-select` modifiers. */\n className?: string;\n /**\n * Render an option's content. Defaults to its `label`.\n *\n * The escape hatch for rows that `icon` and `description` don't cover.\n * Whatever you return must still convey the option in text; do not return\n * colour or an icon alone. It replaces the label, icon and description in\n * the list, not in the trigger.\n */\n renderItem?: (item: SelectItem) => ReactNode;\n /**\n * Glyph for the trigger's open/close affordance.\n *\n * Must point RIGHT — the component rotates it down when closed and up when\n * open, so one glyph serves both states. Pass `ChevronRight`, not a\n * `ChevronDown`: the slot turns what it is given.\n *\n * Defaults to the `chevronRight` of the nearest `IconDefaultsProvider`,\n * where a product puts its own icon set once, or a plain built-in chevron.\n */\n indicator?: IconSource;\n /** Glyph marking the selected option. Same defaulting rule as {@link SelectProps.indicator}. */\n itemIndicator?: IconSource;\n /** Accessible name when no visible `label` is supplied. */\n 'aria-label'?: string;\n}\n\nfunction ItemContent({ item }: { item: SelectItem }) {\n return (\n <span className=\"ds-select__item-content\">\n {item.icon && <span className=\"ds-select__item-icon\">{item.icon}</span>}\n <span className=\"ds-select__item-text\">\n <span>{item.label}</span>\n {item.description && (\n <>\n {' '}\n <span className=\"ds-select__item-description\">{item.description}</span>\n </>\n )}\n </span>\n </span>\n );\n}\n\n// The trigger shows a chosen option's icon too. Without one it returns\n// nothing, so Ark falls back to the label or the placeholder.\nfunction chosenWithIcon(item: SelectItem | undefined): ReactNode {\n if (!item?.icon) return undefined;\n return (\n <span className=\"ds-select__item-content\">\n <span className=\"ds-select__item-icon\">{item.icon}</span>\n <span>{item.label}</span>\n </span>\n );\n}\n\n/**\n * Single-select dropdown, built on Ark UI.\n *\n * Ark owns the hard parts: listbox semantics, typeahead, keyboard\n * navigation, focus return on close, and dismiss behaviour. This wrapper\n * contributes `ds-` classes, the `--ds-select-*` bindings, and a flat\n * `items` API in place of Ark's lower-level collection anatomy.\n *\n * ```tsx\n * <Select\n * label=\"Category\"\n * placeholder=\"Filter by category\"\n * items={[{ value: 'all', label: 'All Categories' }]}\n * value={selected}\n * onValueChange={setSelected}\n * />\n * ```\n *\n * Give it a `label` or an `aria-label` — a select with neither is announced\n * as an unnamed combobox. Options can carry a leading `icon`, a muted\n * `description` line and a `group` heading; for multi-select, compose Ark's\n * anatomy directly in a product package rather than widening this API.\n *\n * The listbox renders in a portal, so it escapes ancestor `overflow: hidden`\n * rather than being clipped inside a card. It sits at `z-index: 60`, a step\n * above the products' overlay layer (50), so it paints above the page or\n * dialog it opens from. Inside a ui-core `Dialog` it portals into the\n * dialog's panel instead of `<body>`, so the modal does not hide it from\n * assistive tech.\n */\nexport function Select({\n items,\n label,\n placeholder,\n value,\n defaultValue,\n onValueChange,\n size = 'md',\n disabled,\n loading = false,\n loadingText = 'Loading…',\n invalid,\n name,\n className,\n renderItem,\n indicator: indicatorProp,\n itemIndicator: itemIndicatorProp,\n 'aria-label': ariaLabel,\n}: SelectProps) {\n const icons = useIconDefaults();\n const indicator = indicatorProp ?? icons.chevronRight;\n const itemIndicator = itemIndicatorProp ?? icons.check;\n // The collection holds the options in drawn order, so arrows, typeahead and\n // the hidden native select all follow the list on screen.\n const groups = useMemo(() => groupItems(items), [items]);\n const collection = useMemo(\n () =>\n createListCollection({\n items: groups.flatMap((group) => group.items),\n itemToValue: (item) => item.value,\n itemToString: (item) => item.label,\n isItemDisabled: (item) => item.disabled ?? false,\n }),\n [groups],\n );\n\n /*\n * A controlled value that no longer matches an option resolves to empty, so\n * the trigger and the form agree about it.\n *\n * Left unresolved they disagree: the trigger already falls back to the\n * placeholder (Ark drives that off whether a value is *set*, not whether it\n * *resolves*), but the hidden native select ends up with no option marked\n * selected — and a single `<select>` in that state reports its **first**\n * option. Measured: with the value `deleted-category`, the field submits\n * `all`. Reading the placeholder and posting a real, different value is the\n * worse half of the mismatch, and it is silent.\n */\n const controlledValue = useMemo(() => {\n if (value === undefined) return undefined;\n if (value === null) return [];\n return items.some((item) => item.value === value) ? [value] : [];\n }, [value, items]);\n\n // Same resolution for the uncontrolled path: an unresolvable `defaultValue`\n // produces the identical trigger-says-placeholder / form-submits-`all` split.\n const initialValue = useMemo(() => {\n if (defaultValue === undefined) return undefined;\n return items.some((item) => item.value === defaultValue) ? [defaultValue] : [];\n }, [defaultValue, items]);\n\n const portalContainer = useContext(PortalContainerContext);\n\n const handleValueChange = useCallback(\n (details: { value: string[] }) => onValueChange?.(details.value[0]),\n [onValueChange],\n );\n\n const renderOption = (item: SelectItem) => (\n <ArkSelect.Item key={item.value} item={item} className=\"ds-select__item\">\n <ArkSelect.ItemText>\n {renderItem ? renderItem(item) : <ItemContent item={item} />}\n </ArkSelect.ItemText>\n <ArkSelect.ItemIndicator className=\"ds-select__item-indicator\">\n <Icon source={itemIndicator} size=\"sm\" decorative />\n </ArkSelect.ItemIndicator>\n </ArkSelect.Item>\n );\n\n const renderGroup = (group: ItemGroup<SelectItem>) =>\n group.label === undefined ? (\n group.items.map(renderOption)\n ) : (\n <ArkSelect.ItemGroup key={group.label} className=\"ds-select__group\">\n <ArkSelect.ItemGroupLabel className=\"ds-select__group-label\">\n {group.label}\n </ArkSelect.ItemGroupLabel>\n {group.items.map(renderOption)}\n </ArkSelect.ItemGroup>\n );\n\n return (\n <ArkSelect.Root\n collection={collection}\n className={cx('ds-select', `ds-select--${size}`, className)}\n value={controlledValue}\n defaultValue={initialValue}\n onValueChange={handleValueChange}\n disabled={disabled || loading}\n invalid={invalid}\n name={name}\n positioning={{ sameWidth: true }}\n >\n {label && <ArkSelect.Label className=\"ds-select__label\">{label}</ArkSelect.Label>}\n\n <ArkSelect.Control>\n <ArkSelect.Trigger\n className=\"ds-select__trigger\"\n aria-label={ariaLabel}\n aria-busy={loading || undefined}\n >\n <ArkSelect.Context<SelectItem>>\n {(select) => (\n <ArkSelect.ValueText\n placeholder={loading ? loadingText : placeholder}\n className=\"ds-select__value-text\"\n >\n {chosenWithIcon(select.selectedItems[0])}\n </ArkSelect.ValueText>\n )}\n </ArkSelect.Context>\n <ArkSelect.Indicator className=\"ds-select__indicator\">\n <Icon source={indicator} size=\"sm\" decorative />\n </ArkSelect.Indicator>\n </ArkSelect.Trigger>\n </ArkSelect.Control>\n\n <Portal container={portalContainer}>\n <ArkSelect.Positioner>\n <ArkSelect.Content className=\"ds-select__content\">\n {groups.map(renderGroup)}\n </ArkSelect.Content>\n </ArkSelect.Positioner>\n </Portal>\n\n <ArkSelect.HiddenSelect />\n </ArkSelect.Root>\n );\n}\n"]}
|
package/dist/sticky/sticky.css
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* The inset from the edge is a private property so the scroll variant can
|
|
4
4
|
* subtract it from the viewport's height. `z-index: 40` is the `sticky`
|
|
5
|
-
* layer
|
|
5
|
+
* layer, and the header's 45 the `header` layer above it
|
|
6
|
+
* (ds-config/scripts/stacking.ts).
|
|
6
7
|
*/
|
|
7
8
|
.ds-sticky {
|
|
8
9
|
--_sticky-inset: 0px;
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
* so a bar or a side panel under it starts where it ends.
|
|
30
31
|
*/
|
|
31
32
|
&.ds-sticky--header {
|
|
33
|
+
z-index: 45;
|
|
32
34
|
display: grid;
|
|
33
35
|
align-content: center;
|
|
34
36
|
min-block-size: var(--ds-sticky-offset-top);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manakind/ui-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"import": "./dist/index.js"
|
|
26
26
|
},
|
|
27
|
+
"./accordion": {
|
|
28
|
+
"types": "./dist/accordion/index.d.ts",
|
|
29
|
+
"import": "./dist/accordion/index.js"
|
|
30
|
+
},
|
|
27
31
|
"./alert": {
|
|
28
32
|
"types": "./dist/alert/index.d.ts",
|
|
29
33
|
"import": "./dist/alert/index.js"
|
|
@@ -124,6 +128,10 @@
|
|
|
124
128
|
"types": "./dist/reorder-control/index.d.ts",
|
|
125
129
|
"import": "./dist/reorder-control/index.js"
|
|
126
130
|
},
|
|
131
|
+
"./radio-group": {
|
|
132
|
+
"types": "./dist/radio-group/index.d.ts",
|
|
133
|
+
"import": "./dist/radio-group/index.js"
|
|
134
|
+
},
|
|
127
135
|
"./scroll-area": {
|
|
128
136
|
"types": "./dist/scroll-area/index.d.ts",
|
|
129
137
|
"import": "./dist/scroll-area/index.js"
|
|
@@ -188,6 +196,10 @@
|
|
|
188
196
|
"types": "./dist/wizard-layout/index.d.ts",
|
|
189
197
|
"import": "./dist/wizard-layout/index.js"
|
|
190
198
|
},
|
|
199
|
+
"./css/accordion": {
|
|
200
|
+
"types": "./dist/accordion/accordion.css.d.ts",
|
|
201
|
+
"default": "./dist/accordion/accordion.css"
|
|
202
|
+
},
|
|
191
203
|
"./css/alert": {
|
|
192
204
|
"types": "./dist/alert/alert.css.d.ts",
|
|
193
205
|
"default": "./dist/alert/alert.css"
|
|
@@ -288,6 +300,10 @@
|
|
|
288
300
|
"types": "./dist/reorder-control/reorder-control.css.d.ts",
|
|
289
301
|
"default": "./dist/reorder-control/reorder-control.css"
|
|
290
302
|
},
|
|
303
|
+
"./css/radio-group": {
|
|
304
|
+
"types": "./dist/radio-group/radio-group.css.d.ts",
|
|
305
|
+
"default": "./dist/radio-group/radio-group.css"
|
|
306
|
+
},
|
|
291
307
|
"./css/scroll-area": {
|
|
292
308
|
"types": "./dist/scroll-area/scroll-area.css.d.ts",
|
|
293
309
|
"default": "./dist/scroll-area/scroll-area.css"
|
|
@@ -380,7 +396,7 @@
|
|
|
380
396
|
},
|
|
381
397
|
"devDependencies": {
|
|
382
398
|
"@manakind/ds-config": "*",
|
|
383
|
-
"@manakind/manuia-tokens": "0.
|
|
399
|
+
"@manakind/manuia-tokens": "0.28.0",
|
|
384
400
|
"@testing-library/jest-dom": "^6.9.1",
|
|
385
401
|
"@testing-library/react": "^16.3.2",
|
|
386
402
|
"@testing-library/user-event": "^14.6.1",
|