prime-ui-kit 0.7.3 → 0.7.7

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.
Files changed (41) hide show
  1. package/dist/components/index.css +326 -34
  2. package/dist/components/index.css.map +4 -4
  3. package/dist/components/index.d.ts +2 -0
  4. package/dist/components/index.d.ts.map +1 -1
  5. package/dist/components/index.js +1363 -588
  6. package/dist/components/index.js.map +4 -4
  7. package/dist/components/select/Select.d.ts +26 -9
  8. package/dist/components/select/Select.d.ts.map +1 -1
  9. package/dist/components/select/examples/pattern-multiple.d.ts +3 -0
  10. package/dist/components/select/examples/pattern-multiple.d.ts.map +1 -0
  11. package/dist/components/tag-select/TagSelect.d.ts +43 -0
  12. package/dist/components/tag-select/TagSelect.d.ts.map +1 -0
  13. package/dist/components/tag-select/examples/pattern-canonical.d.ts +3 -0
  14. package/dist/components/tag-select/examples/pattern-canonical.d.ts.map +1 -0
  15. package/dist/components/tag-select/examples/pattern-features.d.ts +3 -0
  16. package/dist/components/tag-select/examples/pattern-features.d.ts.map +1 -0
  17. package/dist/hooks/usePosition.d.ts.map +1 -1
  18. package/dist/index.css +328 -36
  19. package/dist/index.css.map +4 -4
  20. package/dist/index.js +1363 -588
  21. package/dist/index.js.map +4 -4
  22. package/dist/layout/index.d.ts +1 -0
  23. package/dist/layout/index.d.ts.map +1 -1
  24. package/dist/layout/sidebar/Sidebar.d.ts +2 -0
  25. package/dist/layout/sidebar/Sidebar.d.ts.map +1 -1
  26. package/dist/layout/sidebar/SidebarRoot.d.ts +10 -0
  27. package/dist/layout/sidebar/SidebarRoot.d.ts.map +1 -1
  28. package/dist/layout/sidebar/sidebarDesktopStorage.d.ts +5 -0
  29. package/dist/layout/sidebar/sidebarDesktopStorage.d.ts.map +1 -0
  30. package/dist/layout/sidebar/useSidebarNarrowViewport.d.ts +6 -0
  31. package/dist/layout/sidebar/useSidebarNarrowViewport.d.ts.map +1 -0
  32. package/dist/tokens/semantic.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/src/components/select/COMPONENT.md +91 -32
  35. package/src/components/select/examples/pattern-multiple.tsx +30 -0
  36. package/src/components/tag-select/COMPONENT.md +108 -0
  37. package/src/components/tag-select/examples/examples.module.css +14 -0
  38. package/src/components/tag-select/examples/pattern-canonical.tsx +28 -0
  39. package/src/components/tag-select/examples/pattern-features.tsx +32 -0
  40. package/src/styles/theme-dark.css +1 -1
  41. package/src/styles/theme-light.css +1 -1
@@ -2,6 +2,7 @@ export type { AppShellMainProps, AppShellNavProps, AppShellRootProps, AppShellTe
2
2
  export { AppShell } from "./app-shell/AppShell";
3
3
  export type { SidebarContentProps, SidebarFooterProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderMainProps, SidebarHeaderProps, SidebarHeaderRowProps, SidebarIdentityButtonProps, SidebarMenuActionProps, SidebarMenuButtonProps, SidebarMenuIconProps, SidebarMenuItemProps, SidebarMenuLabelProps, SidebarMenuLinkProps, SidebarMenuProps, SidebarMenuRouterLinkProps, SidebarMenuTrailingProps, SidebarNavCategoryCountProps, SidebarNavCategoryLabelProps, SidebarNavCategoryPanelProps, SidebarNavCategoryProps, SidebarNavCategoryTriggerProps, SidebarNavDocTreeProps, SidebarNavPanelBodyProps, SidebarNavPanelHeadingProps, SidebarNavPanelProps, SidebarResponsive, SidebarRootProps, SidebarSize, SidebarTextProps, SidebarToggleButtonProps, } from "./sidebar/Sidebar";
4
4
  export { Sidebar, useSidebarContext } from "./sidebar/Sidebar";
5
+ export type { StoredSidebarDesktopMode } from "./sidebar/sidebarDesktopStorage";
5
6
  export type { SidebarLayoutMode } from "./sidebar/sidebarLayout";
6
7
  export { SIDEBAR_LAYOUT_BREAKPOINT_MAX, SIDEBAR_MEDIA_QUERY_INLINE, SIDEBAR_MEDIA_QUERY_NARROW, SIDEBAR_MEDIA_QUERY_XS_HIDDEN, } from "./sidebar/sidebarLayout";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC"}
@@ -170,6 +170,7 @@ export declare const Sidebar: React.ForwardRefExoticComponent<Omit<Omit<React.De
170
170
  onOpenChange?: (open: boolean) => void;
171
171
  responsive?: boolean;
172
172
  sidebarSlot?: "page-nav";
173
+ persistStateKey?: string;
173
174
  } & React.RefAttributes<HTMLElement>> & {
174
175
  Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "children"> & {
175
176
  children: React.ReactNode;
@@ -186,6 +187,7 @@ export declare const Sidebar: React.ForwardRefExoticComponent<Omit<Omit<React.De
186
187
  onOpenChange?: (open: boolean) => void;
187
188
  responsive?: boolean;
188
189
  sidebarSlot?: "page-nav";
190
+ persistStateKey?: string;
189
191
  } & React.RefAttributes<HTMLElement>>;
190
192
  NavPanel: typeof SidebarNavPanel;
191
193
  NavPanelBody: typeof SidebarNavPanelBody;
@@ -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AK,CAAC,SAAS;mBACX,KAAK,CAAC,SAAS;mBACf,KAAK,CAAC,SAAS;;;;;;;;iBAqQjB,OAAO;kBACN,OAAO;kBACP,KAAK,CAAC,SAAS;;;iBAyHhB,OAAO;;;kBAcN,KAAK,CAAC,SAAS;;;mBAzJd,KAAK,CAAC,SAAS;;;;;;iBAgBjB,OAAO;kBACN,OAAO;kBACP,KAAK,CAAC,SAAS;;;CA0RzB,CAAC"}
@@ -24,6 +24,11 @@ export type SidebarRootProps = Omit<React.ComponentPropsWithoutRef<"aside">, "ch
24
24
  onOpenChange?: (open: boolean) => void;
25
25
  responsive?: boolean;
26
26
  sidebarSlot?: "page-nav";
27
+ /**
28
+ * Ключ `localStorage`: запоминаются только режимы рабочего стола `expanded` / `compact`.
29
+ * На узком вьюпорте drawer при загрузке всегда закрыт; при возврате на широкий экран подставляется сохранённый режим.
30
+ */
31
+ persistStateKey?: string;
27
32
  };
