@nxgt/material 3.54.0 → 3.56.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 (132) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +8 -3
  3. package/dist/{async-slice-DDSsekfm.js → async-slice-CORlM_wu.js} +2 -2
  4. package/dist/{button-Ct8DSLVv.js → button-CdpVEza0.js} +1 -1
  5. package/dist/charts.js +3 -3
  6. package/dist/{chip-BzoNsd-W.js → chip-C0yNYz9m.js} +2 -2
  7. package/dist/{code-editor-DsLQeiZc.js → code-editor-Bwzp2038.js} +6 -6
  8. package/dist/code-editor.js +5 -5
  9. package/dist/{code-language-items-4zXlIEZ0.js → code-language-items-nP-pF7yH.js} +2 -2
  10. package/dist/components/components.css +8 -0
  11. package/dist/components/ui/display/seat-ring/seat-ring-index.css +125 -0
  12. package/dist/components/ui/display/seat-ring/seat-ring-ring.css +87 -0
  13. package/dist/components/ui/display/seat-ring/seat-ring.css +139 -0
  14. package/dist/components/ui/display/secret-card/secret-card.css +65 -0
  15. package/dist/components/ui/display/vote-tally/vote-tally.css +94 -0
  16. package/dist/{components-DFG2mgsM.js → components-Dl2hVfzt.js} +16273 -15482
  17. package/dist/components.js +26 -26
  18. package/dist/{dialog-DwPmwmA3.js → dialog-BVgsN9Ch.js} +4 -4
  19. package/dist/dnd.js +1 -1
  20. package/dist/{dropdown-menu-CDN6Nqx6.js → dropdown-menu-C8PBmMIa.js} +1 -1
  21. package/dist/editor.js +9 -9
  22. package/dist/{empty-state-Bb9W9did.js → empty-state-C5wfbbW9.js} +2 -2
  23. package/dist/{escape-owner-DI_lg2ID.js → escape-owner-CYnfySUl.js} +1 -1
  24. package/dist/{field-blur-BcJH8H9B.js → field-blur-Nid7-bt_.js} +1 -1
  25. package/dist/{field-blur-context-Dg1nwWOV.js → field-blur-context-DxdIuHAY.js} +1 -1
  26. package/dist/hooks.js +28 -28
  27. package/dist/{hover-card-Qse4gnop.js → hover-card-C_9jiwp1.js} +2 -2
  28. package/dist/{i18n-provider-DlVPS58N.js → i18n-provider-CLVZK6tQ.js} +1 -1
  29. package/dist/i18n.js +5 -5
  30. package/dist/{icon-badge-DVPBQOKe.js → icon-badge-Dcjg_SKJ.js} +3 -3
  31. package/dist/{icon-button-C3wDxsh6.js → icon-button-Bo-VuZ2n.js} +1 -1
  32. package/dist/lib/components/ui/actions/link/link.d.ts +8 -0
  33. package/dist/lib/components/ui/collections/data-table/partials/data-table-page-control.d.ts +1 -1
  34. package/dist/lib/components/ui/collections/data-table/partials/data-table-row.d.ts +1 -1
  35. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-card.d.ts +1 -1
  36. package/dist/lib/components/ui/collections/server-table/partials/server-table-past-end.d.ts +1 -1
  37. package/dist/lib/components/ui/display/index.d.ts +3 -0
  38. package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +1 -1
  39. package/dist/lib/components/ui/display/period-cards/period-cards.d.ts +1 -1
  40. package/dist/lib/components/ui/display/seat-ring/index.d.ts +2 -0
  41. package/dist/lib/components/ui/display/seat-ring/partials/empty-seat.d.ts +5 -0
  42. package/dist/lib/components/ui/display/seat-ring/partials/seat-body.d.ts +9 -0
  43. package/dist/lib/components/ui/display/seat-ring/partials/seat-item.d.ts +17 -0
  44. package/dist/lib/components/ui/display/seat-ring/seat-ring.d.ts +9 -0
  45. package/dist/lib/components/ui/display/seat-ring/seat-ring.utils.d.ts +9 -0
  46. package/dist/lib/components/ui/display/seat-ring/types.d.ts +67 -0
  47. package/dist/lib/components/ui/display/seat-ring/use-seat-ring.d.ts +12 -0
  48. package/dist/lib/components/ui/display/secret-card/index.d.ts +2 -0
  49. package/dist/lib/components/ui/display/secret-card/secret-card.d.ts +11 -0
  50. package/dist/lib/components/ui/display/secret-card/types.d.ts +49 -0
  51. package/dist/lib/components/ui/display/secret-card/use-secret-card.d.ts +20 -0
  52. package/dist/lib/components/ui/display/vote-tally/announcer.d.ts +11 -0
  53. package/dist/lib/components/ui/display/vote-tally/index.d.ts +2 -0
  54. package/dist/lib/components/ui/display/vote-tally/partials/tally-bar.d.ts +8 -0
  55. package/dist/lib/components/ui/display/vote-tally/partials/tally-row.d.ts +9 -0
  56. package/dist/lib/components/ui/display/vote-tally/partials/tally-voters.d.ts +9 -0
  57. package/dist/lib/components/ui/display/vote-tally/types.d.ts +73 -0
  58. package/dist/lib/components/ui/display/vote-tally/use-announcement.d.ts +7 -0
  59. package/dist/lib/components/ui/display/vote-tally/use-tally-summary.d.ts +3 -0
  60. package/dist/lib/components/ui/display/vote-tally/vote-tally.d.ts +10 -0
  61. package/dist/lib/components/ui/display/vote-tally/vote-tally.utils.d.ts +18 -0
  62. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  63. package/dist/lib/components/ui/layout/account-menu/account-menu.d.ts +1 -1
  64. package/dist/lib/components/ui/layout/app-shell/app-sidebar-icon-item.d.ts +1 -1
  65. package/dist/lib/components/ui/layout/app-shell/app-sidebar-label-item.d.ts +1 -1
  66. package/dist/lib/components/ui/layout/app-shell/app-sidebar.d.ts +1 -1
  67. package/dist/lib/components/ui/layout/pager/pager.d.ts +1 -1
  68. package/dist/lib/components/ui/layout/see-also/see-also.d.ts +1 -1
  69. package/dist/lib/components/ui/layout/toc/toc.d.ts +1 -1
  70. package/dist/lib/components/ui/primitives/index.d.ts +1 -0
  71. package/dist/lib/components/ui/primitives/link/index.d.ts +2 -0
  72. package/dist/lib/components/ui/primitives/link/link-component-provider.d.ts +26 -0
  73. package/dist/lib/components/ui/widgets/education/index.d.ts +1 -0
  74. package/dist/lib/components/ui/widgets/education/navigator/index.d.ts +2 -0
  75. package/dist/lib/components/ui/widgets/education/navigator/partials/navigator-item.d.ts +10 -0
  76. package/dist/lib/components/ui/widgets/education/navigator/question-navigator.d.ts +27 -0
  77. package/dist/lib/components/ui/widgets/education/questions/index.d.ts +1 -1
  78. package/dist/lib/components/ui/widgets/education/questions/partials/question-media.d.ts +5 -0
  79. package/dist/lib/components/ui/widgets/education/questions/partials/question-verdict.d.ts +12 -0
  80. package/dist/lib/components/ui/widgets/education/questions/question-options.d.ts +2 -2
  81. package/dist/lib/components/ui/widgets/education/questions/question-text.d.ts +1 -1
  82. package/dist/lib/components/ui/widgets/education/questions/question.d.ts +1 -1
  83. package/dist/lib/components/ui/widgets/education/questions/types.d.ts +33 -1
  84. package/dist/lib/hooks/index.d.ts +1 -0
  85. package/dist/lib/hooks/use-countdown.d.ts +18 -0
  86. package/dist/lib/i18n/resources/en/en.d.ts +34 -0
  87. package/dist/lib/i18n/resources/en/material.json.d.ts +34 -0
  88. package/dist/lib/i18n/resources/fr/fr.d.ts +34 -0
  89. package/dist/lib/i18n/resources/fr/material.json.d.ts +34 -0
  90. package/dist/lib/i18n/resources/resources.d.ts +68 -0
  91. package/dist/lib/i18n/translator.d.ts +1 -1
  92. package/dist/lib.js +1 -1
  93. package/dist/main.js +43 -43
  94. package/dist/map.js +8 -8
  95. package/dist/material.css +1 -1
  96. package/dist/pdf-reader.js +1 -1
  97. package/dist/print.js +2 -2
  98. package/dist/{public-BoVE0ffh.js → public-BtKAthSs.js} +9 -9
  99. package/dist/{rich-code-block-DAUM7Yh_.js → rich-code-block-BZYZ6ewr.js} +5 -5
  100. package/dist/{sortable-provider-BLXsGE_0.js → sortable-provider-hUCwt69K.js} +2 -2
  101. package/dist/{spinner-Rg4PnBPH.js → spinner-BmUXTzvJ.js} +1 -1
  102. package/dist/{stored-language-B1lJMPbR.js → stored-language-_OGPBCn0.js} +64 -0
  103. package/dist/theme-picker.js +2 -2
  104. package/dist/{theme-toggle-jVdxF_mc.js → theme-toggle-DdvEafno.js} +1 -1
  105. package/dist/{toolbar-items-BFY_hns5.js → toolbar-items-DKfY_6AG.js} +4 -4
  106. package/dist/{translate-material-q-JNxP1m.js → translate-material-DzBMPErh.js} +2 -2
  107. package/dist/{translator-BU1o3_l9.js → translator-BIVSiq4X.js} +1 -1
  108. package/dist/{use-chat-composer-DGbDuIUa.js → use-chat-composer-DCQW2EJ8.js} +16 -16
  109. package/dist/{use-heading-spy-CP63sAcS.js → use-heading-spy-Cr2C_Px8.js} +32 -5
  110. package/dist/{use-material-translation-nNF8fUXz.js → use-material-translation-C_bAxfvp.js} +2 -2
  111. package/docs/components/README.md +1 -1
  112. package/docs/components/buttons-and-actions.md +1 -0
  113. package/docs/components/data-display.md +212 -2
  114. package/docs/components/data-table-filter-and-lists.md +3 -3
  115. package/docs/components/feedback-and-status.md +5 -3
  116. package/docs/components/navigation-and-layout.md +4 -4
  117. package/docs/components/primitives.md +62 -0
  118. package/docs/components/rich-widgets.md +51 -0
  119. package/docs/components/selection-and-choice.md +1 -1
  120. package/docs/guides/app-shell.md +2 -2
  121. package/docs/guides/helpers.md +40 -0
  122. package/docs/previews/data-display-seatring.webp +0 -0
  123. package/docs/previews/data-display-secretcard.webp +0 -0
  124. package/docs/previews/data-display-votetally.webp +0 -0
  125. package/lib/components/components.css +8 -0
  126. package/lib/components/ui/display/seat-ring/seat-ring-index.css +125 -0
  127. package/lib/components/ui/display/seat-ring/seat-ring-ring.css +87 -0
  128. package/lib/components/ui/display/seat-ring/seat-ring.css +139 -0
  129. package/lib/components/ui/display/secret-card/secret-card.css +65 -0
  130. package/lib/components/ui/display/vote-tally/vote-tally.css +94 -0
  131. package/package.json +1 -1
  132. package/dist/lib/components/ui/feedback/countdown-timer/use-countdown.d.ts +0 -6
