@journ/bloom-solid 0.0.0-stage → 0.1.1

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 (96) hide show
  1. package/DESIGN.md +46 -0
  2. package/LICENSE +21 -0
  3. package/README.md +148 -2
  4. package/dist/accordion.d.ts +18 -0
  5. package/dist/accordion.jsx +20 -0
  6. package/dist/alert.d.ts +12 -0
  7. package/dist/alert.jsx +19 -0
  8. package/dist/badge.d.ts +11 -0
  9. package/dist/badge.jsx +12 -0
  10. package/dist/bulk-bar.d.ts +6 -0
  11. package/dist/bulk-bar.jsx +9 -0
  12. package/dist/button.d.ts +14 -0
  13. package/dist/button.jsx +45 -0
  14. package/dist/card.d.ts +21 -0
  15. package/dist/card.jsx +21 -0
  16. package/dist/checkbox.d.ts +14 -0
  17. package/dist/checkbox.jsx +19 -0
  18. package/dist/collapsible.d.ts +18 -0
  19. package/dist/collapsible.jsx +16 -0
  20. package/dist/composer.d.ts +8 -0
  21. package/dist/composer.jsx +10 -0
  22. package/dist/description-list.d.ts +6 -0
  23. package/dist/description-list.jsx +8 -0
  24. package/dist/dialog.d.ts +32 -0
  25. package/dist/dialog.jsx +29 -0
  26. package/dist/divider.d.ts +9 -0
  27. package/dist/divider.jsx +5 -0
  28. package/dist/empty-state.d.ts +8 -0
  29. package/dist/empty-state.jsx +12 -0
  30. package/dist/field.d.ts +26 -0
  31. package/dist/field.jsx +24 -0
  32. package/dist/index.d.ts +36 -0
  33. package/dist/index.js +35 -0
  34. package/dist/input.d.ts +3 -0
  35. package/dist/input.jsx +8 -0
  36. package/dist/lib/cn.d.ts +3 -0
  37. package/dist/lib/cn.js +3 -0
  38. package/dist/lib/icon-tile.d.ts +8 -0
  39. package/dist/lib/icon-tile.js +23 -0
  40. package/dist/lib/icons.d.ts +5 -0
  41. package/dist/lib/icons.jsx +10 -0
  42. package/dist/lib/interactive.d.ts +3 -0
  43. package/dist/lib/interactive.js +11 -0
  44. package/dist/lib/styled-part.d.ts +15 -0
  45. package/dist/lib/styled-part.jsx +15 -0
  46. package/dist/lib/text-styles.d.ts +12 -0
  47. package/dist/lib/text-styles.js +12 -0
  48. package/dist/lib/theme.d.ts +31 -0
  49. package/dist/lib/theme.js +32 -0
  50. package/dist/lib/tones.d.ts +14 -0
  51. package/dist/lib/tones.js +44 -0
  52. package/dist/lib/tv.d.ts +6 -0
  53. package/dist/lib/tv.js +2 -0
  54. package/dist/list-row.d.ts +20 -0
  55. package/dist/list-row.jsx +28 -0
  56. package/dist/nav-bar.d.ts +5 -0
  57. package/dist/nav-bar.jsx +10 -0
  58. package/dist/page-header.d.ts +6 -0
  59. package/dist/page-header.jsx +8 -0
  60. package/dist/page.d.ts +15 -0
  61. package/dist/page.jsx +15 -0
  62. package/dist/portal.d.ts +2 -0
  63. package/dist/portal.jsx +1 -0
  64. package/dist/progress.d.ts +9 -0
  65. package/dist/progress.jsx +6 -0
  66. package/dist/radio.d.ts +19 -0
  67. package/dist/radio.jsx +16 -0
  68. package/dist/select.d.ts +10 -0
  69. package/dist/select.jsx +13 -0
  70. package/dist/sidebar.d.ts +14 -0
  71. package/dist/sidebar.jsx +25 -0
  72. package/dist/skeleton.d.ts +2 -0
  73. package/dist/skeleton.jsx +5 -0
  74. package/dist/spinner.d.ts +3 -0
  75. package/dist/spinner.jsx +7 -0
  76. package/dist/stat.d.ts +7 -0
  77. package/dist/stat.jsx +10 -0
  78. package/dist/styles.css +2 -0
  79. package/dist/switch.d.ts +14 -0
  80. package/dist/switch.jsx +16 -0
  81. package/dist/table.d.ts +11 -0
  82. package/dist/table.jsx +16 -0
  83. package/dist/tabs.d.ts +15 -0
  84. package/dist/tabs.jsx +14 -0
  85. package/dist/tag-input.d.ts +18 -0
  86. package/dist/tag-input.jsx +26 -0
  87. package/dist/text.d.ts +9 -0
  88. package/dist/text.jsx +14 -0
  89. package/dist/textarea.d.ts +3 -0
  90. package/dist/textarea.jsx +8 -0
  91. package/dist/tile.d.ts +16 -0
  92. package/dist/tile.jsx +22 -0
  93. package/dist/tokens.css +76 -0
  94. package/dist/touch-target.d.ts +3 -0
  95. package/dist/touch-target.jsx +7 -0
  96. package/package.json +286 -3