28
33
  declare const SidebarRoot: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "children"> & {
29
34
  children: React.ReactNode;
@@ -46,6 +51,11 @@ declare const SidebarRoot: React.ForwardRefExoticComponent<Omit<Omit<React.Detai
46
51
  onOpenChange?: (open: boolean) => void;
47
52
  responsive?: boolean;
48
53
  sidebarSlot?: "page-nav";
54
+ /**
55
+ * Ключ `localStorage`: запоминаются только режимы рабочего стола `expanded` / `compact`.
56
+ * На узком вьюпорте drawer при загрузке всегда закрыт; при возврате на широкий экран подставляется сохранённый режим.
57
+ */
58
+ persistStateKey?: string;
49
59
  } & React.RefAttributes<HTMLElement>>;
50
60
  export { SidebarRoot };
51
61
  //# sourceMappingURL=SidebarRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarRoot.d.ts","sourceRoot":"","sources":["../../../../src/layout/sidebar/SidebarRoot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B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AC;IAC1D,kBAAkB;IAClB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,kBAAkB;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kBAAkB;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAiCF,QAAA,MAAM,WAAW;cA1DL,KAAK,CAAC,SAAS;WAClB,WAAW;WACX,WAAW;YACV,iBAAiB;mBACV,iBAAiB;oBAChB,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;IAClD,kBAAkB;WACX,iBAAiB,GAAG,uBAAuB;IAClD,kBAAkB;kBACJ,iBAAiB,GAAG,uBAAuB;IACzD,kBAAkB;mBACH,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI;IACjD,kBAAkB;WACX,OAAO;IACd,kBAAkB;kBACJ,OAAO;IACrB,kBAAkB;mBACH,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;iBACzB,OAAO;kBACN,UAAU;IACxB;;;OAGG;sBACe,MAAM;qCA8PxB,CAAC;AAIH,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { SidebarLayoutMode } from "./sidebarLayout";
