viewkitjs 0.30.0 → 0.31.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +30 -6
  2. package/package.json +4 -2
  3. package/views/dist/controls/avatar/avatar.d.ts +10 -4
  4. package/views/dist/controls/avatar/avatar.js +5 -3
  5. package/views/dist/controls/avatar/tokens.d.ts +60 -0
  6. package/views/dist/controls/avatar/tokens.js +15 -0
  7. package/views/dist/controls/avatar.css +29 -15
  8. package/views/dist/controls/button/map-button.d.ts +5 -3
  9. package/views/dist/controls/button/map-button.js +14 -7
  10. package/views/dist/controls/index.d.ts +3 -2
  11. package/views/dist/controls/index.js +2 -1
  12. package/views/dist/controls/input/input.d.ts +12 -1
  13. package/views/dist/controls/input/input.js +7 -6
  14. package/views/dist/controls/input/save-mark.d.ts +8 -0
  15. package/views/dist/controls/input/save-mark.js +26 -0
  16. package/views/dist/controls/input/tokens.d.ts +16 -0
  17. package/views/dist/controls/input/tokens.js +4 -0
  18. package/views/dist/controls/input.css +18 -0
  19. package/views/dist/controls/radio/radio.d.ts +7 -0
  20. package/views/dist/controls/radio/radio.js +8 -4
  21. package/views/dist/controls/radio/tokens.d.ts +40 -0
  22. package/views/dist/controls/radio/tokens.js +10 -0
  23. package/views/dist/controls/radio.css +52 -3
  24. package/views/dist/controls/select/select.d.ts +8 -2
  25. package/views/dist/controls/select/select.js +6 -4
  26. package/views/dist/controls/setting-row/looks.d.ts +10 -0
  27. package/views/dist/controls/setting-row/looks.js +17 -0
  28. package/views/dist/controls/setting-row/setting-row.d.ts +65 -0
  29. package/views/dist/controls/setting-row/setting-row.js +66 -0
  30. package/views/dist/controls/setting-row/tokens.d.ts +84 -0
  31. package/views/dist/controls/setting-row/tokens.js +23 -0
  32. package/views/dist/controls/setting-row.css +94 -0
  33. package/views/dist/controls/switch-row/switch-row.d.ts +1 -15
  34. package/views/dist/controls/switch-row/switch-row.js +1 -9
  35. package/views/dist/controls/tokens.js +2 -0
  36. package/views/dist/looks/index.d.ts +1 -0
  37. package/views/dist/looks/index.js +1 -0
  38. package/views/dist/looks/pieces.js +2 -0
  39. package/views/dist/panels/react/views-row/FoldingViewRow.js +3 -4
  40. package/views/dist/styles.css +182 -19
  41. package/views/dist/styles.unlayered.css +182 -19
  42. package/views/docs/controls/avatar.md +15 -0
  43. package/views/docs/controls/input.md +8 -0
  44. package/views/docs/controls/radio.md +18 -0
  45. package/views/docs/controls/select.md +4 -0
  46. package/views/docs/controls/setting-row.md +26 -0
  47. package/views/docs/reference/controls.md +27 -10
  48. package/views/docs/reference/looks.md +3 -0
