plass-ui 1.0.0 → 1.0.2

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 (165) hide show
  1. package/README.md +165 -0
  2. package/dist/components/accordion/PlAccordion.js +1 -131
  3. package/dist/components/accordion/index.js +1 -1
  4. package/dist/components/alert/PlAlert.js +1 -109
  5. package/dist/components/alert/index.js +1 -1
  6. package/dist/components/animate-appear/PlAnimateAppear.js +1 -71
  7. package/dist/components/animate-appear/index.js +1 -1
  8. package/dist/components/animate-blink/PlAnimateBlink.js +1 -47
  9. package/dist/components/animate-blink/index.js +1 -1
  10. package/dist/components/animate-fade/PlAnimateFade.js +1 -48
  11. package/dist/components/animate-fade/index.js +1 -1
  12. package/dist/components/animate-grow/PlAnimateGrow.js +1 -49
  13. package/dist/components/animate-grow/index.js +1 -1
  14. package/dist/components/animate-headline/PlAnimateHeadline.js +1 -120
  15. package/dist/components/animate-headline/index.js +1 -1
  16. package/dist/components/animate-lighting/PlAnimateLighting.js +1 -65
  17. package/dist/components/animate-lighting/index.js +1 -1
  18. package/dist/components/animate-marquee/PlAnimateMarquee.js +1 -94
  19. package/dist/components/animate-marquee/index.js +1 -1
  20. package/dist/components/animate-rotate/PlAnimateRotate.js +1 -50
  21. package/dist/components/animate-rotate/index.js +1 -1
  22. package/dist/components/animate-slide/PlAnimateSlide.js +1 -49
  23. package/dist/components/animate-slide/index.js +1 -1
  24. package/dist/components/animate-typing/PlAnimateTyping.js +1 -177
  25. package/dist/components/animate-typing/index.js +1 -1
  26. package/dist/components/animate-zoom/PlAnimateZoom.js +1 -45
  27. package/dist/components/animate-zoom/index.js +1 -1
  28. package/dist/components/aspect-ratio/PlAspectRatio.js +1 -58
  29. package/dist/components/aspect-ratio/index.js +1 -1
  30. package/dist/components/avatar/PlAvatar.js +1 -121
  31. package/dist/components/avatar/index.js +1 -1
  32. package/dist/components/badge/PlBadge.js +1 -168
  33. package/dist/components/badge/index.js +1 -1
  34. package/dist/components/blockquote/PlBlockquote.js +1 -112
  35. package/dist/components/blockquote/index.js +1 -1
  36. package/dist/components/bottom-navigation/PlBottomNavigation.js +1 -141
  37. package/dist/components/bottom-navigation/index.js +1 -1
  38. package/dist/components/box/PlBox.js +1 -46
  39. package/dist/components/box/index.js +1 -1
  40. package/dist/components/breadcrumb/PlBreadcrumb.js +1 -201
  41. package/dist/components/breadcrumb/index.js +1 -1
  42. package/dist/components/button/PlButton.js +1 -196
  43. package/dist/components/button/index.js +1 -1
  44. package/dist/components/button-group/PlButtonGroup.js +1 -64
  45. package/dist/components/button-group/index.js +1 -1
  46. package/dist/components/card/PlCard.js +1 -102
  47. package/dist/components/card/index.js +1 -1
  48. package/dist/components/carousel/PlCarousel.js +1 -177
  49. package/dist/components/carousel/index.js +1 -1
  50. package/dist/components/chat-bubble/PlChatBubble.js +1 -206
  51. package/dist/components/chat-bubble/index.js +1 -1
  52. package/dist/components/checkbox/PlCheckbox.js +1 -100
  53. package/dist/components/checkbox/index.js +1 -1
  54. package/dist/components/chip/PlChip.js +1 -144
  55. package/dist/components/chip/index.js +1 -1
  56. package/dist/components/collapsible/PlCollapsible.js +1 -65
  57. package/dist/components/collapsible/index.js +1 -1
  58. package/dist/components/combobox/PlCombobox.js +1 -199
  59. package/dist/components/combobox/index.js +1 -1
  60. package/dist/components/container/PlContainer.js +1 -47
  61. package/dist/components/container/index.js +1 -1
  62. package/dist/components/date-picker/PlDatePicker.js +1 -87
  63. package/dist/components/date-picker/index.js +1 -1
  64. package/dist/components/date-range-picker/PlDateRangePicker.js +1 -152
  65. package/dist/components/date-range-picker/index.js +1 -1
  66. package/dist/components/date-time-picker/PlDateTimePicker.js +1 -106
  67. package/dist/components/date-time-picker/index.js +1 -1
  68. package/dist/components/divider/PlDivider.js +1 -107
  69. package/dist/components/divider/index.js +1 -1
  70. package/dist/components/drawer/PlDrawer.js +1 -190
  71. package/dist/components/drawer/index.js +1 -1
  72. package/dist/components/file-picker/PlFilePicker.js +1 -274
  73. package/dist/components/file-picker/index.js +1 -1
  74. package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -291
  75. package/dist/components/floating-bottom-navigation/index.js +1 -1
  76. package/dist/components/grid/PlGrid.js +1 -51
  77. package/dist/components/grid/PlGridItem.js +1 -34
  78. package/dist/components/grid/index.js +1 -2
  79. package/dist/components/highlight/PlHighlight.js +1 -185
  80. package/dist/components/highlight/index.js +1 -1
  81. package/dist/components/hot-keys/PlHotKeys.js +1 -294
  82. package/dist/components/hot-keys/index.js +1 -1
  83. package/dist/components/icon/PlIcon.js +1 -58
  84. package/dist/components/icon/index.js +1 -1
  85. package/dist/components/icon-button/PlIconButton.js +1 -37
  86. package/dist/components/icon-button/index.js +1 -1
  87. package/dist/components/list/PlList.js +1 -160
  88. package/dist/components/list/index.js +1 -1
  89. package/dist/components/menu/PlMenu.js +1 -209
  90. package/dist/components/menu/index.js +1 -1
  91. package/dist/components/modal/PlModal.js +1 -150
  92. package/dist/components/modal/index.js +1 -1
  93. package/dist/components/number-field/PlNumberField.js +1 -111
  94. package/dist/components/number-field/index.js +1 -1
  95. package/dist/components/otp-field/PlOtpField.js +1 -109
  96. package/dist/components/otp-field/index.js +1 -1
  97. package/dist/components/overlay/PlOverlay.js +1 -77
  98. package/dist/components/overlay/index.js +1 -1
  99. package/dist/components/pagination/PlPagination.js +1 -159
  100. package/dist/components/pagination/index.js +1 -1
  101. package/dist/components/panes/PlPanes.js +1 -324
  102. package/dist/components/panes/index.js +1 -1
  103. package/dist/components/pill/PlPill.js +1 -154
  104. package/dist/components/pill/index.js +1 -1
  105. package/dist/components/popover/PlPopover.js +1 -113
  106. package/dist/components/popover/index.js +1 -1
  107. package/dist/components/progress-box/PlProgressBox.js +1 -34
  108. package/dist/components/progress-box/index.js +1 -1
  109. package/dist/components/progress-circular/PlProgressCircular.js +1 -47
  110. package/dist/components/progress-circular/index.js +1 -1
  111. package/dist/components/progress-linear/PlProgressLinear.js +1 -40
  112. package/dist/components/progress-linear/index.js +1 -1
  113. package/dist/components/radio-group/PlRadioGroup.js +1 -99
  114. package/dist/components/radio-group/index.js +1 -1
  115. package/dist/components/rating/PlRating.js +1 -101
  116. package/dist/components/rating/index.js +1 -1
  117. package/dist/components/scroll-zone/PlScrollZone.js +1 -411
  118. package/dist/components/scroll-zone/index.js +1 -1
  119. package/dist/components/segmented-button/PlSegmentedButton.js +1 -206
  120. package/dist/components/segmented-button/index.js +1 -1
  121. package/dist/components/select/PlSelect.js +1 -115
  122. package/dist/components/select/index.js +1 -1
  123. package/dist/components/skeleton/PlSkeleton.js +1 -142
  124. package/dist/components/skeleton/index.js +1 -1
  125. package/dist/components/slider/PlSlider.js +1 -132
  126. package/dist/components/slider/index.js +1 -1
  127. package/dist/components/spoiler/PlSpoiler.js +1 -74
  128. package/dist/components/spoiler/index.js +1 -1
  129. package/dist/components/switch/PlSwitch.js +1 -131
  130. package/dist/components/switch/index.js +1 -1
  131. package/dist/components/table/PlTable.js +1 -210
  132. package/dist/components/table/index.js +1 -1
  133. package/dist/components/tabs/PlTabs.js +1 -182
  134. package/dist/components/tabs/index.js +1 -1
  135. package/dist/components/text-field/PlTextField.js +1 -126
  136. package/dist/components/text-field/index.js +1 -1
  137. package/dist/components/text-link/PlTextLink.js +1 -136
  138. package/dist/components/text-link/index.js +1 -1
  139. package/dist/components/time-picker/PlTimePicker.js +1 -97
  140. package/dist/components/time-picker/index.js +1 -1
  141. package/dist/components/timeline/PlTimeline.js +1 -207
  142. package/dist/components/timeline/index.js +1 -1
  143. package/dist/components/toast/PlToast.js +1 -174
  144. package/dist/components/toast/index.js +1 -1
  145. package/dist/components/toolbar/PlToolbar.js +1 -65
  146. package/dist/components/toolbar/index.js +1 -1
  147. package/dist/components/tooltip/PlTooltip.js +1 -117
  148. package/dist/components/tooltip/index.js +1 -1
  149. package/dist/components/typography/PlTypography.js +1 -143
  150. package/dist/components/typography/index.js +1 -1
  151. package/dist/index.js +1 -75
  152. package/dist/internal/animate.js +1 -318
  153. package/dist/internal/button-group.js +2 -19
  154. package/dist/internal/calendar.js +1 -501
  155. package/dist/internal/date.js +1 -353
  156. package/dist/internal/format.js +1 -41
  157. package/dist/internal/grid.js +1 -143
  158. package/dist/internal/icons.js +1 -138
  159. package/dist/internal/menu.js +1 -18
  160. package/dist/internal/picker.js +1 -139
  161. package/dist/internal/progress.js +1 -167
  162. package/dist/internal/sizer.js +1 -35
  163. package/dist/internal/styles.js +1 -636
  164. package/dist/types.js +0 -8
  165. package/package.json +5 -3
