@journ/bloom 0.3.1 → 0.3.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.
- package/DESIGN.md +81 -80
- package/dist/avatar-parts.d.ts +2 -1
- package/dist/avatar-parts.js +6 -1
- package/dist/avatar.d.ts +2 -1
- package/dist/avatar.js +3 -2
- package/dist/breadcrumbs.d.ts +4 -0
- package/dist/breadcrumbs.js +15 -1
- package/dist/button.d.ts +7 -6
- package/dist/button.js +22 -13
- package/dist/card.d.ts +7 -2
- package/dist/card.js +2 -2
- package/dist/carousel-parts.d.ts +5 -2
- package/dist/carousel-parts.js +10 -1
- package/dist/carousel.d.ts +3 -1
- package/dist/carousel.js +4 -2
- package/dist/character-count-parts.d.ts +14 -0
- package/dist/character-count-parts.js +23 -0
- package/dist/character-count.d.ts +12 -0
- package/dist/character-count.js +12 -0
- package/dist/dropdown-menu-parts.d.ts +5 -1
- package/dist/dropdown-menu-parts.js +15 -1
- package/dist/dropdown-menu.d.ts +4 -1
- package/dist/dropdown-menu.js +5 -2
- package/dist/field-parts.d.ts +8 -1
- package/dist/field-parts.js +19 -1
- package/dist/field.d.ts +3 -1
- package/dist/field.js +4 -2
- package/dist/icon-button.d.ts +1 -1
- package/dist/icon-button.js +2 -1
- package/dist/lib/icon-tile.d.ts +3 -2
- package/dist/lib/icon-tile.js +6 -1
- package/dist/lib/text-styles.d.ts +3 -1
- package/dist/lib/text-styles.js +3 -1
- package/dist/lib/theme.d.ts +5 -1
- package/dist/lib/theme.js +5 -1
- package/dist/message.d.ts +6 -0
- package/dist/message.js +19 -1
- package/dist/nav-bar.js +2 -2
- package/dist/quantity-input-parts.d.ts +7 -3
- package/dist/quantity-input-parts.js +21 -4
- package/dist/quantity-input.d.ts +2 -1
- package/dist/quantity-input.js +3 -2
- package/dist/radio-parts.d.ts +7 -1
- package/dist/radio-parts.js +25 -2
- package/dist/radio.d.ts +3 -1
- package/dist/radio.js +4 -2
- package/dist/sidebar.d.ts +4 -0
- package/dist/sidebar.js +17 -0
- package/dist/stepper-parts.d.ts +4 -1
- package/dist/stepper-parts.js +17 -1
- package/dist/stepper.d.ts +4 -1
- package/dist/stepper.js +5 -2
- package/dist/styles.css +1 -1
- package/dist/toggle-group-parts.d.ts +3 -1
- package/dist/toggle-group-parts.js +12 -2
- package/dist/toggle-group.d.ts +3 -1
- package/dist/toggle-group.js +4 -2
- package/package.json +2 -2
package/DESIGN.md
CHANGED
|
@@ -191,86 +191,87 @@ The typeface is `--font-bloom-display`. Load Hedvig Letters Sans (or your own fa
|
|
|
191
191
|
|
|
192
192
|
Import per file (`@journ/bloom/card`). The library named in parentheses is what the nude part is built on.
|
|
193
193
|
|
|
194
|
-
| Component | Parts
|
|
195
|
-
| ------------------------------- |
|
|
196
|
-
| `Accordion` (Radix, animejs) | `Root` (`type`), `Item`, `Trigger`, `Content`
|
|
197
|
-
| `AlertDialog` (Radix) | `Root`, `Trigger`, `Content` (`tone`), `Title`, `Description`, `Actions`, `Cancel`, `Action`
|
|
198
|
-
| `Alert` | `Root` (`tone`), `Icon`, `Body`, `Title`, `Description`, `Actions`
|
|
199
|
-
| `AnimatedSize` (animejs) | single element, `width`, `height`. Glides to its content's size
|
|
200
|
-
| `Avatar` (Radix) | `Root`, `Image`, `Fallback`
|
|
201
|
-
| `Badge` | single element, `tone`
|
|
202
|
-
| `Breadcrumbs` | `Root`, `List
|
|
203
|
-
| `BulkBar` | `Root`, `Count`, `Actions`
|
|
204
|
-
| `Button` | single element, `tone`, `pending`, renders `<a>` with `href`
|
|
205
|
-
| `Calendar` | `Provider`, `Root`, `Frame`, `Header`, `Heading`, `Previous`, `Next`, `Weekdays`, `Days`, `Months`, `Years`, `useCalendar`
|
|
206
|
-
| `Card` | `Root` (`tone`), `Icon`, `Header`, `Title`, `Description`, `Content`, `Footer`
|
|
207
|
-
| `Checkbox` (Radix) | `Root` (supports `checked="indeterminate"`), `Indicator`
|
|
208
|
-
| `Carousel` (Embla) | `Root` (`opts`, `orientation`), `Content`, `Item`, `Previous`, `Next`
|
|
209
|
-
| `
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
212
|
-
| `
|
|
213
|
-
| `
|
|
214
|
-
| `
|
|
215
|
-
| `
|
|
216
|
-
| `
|
|
217
|
-
| `
|
|
218
|
-
| `
|
|
219
|
-
| `
|
|
220
|
-
| `
|
|
221
|
-
| `
|
|
222
|
-
| `
|
|
223
|
-
| `
|
|
224
|
-
| `
|
|
225
|
-
| `
|
|
226
|
-
| `
|
|
227
|
-
| `
|
|
228
|
-
| `
|
|
229
|
-
| `
|
|
230
|
-
| `
|
|
231
|
-
| `
|
|
232
|
-
| `
|
|
233
|
-
| `
|
|
234
|
-
| `
|
|
235
|
-
| `
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
238
|
-
| `
|
|
239
|
-
| `
|
|
240
|
-
| `
|
|
241
|
-
| `
|
|
242
|
-
| `
|
|
243
|
-
| `
|
|
244
|
-
| `
|
|
245
|
-
| `
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
| `
|
|
249
|
-
| `
|
|
250
|
-
| `
|
|
251
|
-
| `
|
|
252
|
-
| `
|
|
253
|
-
| `
|
|
254
|
-
| `
|
|
255
|
-
| `
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
258
|
-
| `
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
| `
|
|
268
|
-
| `
|
|
269
|
-
| `
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
272
|
-
| `
|
|
273
|
-
| `
|
|
194
|
+
| Component | Parts |
|
|
195
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
196
|
+
| `Accordion` (Radix, animejs) | `Root` (`type`), `Item`, `Trigger`, `Content` |
|
|
197
|
+
| `AlertDialog` (Radix) | `Root`, `Trigger`, `Content` (`tone`), `Title`, `Description`, `Actions`, `Cancel`, `Action` |
|
|
198
|
+
| `Alert` | `Root` (`tone`), `Icon`, `Body`, `Title`, `Description`, `Actions` |
|
|
199
|
+
| `AnimatedSize` (animejs) | single element, `width`, `height`. Glides to its content's size |
|
|
200
|
+
| `Avatar` (Radix) | `Root`, `Image`, `Fallback`, `Group`. `Group` overlaps its avatars and rings each in the surface color |
|
|
201
|
+
| `Badge` | single element, `tone` |
|
|
202
|
+
| `Breadcrumbs` | `Root`, `List` or `Display` (title type), `Item`, `Link`, `Page`, `Separator` (chevron) or `Slash` |
|
|
203
|
+
| `BulkBar` | `Root`, `Count`, `Actions` |
|
|
204
|
+
| `Button` | single element, `tone`, `size` (`md`, `lg`), `pending`, renders `<a>` with `href`. `lg` is the footer call to action |
|
|
205
|
+
| `Calendar` | `Provider`, `Root`, `Frame`, `Header`, `Heading`, `Previous`, `Next`, `Weekdays`, `Days`, `Months`, `Years`, `useCalendar` |
|
|
206
|
+
| `Card` | `Root` (`tone`), `Icon` (`tone`: `outline`, `coral`, `yellow`, `indigo`, `mint`, `sky`; outline by default, the colours are a faint wash), `Header`, `Title`, `Description`, `Content`, `Footer` |
|
|
207
|
+
| `Checkbox` (Radix) | `Root` (supports `checked="indeterminate"`), `Indicator` |
|
|
208
|
+
| `Carousel` (Embla) | `Root` (`opts`, `orientation`), `Content`, `Item`, `Previous`, `Next`, `Dots`, `Dot` (`index`). Dots take the text colour, square, the active one is a bar |
|
|
209
|
+
| `CharacterCount` | `Root` (`value`, `max`) or `Provider`, `Frame`, `Control` (wraps the input or textarea), `Count`, `Max`. `Max` draws the slash; the count turns coral past the limit |
|
|
210
|
+
| `Chip` | `Root` (`tone`), `Dot`, `Remove`, `Tag` |
|
|
211
|
+
| `Collapsible` (Radix, animejs) | `Root`, `Trigger`, `Content` |
|
|
212
|
+
| `ContextMenu` (Radix) | `Root`, `Trigger`, `Content`, `Group`, `Label`, `Item`, `Separator` |
|
|
213
|
+
| `Combobox` (cmdk) | `Provider`, `Root`, `Trigger`, `Value`, `Content`, `Title`, `Description`, `Frame`, `Input`, `List`, `Empty`, `Group`, `Item`, `ItemIndicator`, `useCombobox` |
|
|
214
|
+
| `CommandPalette` (cmdk, Radix) | `Root` (`onSelect`, `shortcut`), `Trigger`, `Content`, plus the Combobox list parts `Frame`, `Input`, `List`, `Empty`, `Group`, `Item`, `ItemIndicator` |
|
|
215
|
+
| `Composer` | `Root`, `Input` |
|
|
216
|
+
| `DatePicker` | `Provider`, `Root`, `Trigger`, `Value`, `Content`, `Title`, `Description`, `Calendar` (wraps `Calendar.Root`), `useDatePicker` |
|
|
217
|
+
| `DescriptionList` | `Root`, `Term`, `Details` |
|
|
218
|
+
| `DateRangePicker` | `Root` (`value`, `locale`), `Trigger`, `Value`, `Content`, `Title`, `Description`, `Calendar`. Two clicks make a range |
|
|
219
|
+
| `CurrencyInput` | `Root` (`value`, `currency`, `locale`, `min`, `max`), `Field` |
|
|
220
|
+
| `DataTable` (TanStack Table v9) | `Root` (`data`, `columns`, `pageSize`, `onSelectionChange`), `Toolbar`, `ColumnPicker`, `Table`, `Pager`, `SelectionBar`. Helpers: `dataTableColumns`, `selectColumn`, `useDataTable` |
|
|
221
|
+
| `DateInput` | `Root` (`value`, `locale`), `Field`. Parses typed dates in the locale's order |
|
|
222
|
+
| `Dialog` (Radix) | `Root`, `Trigger`, `Close`, `Content` (`tone`), `Title`, `Description`, `Body`, `Actions` |
|
|
223
|
+
| `FileDropzone` | `Root` (`accept`, `maxSize`, `multiple`, `onFilesAccepted`, `onFilesRejected`), `Icon`, `Title`, `Description` |
|
|
224
|
+
| `Divider` (Radix) | single element, `orientation` |
|
|
225
|
+
| `Drawer` (vaul) | `Root`, `Trigger`, `Close`, `Content`, `Title`, `Description`, `Body`, `Actions` |
|
|
226
|
+
| `DropdownMenu` (Radix) | `Root`, `Trigger`, `Content`, `Group`, `Label`, `Item`, `Separator`; `RadioGroup` (`value`, controlled), `RadioItem`, `ItemIndicator` (check on the selected item) |
|
|
227
|
+
| `EmptyState` | `Root`, `Icon`, `Title`, `Description`, `Actions` |
|
|
228
|
+
| `Field` (Radix) | `Root` (`invalid`), `Label`, `Control`, `Description`, `Error`, `Frame` (`tone`), `Action`. `Frame` is the inset-label tile |
|
|
229
|
+
| `Heading` | single element, `level` (outline) and `size` (look) |
|
|
230
|
+
| `Icon` | sizes any svg child, `size` |
|
|
231
|
+
| `HoverCard` (Radix) | `Root`, `Trigger`, `Content` |
|
|
232
|
+
| `IconButton` | single element, `tone`, `size` (`sm`, `md`, `lg`) |
|
|
233
|
+
| `Input` | single element, native `<input>` |
|
|
234
|
+
| `Link` | single element, `asChild` styles a router link |
|
|
235
|
+
| `ListRow` | `Root` (static), `Button` or `Link` (pressable), each with `tone`; `Leading`, `Content`, `Title`, `Subtitle`, `Trailing` |
|
|
236
|
+
| `Markdown` (react-markdown) | single element, `components` overrides |
|
|
237
|
+
| `MonthStepper` | `Root` (`value`, `locale`), `Previous`, `Label`, `Next` |
|
|
238
|
+
| `Message` | `Root` (`from`), `Bubble`, `Highlight`, `Sources`, `Suggestions`, `Suggestion`. A source row is a `ListRow.Link` |
|
|
239
|
+
| `NavBar` | `Root`, `Item` (`aria-current="page"` marks active). Items share the bar width equally |
|
|
240
|
+
| `OtpInput` (Radix) | `Root`, `Slot` (one per character), `Hidden` |
|
|
241
|
+
| `MultipleSelector` (cmdk) | `Root` (`value`, `fixed`, `max`), `Trigger`, `Value`, `Tags`, `Content`, then Combobox's `Frame`, `Input`, `List`, `Empty`, `Group`, `Item`, `ItemIndicator`, plus `Create` |
|
|
242
|
+
| `NavigationMenu` (Radix) | `Root` (includes the viewport), `List`, `Item`, `Trigger`, `Content`, `Link` |
|
|
243
|
+
| `Page` | `Root` (`tone`), `Content`, `Footer` |
|
|
244
|
+
| `MonthPicker` | `Root` (`value`, `locale`), then the Calendar parts `Frame`, `Header`, `Heading`, `Previous`, `Next`, `Months`, `Years` |
|
|
245
|
+
| `PageHeader` | `Root`, `Title`, `Actions` |
|
|
246
|
+
| `Pagination` | `Root`, `Previous`, `List`, `Page`, `Gap`, `Next` |
|
|
247
|
+
| `PillSelect` | single element, native `<select>` |
|
|
248
|
+
| `Popover` (Radix) | `Root`, `Trigger`, `Content`, `Close` |
|
|
249
|
+
| `Portal` | single element, `container`. Renders children outside the tree (copied from midday). Radix overlays already portal themselves |
|
|
250
|
+
| `Progress` (Radix) | `Root` (`value`, `max`), `Indicator` (`tone`) |
|
|
251
|
+
| `Radio` (Radix) | `Group`, `Item`, `Card` (`shape`: row, tile), `CardIndicator` |
|
|
252
|
+
| `ScrollArea` (Radix) | `Root` (`type`), `Viewport`, `Scrollbar` (`orientation`), `Corner` |
|
|
253
|
+
| `QuantityInput` | `Root` (`value`, `min`, `max`, `step`, `size`), `Decrement`, `Field`, `Increment`, `Unit`. `size='lg'` is the display stepper |
|
|
254
|
+
| `Select` (Radix) | `Root`, `Trigger`, `Value`, `Content`, `Group`, `Label`, `Item`, `Separator` |
|
|
255
|
+
| `Sidebar` | `Layout`, `Root` or `Rail` (icon only), `Header`, `Body`, `Section`, `Heading`, `Item` or `RailItem` (needs `aria-label`), `Footer`, `Content` (desktop only) |
|
|
256
|
+
| `Skeleton` | single element |
|
|
257
|
+
| `Spinner` | single element |
|
|
258
|
+
| `Stepper` | `Root` (`value`), `Item` (`step`), `Indicator`, `Label`, `Description` for a step list; `Pills` (`value`), `PillItem` (`step`), `Pill` for a row of milestone pills with the `Label` above |
|
|
259
|
+
| `Sheet` (Radix) | `Root`, `Trigger`, `Close`, `Content` (`side`: right, left, top, bottom), `Title`, `Description`, `Body`, `Actions` |
|
|
260
|
+
| `Slider` (Radix) | `Root`, `Track`, `Range`, `Thumb` (one per value) |
|
|
261
|
+
| `Stack` (animejs) | `Root` (`defaultValue`), `Item` (`value`, `tone`), `Trigger`, `Content` |
|
|
262
|
+
| `Stat` | `Root`, `Label`, `Value`, `Hint` |
|
|
263
|
+
| `Switch` (Radix) | `Root`, `Thumb` |
|
|
264
|
+
| `Table` | `Root`, `Caption`, `Head`, `Body`, `Row`, `Header`, `Cell` |
|
|
265
|
+
| `TagInput` | `Root` (`validate`), `Tags`, `Tag`, `Field`. Enter or comma adds, Backspace removes, paste splits |
|
|
266
|
+
| `Tabs` (Radix) | `Root`, `List`, `Trigger`, `Content` |
|
|
267
|
+
| `Text` | single element, `size`, `tone` |
|
|
268
|
+
| `Textarea` | single element, native `<textarea>` |
|
|
269
|
+
| `ToggleGroup` (Radix) | `Root` (`type`), `Item` for the segmented control; `Chips` (`type`), `Chip` for filter chips, with a `Chip.Dot` child for the colour |
|
|
270
|
+
| `TextMorph` (animejs) | single element, `as`. Only changed characters animate |
|
|
271
|
+
| `TextShimmer` | single element, `as`. Loading text, CSS only |
|
|
272
|
+
| `TimeRange` | `Root` (`value` as `{ start, stop }`), `Start`, `Stop`, `Duration` |
|
|
273
|
+
| `Toast` (sonner) | `Provider`, `show`, `Root`, `Title`, `Description`, `Action` |
|
|
274
|
+
| `Tooltip` (Radix) | `Root` (includes its provider), `Trigger`, `Content`, `Provider` |
|
|
274
275
|
|
|
275
276
|
Card tones: `surface` (default, follows the theme), `coral`, `yellow`, `indigo`, `mint`, `sky`.
|
|
276
277
|
|
package/dist/avatar-parts.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ declare const Image: ({ className, alt, ...props }: ComponentPropsWithRef<typeof
|
|
|
7
7
|
alt: string;
|
|
8
8
|
}) => JSX.Element;
|
|
9
9
|
declare const Fallback: Styled<typeof Nude.Fallback>;
|
|
10
|
+
declare const Group: Styled<"div">;
|
|
10
11
|
//#endregion
|
|
11
|
-
export { Fallback, Image, Root };
|
|
12
|
+
export { Fallback, Group, Image, Root };
|
package/dist/avatar-parts.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { stackedFill, stackedRing } from "./lib/theme.js";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import * as Nude from "@journ/nude/avatar-parts";
|
|
5
6
|
//#region src/avatar-parts.tsx
|
|
@@ -16,5 +17,9 @@ const Fallback = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Fallback,
|
|
|
16
17
|
...props,
|
|
17
18
|
className: cn("text-xs font-medium uppercase", className)
|
|
18
19
|
});
|
|
20
|
+
const Group = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Group, {
|
|
21
|
+
...props,
|
|
22
|
+
className: cn("flex items-center [&>*+*]:-ml-2.5 [&>*]:bg-linear-to-b [&>*]:from-current/10 [&>*]:to-current/10", stackedFill, stackedRing, className)
|
|
23
|
+
});
|
|
19
24
|
//#endregion
|
|
20
|
-
export { Fallback, Image, Root };
|
|
25
|
+
export { Fallback, Group, Image, Root };
|
package/dist/avatar.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Fallback, Image, Root } from "./avatar-parts.js";
|
|
1
|
+
import { Fallback, Group, Image, Root } from "./avatar-parts.js";
|
|
2
2
|
//#region src/avatar.d.ts
|
|
3
3
|
declare const Avatar: {
|
|
4
4
|
Root: typeof Root;
|
|
5
5
|
Image: typeof Image;
|
|
6
6
|
Fallback: typeof Fallback;
|
|
7
|
+
Group: typeof Group;
|
|
7
8
|
};
|
|
8
9
|
//#endregion
|
|
9
10
|
export { Avatar };
|
package/dist/avatar.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Fallback, Image, Root } from "./avatar-parts.js";
|
|
1
|
+
import { Fallback, Group, Image, Root } from "./avatar-parts.js";
|
|
2
2
|
//#region src/avatar.tsx
|
|
3
3
|
const Avatar = {
|
|
4
4
|
Root,
|
|
5
5
|
Image,
|
|
6
|
-
Fallback
|
|
6
|
+
Fallback,
|
|
7
|
+
Group
|
|
7
8
|
};
|
|
8
9
|
//#endregion
|
|
9
10
|
export { Avatar };
|
package/dist/breadcrumbs.d.ts
CHANGED
|
@@ -2,17 +2,21 @@ import { Styled } from "@journ/nude/styled";
|
|
|
2
2
|
//#region src/breadcrumbs.d.ts
|
|
3
3
|
declare const Root: Styled<"nav">;
|
|
4
4
|
declare const List: Styled<"ol">;
|
|
5
|
+
declare const Display: Styled<"ol">;
|
|
5
6
|
declare const Item: Styled<"li">;
|
|
6
7
|
declare const Link: Styled<"a">;
|
|
7
8
|
declare const Page: Styled<"span">;
|
|
8
9
|
declare const Separator: Styled<"li">;
|
|
10
|
+
declare const Slash: Styled<"li">;
|
|
9
11
|
declare const Breadcrumbs: {
|
|
10
12
|
Root: typeof Root;
|
|
11
13
|
List: typeof List;
|
|
14
|
+
Display: typeof Display;
|
|
12
15
|
Item: typeof Item;
|
|
13
16
|
Link: typeof Link;
|
|
14
17
|
Page: typeof Page;
|
|
15
18
|
Separator: typeof Separator;
|
|
19
|
+
Slash: typeof Slash;
|
|
16
20
|
};
|
|
17
21
|
//#endregion
|
|
18
22
|
export { Breadcrumbs };
|
package/dist/breadcrumbs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { displayTitle } from "./lib/text-styles.js";
|
|
2
3
|
import { ChevronRight } from "lucide-react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { Breadcrumbs as Breadcrumbs$1 } from "@journ/nude/breadcrumbs";
|
|
@@ -12,6 +13,10 @@ const List = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.List
|
|
|
12
13
|
...props,
|
|
13
14
|
className: cn("flex flex-wrap items-center gap-1.5 text-sm/6", className)
|
|
14
15
|
});
|
|
16
|
+
const Display = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.List, {
|
|
17
|
+
...props,
|
|
18
|
+
className: cn(displayTitle, "flex flex-wrap items-center gap-2", className)
|
|
19
|
+
});
|
|
15
20
|
const Item = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Item, {
|
|
16
21
|
...props,
|
|
17
22
|
className: cn("inline-flex items-center gap-1.5", className)
|
|
@@ -32,13 +37,22 @@ const Separator = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1
|
|
|
32
37
|
className: cn("opacity-40 [&>svg]:size-4", className),
|
|
33
38
|
children: /* @__PURE__ */ jsx(ChevronRight, {})
|
|
34
39
|
});
|
|
40
|
+
const Slash = ({ className, ...props }) => /* @__PURE__ */ jsx(Breadcrumbs$1.Separator, {
|
|
41
|
+
role: "presentation",
|
|
42
|
+
"aria-hidden": true,
|
|
43
|
+
...props,
|
|
44
|
+
className: cn("opacity-25", className),
|
|
45
|
+
children: "/"
|
|
46
|
+
});
|
|
35
47
|
const Breadcrumbs = {
|
|
36
48
|
Root,
|
|
37
49
|
List,
|
|
50
|
+
Display,
|
|
38
51
|
Item,
|
|
39
52
|
Link,
|
|
40
53
|
Page,
|
|
41
|
-
Separator
|
|
54
|
+
Separator,
|
|
55
|
+
Slash
|
|
42
56
|
};
|
|
43
57
|
//#endregion
|
|
44
58
|
export { Breadcrumbs };
|
package/dist/button.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { JSX, ReactNode } from "react";
|
|
|
3
3
|
import { ButtonProps as ButtonProps$1 } from "@journ/nude/button";
|
|
4
4
|
//#region src/button.d.ts
|
|
5
5
|
type ButtonTone = "neutral" | "field" | "coral" | "yellow" | "ink" | "ghost" | "outline";
|
|
6
|
-
|
|
6
|
+
type ButtonSize = "md" | "lg";
|
|
7
|
+
type ButtonVariants = {
|
|
7
8
|
tone?: ButtonTone;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
};
|
|
11
|
+
declare const button: Recipe<ButtonVariants>;
|
|
12
|
+
type ButtonProps = ButtonVariants & ButtonProps$1;
|
|
12
13
|
declare const buttonContent: (children: ReactNode, pending?: boolean) => JSX.Element;
|
|
13
|
-
declare const Button: ({ tone, pending, className, children, ...props }: ButtonProps) => JSX.Element;
|
|
14
|
+
declare const Button: ({ tone, size, pending, className, children, ...props }: ButtonProps) => JSX.Element;
|
|
14
15
|
//#endregion
|
|
15
16
|
export { Button, type ButtonProps, button, buttonContent };
|
package/dist/button.js
CHANGED
|
@@ -12,27 +12,36 @@ import { Button as Button$1 } from "@journ/nude/button";
|
|
|
12
12
|
const button = tv({
|
|
13
13
|
base: [
|
|
14
14
|
interactive,
|
|
15
|
-
controlSize,
|
|
16
15
|
"rounded-bloom inline-flex items-center justify-center gap-x-2 px-4 font-medium",
|
|
17
|
-
"[&>svg]:
|
|
16
|
+
"[&>svg]:shrink-0"
|
|
18
17
|
],
|
|
19
|
-
variants: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
variants: {
|
|
19
|
+
tone: {
|
|
20
|
+
neutral: solidTones.neutral,
|
|
21
|
+
field: control,
|
|
22
|
+
coral: solidTones.coral,
|
|
23
|
+
yellow: solidTones.yellow,
|
|
24
|
+
ink: inkTone,
|
|
25
|
+
ghost: "bg-transparent text-inherit",
|
|
26
|
+
outline: "border border-current/20 bg-transparent text-inherit"
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
md: `${controlSize} [&>svg]:size-5 sm:[&>svg]:size-4`,
|
|
30
|
+
lg: "h-12 gap-x-2.5 px-6 text-base/6 [&>svg]:size-4.5"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
tone: "neutral",
|
|
35
|
+
size: "md"
|
|
36
|
+
}
|
|
29
37
|
});
|
|
30
38
|
const buttonContent = (children, pending = false) => /* @__PURE__ */ jsxs(TouchTarget, { children: [pending && /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true }), children] });
|
|
31
|
-
const Button = ({ tone, pending = false, className, children, ...props }) => /* @__PURE__ */ jsx(Button$1, {
|
|
39
|
+
const Button = ({ tone, size, pending = false, className, children, ...props }) => /* @__PURE__ */ jsx(Button$1, {
|
|
32
40
|
...props,
|
|
33
41
|
pending,
|
|
34
42
|
className: button({
|
|
35
43
|
tone,
|
|
44
|
+
size,
|
|
36
45
|
class: cn(pending && "aria-busy:pointer-events-none", className)
|
|
37
46
|
}),
|
|
38
47
|
children: buttonContent(children, pending)
|
package/dist/card.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SurfaceTone } from "./lib/tones.js";
|
|
2
|
+
import { IconTileTone } from "./lib/icon-tile.js";
|
|
2
3
|
import { ComponentPropsWithRef, JSX } from "react";
|
|
3
4
|
import { Styled } from "@journ/nude/styled";
|
|
4
5
|
//#region src/card.d.ts
|
|
@@ -11,7 +12,11 @@ declare const Title: Styled<"h3">;
|
|
|
11
12
|
declare const Description: Styled<"p">;
|
|
12
13
|
declare const Content: Styled<"div">;
|
|
13
14
|
declare const Footer: Styled<"footer">;
|
|
14
|
-
|
|
15
|
+
type CardIconTone = Exclude<IconTileTone, "soft">;
|
|
16
|
+
type IconProps = ComponentPropsWithRef<"span"> & {
|
|
17
|
+
tone?: CardIconTone;
|
|
18
|
+
};
|
|
19
|
+
declare const Icon: ({ tone, className, ...props }: IconProps) => JSX.Element;
|
|
15
20
|
declare const Card: {
|
|
16
21
|
Root: typeof Root;
|
|
17
22
|
Icon: typeof Icon;
|
|
@@ -23,4 +28,4 @@ declare const Card: {
|
|
|
23
28
|
};
|
|
24
29
|
type CardProps = RootProps;
|
|
25
30
|
//#endregion
|
|
26
|
-
export { Card, type CardProps };
|
|
31
|
+
export { Card, type CardIconTone, type CardProps };
|
package/dist/card.js
CHANGED
|
@@ -42,11 +42,11 @@ const Footer = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Footer, {
|
|
|
42
42
|
...props,
|
|
43
43
|
className: cardFooter({ class: className })
|
|
44
44
|
});
|
|
45
|
-
const Icon = ({ className, ...props }) => /* @__PURE__ */ jsx(Card$1.Icon, {
|
|
45
|
+
const Icon = ({ tone = "outline", className, ...props }) => /* @__PURE__ */ jsx(Card$1.Icon, {
|
|
46
46
|
...props,
|
|
47
47
|
className: iconTile({
|
|
48
48
|
size: "md",
|
|
49
|
-
tone
|
|
49
|
+
tone,
|
|
50
50
|
class: className
|
|
51
51
|
})
|
|
52
52
|
});
|
package/dist/carousel-parts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconButtonProps } from "./icon-button.js";
|
|
2
|
-
import { JSX } from "react";
|
|
2
|
+
import { ComponentProps, JSX } from "react";
|
|
3
3
|
import * as Nude from "@journ/nude/carousel-parts";
|
|
4
4
|
import { Styled } from "@journ/nude/styled";
|
|
5
5
|
//#region src/carousel-parts.d.ts
|
|
@@ -10,5 +10,8 @@ declare const Content: Styled<"div">;
|
|
|
10
10
|
declare const Item: Styled<"div">;
|
|
11
11
|
declare const Previous: ({ tone, size, className, children, ...props }: IconButtonProps) => JSX.Element;
|
|
12
12
|
declare const Next: ({ tone, size, className, children, ...props }: IconButtonProps) => JSX.Element;
|
|
13
|
+
declare const Dots: Styled<"div">;
|
|
14
|
+
type DotProps = ComponentProps<typeof Nude.Dot>;
|
|
15
|
+
declare const Dot: ({ className, ...props }: DotProps) => JSX.Element;
|
|
13
16
|
//#endregion
|
|
14
|
-
export { Content, Item, Next, Previous, Root, type RootProps, useCarousel };
|
|
17
|
+
export { Content, Dot, Dots, Item, Next, Previous, Root, type RootProps, useCarousel };
|
package/dist/carousel-parts.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { interactive } from "./lib/interactive.js";
|
|
3
4
|
import { stepButton } from "./step-button.js";
|
|
4
5
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -49,5 +50,13 @@ const Next = ({ tone, size, className, children, ...props }) => {
|
|
|
49
50
|
})
|
|
50
51
|
});
|
|
51
52
|
};
|
|
53
|
+
const Dots = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Dots, {
|
|
54
|
+
...props,
|
|
55
|
+
className: cn("flex items-center gap-1.5", className)
|
|
56
|
+
});
|
|
57
|
+
const Dot = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Dot, {
|
|
58
|
+
...props,
|
|
59
|
+
className: cn(interactive, "h-1.75 w-1.75 bg-current opacity-30 transition-[width,opacity,transform] duration-200 before:absolute before:-inset-x-0.75 before:-inset-y-4.75 data-[state=active]:w-5.5 data-[state=active]:opacity-100 pointer-fine:before:hidden", className)
|
|
60
|
+
});
|
|
52
61
|
//#endregion
|
|
53
|
-
export { Content, Item, Next, Previous, Root, useCarousel };
|
|
62
|
+
export { Content, Dot, Dots, Item, Next, Previous, Root, useCarousel };
|
package/dist/carousel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Content, Item, Next, Previous, Root, RootProps, useCarousel } from "./carousel-parts.js";
|
|
1
|
+
import { Content, Dot, Dots, Item, Next, Previous, Root, RootProps, useCarousel } from "./carousel-parts.js";
|
|
2
2
|
//#region src/carousel.d.ts
|
|
3
3
|
declare const Carousel: {
|
|
4
4
|
Root: typeof Root;
|
|
@@ -6,6 +6,8 @@ declare const Carousel: {
|
|
|
6
6
|
Item: typeof Item;
|
|
7
7
|
Previous: typeof Previous;
|
|
8
8
|
Next: typeof Next;
|
|
9
|
+
Dots: typeof Dots;
|
|
10
|
+
Dot: typeof Dot;
|
|
9
11
|
};
|
|
10
12
|
//#endregion
|
|
11
13
|
export { Carousel, type RootProps as CarouselProps, useCarousel };
|
package/dist/carousel.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Content, Item, Next, Previous, Root, useCarousel } from "./carousel-parts.js";
|
|
1
|
+
import { Content, Dot, Dots, Item, Next, Previous, Root, useCarousel } from "./carousel-parts.js";
|
|
2
2
|
//#region src/carousel.tsx
|
|
3
3
|
const Carousel = {
|
|
4
4
|
Root,
|
|
5
5
|
Content,
|
|
6
6
|
Item,
|
|
7
7
|
Previous,
|
|
8
|
-
Next
|
|
8
|
+
Next,
|
|
9
|
+
Dots,
|
|
10
|
+
Dot
|
|
9
11
|
};
|
|
10
12
|
//#endregion
|
|
11
13
|
export { Carousel, useCarousel };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Nude from "@journ/nude/character-count-parts";
|
|
2
|
+
import { Styled } from "@journ/nude/styled";
|
|
3
|
+
//#region src/character-count-parts.d.ts
|
|
4
|
+
declare const useCharacterCount: typeof Nude.useCharacterCount;
|
|
5
|
+
declare const Provider: typeof Nude.Provider;
|
|
6
|
+
declare const Root: typeof Nude.Root;
|
|
7
|
+
declare const Control: typeof Nude.Control;
|
|
8
|
+
type RootProps = Nude.RootProps;
|
|
9
|
+
type CharacterCountContextValue = Nude.CharacterCountContextValue;
|
|
10
|
+
declare const Frame: Styled<"div">;
|
|
11
|
+
declare const Count: Styled<"span">;
|
|
12
|
+
declare const Max: typeof Nude.Max;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { type CharacterCountContextValue, Control, Count, Frame, Max, Provider, Root, type RootProps, useCharacterCount };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as Nude from "@journ/nude/character-count-parts";
|
|
4
|
+
//#region src/character-count-parts.tsx
|
|
5
|
+
const useCharacterCount = Nude.useCharacterCount;
|
|
6
|
+
const Provider = Nude.Provider;
|
|
7
|
+
const Root = Nude.Root;
|
|
8
|
+
const Control = Nude.Control;
|
|
9
|
+
const readout = "font-mono text-[0.625rem]/[0.875rem] tracking-wider tabular-nums opacity-60";
|
|
10
|
+
const Frame = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Frame, {
|
|
11
|
+
...props,
|
|
12
|
+
className: cn("flex flex-col gap-2", className)
|
|
13
|
+
});
|
|
14
|
+
const Count = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Count, {
|
|
15
|
+
...props,
|
|
16
|
+
className: cn(readout, "data-over:text-bloom-coral data-over:opacity-100", className)
|
|
17
|
+
});
|
|
18
|
+
const Max = ({ className, ...props }) => /* @__PURE__ */ jsx(Nude.Max, {
|
|
19
|
+
...props,
|
|
20
|
+
className: cn(readout, "before:mx-1 before:content-['/']", className)
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Control, Count, Frame, Max, Provider, Root, useCharacterCount };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CharacterCountContextValue, Control, Count, Frame, Max, Provider, Root, RootProps, useCharacterCount } from "./character-count-parts.js";
|
|
2
|
+
//#region src/character-count.d.ts
|
|
3
|
+
declare const CharacterCount: {
|
|
4
|
+
Provider: typeof Provider;
|
|
5
|
+
Root: typeof Root;
|
|
6
|
+
Frame: typeof Frame;
|
|
7
|
+
Control: typeof Control;
|
|
8
|
+
Count: typeof Count;
|
|
9
|
+
Max: typeof Max;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { CharacterCount, type CharacterCountContextValue, type RootProps as CharacterCountProps, useCharacterCount };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Control, Count, Frame, Max, Provider, Root, useCharacterCount } from "./character-count-parts.js";
|
|
2
|
+
//#region src/character-count.tsx
|
|
3
|
+
const CharacterCount = {
|
|
4
|
+
Provider,
|
|
5
|
+
Root,
|
|
6
|
+
Frame,
|
|
7
|
+
Control,
|
|
8
|
+
Count,
|
|
9
|
+
Max
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { CharacterCount, useCharacterCount };
|