@@ -0,0 +1,84 @@
1
+ export declare const SETTING_ROW_TOKENS: readonly [{
2
+ readonly name: "--vk-border";
3
+ readonly kind: "colour";
4
+ readonly outright: "--border";
5
+ }, {
6
+ readonly name: "--vk-border-subtle";
7
+ readonly kind: "colour";
8
+ readonly outright: "--border-subtle";
9
+ }, {
10
+ readonly name: "--vk-border-danger";
11
+ readonly kind: "colour";
12
+ readonly outright: "--border-danger";
13
+ }, {
14
+ readonly name: "--vk-hovered";
15
+ readonly kind: "colour";
16
+ readonly outright: "--surface-hovered";
17
+ }, {
18
+ readonly name: "--vk-raised";
19
+ readonly kind: "colour";
20
+ readonly outright: "--surface-raised";
21
+ }, {
22
+ readonly name: "--vk-danger";
23
+ readonly kind: "colour";
24
+ readonly outright: "--text-danger";
25
+ }, {
26
+ readonly name: "--vk-fg-subtle";
27
+ readonly kind: "colour";
28
+ readonly outright: "--text-subtle";
29
+ }, {
30
+ readonly name: "--vk-fg-subtlest";
31
+ readonly kind: "colour";
32
+ readonly outright: "--text-subtlest";
33
+ }, {
34
+ readonly name: "--vk-border-width";
35
+ readonly kind: "size";
36
+ readonly outright: "--border-width";
37
+ }, {
38
+ readonly name: "--vk-corner-smoothing";
39
+ readonly kind: "size";
40
+ readonly outright: "--corner-smoothing";
41
+ }, {
42
+ readonly name: "--vk-font-size-sm";
43
+ readonly kind: "size";
44
+ readonly outright: "--text-sm";
45
+ }, {
46
+ readonly name: "--vk-font-size-xs";
47
+ readonly kind: "size";
48
+ readonly outright: "--text-xs";
49
+ }, {
50
+ readonly name: "--vk-font-weight-medium";
51
+ readonly kind: "size";
52
+ readonly outright: "--font-weight-medium";
53
+ }, {
54
+ readonly name: "--vk-line-height-sm";
55
+ readonly kind: "size";
56
+ readonly outright: "--text-sm--line-height";
57
+ }, {
58
+ readonly name: "--vk-line-height-xs";
59
+ readonly kind: "size";
60
+ readonly outright: "--text-xs--line-height";
61
+ }, {
62
+ readonly name: "--vk-radius-lg";
63
+ readonly kind: "size";
64
+ readonly outright: "--radius-lg";
65
+ }, {
66
+ readonly name: "--vk-radius-md";
67
+ readonly kind: "size";
68
+ readonly outright: "--radius-md";
69
+ }, {
70
+ readonly name: "--vk-spacing";
71
+ readonly kind: "size";
72
+ readonly outright: "--spacing";
73
+ }, {
74
+ readonly name: "--vk-duration-fast";
75
+ readonly kind: "motion";
76
+ readonly outright: "--duration-fast";
77
+ }, {
78
+ readonly name: "--vk-ease-out";
79
+ readonly kind: "motion";
80
+ readonly outright: "--ease-out";
81
+ }];
82
+ /** The card's own machinery: its edge and ground by the card picked, its rows' room by the rows picked, the size its smooth
83
+ * corner is fitted to. */
84
+ export declare const SETTING_ROW_PRIVATE: readonly ["--setting-rows-"];
@@ -0,0 +1,23 @@
1
+ export const SETTING_ROW_TOKENS = [
2
+ { name: "--vk-border", kind: "colour", outright: "--border" },
3
+ { name: "--vk-border-subtle", kind: "colour", outright: "--border-subtle" },
4
+ { name: "--vk-border-danger", kind: "colour", outright: "--border-danger" },
5
+ { name: "--vk-hovered", kind: "colour", outright: "--surface-hovered" },
6
+ { name: "--vk-raised", kind: "colour", outright: "--surface-raised" },
7
+ { name: "--vk-danger", kind: "colour", outright: "--text-danger" },
8
+ { name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
9
+ { name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
10
+ { name: "--vk-border-width", kind: "size", outright: "--border-width" },
11
+ { name: "--vk-corner-smoothing", kind: "size", outright: "--corner-smoothing" },
12
+ { name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
13
+ { name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
14
+ { name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
15
+ { name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
16
+ { name: "--vk-line-height-xs", kind: "size", outright: "--text-xs--line-height" },
17
+ { name: "--vk-radius-lg", kind: "size", outright: "--radius-lg" },
18
+ { name: "--vk-radius-md", kind: "size", outright: "--radius-md" },
19
+ { name: "--vk-spacing", kind: "size", outright: "--spacing" },
20
+ { name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
21
+ { name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
22
+ ];
23
+ export const SETTING_ROW_PRIVATE = ["--setting-rows-"];
@@ -0,0 +1,94 @@
1
+ /* The setting row and its card, as the Outright kit draws them (setting-row/setting-row.tsx): one setting as a row, its words
2
+ (choice.css) on the left, its control at its end (the Switch, the Select, a Button, or its value and ›), its mark or icon at
3
+ its start; the rows in a card, a line between each; the danger zone's card with a red edge; a lone row bare. Two options, each
4
+ a computer's, picked on the frame or the app around it (looks.ts): the card (outlined, the default, or raised on its ground)
5
+ and the rows (snug, the default, or roomy, 64 tall). Nothing picked draws exactly as SwitchRows did (switch-row.css), which a
6
+ Switch reads a row under the pointer as its own hover by (switch.css: .o-switch-row). On a phone the card and its rows are
7
+ Field rows' (field.css), and this sheet adds only what a setting puts in them: the name taking the room, the value cut with
8
+ …, ›, a danger name in red.
9
+
10
+ The rules sit in the components layer, so a utility class on a row still wins. */
11
+ @layer components {
12
+
13
+ /* ── The options: each value sets the card's or the rows' own names, read below ─────────────────────────────────────── */
14
+ :where([data-setting-row-card="raised"]) .o-setting-rows { --setting-rows-edge: var(--vk-border-subtle); --setting-rows-ground: var(--vk-raised); }
15
+ :where([data-setting-row-rows="roomy"]) :is(.o-setting-rows, .o-setting-row) {
16
+ --setting-rows-pad: calc(var(--vk-spacing) * 3) calc(var(--vk-spacing) * 4.5); --setting-rows-height: calc(var(--vk-spacing) * 16);
17
+ --setting-rows-side: calc(var(--vk-spacing) * 16);
18
+ }
19
+ .o-setting-rows.o-setting-rows-danger { --setting-rows-edge: var(--vk-border-danger); }
20
+
21
+ /* ── The card, on a computer: the rows in a box, a line between each ───────────────────────────────────────────────── */
22
+ .o-setting-rows:not(.o-field-rows) {
23
+ display: grid; border: var(--vk-border-width) solid var(--setting-rows-edge, var(--vk-border)); border-radius: var(--vk-radius-lg); overflow: hidden;
24
+ background-color: var(--setting-rows-ground, transparent);
25
+ }
26
+
27
+ /* ── A row, on a computer: its start, its words, its end ───────────────────────────────────────────────────────────── */
28
+ .o-setting-row:not(.o-field-row) {
29
+ display: flex; align-items: center; justify-content: space-between; gap: calc(var(--vk-spacing) * 4); box-sizing: border-box;
30
+ min-height: var(--setting-rows-height, auto); margin: 0; padding: var(--setting-rows-pad, calc(var(--vk-spacing) * 3.5) calc(var(--vk-spacing) * 4));
31
+ border: 0; border-top: var(--vk-border-width) solid var(--vk-border-subtle);
32
+ -webkit-tap-highlight-color: transparent; transition: background-color var(--vk-duration-fast) var(--vk-ease-out);
33
+ }
34
+ .o-setting-row:not(.o-field-row):first-child { border-top: 0; }
35
+ .o-setting-row:not(.o-field-row) > .o-choice-text { flex: 1 1 auto; }
36
+ .o-setting-row:not(.o-field-row) .o-choice-label { font-weight: var(--vk-font-weight-medium); }
37
+ /* The rows that are a press as a whole: the switch's (a label) and the one opening its page (a button). */
38
+ button.o-setting-row { width: 100%; font: inherit; color: inherit; text-align: left; background-color: transparent; }
39
+ .o-setting-row:is([data-setting-row-kind="switch"], [data-setting-row-kind="open"]):not(.o-field-row) { cursor: pointer; }
40
+ @media (hover: hover) { .o-setting-row:is([data-setting-row-kind="switch"], [data-setting-row-kind="open"]):not(.o-field-row):hover { background-color: var(--vk-hovered); } }
41
+ .o-setting-row:not(.o-field-row):is([data-locked], :has(.o-switch[data-disabled])) { cursor: not-allowed; background-color: transparent; }
42
+
43
+ /* Its start: a mark as given; an icon in its box. */
44
+ .o-setting-row > :not(.o-choice-text) { flex: none; }
45
+ .o-setting-row-icon {
46
+ display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: calc(var(--vk-spacing) * 8); height: calc(var(--vk-spacing) * 8);
47
+ border: var(--vk-border-width) solid var(--vk-border-subtle); border-radius: var(--vk-radius-md); background-color: var(--vk-raised); color: var(--vk-fg-subtle);
48
+ }
49
+ .o-setting-row-icon > svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
50
+
51
+ /* Its end: the reason, then the control; the Select 220 wide; the value and ›. */
52
+ .o-setting-row-end { display: flex; align-items: center; gap: calc(var(--vk-spacing) * 2); margin-left: auto; min-width: 0; }
53
+ .o-setting-row-select { width: calc(var(--vk-spacing) * 55); }
54
+ .o-setting-row-select .o-select-field { width: 100%; }
55
+ .o-setting-row-reason { font-size: var(--vk-font-size-xs); line-height: calc(var(--vk-font-size-xs) * var(--vk-line-height-xs)); color: var(--vk-fg-subtlest); }
56
+ .o-setting-row-reason + .o-switch { margin-left: calc(var(--vk-spacing) * -2); }
57
+ .o-setting-row-value { font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); color: var(--vk-fg-subtle); }
58
+ .o-setting-row-chevron { flex: none; width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); color: var(--vk-fg-subtlest); }
59
+ /* Locked: its control greyed (a switch keeps its own locked state), its words as they are. */
60
+ .o-setting-row[data-locked] :is(.o-setting-row-select, .o-button, .o-setting-row-value, .o-setting-row-chevron) { opacity: 0.45; }
61
+
62
+ /* A lone row: bare, no card, no line, no room round it. */
63
+ .o-setting-row[data-alone]:not(.o-field-row) { min-height: 0; padding: 0; border-top: 0; background-color: transparent; }
64
+
65
+ /* ── On a phone: Field rows' card and rows; a setting's words, value and › in them ─────────────────────────────────── */
66
+ .o-setting-row.o-field-row > .o-choice-text { flex: 1 1 auto; }
67
+ .o-setting-row-press {
68
+ display: flex; flex: 1 1 auto; align-items: center; gap: calc(var(--vk-spacing) * 3); align-self: stretch; min-width: 0; margin: 0; padding: 0;
69
+ border: 0; font: inherit; color: inherit; text-align: left; background-color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
70
+ }
71
+ .o-setting-row.o-field-row .o-setting-row-end { flex: 0 1 auto; }
72
+ .o-setting-row.o-field-row .o-setting-row-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: inherit; line-height: inherit; }
73
+ .o-setting-rows-danger.o-field-rows .o-choice-label { color: var(--vk-danger); }
74
+
75
+ @media (prefers-reduced-motion: reduce) { .o-setting-row { transition: none; } }
76
+
77
+ /* ── The card's corners smooth: following the token corner-smoothing, drawn with the smooth outline (smooth.css) in every
78
+ browser that knows shape(); one that doesn't keeps the corners above. Its round part is fitted to its smallest row, as a
79
+ control's is. Nothing stands outside it (its rows were hidden past its edge), so it is clipped itself, its rows with it; its
80
+ edge is a ring along the curve over its rows (::after), in the card's edge colour. ── */
81
+ @supports (clip-path: shape(evenodd from 0 0, curve by 1px 1px with 1px 0 / 1px 0, close, move to 0 0, hline to 1px, close)) and (width: calc(tan(atan2(1px, 1px)) * 1px)) {
82
+ .o-setting-rows:not(.o-field-rows) {
83
+ --smooth-amount: var(--vk-corner-smoothing);
84
+ --setting-rows-fit: min(var(--vk-radius-lg), var(--setting-rows-side, calc(var(--vk-spacing) * 7 + var(--vk-font-size-sm) * var(--vk-line-height-sm))) / (2 + 2 * var(--smooth-amount, 0.7)));
85
+ --smooth-t: var(--setting-rows-fit); --smooth-side: var(--setting-rows-side, calc(var(--vk-spacing) * 7 + var(--vk-font-size-sm) * var(--vk-line-height-sm)));
86
+ position: relative; overflow: visible; border-color: transparent; border-radius: var(--setting-rows-fit); clip-path: shape(var(--smooth-outline));
87
+ }
88
+ .o-setting-rows:not(.o-field-rows)::after {
89
+ --smooth-t: max(0px, var(--setting-rows-fit) - var(--vk-border-width)); --smooth-in: var(--vk-border-width);
90
+ content: ""; position: absolute; inset: calc(var(--vk-border-width) * -1); z-index: 1; pointer-events: none;
91
+ background-color: var(--setting-rows-edge, var(--vk-border)); clip-path: shape(var(--smooth-ring));
92
+ }
93
+ }
94
+ }
@@ -1,15 +1 @@
1
- import * as React from "react";
2
- import { type SwitchProps } from "../switch/switch.js";
3
- export interface SwitchRowProps extends SwitchProps {
4
- /** The setting's name ("Daily summary"), not the action. */
5
- label: React.ReactNode;
6
- /** A line under it: what it does, or why it is locked. */
7
- note?: React.ReactNode;
8
- }
9
- /** A setting in a settings list: its name and a line on the left, the switch on the right; the whole row presses it. */
10
- export declare function SwitchRow({ label, note, ...props }: SwitchRowProps): import("react/jsx-runtime").JSX.Element;
11
- /** Settings rows in a bordered box, a line between each. */
12
- export declare function SwitchRows({ className, children }: {
13
- className?: string;
14
- children: React.ReactNode;
15
- }): import("react/jsx-runtime").JSX.Element;
1
+ export { SwitchRow, SwitchRows, type SwitchRowProps } from "../setting-row/setting-row.js";
@@ -1,9 +1 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from "../../internal/cx.js";
3
- import { Switch } from "../switch/switch.js";
4
- export function SwitchRow({ label, note, ...props }) {
5
- return (_jsxs("label", { className: "o-switch-row", children: [_jsxs("span", { className: "o-choice-text", children: [_jsx("span", { className: "o-choice-label", children: label }), note != null && _jsx("span", { className: "o-choice-note", children: note })] }), _jsx(Switch, { ...props })] }));
6
- }
7
- export function SwitchRows({ className, children }) {
8
- return _jsx("div", { className: cx("o-switch-rows o-smooth o-smooth-ease", className), children: children });
9
- }
1
+ export { SwitchRow, SwitchRows } from "../setting-row/setting-row.js";
@@ -51,6 +51,7 @@ import { LINKS_EDITOR_PRIVATE, LINKS_EDITOR_TOKENS } from "./links-editor/tokens
51
51
  import { PRESS_PRIVATE, PRESS_TOKENS } from "./press/tokens.js";
52
52
  import { CHOICE_PRIVATE, CHOICE_TOKENS } from "./choice/tokens.js";
53
53
  import { TAG_FIELD_PRIVATE, TAG_FIELD_TOKENS } from "./tag-field/tokens.js";
54
+ import { SETTING_ROW_PRIVATE, SETTING_ROW_TOKENS } from "./setting-row/tokens.js";
54
55
  import { SWITCH_ROW_PRIVATE, SWITCH_ROW_TOKENS } from "./switch-row/tokens.js";
55
56
  const CONTROLS_OWN = {
56
57
  button: { tokens: BUTTON_TOKENS, private: BUTTON_PRIVATE },
@@ -107,6 +108,7 @@ const CONTROLS_OWN = {
107
108
  choice: { tokens: CHOICE_TOKENS, private: CHOICE_PRIVATE },
108
109
  "tag-field": { tokens: TAG_FIELD_TOKENS, private: TAG_FIELD_PRIVATE },
109
110
  "switch-row": { tokens: SWITCH_ROW_TOKENS, private: SWITCH_ROW_PRIVATE },
111
+ "setting-row": { tokens: SETTING_ROW_TOKENS, private: SETTING_ROW_PRIVATE },
110
112
  };
111
113
  export const VK_CONTROL_TOKENS_BY_PIECE = Object.fromEntries(Object.entries(CONTROLS_OWN).map(([piece, own]) => [piece, own.tokens]));
112
114
  export const VK_CONTROL_TOKENS = Object.entries(VK_CONTROL_TOKENS_BY_PIECE)
@@ -21,6 +21,7 @@ export { TOGGLE_LOOKS, type ToggleLookOptionId } from "../controls/toggle/looks.
21
21
  export { OPTION_LOOKS, optionColours, type OptionColour, type OptionLookOptionId } from "../controls/option/looks.js";
22
22
  export { STATUS_LOOKS, type StatusLookOptionId } from "../controls/status/looks.js";
23
23
  export { SWITCH_LOOKS, type SwitchLookOptionId } from "../controls/switch/looks.js";
24
+ export { SETTING_ROW_LOOKS, type SettingRowOptionId, type SettingRowPicks } from "../controls/setting-row/looks.js";
24
25
  export { TAG_LOOKS, type TagLookOptionId } from "../controls/tag/looks.js";
25
26
  export { MENU_LIST_LOOKS, type MenuListLookOptionId } from "../controls/menu-list/looks.js";
26
27
  export { LIST_LOOKS, type ListOptionId } from "../controls/list/looks.js";
@@ -17,6 +17,7 @@ export { TOGGLE_LOOKS } from "../controls/toggle/looks.js";
17
17
  export { OPTION_LOOKS, optionColours } from "../controls/option/looks.js";
18
18
  export { STATUS_LOOKS } from "../controls/status/looks.js";
19
19
  export { SWITCH_LOOKS } from "../controls/switch/looks.js";
20
+ export { SETTING_ROW_LOOKS } from "../controls/setting-row/looks.js";
20
21
  export { TAG_LOOKS } from "../controls/tag/looks.js";
21
22
  export { MENU_LIST_LOOKS } from "../controls/menu-list/looks.js";
22
23
  export { LIST_LOOKS } from "../controls/list/looks.js";
@@ -15,6 +15,7 @@ import { TOGGLE_LOOKS } from "../controls/toggle/looks.js";
15
15
  import { OPTION_LOOKS } from "../controls/option/looks.js";
16
16
  import { STATUS_LOOKS } from "../controls/status/looks.js";
17
17
  import { SWITCH_LOOKS } from "../controls/switch/looks.js";
18
+ import { SETTING_ROW_LOOKS } from "../controls/setting-row/looks.js";
18
19
  import { TAG_LOOKS } from "../controls/tag/looks.js";
19
20
  import { MENU_LIST_LOOKS } from "../controls/menu-list/looks.js";
20
21
  import { AVATAR_LOOKS } from "../controls/avatar/looks.js";
@@ -55,6 +56,7 @@ export const LOOKS = [
55
56
  TAG_LOOKS,
56
57
  STATUS_LOOKS,
57
58
  SWITCH_LOOKS,
59
+ SETTING_ROW_LOOKS,
58
60
  MENU_LIST_LOOKS,
59
61
  LIST_LOOKS,
60
62
  PICKER_LOOKS,
@@ -94,12 +94,11 @@ export function FoldingViewRow({ axis, folded: told }) {
94
94
  variant: "ghost",
95
95
  size: "sm",
96
96
  "data-slot": "vk-views-more",
97
- children: _jsx(MoreChipInner, { count: 99 }),
97
+ children: moreChipInner(views, 99),
98
98
  }) })), axis.onCreate && (_jsx("span", { "data-measure-ghost": true, children: _jsx(ViewCreatePill, { label: axis.createLabel, onClick: () => { } }) }))] }) }))] }));