@@ -0,0 +1,125 @@
1
+ /* SeatRing: the seat count `--n` and the seat's index `--i`, from data
2
+ * attributes, for the circle's trigonometry (seat-ring-ring.css). Server
3
+ * markup carries no `style`. Up to 10 seats (RING_LIMIT); more is a grid. */
4
+ @layer components {
5
+ .nxgt-seat-ring[data-count="1"] {
6
+ --n: 1;
7
+ }
8
+ .nxgt-seat-ring[data-count="2"] {
9
+ --n: 2;
10
+ }
11
+ .nxgt-seat-ring[data-count="3"] {
12
+ --n: 3;
13
+ }
14
+ .nxgt-seat-ring[data-count="4"] {
15
+ --n: 4;
16
+ }
17
+ .nxgt-seat-ring[data-count="5"] {
18
+ --n: 5;
19
+ }
20
+ .nxgt-seat-ring[data-count="6"] {
21
+ --n: 6;
22
+ }
23
+ .nxgt-seat-ring[data-count="7"] {
24
+ --n: 7;
25
+ }
26
+ .nxgt-seat-ring[data-count="8"] {
27
+ --n: 8;
28
+ }
29
+ .nxgt-seat-ring[data-count="9"] {
30
+ --n: 9;
31
+ }
32
+ .nxgt-seat-ring[data-count="10"] {
33
+ --n: 10;
34
+ }
35
+ .nxgt-seat-ring[data-count="11"] {
36
+ --n: 11;
37
+ }
38
+ .nxgt-seat-ring[data-count="12"] {
39
+ --n: 12;
40
+ }
41
+ .nxgt-seat-ring[data-count="13"] {
42
+ --n: 13;
43
+ }
44
+ .nxgt-seat-ring[data-count="14"] {
45
+ --n: 14;
46
+ }
47
+ .nxgt-seat-ring[data-count="15"] {
48
+ --n: 15;
49
+ }
50
+ .nxgt-seat-ring[data-count="16"] {
51
+ --n: 16;
52
+ }
53
+ .nxgt-seat-ring[data-count="17"] {
54
+ --n: 17;
55
+ }
56
+ .nxgt-seat-ring[data-count="18"] {
57
+ --n: 18;
58
+ }
59
+ .nxgt-seat-ring[data-count="19"] {
60
+ --n: 19;
61
+ }
62
+ .nxgt-seat-ring[data-count="20"] {
63
+ --n: 20;
64
+ }
65
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="0"] {
66
+ --i: 0;
67
+ }
68
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="1"] {
69
+ --i: 1;
70
+ }
71
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="2"] {
72
+ --i: 2;
73
+ }
74
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="3"] {
75
+ --i: 3;
76
+ }
77
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="4"] {
78
+ --i: 4;
79
+ }
80
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="5"] {
81
+ --i: 5;
82
+ }
83
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="6"] {
84
+ --i: 6;
85
+ }
86
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="7"] {
87
+ --i: 7;
88
+ }
89
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="8"] {
90
+ --i: 8;
91
+ }
92
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="9"] {
93
+ --i: 9;
94
+ }
95
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="10"] {
96
+ --i: 10;
97
+ }
98
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="11"] {
99
+ --i: 11;
100
+ }
101
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="12"] {
102
+ --i: 12;
103
+ }
104
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="13"] {
105
+ --i: 13;
106
+ }
107
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="14"] {
108
+ --i: 14;
109
+ }
110
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="15"] {
111
+ --i: 15;
112
+ }
113
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="16"] {
114
+ --i: 16;
115
+ }
116
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="17"] {
117
+ --i: 17;
118
+ }
119
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="18"] {
120
+ --i: 18;
121
+ }
122
+ .nxgt-seat-ring [data-slot="seat-ring-seat"][data-index="19"] {
123
+ --i: 19;
124
+ }
125
+ }
@@ -0,0 +1,87 @@
1
+ /* SeatRing's circle: CSS trigonometry on `--i`, `--n` (seat-ring-index.css)
2
+ * and `--seat-dir` (-1 in a right-to-left box, so the ring is mirrored). The
3
+ * three container queries only switch `--ring-k` on the orbit once the box
4
+ * fits the seat size (32rem small, 38rem medium, 46rem large); every rule
5
+ * below reads it, as 0 (the grid of seat-ring.css) or 1 (the circle), so the
6
+ * circle's rules are written once. */
7
+ @layer components {
8
+ @container seat-ring (min-width: 32rem) {
9
+ .nxgt-seat-ring[data-layout="ring"][data-size="sm"]
10
+ [data-slot="seat-ring-orbit"] {
11
+ --ring-k: 1;
12
+ --ring-abs: absolute;
13
+ --ring-block: block;
14
+ --ring-ratio: 1;
15
+ --ring-margin: auto;
16
+ --ring-size: min(
17
+ 100%,
18
+ max(calc(var(--seat) * 3.2), calc(var(--seat) * (var(--n) * 0.6 + 1))),
19
+ 56rem
20
+ );
21
+ --ring-w: var(--seat);
22
+ }
23
+ }
24
+ @container seat-ring (min-width: 38rem) {
25
+ .nxgt-seat-ring[data-layout="ring"][data-size="md"]
26
+ [data-slot="seat-ring-orbit"] {
27
+ --ring-k: 1;
28
+ --ring-abs: absolute;
29
+ --ring-block: block;
30
+ --ring-ratio: 1;
31
+ --ring-margin: auto;
32
+ --ring-size: min(
33
+ 100%,
34
+ max(calc(var(--seat) * 3.2), calc(var(--seat) * (var(--n) * 0.6 + 1))),
35
+ 56rem
36
+ );
37
+ --ring-w: var(--seat);
38
+ }
39
+ }
40
+ @container seat-ring (min-width: 46rem) {
41
+ .nxgt-seat-ring[data-layout="ring"][data-size="lg"]
42
+ [data-slot="seat-ring-orbit"] {
43
+ --ring-k: 1;
44
+ --ring-abs: absolute;
45
+ --ring-block: block;
46
+ --ring-ratio: 1;
47
+ --ring-margin: auto;
48
+ --ring-size: min(
49
+ 100%,
50
+ max(calc(var(--seat) * 3.2), calc(var(--seat) * (var(--n) * 0.6 + 1))),
51
+ 56rem
52
+ );
53
+ --ring-w: var(--seat);
54
+ }
55
+ }
56
+
57
+ .nxgt-seat-ring [data-slot="seat-ring-orbit"] {
58
+ position: relative;
59
+ display: var(--ring-block, flex);
60
+ inline-size: var(--ring-size, auto);
61
+ aspect-ratio: var(--ring-ratio, auto);
62
+ margin-inline: var(--ring-margin, 0);
63
+ }
64
+ .nxgt-seat-ring [data-slot="seat-ring-list"] {
65
+ position: var(--ring-abs, static);
66
+ inset: 0;
67
+ }
68
+ .nxgt-seat-ring [data-slot="seat-ring-seat"] {
69
+ --a: calc(360deg * var(--i, 0) / var(--n, 1));
70
+ position: var(--ring-abs, relative);
71
+ inline-size: var(--ring-w, auto);
72
+ left: calc(
73
+ var(--ring-k, 0) *
74
+ (50% + (50% - var(--seat) / 2) * sin(var(--a)) * var(--seat-dir))
75
+ );
76
+ top: calc(
77
+ var(--ring-k, 0) *
78
+ (50% - (50% - var(--seat) / 2) * cos(var(--a)))
79
+ );
80
+ translate: calc(var(--ring-k, 0) * -50%) calc(var(--ring-k, 0) * -50%);
81
+ }
82
+ .nxgt-seat-ring [data-slot="seat-ring-center"] {
83
+ position: var(--ring-abs, static);
84
+ /* The square inside the circle of seats: the orbit's radius less a seat and a half. */
85
+ inset: calc(50% - 0.5 * max(0px, 50% - 1.1 * var(--seat)));
86
+ }
87
+ }
@@ -0,0 +1,139 @@
1
+ /* SeatRing: seats as a grid of cards, or on a circle when the box is wide
2
+ * enough. The component is a size container, so the switch follows its own
3
+ * width (a column, a dialog, a phone), never the window. The ring is pure CSS
4
+ * (trigonometry on `--i`, the seat's index, and `--n`, their count, both set by
5
+ * the attribute rules below, so server markup carries no `style`). It holds up
6
+ * to 10 seats (RING_LIMIT); more is a grid. Selected: the primary tint, a
7
+ * border and a check mark, so colour is never the only cue. */
8
+ @layer components {
9
+ .nxgt-seat-ring {
10
+ --seat: 6rem;
11
+ --seat-avatar: 2.5rem;
12
+ --seat-dir: 1;
13
+ container: seat-ring / inline-size;
14
+ }
15
+ .nxgt-seat-ring:dir(rtl) {
16
+ --seat-dir: -1;
17
+ }
18
+ .nxgt-seat-ring[data-size="sm"] {
19
+ --seat: 4.75rem;
20
+ --seat-avatar: 2rem;
21
+ }
22
+ .nxgt-seat-ring[data-size="lg"] {
23
+ --seat: 8rem;
24
+ --seat-avatar: 3.5rem;
25
+ }
26
+
27
+ .nxgt-seat-ring [data-slot="seat-ring-orbit"] {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 0.75rem;
31
+ }
32
+ .nxgt-seat-ring [data-slot="seat-ring-center"] {
33
+ order: -1;
34
+ display: grid;
35
+ place-items: center;
36
+ text-align: center;
37
+ }
38
+ .nxgt-seat-ring [data-slot="seat-ring-list"] {
39
+ display: grid;
40
+ grid-template-columns: repeat(
41
+ auto-fill,
42
+ minmax(min(var(--seat), 100%), 1fr)
43
+ );
44
+ gap: 0.5rem;
45
+ margin: 0;
46
+ padding: 0;
47
+ list-style: none;
48
+ }
49
+ @container seat-ring (max-width: 30rem) {
50
+ .nxgt-seat-ring [data-slot="seat-ring-list"] {
51
+ grid-template-columns: repeat(2, minmax(0, 1fr));
52
+ }
53
+ }
54
+
55
+ .nxgt-seat-ring [data-slot="seat-ring-seat"] {
56
+ position: relative;
57
+ display: flex;
58
+ flex-direction: column;
59
+ align-items: center;
60
+ gap: 0.25rem;
61
+ min-inline-size: 0;
62
+ min-block-size: 2.75rem;
63
+ padding: 0.5rem 0.375rem;
64
+ border: 1px solid var(--border);
65
+ border-radius: var(--radius-lg, 0.75rem);
66
+ background: var(--card, var(--background));
67
+ color: var(--foreground);
68
+ text-align: center;
69
+ transition:
70
+ background-color 150ms,
71
+ border-color 150ms;
72
+ }
73
+ .nxgt-seat-ring [data-slot="seat-ring-label"] {
74
+ max-inline-size: 100%;
75
+ overflow-wrap: anywhere;
76
+ font-size: 0.875rem;
77
+ font-weight: 500;
78
+ line-height: 1.25;
79
+ }
80
+ .nxgt-seat-ring [data-slot="seat-ring-badge"] {
81
+ position: absolute;
82
+ inset-block-start: -0.5rem;
83
+ inset-inline-end: 0.25rem;
84
+ }
85
+ .nxgt-seat-ring [data-slot="seat-ring-mark"] {
86
+ position: absolute;
87
+ inset-block-start: 0.25rem;
88
+ inset-inline-start: 0.25rem;
89
+ display: grid;
90
+ inline-size: 1rem;
91
+ block-size: 1rem;
92
+ color: var(--primary-text, var(--primary));
93
+ }
94
+ .nxgt-seat-ring [data-slot="seat-ring-empty-circle"] {
95
+ inline-size: var(--seat-avatar);
96
+ block-size: var(--seat-avatar);
97
+ border: 2px dashed var(--border);
98
+ border-radius: 9999px;
99
+ }
100
+ .nxgt-seat-ring [data-empty] {
101
+ border-style: dashed;
102
+ background: transparent;
103
+ }
104
+ .nxgt-seat-ring [data-highlighted] {
105
+ border-color: var(--primary-indicator, var(--primary));
106
+ box-shadow: 0 0 0 2px var(--primary-indicator, var(--primary));
107
+ }
108
+ .nxgt-seat-ring [role="option"]:not([aria-disabled="true"]) {
109
+ cursor: pointer;
110
+ }
111
+ .nxgt-seat-ring [role="option"]:not([aria-disabled="true"]):hover {
112
+ background: color-mix(
113
+ in oklab,
114
+ var(--primary-text, var(--primary)) 8%,
115
+ var(--card, var(--background))
116
+ );
117
+ }
118
+ .nxgt-seat-ring [role="option"][aria-selected="true"] {
119
+ border-color: var(--primary-text, var(--primary));
120
+ background: color-mix(
121
+ in oklab,
122
+ var(--primary-text, var(--primary)) 12%,
123
+ var(--card, var(--background))
124
+ );
125
+ }
126
+ .nxgt-seat-ring [role="option"][aria-disabled="true"],
127
+ .nxgt-seat-ring [aria-disabled="true"] {
128
+ opacity: 0.6;
129
+ }
130
+ .nxgt-seat-ring [role="option"]:focus-visible {
131
+ outline: 2px solid var(--ring);
132
+ outline-offset: 2px;
133
+ }
134
+ @media (prefers-reduced-motion: reduce) {
135
+ .nxgt-seat-ring [data-slot="seat-ring-seat"] {
136
+ transition: none;
137
+ }
138
+ }
139
+ }
@@ -0,0 +1,65 @@
1
+ /* SecretCard: a card whose secret face is not rendered until it is revealed.
2
+ * It carries `data-tone`, so the tone's tokens resolve on it. The hidden face
3
+ * is a quiet diagonal pattern in the tone's ring colour. The card's border is
4
+ * that colour too (set by a utility class on the Card, which wins over the
5
+ * Card's own). A change flips the face in, never on mount, and only when the person has not asked for reduced motion. The card is
6
+ * full width up to a reading width and keeps the reveal button a 44px target
7
+ * on a phone. */
8
+ @layer components {
9
+ .nxgt-secret-card {
10
+ width: 100%;
11
+ max-width: 28rem;
12
+ margin-inline: auto;
13
+ --secret-card-line: var(--nxgt-tone-ring, var(--border));
14
+ border-color: var(--secret-card-line);
15
+ perspective: 60rem;
16
+ }
17
+ .nxgt-secret-card [data-slot="secret-card-title"] {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: 0.5rem;
21
+ color: var(--nxgt-tone-text, inherit);
22
+ }
23
+ .nxgt-secret-card [data-slot="secret-card-pattern"] {
24
+ min-height: 6rem;
25
+ border-radius: 0.5rem;
26
+ border: 1px dashed var(--secret-card-line);
27
+ background-image: repeating-linear-gradient(
28
+ 45deg,
29
+ color-mix(in oklab, var(--secret-card-line) 25%, transparent) 0 0.5rem,
30
+ transparent 0.5rem 1rem
31
+ );
32
+ }
33
+ .nxgt-secret-card [data-slot="secret-card-back"] {
34
+ min-height: 6rem;
35
+ display: grid;
36
+ place-items: center;
37
+ text-align: center;
38
+ overflow-wrap: anywhere;
39
+ font-size: 1.25rem;
40
+ font-weight: 600;
41
+ user-select: text;
42
+ }
43
+ .nxgt-secret-card [data-slot="secret-card-actions"] {
44
+ flex-wrap: wrap;
45
+ gap: 0.5rem;
46
+ }
47
+ .nxgt-secret-card [data-slot="secret-card-actions"] > button {
48
+ min-height: 44px;
49
+ }
50
+ @media (prefers-reduced-motion: no-preference) {
51
+ .nxgt-secret-card [data-slot="secret-card-face"][data-changed] {
52
+ animation: nxgt-secret-flip 0.35s ease-out;
53
+ }
54
+ }
55
+ @keyframes nxgt-secret-flip {
56
+ from {
57
+ opacity: 0;
58
+ transform: rotateY(90deg);
59
+ }
60
+ to {
61
+ opacity: 1;
62
+ transform: rotateY(0);
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,94 @@
1
+ /* VoteTally: ranked rows, label and "n votes, x%" as text, a decorative bar
2
+ * beneath. The bar is an SVG whose rect width is an attribute (no `style`,
3
+ * strict CSP). Leader and tie take the primary fill and a word; the others a
4
+ * quieter one. Layout is one column at any width: the stat wraps under the
5
+ * label on a phone, the bar keeps its own line, so counts changing never move
6
+ * a row. Bars ease only without reduced motion. */
7
+ @layer components {
8
+ .nxgt-vote-tally {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 0.75rem;
12
+ min-inline-size: 0;
13
+ }
14
+ .nxgt-vote-tally [data-slot="vote-tally-list"] {
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 0.875rem;
18
+ margin: 0;
19
+ padding: 0;
20
+ list-style: none;
21
+ }
22
+ .nxgt-vote-tally [data-slot="vote-tally-row"] {
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: 0.375rem;
26
+ min-inline-size: 0;
27
+ }
28
+ .nxgt-vote-tally [data-slot="vote-tally-head"] {
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ align-items: baseline;
32
+ justify-content: space-between;
33
+ column-gap: 0.75rem;
34
+ row-gap: 0.125rem;
35
+ }
36
+ .nxgt-vote-tally [data-slot="vote-tally-name"] {
37
+ display: inline-flex;
38
+ flex-wrap: wrap;
39
+ align-items: center;
40
+ gap: 0.375rem 0.5rem;
41
+ min-inline-size: 0;
42
+ font-weight: 500;
43
+ overflow-wrap: anywhere;
44
+ }
45
+ .nxgt-vote-tally [data-slot="vote-tally-marks"] {
46
+ display: inline-flex;
47
+ flex-wrap: wrap;
48
+ gap: 0.25rem;
49
+ }
50
+ .nxgt-vote-tally [data-slot="vote-tally-stat"] {
51
+ color: var(--muted-foreground);
52
+ font-size: 0.875rem;
53
+ font-variant-numeric: tabular-nums;
54
+ white-space: nowrap;
55
+ }
56
+ .nxgt-vote-tally [data-slot="vote-tally-bar"] {
57
+ display: block;
58
+ block-size: 0.625rem;
59
+ overflow: hidden;
60
+ border-radius: 9999px;
61
+ background: var(--muted);
62
+ }
63
+ .nxgt-vote-tally [data-slot="vote-tally-bar"] svg {
64
+ display: block;
65
+ inline-size: 100%;
66
+ block-size: 100%;
67
+ }
68
+ .nxgt-vote-tally:dir(rtl) [data-slot="vote-tally-bar"] svg {
69
+ transform: scaleX(-1);
70
+ }
71
+ .nxgt-vote-tally [data-slot="vote-tally-fill"] {
72
+ fill: color-mix(in oklab, var(--muted-foreground) 70%, var(--background));
73
+ }
74
+ .nxgt-vote-tally [data-leader] [data-slot="vote-tally-fill"],
75
+ .nxgt-vote-tally [data-selected] [data-slot="vote-tally-fill"] {
76
+ fill: var(--primary-indicator, var(--primary));
77
+ }
78
+ .nxgt-vote-tally [data-slot="vote-tally-voters"] {
79
+ margin: 0;
80
+ color: var(--muted-foreground);
81
+ font-size: 0.8125rem;
82
+ }
83
+ .nxgt-vote-tally [data-slot="vote-tally-empty"],
84
+ .nxgt-vote-tally [data-slot="vote-tally-abstain"] {
85
+ margin: 0;
86
+ color: var(--muted-foreground);
87
+ font-size: 0.875rem;
88
+ }
89
+ @media (prefers-reduced-motion: no-preference) {
90
+ .nxgt-vote-tally[data-animated] [data-slot="vote-tally-fill"] {
91
+ transition: width 400ms cubic-bezier(0.2, 0, 0, 1);
92
+ }
93
+ }
94
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.54.0",
3
+ "version": "3.56.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -1,6 +0,0 @@
1
- /**
2
- * Seconds left of `duration`, ticking on the client only (the server and the
3
- * first render show the full time). Pausing keeps what is left; a new
4
- * `duration` starts over. `onExpire` runs once, when it reaches zero.
5
- */
6
- export declare function useCountdown(duration: number, paused: boolean, onExpire?: () => void): number;