2
+ export type StoredSidebarDesktopMode = Extract<SidebarLayoutMode, "expanded" | "compact">;
3
+ export declare function readStoredDesktopMode(key: string): StoredSidebarDesktopMode | null;
4
+ export declare function writeStoredDesktopMode(key: string, mode: StoredSidebarDesktopMode): void;
5
+ //# sourceMappingURL=sidebarDesktopStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebarDesktopStorage.d.ts","sourceRoot":"","sources":["../../../../src/layout/sidebar/sidebarDesktopStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;AAa1F,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,GAAG,IAAI,CAWlF;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,IAAI,CAQxF"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Подписка на `(max-width: 47.999rem)` без рассинхрона с эффектом:
3
+ * первый клиентский кадр совпадает с `matchMedia` (в т.ч. после гидрации).
4
+ */
5
+ export declare function useSidebarNarrowViewport(enabled: boolean): boolean;
6
+ //# sourceMappingURL=useSidebarNarrowViewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSidebarNarrowViewport.d.ts","sourceRoot":"","sources":["../../../../src/layout/sidebar/useSidebarNarrowViewport.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAuBlE"}
@@ -440,7 +440,7 @@ export declare const semanticTokens: {
440
440
  readonly maxWidth: "30rem";
441
441
  readonly paddingX: "{spacing.xl}";
442
442
  readonly paddingY: "{spacing.xl}";
443
- readonly titleGap: "{spacing.s}";
443
+ readonly titleGap: "{spacing.x1}";
444
444
  readonly contentGap: "{spacing.l}";
445
445
  readonly headerGap: "{spacing.m}";
446
446
  readonly headerPaddingBottom: "{spacing.l}";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prime-ui-kit",
3
- "version": "0.7.3",
3
+ "version": "0.7.7",
4
4
  "description": "React 19 UI kit: CSS Modules, semantic design tokens (--prime-sys-*), composable components — forms, modals, selects, tables, navigation, overlays. TypeScript, ESM, a11y-oriented.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -4,30 +4,33 @@
4
4
 
5
5
  ## About
6
6
 
7
- A single-select field: by default (**`native`** `false`) it is a combobox — a trigger shows the current choice or a placeholder, and a portaled listbox lets the user pick one string value from predefined options. With **`native`** `true`, **`Select.Root`** renders a native **`<select>`** with **`<option>`** / **`<optgroup>`** built from the same **`Select.Item`** (and optional **`Select.Group`**) tree.
7
+ A field for choosing from a closed set of options. By default (**`native`** `false`) it is a combobox — a trigger shows the current choice or a placeholder, and a portaled listbox lets the user pick. Set **`multiple`** to **`true`** on **`Select.Root`** for multiselect: **`value`** / **`defaultValue`** / **`onChange`** use **`string[]`**; picking toggles options; the list stays open until blur, outside click, or **Escape**; **`Select.Value`** shows selected labels joined with **`, `**; the listbox sets **`aria-multiselectable`**.
8
+
9
+ With **`native`** `true`, **`Select.Root`** renders a native **`<select>`** (single) or **`<select multiple>`** (when **`multiple`** is **`true`**) with **`<option>`** / **`<optgroup>`** built from the same **`Select.Item`** (and optional **`Select.Group`**) tree.
8
10
 
9
11
  **When to use**
10
12
 
11
- - Forms, settings, and filters where exactly one option must be chosen from a closed set (role, country, theme, interval, and similar fields).
13
+ - Forms, settings, and filters where one or many options must be chosen from a predefined list (role, country, departments, themes, intervals).
12
14
  - Flows where a compact trigger is enough and the full list should open on demand with keyboard support.
13
15
  - Long option lists structured with **`Select.Group`**, **`Select.GroupLabel`**, and **`Select.Separator`**.
16
+ - Multiselect from the same list without chips or free-text creation — **`multiple`** on the combobox, or **`native`** + **`multiple`** for a platform **`<select multiple>`**.
14
17
 
15
18
  **When not to use**
16
19
 
17
- - Multi-select, inline search, or async loading of options this primitive is single-choice only with static item children.
18
- - Arbitrary free textuse an input-style control instead.
19
- - Command or action menus — use [Dropdown](../dropdown/COMPONENT.md) when choices are actions, not a single form value.
20
+ - Free text or ad-hoc tags with a chip row and optional “create” prefer [Tag select](../tag-select/COMPONENT.md).
21
+ - Async search-as-you-type or virtualized remote lists this primitive expects static **`Select.Item`** children (extend at the app layer if needed).
22
+ - Command or action menus — use [Dropdown](../dropdown/COMPONENT.md) when choices are actions, not form values.
20
23
 
21
24
  ## Composition
22
25
 
23
- - **`Select.Root`** — owns value (controlled or uncontrolled), `size`, `hasError`, `disabled`, **`placeholder`**, and **`native`**. When **`native`** is `false`, it also owns open state and highlight. Wrap everything else.
24
- - **`Select.Trigger`** — (non-**`native`** only) the combobox `button` (fixed chevron on the right). Put **`Select.Value`** inside; optionally **`Select.TriggerIcon`** before **`Select.Value`**. The implementation sets the trigger **`id`**; you cannot override it — associate an external [Label](../label/COMPONENT.md) with **`aria-labelledby`** pointing at the label’s **`id`**.
25
- - **`Select.Value`** — (non-**`native`** only) displays the selected item label, otherwise falls back to the raw value or **`placeholder`** (hint styling when empty).
26
- - **`Select.Content`** — when **`native`** is `false`: portaled **`role="listbox"`** with **`display: none`** while closed (nodes stay mounted). Place **`Select.Item`** rows (and optional groups/separators) inside. Must come after the trigger in the document for a predictable structure. When **`native`** is `true`, **`Select.Content`** is optional as a structural wrapper; only **`Select.Item`** (and groups) contribute to the DOM **`<select>`**.
27
- - **`Select.Item`** — one option per row; optional **`Select.ItemIcon`** children are recognized by component type and rendered before the text. Use **`label`** when the trigger should show different text than the row content.
28
- - **`Select.Group`** / **`Select.GroupLabel`** / **`Select.Separator`** — optional structure inside **`Select.Content`**.
26
+ - **`Select.Root`** — owns **`native`**, **`multiple`**, value (string or **`string[]`** depending on **`multiple`**), **`size`**, **`hasError`**, **`disabled`**, **`placeholder`**. When **`native`** is `false`, the combobox also owns open state and highlight. Wrap everything else.
27
+ - **`Select.Trigger`** — (non-**`native`** only) the combobox **`button`**. Put **`Select.Value`** inside; optionally **`Select.TriggerIcon`** before **`Select.Value`**. The implementation sets the trigger **`id`**; associate an external [Label](../label/COMPONENT.md) with **`aria-labelledby`** pointing at the label’s **`id`**.
28
+ - **`Select.Value`** — (non-**`native`** only) displays the selected label(s): one label in single mode, or comma-separated labels in **`multiple`** mode, otherwise **`placeholder`** when empty.
29
+ - **`Select.Content`** — when **`native`** is `false`: portaled **`role="listbox"`** with **`display: none`** and **`aria-hidden`** while closed (items stay mounted so **`Select.Item`** can register labels for **`Select.Value`** do not unmount the list when closed). Closed panel uses **`pointer-events: none`** so fixed layers in **`body`** do not block navigation. With **`multiple`**, the listbox gets **`aria-multiselectable="true"`**. When **`native`** is `true`, **`Select.Content`** is optional; items build the **`<select>`** DOM.
30
+ - **`Select.Item`** — one option per row; optional **`Select.ItemIcon`** children are split into a leading icon slot vs label text (stable marker on **`Select.ItemIcon`**, not only `===` type duplicate module chunks in the bundle still work). Row spacing tokens are applied on the item (**`data-size`** from root). Use **`label`** when the trigger should show different text than the row content.
31
+ - **`Select.Group`** / **`Select.GroupLabel`** / **`Select.Separator`** — optional structure inside **`Select.Content`** (or under **`native`** root for optgroups).
29
32
 
30
- ### Canonical example
33
+ ### Canonical example (single)
31
34
 
32
35
  ```tsx
33
36
  import * as React from "react";
@@ -59,6 +62,30 @@ export function Example() {
59
62
  }
60
63
  ```
61
64
 
65
+ ### Multiselect (combobox)
66
+
67
+ ```tsx
68
+ import * as React from "react";
69
+ import { Select } from "prime-ui-kit";
70
+
71
+ export function MultiExample() {
72
+ const [value, setValue] = React.useState<string[]>(["eng"]);
73
+
74
+ return (
75
+ <Select.Root multiple value={value} onChange={setValue} placeholder="Choose departments">
76
+ <Select.Trigger aria-label="Departments">
77
+ <Select.Value />
78
+ </Select.Trigger>
79
+ <Select.Content>
80
+ <Select.Item value="eng">Engineering</Select.Item>
81
+ <Select.Item value="design">Design</Select.Item>
82
+ <Select.Item value="sales">Sales</Select.Item>
83
+ </Select.Content>
84
+ </Select.Root>
85
+ );
86
+ }
87
+ ```
88
+
62
89
  ### Native `<select>` (`native`)
63
90
 
64
91
  ```tsx
@@ -74,6 +101,24 @@ export function NativeExample() {
74
101
  }
75
102
  ```
76
103
 
104
+ ### Native `<select multiple>` (`native` + `multiple`)
105
+
106
+ ```tsx
107
+ import * as React from "react";
108
+ import { Select } from "prime-ui-kit";
109
+
110
+ export function NativeMultiExample() {
111
+ const [value, setValue] = React.useState<string[]>(["a"]);
112
+
113
+ return (
114
+ <Select.Root native multiple value={value} onChange={setValue}>
115
+ <Select.Item value="a">Option A</Select.Item>
116
+ <Select.Item value="b">Option B</Select.Item>
117
+ </Select.Root>
118
+ );
119
+ }
120
+ ```
121
+
77
122
  You can wrap items in **`Select.Content`** for parity with the composable tree; behavior is the same.
78
123
 
79
124
  ### Playground snippets (live demos)
@@ -88,6 +133,7 @@ These files power **`playground/sections/SelectSection.tsx`** (Russian copy in t
88
133
  | `playground/snippets/select/composition.tsx` | **`Select.TriggerIcon`**, **`Select.ItemIcon`**, item **`label`** vs short row text |
89
134
  | `playground/snippets/select/full-width.tsx` | Trigger fills a narrow shell (**`width: 100%`** from kit styles) |
90
135
  | `playground/snippets/select/native.tsx` | **`Select.Root`** **`native`** with optional **`Select.Content`** wrapper |
136
+ | `playground/snippets/select/multiple.tsx` | **`Select.Root`** **`multiple`**: **`string[]`** value, list stays open on pick |
91
137
  | `playground/snippets/select/features.tsx` | **`Group`** / **`GroupLabel`** / **`Separator`**, disabled item, long list + scroll |
92
138
 
93
139
  ### Examples next to this file
@@ -99,6 +145,7 @@ Runnable examples use **`@/`** in the workspace; published consumers import **`p
99
145
  | `examples/pattern-sizes.tsx` | **`sizes.tsx`** snippet |
100
146
  | `examples/pattern-states.tsx` | **`states.tsx`** snippet |
101
147
  | `examples/pattern-controlled.tsx` | **`controlled.tsx`** snippet |
148
+ | `examples/pattern-multiple.tsx` | **`multiple.tsx`** snippet |
102
149
  | `examples/pattern-composition.tsx` | **`composition.tsx`** snippet |
103
150
  | `examples/pattern-full-width.tsx` | **`full-width.tsx`** snippet |
104
151
  | `examples/pattern-native.tsx` | **`native.tsx`** snippet |
@@ -117,34 +164,45 @@ Runnable examples use **`@/`** in the workspace; published consumers import **`p
117
164
 
118
165
  ## Rules
119
166
 
120
- - **`native`** — default **`false`**. **`true`**: one **`<select>`** with kit styling; **`Select.Trigger`**, **`Select.Value`**, **`Select.Content`** portal, and listbox keyboard behavior are not used (the platform handles the dropdown). Options are collected by walking **`children`** for **`Select.Item`** (and **`Select.Group`** / **`Select.GroupLabel`** → **`<optgroup>`**; **`Select.Separator`** is skipped). **`placeholder`** adds a first **`<option value="">`**; do not use **`value=""`** on an **`Select.Item`** if you rely on that placeholder. **`Select.ItemIcon`** / **`Select.TriggerIcon`** are not represented in the native control.
121
- - **Controlled:** set **`value`** and **`onChange`** together. **Uncontrolled:** use **`defaultValue`** (or neither for an empty initial value). Values are always **`string`**; map numbers or enums to strings yourself.
122
- - **`onChange`** runs only when the value changes to a defined string (same contract as internal controllable state).
123
- - **`disabled`** on **`Select.Root`** prevents opening the list and selecting; the trigger is inactive.
167
+ - **`native`** — default **`false`**. **`true`**: **`<select>`** (or **`<select multiple>`** when **`multiple`** is **`true`**) with kit styling; combobox trigger, portaled listbox, and listbox keyboard model are not used for the single-select native path. Options are collected by walking **`children`** for **`Select.Item`** (and **`Select.Group`** / **`Select.GroupLabel`** → **`<optgroup>`**; **`Select.Separator`** is skipped). **`placeholder`** adds a first **`<option value="">`** for single native select; do not use **`value=""`** on an **`Select.Item`** if you rely on that placeholder. **`Select.ItemIcon`** / **`Select.TriggerIcon`** are not represented in the native control.
168
+ - **`multiple`** default **`false`**. **`true`**: use **`string[]`** for **`value`**, **`defaultValue`**, and **`onChange`**. Combobox: toggling an option does not close the list; **`Select.Value`** joins labels in selection order. Native: platform rules for **`<select multiple>`** (e.g. modifier keys for multi-select on desktop).
169
+ - **Controlled:** set **`value`** and **`onChange`** together (types follow **`multiple`**). **Uncontrolled:** use **`defaultValue`** or neither; initial empty selection is **`undefined`** / **`[]`** as appropriate.
170
+ - **`onChange`** fires when the controlled value changes (string or **`string[]`**).
171
+ - **`disabled`** on **`Select.Root`** prevents opening the list and selecting; the trigger is inactive (combobox) or the **`<select>`** is disabled (native).
124
172
  - **`disabled`** on **`Select.Item`** skips that option for pointer selection and for arrow-key navigation among enabled options only.
125
- - **`hasError`** on **`Select.Root`** applies error styling to the trigger; there is no separate **`variant`** prop.
126
- - **Width:** there is no **`fullWidth`** prop on **`Select.Root`**. The combobox trigger uses **`width: 100%`** — constrain or stretch the field with the parent layout (form column, grid cell, flex item).
127
- - **`Select.Content`** uses **`Portal`**, which attaches after the first client layout effect; until option nodes mount, **`selectedLabel`** may be unset and **`Select.Value`** can briefly show the raw **`value`** instead of an item’s **`label`**—effects on **`Select.Item`** then call **`onInitLabel`** to align the trigger text.
128
- - **`Select.Content`** is portaled; on open the listbox receives focus, **`useOutsideClick`** and **Escape** close it. Arrow **Up**/**Down**, **Home**/**End** move highlight; **Enter** or **Space** selects the highlighted enabled item; **Escape** closes from the listbox handler as well.
129
- - **`Select.Trigger`** is **`role="combobox"`** with **`aria-expanded`**, **`aria-haspopup="listbox"`**, and **`aria-controls`** pointing at the listbox **`id`**. Items expose **`role="option"`**, **`aria-selected`**, and **`aria-disabled`** when disabled.
130
- - If there is no visible text label on the trigger, set **`aria-label`** on **`Select.Trigger`**. For an external [Label](../label/COMPONENT.md), give the label a stable **`id`** and set **`aria-labelledby`** on **`Select.Trigger`** to that **`id`** (the trigger’s **`id`** is generated inside the component).
131
- - List position (e.g. flipping above/below) is resolved internally from viewport space; there are no public **`side`** / **`align`** props on **`Select.Content`**.
173
+ - **`hasError`** on **`Select.Root`** applies error styling to the trigger (combobox) or native select.
174
+ - **Width:** there is no **`fullWidth`** prop on **`Select.Root`**. The combobox trigger uses **`width: 100%`** — constrain with the parent layout.
175
+ - **`Select.Content`** uses **`Portal`**; **`Select.Item`** effects call **`onInitLabel`** so **`Select.Value`** stays aligned with item labels. While open, the listbox **repositions** like **Dropdown** / **Popover**: **`resize`** on **`window`** and **`visualViewport`**, **`scroll`** on the trigger’s scroll ancestors, and **`ResizeObserver`** on the panel when the runtime supports it — the panel stays anchored to the trigger when the page or a scroll container moves.
176
+ - **`Select.Content`** (combobox): on open the listbox receives focus; **Escape** and outside click close. **Enter** / **Space** on a highlighted option applies selection (toggle in **`multiple`** mode). With **`multiple`**, the listbox is **`aria-multiselectable`**.
177
+ - **`Select.Trigger`** is **`role="combobox"`** with **`aria-expanded`**, **`aria-haspopup="listbox"`**, **`aria-controls`**. Items use **`role="option"`**, **`aria-selected`**, **`aria-disabled`** when disabled.
178
+ - If there is no visible label on the trigger, set **`aria-label`** on **`Select.Trigger`**, or **`aria-labelledby`** with an external [Label](../label/COMPONENT.md).
179
+ - List position is resolved internally; there are no public **`side`** / **`align`** props on **`Select.Content`**.
132
180
 
133
181
  ## API
134
182
 
135
183
  ### Select.Root
136
184
 
185
+ Discriminated by **`multiple`** and **`native`**:
186
+
187
+ | Mode | `value` / `defaultValue` | `onChange` |
188
+ |------|--------------------------|------------|
189
+ | Default (combobox, single) | `string` | `(value: string) => void` |
190
+ | Combobox **`multiple`** | `string[]` | `(value: string[]) => void` |
191
+ | **`native`** (single) | `string` | `(value: string) => void` |
192
+ | **`native`** + **`multiple`** | `string[]` | `(value: string[]) => void` |
193
+
137
194
  | Prop | Type | Default | Required | Description |
138
195
  |------|------|---------|----------|-------------|
139
- | size | `"s" \| "m" \| "l" \| "xl"` | `"m"` | No | Token tier: trigger height, type scale, padding, icon sizes in trigger and list |
140
- | value | `string` | | No | Controlled selected value |
141
- | defaultValue | `string` | — | No | Initial value when uncontrolled |
142
- | onChange | `(value: string) => void` | — | No | Fires after a new value is selected |
143
- | disabled | `boolean` | — | No | Disables the trigger and selection |
144
- | placeholder | `string` | — | No | Shown in the trigger when no value is selected |
145
- | hasError | `boolean` | `false` | No | Error styling on the trigger |
146
- | native | `boolean` | `false` | No | **`true`**: native **`<select>`**; **`false`**: combobox + portaled listbox |
147
- | children | `React.ReactNode` | | Yes | Typically **`Select.Trigger`** and **`Select.Content`** (non-**`native`**); **`Select.Item`** tree (**`native`**) |
196
+ | size | `"s" \| "m" \| "l" \| "xl"` | `"m"` | No | Token tier: trigger height, type scale, padding, icon sizes |
197
+ | multiple | `boolean` | `false` | No | **`true`**: multiselect; value types are **`string[]`** |
198
+ | value | `string` or `string[]` | — | No | Controlled selected value(s) |
199
+ | defaultValue | `string` or `string[]` | — | No | Initial value when uncontrolled |
200
+ | onChange | `(value: string) => void` or `(value: string[]) => void` | — | No | Fires after selection changes |
201
+ | disabled | `boolean` | — | No | Disables the control |
202
+ | placeholder | `string` | | No | Shown in the trigger when empty (combobox); native single: empty **`<option>`** |
203
+ | hasError | `boolean` | `false` | No | Error styling |
204
+ | native | `boolean` | `false` | No | **`true`**: native **`<select>`** (single or **`multiple`**) |
205
+ | children | `React.ReactNode` | — | Yes | **`Select.Trigger`** + **`Select.Content`** (combobox) or **`Select.Item`** tree (**`native`**) |
148
206
 
149
207
  ### Select.Trigger
150
208
 
@@ -228,5 +286,6 @@ Runnable examples use **`@/`** in the workspace; published consumers import **`p
228
286
  - [Label](../label/COMPONENT.md) — visible field label; pair with **`aria-labelledby`** on **`Select.Trigger`** when needed.
229
287
  - [Hint](../hint/COMPONENT.md) — helper or error text below the field.
230
288
  - [Input](../input/COMPONENT.md) — free-form text when a fixed list is not appropriate.
289
+ - [Tag select](../tag-select/COMPONENT.md) — chips, filter input, optional creatable values.
231
290
  - [Dropdown](../dropdown/COMPONENT.md) — action menus, not single form values.
232
291
  - [Modal](../modal/COMPONENT.md) / [Drawer](../drawer/COMPONENT.md) — nested focus and stacking when the select sits inside overlays.
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+
3
+ import { Select } from "@/components/select/Select";
4
+ import { Typography } from "@/components/typography/Typography";
5
+
6
+ import styles from "./examples.module.css";
7
+
8
+ /** Controlled multiselect; mirrors `playground/snippets/select/multiple.tsx` (English labels). */
9
+ export default function SelectPatternMultipleExample() {
10
+ const [value, setValue] = React.useState<string[]>(["eng"]);
11
+
12
+ return (
13
+ <div className={`${styles.stack} ${styles.stackNarrow}`}>
14
+ <Select.Root multiple value={value} onChange={setValue} placeholder="Choose departments">
15
+ <Select.Trigger aria-label="Departments">
16
+ <Select.Value />
17
+ </Select.Trigger>
18
+ <Select.Content>
19
+ <Select.Item value="eng">Engineering</Select.Item>
20
+ <Select.Item value="design">Design</Select.Item>
21
+ <Select.Item value="sales">Sales</Select.Item>
22
+ <Select.Item value="hr">HR</Select.Item>
23
+ </Select.Content>
24
+ </Select.Root>
25
+ <Typography.Root as="p" variant="caption" tone="muted" className={styles.caption}>
26
+ Selected: <code>{value.length ? value.join(", ") : "—"}</code>
27
+ </Typography.Root>
28
+ </div>
29
+ );
30
+ }
@@ -0,0 +1,108 @@
1
+ # Tag select
2
+
3
+ **Default sizing:** when designing screens and examples, start with **`m`** for `size` wherever a size axis exists unless the scenario explicitly needs another value.
4
+
5
+ ## About
6
+
7
+ A multi-select field: selected values appear as removable chips (styled like [Tag](../tag/COMPONENT.md)); typing in the embedded input filters the dropdown list. Options are passed as **`options`** (value, label, optional **`Badge`** **`filled`** color). With **`creatable`**, the user can add a string that is not in the list; **`onCreated`** fires only when a new value is committed via Create / Enter (not when picking from **`options`**).
8
+
9
+ **When to use**
10
+
11
+ - Forms and filters where several labels from a known set are needed (channels, skills, topics) with optional ad-hoc values.
12
+ - Flows that combine chip display, inline filtering, and keyboard navigation in one control.
13
+
14
+ **When not to use**
15
+
16
+ - Exactly one choice from a closed set — prefer [Select](../select/COMPONENT.md).
17
+ - Free text without structured chips — prefer [Input](../input/COMPONENT.md) or [Textarea](../textarea/COMPONENT.md).
18
+ - Read-only tags without editing — prefer [Tag](../tag/COMPONENT.md) alone.
19
+
20
+ ## Composition
21
+
22
+ - **`TagSelect.Root`** — owns **`options`**, **`value`** / **`defaultValue`**, **`onValueChange`**, **`creatable`**, **`onCreated`**, **`placeholder`**, **`hint`**, **`size`** (same [`Select`](../select) size axis as **`Select.Root`**), **`disabled`**, **`hasError`**, **`aria-label`** / **`aria-labelledby`**. Renders the chip row + input, a portaled listbox when open, and optional **`ScrollContainer`** for the option list.
23
+
24
+ ### Canonical example
25
+
26
+ ```tsx
27
+ import * as React from "react";
28
+ import { TagSelect } from "prime-ui-kit";
29
+
30
+ export function Example() {
31
+ const [value, setValue] = React.useState<string[]>(["eng"]);
32
+
33
+ return (
34
+ <TagSelect.Root
35
+ options={[
36
+ { value: "eng", label: "Engineering", color: "blue" },
37
+ { value: "design", label: "Design", color: "purple" },
38
+ { value: "sales", label: "Sales", color: "green" },
39
+ ]}
40
+ value={value}
41
+ onValueChange={setValue}
42
+ placeholder="Add team…"
43
+ aria-label="Teams"
44
+ />
45
+ );
46
+ }
47
+ ```
48
+
49
+ ### Scenarios (`examples/`)
50
+
51
+ | File | Intent |
52
+ |------|--------|
53
+ | [`examples/pattern-canonical.tsx`](./examples/pattern-canonical.tsx) | Controlled multi-select from **`options`** (`prime-ui-kit` import). |
54
+ | [`examples/pattern-features.tsx`](./examples/pattern-features.tsx) | **`creatable`** + filter; mirrors [`playground/snippets/tag-select/features.tsx`](../../../playground/snippets/tag-select/features.tsx). |
55
+
56
+ ### Playground
57
+
58
+ Live demo: **`playground/sections/TagSelectSection.tsx`** — snippet **`playground/snippets/tag-select/features.tsx`**.
59
+
60
+ **LLM note:** Prefer runnable files under **`./examples/*.tsx`** for prop combinations; this page keeps the contract (rules + API) authoritative.
61
+
62
+ ## Rules
63
+
64
+ - **`size`** follows the same **`Select`** control tier as **`Select.Root`**; nested **`Badge`** chips inherit size via **`ControlSizeProvider`**.
65
+ - **`onCreated`** is only invoked when a **new** value is added through creatable flow (Create row or Enter), not when selecting an existing **`options`** row.
66
+ - **`hasPanelContent`** gates the dropdown: if there are no list rows and no create row, the panel closes.
67
+ - Removing the last chip with empty input: **Backspace** removes the last selected value.
68
+ - Name the control with **`aria-label`** or **`aria-labelledby`** when there is no visible [Label](../label/COMPONENT.md).
69
+
70
+ ## API
71
+
72
+ ### TagSelect.Root
73
+
74
+ | Prop | Type | Default | Required | Description |
75
+ |------|------|---------|----------|-------------|
76
+ | options | `TagSelectOption[]` | — | Yes | Options: **`value`**, **`label`**, optional **`color`**, **`disabled`** |
77
+ | value | `string[]` | — | No | Controlled selected values |
78
+ | defaultValue | `string[]` | `[]` | No | Uncontrolled initial selected values |
79
+ | onValueChange | `(next: string[]) => void` | — | No | Called when selection changes |
80
+ | creatable | `boolean` | `false` | No | Allow creating a value not in **`options`** |
81
+ | onCreated | `(value: string) => void` | — | No | When **`creatable`**: fired for newly created values only |
82
+ | defaultTagColor | `BadgeColor` | `"gray"` | No | Chip color for values not in **`options`** |
83
+ | hint | `React.ReactNode` | `"Select an option or create one"` | No | Text above the list |
84
+ | createActionLabel | `string` | `"Create"` | No | Label for the create row |
85
+ | disabled | `boolean` | `false` | No | Disables the field |
86
+ | placeholder | `string` | `""` | No | Input placeholder |
87
+ | hasError | `boolean` | `false` | No | Error styling |
88
+ | size | `SelectSize` | `"m"` | No | Same size axis as **`Select.Root`** |
89
+ | id | `string` | — | No | Root id (listbox and input ids are derived) |
90
+ | className | `string` | — | No | Extra class on the root |
91
+ | aria-label | `string` | — | No | Accessible name |
92
+ | aria-labelledby | `string` | — | No | References label ids |
93
+
94
+ ### TagSelectOption
95
+
96
+ | Field | Type | Required | Description |
97
+ |-------|------|----------|-------------|
98
+ | value | `string` | Yes | Stored in **`value[]`** |
99
+ | label | `string` | Yes | Chip and list row text |
100
+ | color | `BadgeColor` | No | **`Badge`** **`filled`** color in the list |
101
+ | disabled | `boolean` | No | Option not selectable |
102
+
103
+ ## Related
104
+
105
+ - [Select](../select/COMPONENT.md)
106
+ - [Tag](../tag/COMPONENT.md)
107
+ - [Badge](../badge/COMPONENT.md)
108
+ - [ScrollContainer](../scroll-container/ScrollContainer.tsx) (internal list)
@@ -0,0 +1,14 @@
1
+ .stackNarrow {
2
+ width: 100%;
3
+ max-width: calc(var(--prime-sys-unit-1rem) * 22);
4
+ }
5
+
6
+ .stack {
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: var(--prime-sys-spacing-s);
10
+ }
11
+
12
+ .caption {
13
+ margin: 0;
14
+ }
@@ -0,0 +1,28 @@
1
+ import { TagSelect, Typography } from "prime-ui-kit";
2
+ import * as React from "react";
3
+
4
+ import styles from "./examples.module.css";
5
+
6
+ /** Controlled multi-select from `options`; `prime-ui-kit` import for published consumers. */
7
+ export default function TagSelectPatternCanonicalExample() {
8
+ const [value, setValue] = React.useState<string[]>(["eng"]);
9
+
10
+ return (
11
+ <div className={`${styles.stack} ${styles.stackNarrow}`}>
12
+ <TagSelect.Root
13
+ options={[
14
+ { value: "eng", label: "Engineering", color: "blue" },
15
+ { value: "design", label: "Design", color: "purple" },
16
+ { value: "sales", label: "Sales", color: "green" },
17
+ ]}
18
+ value={value}
19
+ onValueChange={setValue}
20
+ placeholder="Add team…"
21
+ aria-label="Teams"
22
+ />
23
+ <Typography.Root as="p" variant="caption" tone="muted" className={styles.caption}>
24
+ Selected: <code>{value.join(", ") || "—"}</code>
25
+ </Typography.Root>
26
+ </div>
27
+ );
28
+ }
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+
3
+ import { TagSelect } from "@/components/tag-select/TagSelect";
4
+ import { Typography } from "@/components/typography/Typography";
5
+
6
+ import styles from "./examples.module.css";
7
+
8
+ /** `creatable` + filter; mirrors `playground/snippets/tag-select/features.tsx`. */
9
+ export default function TagSelectPatternFeaturesExample() {
10
+ const [value, setValue] = React.useState<string[]>([]);
11
+
12
+ return (
13
+ <div className={`${styles.stack} ${styles.stackNarrow}`}>
14
+ <TagSelect.Root
15
+ options={[
16
+ { value: "telegram", label: "telegram", color: "blue" },
17
+ { value: "whatsapp", label: "whatsapp", color: "green" },
18
+ { value: "facebook", label: "facebook", color: "purple" },
19
+ { value: "viber", label: "viber", color: "pink" },
20
+ ]}
21
+ value={value}
22
+ onValueChange={setValue}
23
+ creatable
24
+ placeholder="Channel…"
25
+ aria-label="Contact channels"
26
+ />
27
+ <Typography.Root as="p" variant="caption" tone="muted" className={styles.caption}>
28
+ Type to filter; add a new channel if it is not in the list.
29
+ </Typography.Root>
30
+ </div>
31
+ );
32
+ }
@@ -293,7 +293,7 @@
293
293
  --prime-sys-size-modal-paddingX: var(--prime-sys-spacing-xl);
294
294
  --prime-sys-size-modal-paddingY: var(--prime-sys-spacing-xl);
295
295
  --prime-sys-size-modal-radius: var(--prime-sys-shape-radius-4xl);
296
- --prime-sys-size-modal-titleGap: var(--prime-sys-spacing-s);
296
+ --prime-sys-size-modal-titleGap: var(--prime-sys-spacing-x1);
297
297
  --prime-sys-size-switch-l-thumb: var(--prime-ref-icon-m);
298
298
  --prime-sys-size-switch-l-trackHeight: 1.25rem;
299
299
  --prime-sys-size-switch-l-trackWidth: 2.25rem;
@@ -294,7 +294,7 @@
294
294
  --prime-sys-size-modal-paddingX: var(--prime-sys-spacing-xl);
295
295
  --prime-sys-size-modal-paddingY: var(--prime-sys-spacing-xl);
296
296
  --prime-sys-size-modal-radius: var(--prime-sys-shape-radius-4xl);
297
- --prime-sys-size-modal-titleGap: var(--prime-sys-spacing-s);
297
+ --prime-sys-size-modal-titleGap: var(--prime-sys-spacing-x1);
298
298
  --prime-sys-size-switch-l-thumb: var(--prime-ref-icon-m);
299
299
  --prime-sys-size-switch-l-trackHeight: 1.25rem;
300
300
  --prime-sys-size-switch-l-trackWidth: 2.25rem;