99
99
  }
100
100
  const MORE_CHIP_FRAME = "h-8 shrink-0 gap-0.5 whitespace-nowrap px-2.5";
101
- function MoreChipInner({ count }) {
102
- const { conventions, icons } = useViews();
101
+ function moreChipInner({ conventions, icons }, count) {
103
102
  const Chevron = icons.chevronDown;
104
103
  return (_jsxs(_Fragment, { children: ["+", formatCount(count, conventions), _jsx(Chevron, { className: "h-3.5 w-3.5 shrink-0 opacity-70" })] }));
105
104
  }
@@ -126,7 +125,7 @@ function FoldedViews({ axis, options, }) {
126
125
  "data-state": toggle.open ? "open" : "closed",
127
126
  onPointerDown: toggle.triggerProps.onPointerDown,
128
127
  onClick: toggle.triggerProps.onClick,
129
- children: _jsx(MoreChipInner, { count: options.length }),
128
+ children: moreChipInner(views, options.length),
130
129
  } })), _jsx(Popover, { open: toggle.open, onOpenChange: toggle.onOpenChange, anchor: anchor, align: "start", sideOffset: 6, chrome: "menu", className: "w-64", children: _jsx("div", { role: "listbox", "aria-label": messages({ key: "views.panels.views-more-list" }), className: VIEWS_LIST_CLASS, children: options.map((option) => (_jsx(ViewPickerRow, { option: option, active: option.value === axis.value, hideCounts: axis.hideCounts, onSelect: () => {
131
130
  axis.onChange(option.value);
132
131
  toggle.close();