package/DESIGN.md ADDED
@@ -0,0 +1,46 @@
1
+ # Bloom Solid design system
2
+
3
+ `@journ/bloom-solid` applies Bloom's visual language to SolidJS 2 primitives. It owns styles and decorative content. `@journ/nude-solid` owns state, browser behavior, keyboard navigation, and ARIA.
4
+
5
+ ## Appearance
6
+
7
+ Use monochrome surfaces, hairline borders, square corners, and restrained status colors. Use Hedvig Letters Sans for body text and monospace for numbers and status labels. Load the typeface in the application or override `--font-bloom-display`.
8
+
9
+ Use `bloom-*` tokens for color. Shared light and dark pairings live in `src/lib/theme.ts`. Tone maps live in `src/lib/tones.ts`. Components must not repeat dark variants or introduce raw colors.
10
+
11
+ Primary buttons invert with the theme. Colored buttons use a solid fill. Colored cards and dialogs use a faint wash with a colored border. Secondary text uses opacity.
12
+
13
+ Use `rounded-bloom` for square shapes. The `--radius-bloom` token controls their radius. Use round shapes for badges, radio inputs, and switches.
14
+
15
+ ## Composition
16
+
17
+ - Wrap the corresponding `nude-solid` part. Keep state and event handling in the primitive.
18
+ - Keep provider and root contracts intact. Re-export each compound's `useX` function for custom parts.
19
+ - Use independent parts and children. Avoid layout flags that insert or remove optional sections.
20
+ - Read reactive props where they are used. Do not destructure props in a component body.
21
+ - Use functional components and immutable data. New source files contain no code comments.
22
+ - Structural parts preserve typed `as` composition. Native control refs point to the input or select.
23
+ - Merge Solid's `class` values through the shared `cn` helper. Keep consumer overrides last.
24
+ - Remove variant props before forwarding props to the DOM.
25
+
26
+ ## Controls and feedback
27
+
28
+ Use native inputs inside the Checkbox, Radio, and Switch label structures. Decorative marks must remain hidden from assistive technology. Keep inputs focusable and preserve their native form behavior.
29
+
30
+ Pressable controls use keyboard focus outlines. Touch layouts provide at least 44px hit areas. Text inputs use 16px on mobile and 14px on larger screens.
31
+
32
+ Native dialogs enter the browser's modal top layer. Closed dialogs must retain their native hidden state. Apply flex layout only under the `open` selector. The primitive manages focus and dismissal.
33
+
34
+ Use transforms and opacity for motion. Dialog entry lasts 100ms and content reveal lasts 120ms. Gate animations behind `motion-safe` and remove transition motion under reduced motion.
35
+
36
+ ## CSS delivery
37
+
38
+ `styles.css` includes precompiled Tailwind utilities and tokens. Consumers can use it without Tailwind.
39
+
40
+ `tokens.css` provides theme tokens, theme selection, motion utilities, and the scrollbar utility for applications that run Tailwind themselves. The visual values match React Bloom, but the Solid library has no dependency on that package.
41
+
42
+ ## Scope
43
+
44
+ The catalog covers the 33 components currently available in `nude-solid`. Spinner and TouchTarget are additional presentational helpers. Add new behavioral components to `nude-solid` before introducing their Bloom style layer.
45
+
46
+ Run the package lint target to check token colors, shared theme pairings, typography, focus outlines, scrollbar styling, and spacing.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Journ
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,149 @@
1
- # Temporary Holding Version
1
+ # @journ/bloom-solid
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Bloom's design system for SolidJS 2. Styled components compose `@journ/nude-solid` primitives and add Bloom's tokens, variants, and motion. React `@journ/bloom` remains a separate package.
4
+
5
+ The catalog covers all 33 components in `nude-solid`, plus `Spinner` and `TouchTarget`. The package uses native form controls and native dialogs. It has no React dependency.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add @journ/bloom-solid solid-js@^2.0.4 @solidjs/web@^2.0.4
11
+ ```
12
+
13
+ Import the precompiled stylesheet once. Your application does not need Tailwind to use this stylesheet.
14
+
15
+ ```ts
16
+ import '@journ/bloom-solid/styles.css'
17
+ ```
18
+
19
+ Compile JSX with a Solid 2 compiler. For Vite, use `@solidjs/vite-plugin`. Configure TypeScript with `"jsx": "preserve"` and `"jsxImportSource": "@solidjs/web"`.
20
+
21
+ ## Compose components
22
+
23
+ ```tsx
24
+ import { Button } from '@journ/bloom-solid/button'
25
+ import { Card } from '@journ/bloom-solid/card'
26
+
27
+ const Project = () => (
28
+ <Card.Root tone='surface'>
29
+ <Card.Header>
30
+ <Card.Title>Project overview</Card.Title>
31
+ </Card.Header>
32
+ <Card.Content>Your next milestone is ready for review.</Card.Content>
33
+ <Card.Footer>
34
+ <Button tone='neutral'>Open project</Button>
35
+ <Button tone='outline'>Share</Button>
36
+ </Card.Footer>
37
+ </Card.Root>
38
+ )
39
+ ```
40
+
41
+ Every component has a subpath export. The package also exports its components from the root.
42
+
43
+ ## State and providers
44
+
45
+ Behavior and state belong to `nude-solid`. Stateful compounds preserve its `Root`, `Provider`, and `useX` APIs. A provider can receive state from a signal, store, or application service.
46
+
47
+ ```tsx
48
+ import { createSignal } from 'solid-js'
49
+ import { Tabs } from '@journ/bloom-solid/tabs'
50
+
51
+ const Settings = () => {
52
+ const [value, select] = createSignal('profile')
53
+
54
+ return (
55
+ <Tabs.Provider
56
+ state={{
57
+ get value() {
58
+ return value()
59
+ },
60
+ }}
61
+ actions={{ select }}
62
+ meta={{ id: 'settings', orientation: 'horizontal', activationMode: 'automatic', dir: 'ltr' }}
63
+ >
64
+ <Tabs.Frame>
65
+ <Tabs.List aria-label='Settings'>
66
+ <Tabs.Trigger value='profile'>Profile</Tabs.Trigger>
67
+ <Tabs.Trigger value='security'>Security</Tabs.Trigger>
68
+ </Tabs.List>
69
+ <Tabs.Content value='profile'>Profile settings</Tabs.Content>
70
+ <Tabs.Content value='security'>Security settings</Tabs.Content>
71
+ </Tabs.Frame>
72
+ </Tabs.Provider>
73
+ )
74
+ }
75
+ ```
76
+
77
+ `Root` renders no DOM for Accordion, Collapsible, Dialog, Tabs, and TagInput. Use their DOM parts to choose layout and semantics. `Tabs.Frame` supplies the vertical layout and 16px gap used by React Bloom. Props and classes remain reactive. Consumer handlers run first and can call `preventDefault()` to cancel internal behavior.
78
+
79
+ ## Native controls
80
+
81
+ Checkbox and Switch roots render labels. Their `Control` parts render native inputs with decorative marks. Add the label text beside the control. Radio uses a fieldset, legend, labels, and radio inputs. Select renders a native select.
82
+
83
+ ```tsx
84
+ import { Checkbox } from '@journ/bloom-solid/checkbox'
85
+ import { Switch } from '@journ/bloom-solid/switch'
86
+
87
+ const Preferences = () => (
88
+ <form>
89
+ <Checkbox.Root name='updates' value='yes' defaultChecked>
90
+ <Checkbox.Control />
91
+ Receive project updates
92
+ </Checkbox.Root>
93
+ <Switch.Root name='notifications'>
94
+ <Switch.Control />
95
+ Enable notifications
96
+ </Switch.Root>
97
+ </form>
98
+ )
99
+ ```
100
+
101
+ Control refs point to the native input. Form submission, required validation, disabled state, and form reset behavior come from `nude-solid`. `Switch.Control` includes its track and thumb. `Checkbox.Control` includes its check mark.
102
+
103
+ `Dialog.Content` uses a native dialog and preserves browser focus containment, Escape dismissal, and focus restoration. Give every dialog a title. Its `tone` changes the surface color without changing behavior.
104
+
105
+ ## Variants and customization
106
+
107
+ - Button: `tone` is `neutral`, `field`, `coral`, `yellow`, `ink`, `ghost`, or `outline`. `size` is `md` or `lg`.
108
+ - Card, Alert, Tile, Field.Frame, and Dialog.Content: `tone` is `surface`, `coral`, `yellow`, `indigo`, `mint`, or `sky`.
109
+ - Badge: `tone` is `neutral`, `coral`, `yellow`, `indigo`, `mint`, `sky`, or `ink`.
110
+ - Page.Root: `tone` is `canvas`, `ink`, `coral`, `yellow`, `indigo`, `mint`, or `sky`.
111
+ - ListRow: `tone` is `surface`, `soft`, or `outline`.
112
+ - Progress: `tone` is `neutral`, `coral`, `yellow`, `indigo`, `mint`, or `sky`.
113
+ - Text: `size` is `sm`, `md`, or `lg`. `tone` is `default` or `muted`.
114
+
115
+ Use Solid's `class`, `style`, and `ref` props. Classes accept strings, arrays, and condition objects. Later Tailwind utilities win when classes conflict. Structural parts preserve the typed `as` prop, including custom Solid components.
116
+
117
+ ```tsx
118
+ <Card.Root as='article' tone='mint' class='project-card'>
119
+ <Card.Title as='h1'>Project</Card.Title>
120
+ </Card.Root>
121
+ ```
122
+
123
+ The stylesheet contains the package's utilities. Add custom rules in your CSS, or use your own Tailwind build for additional utilities.
124
+
125
+ ## With your own Tailwind
126
+
127
+ Import the tokens and scan the package instead of importing `styles.css`:
128
+
129
+ ```css
130
+ @import 'tailwindcss';
131
+ @import '@journ/bloom-solid/tokens.css';
132
+ @source '../node_modules/@journ/bloom-solid/dist';
133
+ ```
134
+
135
+ Tokens use the `bloom-*` names. Without a class, the theme follows the operating system. Add `.light` or `.dark` to the document root to force a theme. The token entry includes motion utilities. Animations respect reduced motion.
136
+
137
+ [DESIGN.md](./DESIGN.md) describes the styling and composition rules.
138
+
139
+ ## Ladle
140
+
141
+ Run `pnpm nx run @journ/playground:dev` and select **Bloom Solid / Components**. Each of the 33 components has a preview. Relevant previews expose tone, size, pending, disabled, invalid, orientation, and activation controls. **Bloom Solid / Style parity** renders matching React and Solid samples side by side for checking typography, spacing, colors, and states.
142
+
143
+ ## Validation
144
+
145
+ ```sh
146
+ pnpm nx run-many -t build typecheck test lint format:check test:package --projects=@journ/bloom-solid
147
+ ```
148
+
149
+ The build emits declarations, JSX with a `solid` export condition, precompiled CSS, and tokens. The package check builds browser and SSR consumers, verifies CSS output, and checks hydration with working controls.
@@ -0,0 +1,18 @@
1
+ import { Accordion as Nude, useAccordion } from '@journ/nude-solid/accordion';
2
+ import type { ComponentProps, JSX } from '@solidjs/web';
3
+ declare const Frame: (props: ComponentProps<typeof Nude.Frame>) => JSX.Element;
4
+ declare const Item: (props: ComponentProps<typeof Nude.Item>) => JSX.Element;
5
+ declare const Header: (props: ComponentProps<typeof Nude.Header>) => JSX.Element;
6
+ declare const Trigger: (props: ComponentProps<typeof Nude.Trigger>) => JSX.Element;
7
+ declare const Content: (props: ComponentProps<typeof Nude.Content>) => JSX.Element;
8
+ declare const Accordion: {
9
+ Root: (props: import("@journ/nude-solid/accordion").AccordionProps) => JSX.Element;
10
+ Provider: (props: import("solid-js").ParentProps<import("@journ/nude-solid/accordion").AccordionContextValue>) => JSX.Element;
11
+ Frame: typeof Frame;
12
+ Item: typeof Item;
13
+ Header: typeof Header;
14
+ Trigger: typeof Trigger;
15
+ Content: typeof Content;
16
+ };
17
+ export { Accordion, useAccordion };
18
+ export type { AccordionProps, AccordionContextValue } from '@journ/nude-solid/accordion';
@@ -0,0 +1,20 @@
1
+ import { Accordion as Nude, useAccordion } from '@journ/nude-solid/accordion';
2
+ import { omit } from 'solid-js';
3
+ import { cn } from './lib/cn.js';
4
+ import { ChevronDown } from './lib/icons.jsx';
5
+ import { pressReset } from './lib/interactive.js';
6
+ import { displayHeading } from './lib/text-styles.js';
7
+ const Root = Nude.Root;
8
+ const Provider = Nude.Provider;
9
+ const Frame = (props) => (<Nude.Frame {...props} class={cn('w-full', props.class)}/>);
10
+ const Item = (props) => (<Nude.Item {...props} class={cn('border-b border-current/15 last:border-b-0', props.class)}/>);
11
+ const Header = (props) => (<Nude.Header {...props} class={cn('flex', props.class)}/>);
12
+ const Trigger = (props) => (<Nude.Trigger {...omit(props, 'children', 'class')} class={cn(pressReset, displayHeading, 'group flex flex-1 cursor-default items-center justify-between gap-4 py-4 text-left outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky disabled:opacity-50', props.class)}>
13
+ {props.children}
14
+ <ChevronDown class='size-4 shrink-0 transition-transform group-aria-expanded:rotate-180 motion-reduce:transition-none'/>
15
+ </Nude.Trigger>);
16
+ const Content = (props) => (<Nude.Content {...omit(props, 'class', 'children')} class='motion-safe:animate-bloom-solid-reveal overflow-hidden'>
17
+ <div class={cn('pb-4 text-sm/5', props.class)}>{props.children}</div>
18
+ </Nude.Content>);
19
+ const Accordion = { Root, Provider, Frame, Item, Header, Trigger, Content };
20
+ export { Accordion, useAccordion };
@@ -0,0 +1,12 @@
1
+ import { type SurfaceTone } from './lib/tones.js';
2
+ declare const Alert: {
3
+ Root: import("./lib/styled-part.jsx").StyledPart<"div", {
4
+ tone?: SurfaceTone;
5
+ }>;
6
+ Icon: import("./lib/styled-part.jsx").StyledPart<"span", object>;
7
+ Body: import("./lib/styled-part.jsx").StyledPart<"div", object>;
8
+ Title: import("./lib/styled-part.jsx").StyledPart<"p", object>;
9
+ Description: import("./lib/styled-part.jsx").StyledPart<"p", object>;
10
+ Actions: import("./lib/styled-part.jsx").StyledPart<"div", object>;
11
+ };
12
+ export { Alert };
package/dist/alert.jsx ADDED
@@ -0,0 +1,19 @@
1
+ import { Alert as Nude } from '@journ/nude-solid/alert';
2
+ import { cn } from './lib/cn.js';
3
+ import { styledPart } from './lib/styled-part.jsx';
4
+ import { displayLabel } from './lib/text-styles.js';
5
+ import { surfaceTones } from './lib/tones.js';
6
+ import { tv } from './lib/tv.js';
7
+ const alert = tv({
8
+ base: 'rounded-bloom flex items-start gap-3 p-4',
9
+ variants: { tone: surfaceTones },
10
+ defaultVariants: { tone: 'surface' },
11
+ });
12
+ const Root = styledPart(Nude.Root, props => alert({ tone: props.tone, class: cn(props.class) }), ['tone']);
13
+ const Icon = styledPart(Nude.Icon, props => cn('mt-0.5 shrink-0 [&>svg]:size-5', props.class));
14
+ const Body = styledPart(Nude.Body, props => cn('flex min-w-0 flex-1 flex-col gap-1', props.class));
15
+ const Title = styledPart(Nude.Title, props => cn(displayLabel, props.class));
16
+ const Description = styledPart(Nude.Description, props => cn('text-sm/5 opacity-80', props.class));
17
+ const Actions = styledPart(Nude.Actions, props => cn('mt-2 flex items-center gap-2', props.class));
18
+ const Alert = { Root, Icon, Body, Title, Description, Actions };
19
+ export { Alert };
@@ -0,0 +1,11 @@
1
+ import { type StyledPartProps } from './lib/styled-part.jsx';
2
+ import { type LabelTone } from './lib/tones.js';
3
+ type BadgeTone = LabelTone | 'ink';
4
+ declare const Badge: import("./lib/styled-part.jsx").StyledPart<"span", {
5
+ tone?: BadgeTone;
6
+ }>;
7
+ type BadgeProps = StyledPartProps<'span', {
8
+ tone?: BadgeTone;
9
+ }>;
10
+ export { Badge };
11
+ export type { BadgeTone, BadgeProps };
package/dist/badge.jsx ADDED
@@ -0,0 +1,12 @@
1
+ import { Badge as NudeBadge } from '@journ/nude-solid/badge';
2
+ import { cn } from './lib/cn.js';
3
+ import { styledPart } from './lib/styled-part.jsx';
4
+ import { inkTone, labelTones } from './lib/tones.js';
5
+ import { tv } from './lib/tv.js';
6
+ const badge = tv({
7
+ base: 'inline-flex items-center rounded-full px-2.5 py-0.5 font-mono text-xs/5 tabular-nums',
8
+ variants: { tone: { ...labelTones, ink: inkTone } },
9
+ defaultVariants: { tone: 'neutral' },
10
+ });
11
+ const Badge = styledPart(NudeBadge, props => badge({ tone: props.tone, class: cn(props.class) }), ['tone']);
12
+ export { Badge };
@@ -0,0 +1,6 @@
1
+ declare const BulkBar: {
2
+ Root: import("./lib/styled-part.jsx").StyledPart<"div", object>;
3
+ Count: import("./lib/styled-part.jsx").StyledPart<"p", object>;
4
+ Actions: import("./lib/styled-part.jsx").StyledPart<"div", object>;
5
+ };
6
+ export { BulkBar };
@@ -0,0 +1,9 @@
1
+ import { BulkBar as Nude } from '@journ/nude-solid/bulk-bar';
2
+ import { cn } from './lib/cn.js';
3
+ import { styledPart } from './lib/styled-part.jsx';
4
+ import { raised } from './lib/theme.js';
5
+ const Root = styledPart(Nude.Root, props => cn(raised, 'sticky bottom-4 flex h-12 items-center gap-3 pr-2 pl-4 shadow-md', props.class));
6
+ const Count = styledPart(Nude.Count, props => cn('text-sm/6 font-medium tabular-nums', props.class));
7
+ const Actions = styledPart(Nude.Actions, props => cn('ml-auto flex items-center gap-1', props.class));
8
+ const BulkBar = { Root, Count, Actions };
9
+ export { BulkBar };
@@ -0,0 +1,14 @@
1
+ import { type ButtonProps as NudeButtonProps } from '@journ/nude-solid/button';
2
+ import type { JSX } from '@solidjs/web';
3
+ import { type Recipe } from './lib/tv.js';
4
+ type ButtonTone = 'neutral' | 'field' | 'coral' | 'yellow' | 'ink' | 'ghost' | 'outline';
5
+ type ButtonSize = 'md' | 'lg';
6
+ type ButtonVariants = {
7
+ tone?: ButtonTone;
8
+ size?: ButtonSize;
9
+ };
10
+ type ButtonProps = ButtonVariants & NudeButtonProps;
11
+ declare const button: Recipe<ButtonVariants>;
12
+ declare const Button: (props: ButtonProps) => JSX.Element;
13
+ export { Button, button };
14
+ export type { ButtonProps, ButtonTone, ButtonSize };
@@ -0,0 +1,45 @@
1
+ import { Button as NudeButton } from '@journ/nude-solid/button';
2
+ import { Show, omit } from 'solid-js';
3
+ import { cn } from './lib/cn.js';
4
+ import { interactive } from './lib/interactive.js';
5
+ import { controlSize } from './lib/text-styles.js';
6
+ import { control } from './lib/theme.js';
7
+ import { inkTone, solidTones } from './lib/tones.js';
8
+ import { tv } from './lib/tv.js';
9
+ import { Spinner } from './spinner.jsx';
10
+ import { TouchTarget } from './touch-target.jsx';
11
+ const button = tv({
12
+ base: [
13
+ interactive,
14
+ 'rounded-bloom inline-flex items-center justify-center gap-x-2 px-4 font-medium [&>svg]:shrink-0',
15
+ ],
16
+ variants: {
17
+ tone: {
18
+ neutral: solidTones.neutral,
19
+ field: control,
20
+ coral: solidTones.coral,
21
+ yellow: solidTones.yellow,
22
+ ink: inkTone,
23
+ ghost: 'bg-transparent text-inherit',
24
+ outline: 'border border-current/20 bg-transparent text-inherit',
25
+ },
26
+ size: {
27
+ md: `${controlSize} [&>svg]:size-5 sm:[&>svg]:size-4`,
28
+ lg: 'h-12 gap-x-2.5 px-6 text-base/6 [&>svg]:size-4.5',
29
+ },
30
+ },
31
+ defaultVariants: { tone: 'neutral', size: 'md' },
32
+ });
33
+ const Button = (props) => (<NudeButton {...omit(props, 'tone', 'size', 'class', 'children')} class={button({
34
+ tone: props.tone,
35
+ size: props.size,
36
+ class: cn(props.pending && 'aria-busy:pointer-events-none', props.class),
37
+ })}>
38
+ <TouchTarget>
39
+ <Show when={props.pending}>
40
+ <Spinner aria-hidden='true'/>
41
+ </Show>
42
+ {props.children}
43
+ </TouchTarget>
44
+ </NudeButton>);
45
+ export { Button, button };
package/dist/card.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { type IconTileTone } from './lib/icon-tile.js';
2
+ import { type StyledPartProps } from './lib/styled-part.jsx';
3
+ import { type SurfaceTone } from './lib/tones.js';
4
+ type CardVariants = {
5
+ tone?: SurfaceTone;
6
+ };
7
+ type CardIconTone = Exclude<IconTileTone, 'soft'>;
8
+ declare const Card: {
9
+ Root: import("./lib/styled-part.jsx").StyledPart<"div", CardVariants>;
10
+ Header: import("./lib/styled-part.jsx").StyledPart<"div", object>;
11
+ Title: import("./lib/styled-part.jsx").StyledPart<"h3", object>;
12
+ Description: import("./lib/styled-part.jsx").StyledPart<"p", object>;
13
+ Content: import("./lib/styled-part.jsx").StyledPart<"div", object>;
14
+ Footer: import("./lib/styled-part.jsx").StyledPart<"footer", object>;
15
+ Icon: import("./lib/styled-part.jsx").StyledPart<"span", {
16
+ tone?: CardIconTone;
17
+ }>;
18
+ };
19
+ type CardProps = StyledPartProps<'div', CardVariants>;
20
+ export { Card };
21
+ export type { CardVariants, CardIconTone, CardProps };
package/dist/card.jsx ADDED
@@ -0,0 +1,21 @@
1
+ import { Card as Nude } from '@journ/nude-solid/card';
2
+ import { cn } from './lib/cn.js';
3
+ import { iconTile } from './lib/icon-tile.js';
4
+ import { styledPart } from './lib/styled-part.jsx';
5
+ import { displayTitle, mutedText } from './lib/text-styles.js';
6
+ import { surfaceTones } from './lib/tones.js';
7
+ import { tv } from './lib/tv.js';
8
+ const cardRoot = tv({
9
+ base: 'rounded-bloom flex flex-col gap-3 p-6',
10
+ variants: { tone: surfaceTones },
11
+ defaultVariants: { tone: 'surface' },
12
+ });
13
+ const Root = styledPart(Nude.Root, props => cardRoot({ tone: props.tone, class: cn(props.class) }), ['tone']);
14
+ const Header = styledPart(Nude.Header, props => cn('flex items-start justify-between gap-4', props.class));
15
+ const Title = styledPart(Nude.Title, props => cn(displayTitle, props.class));
16
+ const Description = styledPart(Nude.Description, props => cn(mutedText, props.class));
17
+ const Content = styledPart(Nude.Content, props => cn('flex flex-col gap-2', props.class));
18
+ const Footer = styledPart(Nude.Footer, props => cn('flex flex-wrap items-center gap-2', props.class));
19
+ const Icon = styledPart(Nude.Icon, props => iconTile({ size: 'md', tone: props.tone ?? 'outline', class: cn(props.class) }), ['tone']);
20
+ const Card = { Root, Header, Title, Description, Content, Footer, Icon };
21
+ export { Card };
@@ -0,0 +1,14 @@
1
+ import { Checkbox as Nude, useCheckbox } from '@journ/nude-solid/checkbox';
2
+ import type { ComponentProps, JSX } from '@solidjs/web';
3
+ declare const Root: (props: ComponentProps<typeof Nude.Root>) => JSX.Element;
4
+ declare const Control: (props: ComponentProps<typeof Nude.Control>) => JSX.Element;
5
+ declare const Indicator: (props: ComponentProps<typeof Nude.Indicator>) => JSX.Element;
6
+ declare const Checkbox: {
7
+ Root: typeof Root;
8
+ Provider: (props: import("solid-js").ParentProps<import("@journ/nude-solid/checkbox").CheckboxContextValue>) => JSX.Element;
9
+ Control: typeof Control;
10
+ Indicator: typeof Indicator;
11
+ Thumb: (props: JSX.HTMLAttributes<HTMLSpanElement>) => JSX.Element;
12
+ };
13
+ export { Checkbox, useCheckbox };
14
+ export type { CheckboxProps, CheckboxContextValue } from '@journ/nude-solid/checkbox';
@@ -0,0 +1,19 @@
1
+ import { Checkbox as Nude, useCheckbox } from '@journ/nude-solid/checkbox';
2
+ import { omit } from 'solid-js';
3
+ import { cn } from './lib/cn.js';
4
+ import { TouchTarget } from './touch-target.jsx';
5
+ import { Check } from './lib/icons.jsx';
6
+ import { pressReset } from './lib/interactive.js';
7
+ const Provider = Nude.Provider;
8
+ const Root = (props) => (<Nude.Root {...props} class={cn(pressReset, 'inline-flex cursor-default items-center gap-3 text-sm', props.class)}/>);
9
+ const Control = (props) => (<span class='relative inline-grid size-4 shrink-0 place-items-center has-disabled:opacity-50'>
10
+ <Nude.Control {...props} class={cn('peer absolute inset-0 size-4 appearance-none border border-current/30 outline-none checked:bg-current/10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-bloom-sky disabled:cursor-not-allowed', props.class)}/>
11
+ <TouchTarget />
12
+ <Check class='pointer-events-none size-3 opacity-0 peer-checked:opacity-100'/>
13
+ </span>);
14
+ const Indicator = (props) => (<Nude.Indicator {...omit(props, 'children', 'class')} class={cn('inline-grid place-items-center [&>svg]:size-3', props.class)}>
15
+ {props.children ?? <Check />}
16
+ </Nude.Indicator>);
17
+ const Thumb = Nude.Thumb;
18
+ const Checkbox = { Root, Provider, Control, Indicator, Thumb };
19
+ export { Checkbox, useCheckbox };
@@ -0,0 +1,18 @@
1
+ import { Collapsible as Nude, useCollapsible } from '@journ/nude-solid/collapsible';
2
+ import type { ComponentProps, JSX } from '@solidjs/web';
3
+ import { type ButtonTone, type ButtonSize } from './button.jsx';
4
+ type TriggerProps = ComponentProps<typeof Nude.Trigger> & {
5
+ tone?: ButtonTone;
6
+ size?: ButtonSize;
7
+ };
8
+ declare const Trigger: (props: TriggerProps) => JSX.Element;
9
+ declare const Content: (props: ComponentProps<typeof Nude.Content>) => JSX.Element;
10
+ declare const Collapsible: {
11
+ Root: (props: import("@journ/nude-solid/collapsible").CollapsibleProps) => JSX.Element;
12
+ Provider: (props: import("solid-js").ParentProps<import("@journ/nude-solid/collapsible").CollapsibleContextValue>) => JSX.Element;
13
+ Frame: import("@journ/nude-solid/part").Part<"div">;
14
+ Trigger: typeof Trigger;
15
+ Content: typeof Content;
16
+ };
17
+ export { Collapsible, useCollapsible };
18
+ export type { CollapsibleProps, CollapsibleContextValue } from '@journ/nude-solid/collapsible';
@@ -0,0 +1,16 @@
1
+ import { Collapsible as Nude, useCollapsible } from '@journ/nude-solid/collapsible';
2
+ import { omit } from 'solid-js';
3
+ import { button } from './button.jsx';
4
+ import { cn } from './lib/cn.js';
5
+ import { TouchTarget } from './touch-target.jsx';
6
+ const Root = Nude.Root;
7
+ const Provider = Nude.Provider;
8
+ const Frame = Nude.Frame;
9
+ const Trigger = (props) => (<Nude.Trigger {...omit(props, 'tone', 'size', 'children', 'class')} class={button({ tone: props.tone ?? 'outline', size: props.size, class: cn(props.class) })}>
10
+ <TouchTarget>{props.children}</TouchTarget>
11
+ </Nude.Trigger>);
12
+ const Content = (props) => (<Nude.Content {...omit(props, 'class', 'children')} class='motion-safe:animate-bloom-solid-reveal overflow-hidden'>
13
+ <div class={cn('py-2', props.class)}>{props.children}</div>
14
+ </Nude.Content>);
15
+ const Collapsible = { Root, Provider, Frame, Trigger, Content };
16
+ export { Collapsible, useCollapsible };
@@ -0,0 +1,8 @@
1
+ import type { JSX } from '@solidjs/web';
2
+ declare const composerRoot: (classes?: JSX.ClassValue) => string;
3
+ declare const composerInput: (classes?: JSX.ClassValue) => string;
4
+ declare const Composer: {
5
+ Root: import("./lib/styled-part.jsx").StyledPart<"div", object>;
6
+ Input: import("./lib/styled-part.jsx").StyledPart<"input", object>;
7
+ };
8
+ export { Composer, composerRoot, composerInput };
@@ -0,0 +1,10 @@
1
+ import { Composer as Nude } from '@journ/nude-solid/composer';
2
+ import { cn } from './lib/cn.js';
3
+ import { styledPart } from './lib/styled-part.jsx';
4
+ import { fieldText } from './lib/text-styles.js';
5
+ const composerRoot = (classes) => cn('flex items-center gap-2 border border-current/15 p-1 has-disabled:opacity-50 sm:focus-within:outline-2 sm:focus-within:outline-bloom-sky', classes);
6
+ const composerInput = (classes) => cn(fieldText, 'min-w-0 flex-1 bg-transparent px-3 py-1.5 text-base/6 outline-none aria-invalid:text-bloom-coral sm:text-sm/6', classes);
7
+ const Root = styledPart(Nude.Root, props => composerRoot(props.class));
8
+ const Input = styledPart(Nude.Input, props => composerInput(props.class));
9
+ const Composer = { Root, Input };
10
+ export { Composer, composerRoot, composerInput };
@@ -0,0 +1,6 @@
1
+ declare const DescriptionList: {
2
+ Root: import("./lib/styled-part.jsx").StyledPart<"dl", object>;
3
+ Term: import("./lib/styled-part.jsx").StyledPart<"dt", object>;
4
+ Details: import("./lib/styled-part.jsx").StyledPart<"dd", object>;
5
+ };
6
+ export { DescriptionList };
@@ -0,0 +1,8 @@
1
+ import { DescriptionList as Nude } from '@journ/nude-solid/description-list';
2
+ import { cn } from './lib/cn.js';
3
+ import { styledPart } from './lib/styled-part.jsx';
4
+ const Root = styledPart(Nude.Root, props => cn('grid grid-cols-1 text-sm/6 sm:grid-cols-[minmax(8rem,1fr)_3fr]', props.class));
5
+ const Term = styledPart(Nude.Term, props => cn('border-t border-current/10 pt-3 opacity-60 sm:py-3', props.class));
6
+ const Details = styledPart(Nude.Details, props => cn('pb-3 sm:border-t sm:border-current/10 sm:py-3', props.class));
7
+ const DescriptionList = { Root, Term, Details };
8
+ export { DescriptionList };
@@ -0,0 +1,32 @@
1
+ import { Dialog as Nude, useDialog } from '@journ/nude-solid/dialog';
2
+ import type { ComponentProps, JSX } from '@solidjs/web';
3
+ import { type ButtonTone, type ButtonSize } from './button.jsx';
4
+ import { type SurfaceTone } from './lib/tones.js';
5
+ type TriggerProps = ComponentProps<typeof Nude.Trigger> & {
6
+ tone?: ButtonTone;
7
+ size?: ButtonSize;
8
+ };
9
+ declare const Trigger: (props: TriggerProps) => JSX.Element;
10
+ declare const Close: (props: TriggerProps) => JSX.Element;
11
+ type DialogContentProps = ComponentProps<typeof Nude.Content> & {
12
+ tone?: SurfaceTone;
13
+ };
14
+ declare const Content: (props: DialogContentProps) => JSX.Element;
15
+ declare const Title: (props: ComponentProps<typeof Nude.Title>) => JSX.Element;
16
+ declare const Description: (props: ComponentProps<typeof Nude.Description>) => JSX.Element;
17
+ declare const Body: (props: ComponentProps<typeof Nude.Body>) => JSX.Element;
18
+ declare const Actions: (props: ComponentProps<typeof Nude.Actions>) => JSX.Element;
19
+ declare const Dialog: {
20
+ Root: (props: import("@journ/nude-solid/dialog").DialogProps) => JSX.Element;
21
+ Provider: (props: import("solid-js").ParentProps<import("@journ/nude-solid/dialog").DialogContextValue>) => JSX.Element;
22
+ Trigger: typeof Trigger;
23
+ Close: typeof Close;
24
+ Content: typeof Content;
25
+ Title: typeof Title;
26
+ Description: typeof Description;
27
+ Body: typeof Body;
28
+ Actions: typeof Actions;
29
+ };
30
+ export { Dialog, useDialog };
31
+ export type { DialogContentProps };
32
+ export type { DialogProps, DialogContextValue } from '@journ/nude-solid/dialog';
@@ -0,0 +1,29 @@
1
+ import { Dialog as Nude, useDialog } from '@journ/nude-solid/dialog';
2
+ import { omit } from 'solid-js';
3
+ import { button } from './button.jsx';
4
+ import { cn } from './lib/cn.js';
5
+ import { nativeDialogBackdrop } from './lib/theme.js';
6
+ import { displayTitle, mutedText } from './lib/text-styles.js';
7
+ import { surfaceTones } from './lib/tones.js';
8
+ import { tv } from './lib/tv.js';
9
+ import { TouchTarget } from './touch-target.jsx';
10
+ const Root = Nude.Root;
11
+ const Provider = Nude.Provider;
12
+ const Trigger = (props) => (<Nude.Trigger {...omit(props, 'tone', 'size', 'class', 'children')} class={button({ tone: props.tone, size: props.size, class: cn(props.class) })}>
13
+ <TouchTarget>{props.children}</TouchTarget>
14
+ </Nude.Trigger>);
15
+ const Close = (props) => (<Nude.Close {...omit(props, 'tone', 'size', 'class', 'children')} class={button({ tone: props.tone ?? 'ghost', size: props.size, class: cn(props.class) })}>
16
+ <TouchTarget>{props.children}</TouchTarget>
17
+ </Nude.Close>);
18
+ const dialog = tv({
19
+ base: `open:motion-safe:animate-bloom-solid-enter scrollbar-bloom rounded-bloom fixed inset-0 m-auto max-h-[85dvh] w-[calc(100%-2rem)] max-w-lg overflow-y-auto p-6 outline-none open:flex open:flex-col open:gap-4 ${nativeDialogBackdrop}`,
20
+ variants: { tone: surfaceTones },
21
+ defaultVariants: { tone: 'surface' },
22
+ });
23
+ const Content = (props) => (<Nude.Content {...omit(props, 'tone', 'class')} class={dialog({ tone: props.tone, class: cn(props.class) })}/>);
24
+ const Title = (props) => (<Nude.Title {...props} class={cn(displayTitle, props.class)}/>);
25
+ const Description = (props) => (<Nude.Description {...props} class={cn(mutedText, props.class)}/>);
26
+ const Body = (props) => (<Nude.Body {...props} class={cn('scrollbar-bloom flex flex-col gap-3 overflow-y-auto', props.class)}/>);
27
+ const Actions = (props) => (<Nude.Actions {...props} class={cn('flex items-center justify-end gap-2', props.class)}/>);
28
+ const Dialog = { Root, Provider, Trigger, Close, Content, Title, Description, Body, Actions };
29
+ export { Dialog, useDialog };
@@ -0,0 +1,9 @@
1
+ import { Divider as Nude } from '@journ/nude-solid/divider';
2
+ import type { ComponentProps, JSX } from '@solidjs/web';
3
+ type DividerProps = ComponentProps<typeof Nude> & {
4
+ orientation?: 'horizontal' | 'vertical';
5
+ decorative?: boolean;
6
+ };
7
+ declare const Divider: (props: DividerProps) => JSX.Element;
8
+ export { Divider };
9
+ export type { DividerProps };