@@ -1,294 +1 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { controlHeightClasses, controlSlots, controlTextClasses, glassClasses, paddingXClasses, radiusClasses, srOnlyClasses, transitionClasses } from '../../internal/styles.js';
4
- const word = (text) => ({ symbol: text, name: text });
5
- /**
6
- * One entry per key that is spelled differently somewhere, keyed by the token
7
- * with its case and spaces taken off.
8
- *
9
- * The aliases are deliberate and not generosity: `Cmd`, `Command` and `Meta` are
10
- * three names one key already has, and a component that accepted only one of
11
- * them would be a component every caller has to look up.
12
- *
13
- * `Mod` is the entry the rest exist for. It is the only token whose *meaning*
14
- * changes with the platform rather than just its spelling — the modifier a
15
- * shortcut is actually built on, which is Command on a Mac and Control
16
- * everywhere else. Writing `Ctrl` and hoping is what makes a documentation page
17
- * wrong for half its readers.
18
- */
19
- const keyLabels = {
20
- mod: {
21
- mac: { symbol: '⌘', name: 'Command' },
22
- windows: word('Ctrl'),
23
- linux: word('Ctrl')
24
- },
25
- meta: {
26
- mac: { symbol: '⌘', name: 'Command' },
27
- windows: word('Win'),
28
- linux: word('Super')
29
- },
30
- ctrl: {
31
- mac: { symbol: '⌃', name: 'Control' },
32
- windows: word('Ctrl'),
33
- linux: word('Ctrl')
34
- },
35
- alt: {
36
- mac: { symbol: '⌥', name: 'Option' },
37
- windows: word('Alt'),
38
- linux: word('Alt')
39
- },
40
- shift: {
41
- mac: { symbol: '⇧', name: 'Shift' },
42
- windows: word('Shift'),
43
- linux: word('Shift')
44
- },
45
- enter: {
46
- mac: { symbol: '↩', name: 'Enter' },
47
- windows: word('Enter'),
48
- linux: word('Enter')
49
- },
50
- tab: {
51
- mac: { symbol: '⇥', name: 'Tab' },
52
- windows: word('Tab'),
53
- linux: word('Tab')
54
- },
55
- escape: {
56
- mac: { symbol: '⎋', name: 'Escape' },
57
- windows: word('Esc'),
58
- linux: word('Esc')
59
- },
60
- backspace: {
61
- mac: { symbol: '⌫', name: 'Backspace' },
62
- windows: word('Backspace'),
63
- linux: word('Backspace')
64
- },
65
- delete: {
66
- mac: { symbol: '⌦', name: 'Delete' },
67
- windows: word('Del'),
68
- linux: word('Del')
69
- },
70
- capslock: {
71
- mac: { symbol: '⇪', name: 'Caps Lock' },
72
- windows: word('Caps Lock'),
73
- linux: word('Caps Lock')
74
- }
75
- };
76
- /** The tokens that name one key by more than one word. */
77
- const keyAliases = {
78
- cmdorctrl: 'mod',
79
- commandorcontrol: 'mod',
80
- cmd: 'meta',
81
- command: 'meta',
82
- super: 'meta',
83
- win: 'meta',
84
- windows: 'meta',
85
- control: 'ctrl',
86
- option: 'alt',
87
- opt: 'alt',
88
- return: 'enter',
89
- esc: 'escape',
90
- del: 'delete',
91
- caps: 'capslock'
92
- };
93
- /**
94
- * The keys drawn as arrows on every platform, not just on a Mac. An arrow is not
95
- * a Mac convention — it is what is printed on the key.
96
- */
97
- const arrowLabels = {
98
- up: { symbol: '↑', name: 'Arrow up' },
99
- down: { symbol: '↓', name: 'Arrow down' },
100
- left: { symbol: '←', name: 'Arrow left' },
101
- right: { symbol: '→', name: 'Arrow right' },
102
- arrowup: { symbol: '↑', name: 'Arrow up' },
103
- arrowdown: { symbol: '↓', name: 'Arrow down' },
104
- arrowleft: { symbol: '←', name: 'Arrow left' },
105
- arrowright: { symbol: '→', name: 'Arrow right' }
106
- };
107
- /** Resolves one token into what to draw and what to announce. */
108
- function labelFor(token, os) {
109
- const normalized = token.toLowerCase().replace(/[\s_-]/g, '');
110
- const canonical = keyAliases[normalized] ?? normalized;
111
- const arrow = arrowLabels[canonical];
112
- if (arrow) {
113
- return arrow;
114
- }
115
- const known = keyLabels[canonical];
116
- if (known) {
117
- return known[os];
118
- }
119
- // Everything else is printed as it was written, with the one courtesy that a
120
- // single letter is capitalised: `keys="mod+k"` should draw a K, because that
121
- // is what is on the key.
122
- return word(token.length === 1 ? token.toUpperCase() : token);
123
- }
124
- /**
125
- * Splits the string form. Empty segments are what `'Ctrl++'` leaves behind, and
126
- * dropping them is why the array form exists for that case.
127
- */
128
- function tokenize(keys) {
129
- if (Array.isArray(keys)) {
130
- return keys.map((key) => key.trim()).filter(Boolean);
131
- }
132
- return keys
133
- .split('+')
134
- .map((key) => key.trim())
135
- .filter(Boolean);
136
- }
137
- /**
138
- * What the browser says it is running on.
139
- *
140
- * `userAgentData.platform` is the modern spelling and `navigator.platform` the
141
- * deprecated one that every browser still answers; the user agent string is the
142
- * last resort. All three are matched at once because the question here is coarse
143
- * — which of three key caps to print — and getting it slightly wrong is a label,
144
- * not a bug.
145
- */
146
- function detectOS() {
147
- if (typeof navigator === 'undefined') {
148
- return 'windows';
149
- }
150
- const data = navigator.userAgentData;
151
- const haystack = `${data?.platform ?? ''} ${navigator.platform ?? ''} ${navigator.userAgent ?? ''}`;
152
- if (/mac|iphone|ipad|ipod/i.test(haystack)) {
153
- return 'mac';
154
- }
155
- if (/win/i.test(haystack)) {
156
- return 'windows';
157
- }
158
- return 'linux';
159
- }
160
- /** The platform never changes under a running page, so there is nothing to subscribe to. */
161
- function subscribe() {
162
- return () => { };
163
- }
164
- function serverOS() {
165
- return 'windows';
166
- }
167
- /**
168
- * `useSyncExternalStore` rather than `useEffect` plus state, and rather than
169
- * reading `navigator` during render.
170
- *
171
- * Reading it during render is a hydration mismatch waiting to happen: the server
172
- * has no `navigator`, so it would render `Ctrl` and the client would render `⌘`
173
- * into the same markup. This hook is the one API that tells React the two are
174
- * *meant* to differ — it hydrates with the server's answer and re-renders with
175
- * the browser's, which is exactly the sequence a Mac reader sees.
176
- */
177
- function useDetectedOS() {
178
- return React.useSyncExternalStore(subscribe, detectOS, serverOS);
179
- }
180
- /**
181
- * A key cap sits one step down the control ladder: it is a token inside a line
182
- * of text, not a control the line lines up against.
183
- */
184
- const keyScale = {
185
- xs: 'xs',
186
- sm: 'xs',
187
- md: 'sm',
188
- lg: 'md',
189
- xl: 'lg'
190
- };
191
- /**
192
- * The three materials, and the one place in the library where a filled surface
193
- * gets a hard-edged shadow directly under it.
194
- *
195
- * That lip is not the gloss line the design language rules out — a gloss line is
196
- * a highlight *on* the surface, claiming a lamp. This is a two-pixel offset
197
- * shadow *under* it, which is the one thing every printed manual has used to
198
- * mean "this is a key you press". A picture of a key is allowed to look like a
199
- * key; a control is not allowed to look like a picture of one.
200
- *
201
- * `glass` is the default, because a hairline box is what a key cap has looked
202
- * like in every manual ever printed. Its edge is `--plass-border` rather than
203
- * the sheet's white hairline, or a cap set on a light card would have no edge.
204
- */
205
- const variantClasses = {
206
- solid: /* @__PURE__ */ [
207
- 'text-(--p-on-solid) [background-image:var(--p-fill)]',
208
- '[box-shadow:var(--p-elev),0_2px_0_0_var(--p-tint)]'
209
- ].join(' '),
210
- glass: /* @__PURE__ */ [
211
- glassClasses,
212
- 'border text-(--p-accent) bg-(--plass-glass)',
213
- '[border-color:var(--plass-border)]',
214
- '[box-shadow:var(--p-elev),0_2px_0_0_var(--plass-shadow-ambient)]'
215
- ].join(' '),
216
- ghost: 'text-(--p-accent) bg-(--p-soft)'
217
- };
218
- /** The width a single-letter cap is held to, so `⌘` and `K` are the same square. */
219
- const keyMinWidthClasses = {
220
- xs: 'min-w-6',
221
- sm: 'min-w-8',
222
- md: 'min-w-10',
223
- lg: 'min-w-12',
224
- xl: 'min-w-14'
225
- };
226
- /**
227
- * One key cap.
228
- *
229
- * Exported so a caller can compose a layout this component does not draw — a
230
- * numeric keypad, a row of function keys — out of the same object the shortcut
231
- * strip is made of.
232
- *
233
- * It reads its colour slots from whatever set them, which is the `PlHotKeys`
234
- * around it in the common case. On its own it falls back to the page's own ink,
235
- * so a bare `<PlKbd>` still draws.
236
- */
237
- export const PlKbd = /* @__PURE__ */ React.forwardRef(function PlKbd({ variant = 'glass', size = 'md', density = 'compact', className, children, ...props }, ref) {
238
- const step = keyScale[size];
239
- return (_jsx("kbd", { ref: ref, className: [
240
- 'inline-flex shrink-0 items-center justify-center',
241
- 'font-mono leading-none font-medium tabular-nums whitespace-nowrap',
242
- controlHeightClasses[step],
243
- controlTextClasses[step],
244
- keyMinWidthClasses[step],
245
- paddingXClasses[density][step],
246
- radiusClasses[step],
247
- variantClasses[variant],
248
- transitionClasses,
249
- className ?? ''
250
- ]
251
- .filter(Boolean)
252
- .join(' '), ...props, children: children }));
253
- });
254
- /**
255
- * A keyboard key, a combination of them, or the four movement keys as they sit
256
- * on the keyboard.
257
- *
258
- * Two things make this more than a styled `<kbd>`, and both are about the label
259
- * rather than the box around it.
260
- *
261
- * The first is `Mod`. A shortcut written as `Ctrl+K` is wrong for every Mac
262
- * reader and one written as `⌘K` is wrong for everybody else, so the token that
263
- * means "the modifier shortcuts are built on" resolves per platform — and `os`
264
- * is there for the pages that have to name a platform rather than the reader's.
265
- *
266
- * The second is that `⌘` is not a word. A screen reader reads it as "place of
267
- * interest sign", so every key drawn as a glyph carries its name beside it, in
268
- * the clipped box `srOnlyClasses` describes. What is announced is "Command K",
269
- * which is what the shortcut is called.
270
- *
271
- * The keys are real `<kbd>` elements; the wrapper around them is a `<span>`.
272
- * Nesting `<kbd>` inside `<kbd>` is allowed and would also be defensible, but a
273
- * `kbd` wrapper is a second box for a host stylesheet to reach into for no gain
274
- * — the semantics are carried by the keys themselves either way.
275
- */
276
- export const PlHotKeys = /* @__PURE__ */ React.forwardRef(function PlHotKeys({ variant = 'glass', size = 'md', color = 'secondary', density = 'compact', elevation = 0, keys, cluster, os = 'auto', separator, className, style, ...props }, ref) {
277
- const detected = useDetectedOS();
278
- const resolved = os === 'auto' ? detected : os;
279
- const slots = { ...controlSlots(color, elevation, variant), ...style };
280
- const capProps = { variant, size, density };
281
- const gap = size === 'xs' || size === 'sm' ? 'gap-1' : 'gap-1.5';
282
- if (cluster) {
283
- return (_jsxs("span", { ref: ref, className: ['inline-flex flex-col items-center align-middle', gap, className ?? '']
284
- .filter(Boolean)
285
- .join(' '), style: slots, ...props, children: [_jsx(PlKbd, { ...capProps, children: cluster.up }), _jsxs("span", { className: `inline-flex ${gap}`, children: [_jsx(PlKbd, { ...capProps, children: cluster.left }), _jsx(PlKbd, { ...capProps, children: cluster.down }), _jsx(PlKbd, { ...capProps, children: cluster.right })] })] }));
286
- }
287
- const labels = tokenize(keys ?? []).map((token) => labelFor(token, resolved));
288
- // macOS writes a shortcut as a run of symbols with nothing between them; the
289
- // other two join theirs with a `+`. A caller who passes one gets theirs.
290
- const joiner = separator === undefined ? (resolved === 'mac' ? null : '+') : separator;
291
- return (_jsx("span", { ref: ref, className: ['inline-flex max-w-full items-center gap-1 align-middle', className ?? '']
292
- .filter(Boolean)
293
- .join(' '), style: slots, ...props, children: labels.map((label, index) => (_jsxs(React.Fragment, { children: [index > 0 && joiner !== null ? (_jsx("span", { "aria-hidden": "true", className: "text-(--plass-muted-fg)", children: joiner })) : null, _jsx(PlKbd, { ...capProps, children: label.symbol === label.name ? (label.symbol) : (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", children: label.symbol }), _jsx("span", { className: srOnlyClasses, children: label.name })] })) })] }, index))) }));
294
- });
1
+ "use client";import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import*as o from"react";import{controlHeightClasses as r,controlSlots as s,controlTextClasses as t,glassClasses as l,paddingXClasses as i,radiusClasses as m,srOnlyClasses as c,transitionClasses as d}from"../../internal/styles.js";const word=e=>({symbol:e,name:e}),p={mod:{mac:{symbol:"⌘",name:"Command"},windows:word("Ctrl"),linux:word("Ctrl")},meta:{mac:{symbol:"⌘",name:"Command"},windows:word("Win"),linux:word("Super")},ctrl:{mac:{symbol:"⌃",name:"Control"},windows:word("Ctrl"),linux:word("Ctrl")},alt:{mac:{symbol:"⌥",name:"Option"},windows:word("Alt"),linux:word("Alt")},shift:{mac:{symbol:"⇧",name:"Shift"},windows:word("Shift"),linux:word("Shift")},enter:{mac:{symbol:"↩",name:"Enter"},windows:word("Enter"),linux:word("Enter")},tab:{mac:{symbol:"⇥",name:"Tab"},windows:word("Tab"),linux:word("Tab")},escape:{mac:{symbol:"⎋",name:"Escape"},windows:word("Esc"),linux:word("Esc")},backspace:{mac:{symbol:"⌫",name:"Backspace"},windows:word("Backspace"),linux:word("Backspace")},delete:{mac:{symbol:"⌦",name:"Delete"},windows:word("Del"),linux:word("Del")},capslock:{mac:{symbol:"⇪",name:"Caps Lock"},windows:word("Caps Lock"),linux:word("Caps Lock")}},u={cmdorctrl:"mod",commandorcontrol:"mod",cmd:"meta",command:"meta",super:"meta",win:"meta",windows:"meta",control:"ctrl",option:"alt",opt:"alt",return:"enter",esc:"escape",del:"delete",caps:"capslock"},w={up:{symbol:"↑",name:"Arrow up"},down:{symbol:"↓",name:"Arrow down"},left:{symbol:"←",name:"Arrow left"},right:{symbol:"→",name:"Arrow right"},arrowup:{symbol:"↑",name:"Arrow up"},arrowdown:{symbol:"↓",name:"Arrow down"},arrowleft:{symbol:"←",name:"Arrow left"},arrowright:{symbol:"→",name:"Arrow right"}};function detectOS(){if("undefined"==typeof navigator)return"windows";const e=navigator.userAgentData,n=`${e?.platform??""} ${navigator.platform??""} ${navigator.userAgent??""}`;return/mac|iphone|ipad|ipod/i.test(n)?"mac":/win/i.test(n)?"windows":"linux"}function subscribe(){return()=>{}}function serverOS(){return"windows"}const b={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},f={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--p-tint)]"].join(" "),glass:/* @__PURE__ */[l,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),0_2px_0_0_var(--plass-shadow-ambient)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft)"},x={xs:"min-w-6",sm:"min-w-8",md:"min-w-10",lg:"min-w-12",xl:"min-w-14"};export const PlKbd=/* @__PURE__ */o.forwardRef(function PlKbd({variant:n="glass",size:a="md",density:o="compact",className:s,children:l,...c},p){const u=b[a];return e("kbd",{ref:p,className:["inline-flex shrink-0 items-center justify-center","font-mono leading-none font-medium tabular-nums whitespace-nowrap",r[u],t[u],x[u],i[o][u],m[u],f[n],d,s??""].filter(Boolean).join(" "),...c,children:l})});export const PlHotKeys=/* @__PURE__ */o.forwardRef(function PlHotKeys({variant:r="glass",size:t="md",color:l="secondary",density:i="compact",elevation:m=0,keys:d,cluster:b,os:f="auto",separator:x,className:y,style:g,...h},v){const k=function useDetectedOS(){return o.useSyncExternalStore(subscribe,detectOS,serverOS)}(),A="auto"===f?k:f,C={...s(l,m,r),...g},S={variant:r,size:t,density:i},j="xs"===t||"sm"===t?"gap-1":"gap-1.5";if(b)return n("span",{ref:v,className:["inline-flex flex-col items-center align-middle",j,y??""].filter(Boolean).join(" "),style:C,...h,children:[e(PlKbd,{...S,children:b.up}),n("span",{className:`inline-flex ${j}`,children:[e(PlKbd,{...S,children:b.left}),e(PlKbd,{...S,children:b.down}),e(PlKbd,{...S,children:b.right})]})]});const K=function tokenize(e){return Array.isArray(e)?e.map(e=>e.trim()).filter(Boolean):e.split("+").map(e=>e.trim()).filter(Boolean)}(d??[]).map(e=>function labelFor(e,n){const a=e.toLowerCase().replace(/[\s_-]/g,""),o=u[a]??a,r=w[o];if(r)return r;const s=p[o];return s?s[n]:word(1===e.length?e.toUpperCase():e)}(e,A)),P=void 0===x?"mac"===A?null:"+":x;return e("span",{ref:v,className:["inline-flex max-w-full items-center gap-1 align-middle",y??""].filter(Boolean).join(" "),style:C,...h,children:K.map((r,s)=>n(o.Fragment,{children:[s>0&&null!==P?e("span",{"aria-hidden":"true",className:"text-(--plass-muted-fg)",children:P}):null,e(PlKbd,{...S,children:r.symbol===r.name?r.symbol:n(a,{children:[e("span",{"aria-hidden":"true",children:r.symbol}),e("span",{className:c,children:r.name})]})})]},s))})});
@@ -1 +1 @@
1
- export { PlHotKeys, PlKbd } from './PlHotKeys.js';
1
+ export{PlHotKeys,PlKbd}from"./PlHotKeys.js";
@@ -1,58 +1 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { iconSizeClasses } from '../../internal/styles.js';
4
- /**
5
- * The same five lengths as `iconSizeClasses`, as a font size.
6
- *
7
- * Written out rather than inherited: an icon set hands back an `<svg>` sized in
8
- * `em` about as often as one sized in `px`, and the only way both come out right
9
- * is for the box's own font size to *be* the box. `text-[length:inherit]` would
10
- * take the surrounding paragraph's, which is the one size the box deliberately
11
- * is not.
12
- */
13
- const glyphFontClasses = {
14
- xs: 'text-[0.875rem]',
15
- sm: 'text-[1rem]',
16
- md: 'text-[1.25rem]',
17
- lg: 'text-[1.5rem]',
18
- xl: 'text-[1.75rem]'
19
- };
20
- /**
21
- * A glyph at a known size, in a known colour.
22
- *
23
- * The library draws no icons of its own beyond the handful its components need —
24
- * an icon set is a decision that belongs to the app, not to the component
25
- * library it installs. What this does is give whatever icon the app chose the
26
- * same two axes everything else here has.
27
- *
28
- * The box is `inline-flex` with the glyph told to fill it, and `font-size` is
29
- * set to the same length — so an `<svg>` with its own `width`, an `<svg>` sized
30
- * in `em`, and a bare character all come out the same size. That is the whole
31
- * component: a box, a length written twice, and a colour.
32
- *
33
- * There is no `variant` and no `elevation`. An icon is not a surface: it is ink,
34
- * and the only thing the design language has to say about ink is which family it
35
- * is drawn in.
36
- */
37
- export const PlIcon = /* @__PURE__ */ React.forwardRef(function PlIcon({ icon, size = 'md', color = 'inherit', label, className, style, ...props }, ref) {
38
- const classNames = [
39
- 'inline-flex shrink-0 items-center justify-center align-middle',
40
- iconSizeClasses[size],
41
- // The glyph fills the box however it was authored. `[font-size:100%]` on the
42
- // box itself would be a no-op; what makes an em-sized drawing come out right
43
- // is the box being an em, which `size-*` and this pair together arrange.
44
- '[&>svg]:block [&>svg]:size-full [&>img]:block [&>img]:size-full',
45
- `leading-none ${glyphFontClasses[size]}`,
46
- color === 'inherit' ? '' : 'text-(--p-accent)',
47
- className ?? ''
48
- ]
49
- .filter(Boolean)
50
- .join(' ');
51
- return (_jsx("span", { ref: ref, className: classNames, style: (color === 'inherit'
52
- ? style
53
- : { '--p-accent': `var(--plass-${color}-accent)`, ...style }),
54
- // An icon with something to say is an `img` with a name; one without is
55
- // furniture. There is no third case, and `role="img"` on a decorative glyph
56
- // is the most common way a screen reader ends up saying "graphic".
57
- role: label ? 'img' : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, ...props, children: icon }));
58
- });
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{iconSizeClasses as i}from"../../internal/styles.js";const r={xs:"text-[0.875rem]",sm:"text-[1rem]",md:"text-[1.25rem]",lg:"text-[1.5rem]",xl:"text-[1.75rem]"};export const PlIcon=/* @__PURE__ */t.forwardRef(function PlIcon({icon:t,size:n="md",color:l="inherit",label:s,className:o,style:a,...c},m){const f=["inline-flex shrink-0 items-center justify-center align-middle",i[n],"[&>svg]:block [&>svg]:size-full [&>img]:block [&>img]:size-full",`leading-none ${r[n]}`,"inherit"===l?"":"text-(--p-accent)",o??""].filter(Boolean).join(" ");return e("span",{ref:m,className:f,style:"inherit"===l?a:{"--p-accent":`var(--plass-${l}-accent)`,...a},role:s?"img":void 0,"aria-label":s,"aria-hidden":!s||void 0,...c,children:t})});
@@ -1 +1 @@
1
- export { PlIcon } from './PlIcon.js';
1
+ export{PlIcon}from"./PlIcon.js";
@@ -1,37 +1 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { PlButton } from '../button/PlButton.js';
4
- /**
5
- * A round button with a glyph in it and nothing else.
6
- *
7
- * A `PlButton` with an icon and no children already goes square — the same
8
- * height, the same width, the house fillet cut off it. This is the other shape:
9
- * a disc.
10
- *
11
- * That disc is a deliberate exception to the radius rule, which holds every
12
- * corner well short of the 50% that would make a control a pill, because the
13
- * flat run along the top and bottom edge is what still reads as a sheet with its
14
- * corners cut. The rule is about *labelled* controls: the flat run is there for
15
- * the line of text to sit on, and a glyph has no line of text. A circle with a
16
- * single mark centred in it is a punched token rather than a moulded key, so it
17
- * says the thing the rule exists to protect by a different route.
18
- *
19
- * Everything else is `PlButton`'s, unchanged and on purpose: the three
20
- * materials, the elevation ladder, the pointer light, `loading`, `readOnly` and
21
- * `disabled`. Two components that draw the same surface out of two copies of the
22
- * same table are two components that will eventually disagree.
23
- */
24
- export const PlIconButton = /* @__PURE__ */ React.forwardRef(function PlIconButton({ icon, label, style, ...props }, ref) {
25
- return (_jsx(PlButton, { ref: ref, "aria-label": label,
26
- // The icon goes in `startIcon` rather than in `children`, which is what
27
- // puts PlButton on its icon-only path: square footprint, no horizontal
28
- // padding, and the spinner taking the glyph's place while `loading`.
29
- startIcon: icon,
30
- // An inline style rather than a `rounded-full`, and for once not as a
31
- // shortcut. PlButton already writes a `rounded-*` utility of its own, and
32
- // two utilities setting the same property resolve by their order in the
33
- // generated stylesheet — which is not something a component may depend
34
- // on. An inline declaration is the one form that wins deterministically,
35
- // and it still leaves the caller's own `style` free to override it below.
36
- style: { borderRadius: '9999px', ...style }, ...props }));
37
- });
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import*as o from"react";import{PlButton as r}from"../button/PlButton.js";export const PlIconButton=/* @__PURE__ */o.forwardRef(function PlIconButton({icon:o,label:e,style:n,...a},s){return t(r,{ref:s,"aria-label":e,startIcon:o,style:{borderRadius:"9999px",...n},...a})});
@@ -1 +1 @@
1
- export { PlIconButton } from './PlIconButton.js';
1
+ export{PlIconButton}from"./PlIconButton.js";
@@ -1,160 +1 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { useRender } from '@base-ui/react/use-render';
4
- import { focusRingClasses, gapClasses, glassClasses, hasContent, iconClasses, metaTextClasses, paddingXClasses, radiusClasses, sheetBodyClasses, surfaceSlots, transitionClasses } from '../../internal/styles.js';
5
- const ListContext = /* @__PURE__ */ React.createContext({
6
- size: 'md',
7
- density: 'default',
8
- dividers: false
9
- });
10
- /**
11
- * The three materials, said the way a *container* says them — the sheet is never
12
- * dyed, exactly as on a `PlCard`. A list holds other people's content, and that
13
- * content arrives with its own colours.
14
- *
15
- * `ghost` is the one to reach for inside a card: the card is already a sheet,
16
- * and a second bordered rectangle inside it is a second rectangle.
17
- */
18
- const variantClasses = {
19
- solid: /* @__PURE__ */ [
20
- glassClasses,
21
- 'text-(--plass-fg) bg-(--plass-glass-press)',
22
- '[box-shadow:var(--p-elev),var(--plass-gloss-glass)]'
23
- ].join(' '),
24
- glass: /* @__PURE__ */ [
25
- glassClasses,
26
- 'border text-(--plass-fg) bg-(--plass-glass)',
27
- '[border-color:var(--plass-glass-line)]',
28
- '[box-shadow:var(--p-elev),var(--plass-gloss-glass)]'
29
- ].join(' '),
30
- ghost: 'text-(--plass-fg) bg-transparent'
31
- };
32
- /**
33
- * A row's vertical padding. Its own ladder rather than a sheet's, because a row
34
- * is a line of text in a stack of them and a sheet is a container: the same `md`
35
- * that gives a card 20px of air would give a list of eight rows the height of a
36
- * page.
37
- */
38
- const rowPaddingYClasses = {
39
- default: { xs: 'py-1', sm: 'py-1.5', md: 'py-2', lg: 'py-2.5', xl: 'py-3' },
40
- compact: { xs: 'py-0.5', sm: 'py-0.5', md: 'py-1', lg: 'py-1.5', xl: 'py-2' }
41
- };
42
- /**
43
- * A row's horizontal padding: a control's, not a sheet's. The words in a row are
44
- * a label on a line rather than a paragraph inside a container, and a sheet's
45
- * inset would push every row's text a third of the way across a narrow list.
46
- */
47
- const rowPaddingXClasses = paddingXClasses;
48
- /**
49
- * A row sits one step down the radius ladder from the sheet it is inside — a
50
- * tile cut out of a sheet cannot have the same corner as the sheet, or the two
51
- * curves fight along the edge.
52
- */
53
- const rowRadiusClasses = {
54
- xs: radiusClasses.xs,
55
- sm: radiusClasses.xs,
56
- md: radiusClasses.sm,
57
- lg: radiusClasses.sm,
58
- xl: radiusClasses.md
59
- };
60
- /**
61
- * The rule between two rows, and the rule that makes the sheet give up its
62
- * padding: `>li+li` rather than a class on each item, so it holds however the
63
- * caller composed the rows — through a `.map()`, through fragments, through a
64
- * component of their own that renders a `PlListItem`.
65
- *
66
- * `--plass-divider` and not the sheet's white hairline, for the reason a
67
- * checkbox's edge takes a neutral one: white light on a translucent pane is
68
- * invisible the moment the list is set on something opaque. It is the same ink
69
- * a PlCard is scored with and a PlTable rules its rows in, so a list on a card
70
- * inside a table cell is one family of lines rather than three.
71
- */
72
- const dividerClasses = '[&>li+li]:border-t [&>li+li]:[border-color:var(--plass-divider)]';
73
- /**
74
- * A stack of rows.
75
- *
76
- * The list is a sheet and the rows are what is on it, which is the whole reason
77
- * the two are separate components: `size` and `density` are properties of the
78
- * stack, not of any one line in it, and a context is what carries them down.
79
- *
80
- * There is no Base UI primitive under this on purpose. A list is not a composite
81
- * widget — it has no roving focus, no selection model, no keyboard contract of
82
- * its own. Reaching for a menu or a listbox primitive to get one would hand
83
- * every consumer's plain list of links the semantics of a menu, which is the
84
- * most common way a component library breaks a screen reader.
85
- */
86
- export const PlList = /* @__PURE__ */ React.forwardRef(function PlList({ variant = 'glass', size = 'md', color = 'primary', density = 'default', elevation = 0, dividers = false, render, className, style, children, ...props }, ref) {
87
- const context = React.useMemo(() => ({ size, density, dividers }), [size, density, dividers]);
88
- const classNames = [
89
- 'flex flex-col',
90
- radiusClasses[size],
91
- variantClasses[variant],
92
- transitionClasses,
93
- // Without dividers the rows are tiles and the sheet keeps a hair of padding
94
- // so a hovered row does not run into the edge. With them the rules have to
95
- // reach the edge, so the padding goes and the rows square off.
96
- dividers ? `overflow-hidden ${dividerClasses}` : 'p-1',
97
- className ?? ''
98
- ]
99
- .filter(Boolean)
100
- .join(' ');
101
- const element = useRender({
102
- render,
103
- ref,
104
- props: {
105
- // Tailwind's reset takes the bullets off every `<ul>`, and Safari takes
106
- // the list semantics off with them. Saying `role="list"` out loud is the
107
- // one-line fix, and it costs nothing when the reset is not there.
108
- role: 'list',
109
- className: classNames,
110
- style: { ...surfaceSlots(color, elevation), ...style },
111
- children,
112
- ...props
113
- }
114
- });
115
- return _jsx(ListContext.Provider, { value: context, children: element });
116
- });
117
- /**
118
- * One row.
119
- *
120
- * The shell is always an `<li>`. What changes is what is inside it: a plain run
121
- * of content, or — when `onClick` or `href` is given — a real `<button>` or
122
- * `<a>` wrapping that content, with `action` sitting outside it as a separate
123
- * control. This is the same shape a `PlChip` uses, for the same two reasons: a
124
- * `<span>` carrying a click handler is invisible to a keyboard, and a
125
- * `<button>` inside a `<button>` is markup the browser silently un-nests.
126
- */
127
- export const PlListItem = /* @__PURE__ */ React.forwardRef(function PlListItem({ startIcon, endIcon, description, action, href, selected = false, disabled = false, className, children, onClick, ...props }, ref) {
128
- const { size, density, dividers } = React.useContext(ListContext);
129
- const interactive = Boolean(onClick || href) && !disabled;
130
- const padX = rowPaddingXClasses[density][size];
131
- const padY = rowPaddingYClasses[density][size];
132
- const bodyClassNames = [
133
- 'flex min-w-0 flex-1 items-center text-start',
134
- padX,
135
- padY,
136
- gapClasses[size],
137
- sheetBodyClasses[size],
138
- transitionClasses,
139
- iconClasses,
140
- // Squared off when the rows are ruled, for the reason `dividerClasses`
141
- // exists: a tile and a line are two different ideas about what a row is.
142
- dividers ? '' : rowRadiusClasses[size],
143
- // An if/else rather than stacked variants: two Tailwind classes of equal
144
- // specificity resolve by their order in the generated stylesheet.
145
- disabled
146
- ? 'cursor-not-allowed opacity-50 saturate-[0.35]'
147
- : selected
148
- ? 'bg-(--p-soft-press) font-medium text-(--p-accent)'
149
- : '',
150
- interactive ? `cursor-pointer ${focusRingClasses}` : '',
151
- // Hover deepens the same tint `selected` already uses, one step down, so a
152
- // hovered row and the chosen row are the same idea at two strengths.
153
- interactive && !selected ? 'hover:bg-(--p-soft)' : '',
154
- interactive && selected ? 'hover:bg-(--p-soft-press)' : ''
155
- ]
156
- .filter(Boolean)
157
- .join(' ');
158
- const body = (_jsxs(_Fragment, { children: [hasContent(startIcon) ? (_jsx("span", { className: "flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)", children: startIcon })) : null, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [hasContent(children) ? _jsx("span", { className: "truncate", children: children }) : null, hasContent(description) ? (_jsx("span", { className: `truncate text-(--plass-muted-fg) ${metaTextClasses[size]}`, children: description })) : null] }), hasContent(endIcon) ? (_jsx("span", { className: "flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)", children: endIcon })) : null] }));
159
- return (_jsxs("li", { ref: ref, className: ['flex w-full items-center', className ?? ''].filter(Boolean).join(' '), ...props, children: [interactive && href ? (_jsx("a", { href: href, className: bodyClassNames, "aria-current": selected ? 'page' : undefined, onClick: onClick, children: body })) : interactive ? (_jsx("button", { type: "button", className: bodyClassNames, "aria-current": selected ? true : undefined, onClick: onClick, children: body })) : (_jsx("div", { className: bodyClassNames, "aria-disabled": disabled || undefined, children: body })), hasContent(action) ? (_jsx("div", { className: `flex shrink-0 items-center ${padX}`, children: action })) : null] }));
160
- });
1
+ "use client";import{jsx as e,jsxs as s,Fragment as l}from"react/jsx-runtime";import*as r from"react";import{useRender as t}from"@base-ui/react/use-render";import{focusRingClasses as a,gapClasses as i,glassClasses as n,hasContent as o,iconClasses as d,metaTextClasses as c,paddingXClasses as p,radiusClasses as m,sheetBodyClasses as f,surfaceSlots as x,transitionClasses as u}from"../../internal/styles.js";const h=/* @__PURE__ */r.createContext({size:"md",density:"default",dividers:!1}),g={solid:/* @__PURE__ */[n,"text-(--plass-fg) bg-(--plass-glass-press)","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),glass:/* @__PURE__ */[n,"border text-(--plass-fg) bg-(--plass-glass)","[border-color:var(--plass-glass-line)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--plass-fg) bg-transparent"},v={default:{xs:"py-1",sm:"py-1.5",md:"py-2",lg:"py-2.5",xl:"py-3"},compact:{xs:"py-0.5",sm:"py-0.5",md:"py-1",lg:"py-1.5",xl:"py-2"}},y=p,b={xs:m.xs,sm:m.xs,md:m.sm,lg:m.sm,xl:m.md};export const PlList=/* @__PURE__ */r.forwardRef(function PlList({variant:s="glass",size:l="md",color:a="primary",density:i="default",elevation:n=0,dividers:o=!1,render:d,className:c,style:p,children:f,...v},y){const b=r.useMemo(()=>({size:l,density:i,dividers:o}),[l,i,o]),N=["flex flex-col",m[l],g[s],u,o?"overflow-hidden [&>li+li]:border-t [&>li+li]:[border-color:var(--plass-divider)]":"p-1",c??""].filter(Boolean).join(" "),j=t({render:d,ref:y,props:{role:"list",className:N,style:{...x(a,n),...p},children:f,...v}});return e(h.Provider,{value:b,children:j})});export const PlListItem=/* @__PURE__ */r.forwardRef(function PlListItem({startIcon:t,endIcon:n,description:p,action:m,href:x,selected:g=!1,disabled:N=!1,className:j,children:w,onClick:k,...C},P){const{size:z,density:B,dividers:I}=r.useContext(h),L=Boolean(k||x)&&!N,$=y[B][z],R=["flex min-w-0 flex-1 items-center text-start",$,v[B][z],i[z],f[z],u,d,I?"":b[z],N?"cursor-not-allowed opacity-50 saturate-[0.35]":g?"bg-(--p-soft-press) font-medium text-(--p-accent)":"",L?`cursor-pointer ${a}`:"",L&&!g?"hover:bg-(--p-soft)":"",L&&g?"hover:bg-(--p-soft-press)":""].filter(Boolean).join(" "),F=s(l,{children:[o(t)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:t}):null,s("span",{className:"flex min-w-0 flex-1 flex-col",children:[o(w)?e("span",{className:"truncate",children:w}):null,o(p)?e("span",{className:`truncate text-(--plass-muted-fg) ${c[z]}`,children:p}):null]}),o(n)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--plass-muted-fg)",children:n}):null]});return s("li",{ref:P,className:["flex w-full items-center",j??""].filter(Boolean).join(" "),...C,children:[L&&x?e("a",{href:x,className:R,"aria-current":g?"page":void 0,onClick:k,children:F}):L?e("button",{type:"button",className:R,"aria-current":!!g||void 0,onClick:k,children:F}):e("div",{className:R,"aria-disabled":N||void 0,children:F}),o(m)?e("div",{className:`flex shrink-0 items-center ${$}`,children:m}):null]})});
@@ -1 +1 @@
1
- export { PlList, PlListItem } from './PlList.js';
1
+ export{PlList,PlListItem}from"./PlList.js";