@scattered-light/loomiere-mojave 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +6 -1
  2. package/dist/exports/AGENTS.md +150 -0
  3. package/dist/exports/catalog.json +99 -1
  4. package/dist/exports/design-system/README.md +142 -0
  5. package/dist/exports/design-system/components/Accordion/README.md +97 -0
  6. package/dist/exports/design-system/components/Accordion/preview.html +19 -0
  7. package/dist/exports/design-system/components/AlertDialog/README.md +52 -0
  8. package/dist/exports/design-system/components/AlertDialog/preview.html +19 -0
  9. package/dist/exports/design-system/components/Autocomplete/README.md +68 -0
  10. package/dist/exports/design-system/components/Autocomplete/preview.html +19 -0
  11. package/dist/exports/design-system/components/Avatar/README.md +39 -0
  12. package/dist/exports/design-system/components/Avatar/preview.html +19 -0
  13. package/dist/exports/design-system/components/Button/README.md +27 -0
  14. package/dist/exports/design-system/components/Button/preview.html +23 -0
  15. package/dist/exports/design-system/components/Checkbox/README.md +39 -0
  16. package/dist/exports/design-system/components/Checkbox/preview.html +19 -0
  17. package/dist/exports/design-system/components/CheckboxGroup/README.md +56 -0
  18. package/dist/exports/design-system/components/CheckboxGroup/preview.html +19 -0
  19. package/dist/exports/design-system/components/Collapsible/README.md +48 -0
  20. package/dist/exports/design-system/components/Collapsible/preview.html +19 -0
  21. package/dist/exports/design-system/components/Combobox/README.md +105 -0
  22. package/dist/exports/design-system/components/Combobox/preview.html +19 -0
  23. package/dist/exports/design-system/components/ContextMenu/README.md +70 -0
  24. package/dist/exports/design-system/components/ContextMenu/preview.html +19 -0
  25. package/dist/exports/design-system/components/Cover/preview.html +39 -0
  26. package/dist/exports/design-system/components/Dialog/README.md +62 -0
  27. package/dist/exports/design-system/components/Dialog/preview.html +19 -0
  28. package/dist/exports/design-system/components/Drawer/README.md +32 -0
  29. package/dist/exports/design-system/components/Drawer/preview.html +19 -0
  30. package/dist/exports/design-system/components/Field/README.md +41 -0
  31. package/dist/exports/design-system/components/Field/preview.html +19 -0
  32. package/dist/exports/design-system/components/Fieldset/README.md +45 -0
  33. package/dist/exports/design-system/components/Fieldset/preview.html +19 -0
  34. package/dist/exports/design-system/components/Form/README.md +57 -0
  35. package/dist/exports/design-system/components/Form/preview.html +19 -0
  36. package/dist/exports/design-system/components/Input/README.md +38 -0
  37. package/dist/exports/design-system/components/Input/preview.html +19 -0
  38. package/dist/exports/design-system/components/Menu/README.md +58 -0
  39. package/dist/exports/design-system/components/Menu/preview.html +19 -0
  40. package/dist/exports/design-system/components/Menubar/README.md +105 -0
  41. package/dist/exports/design-system/components/Menubar/preview.html +19 -0
  42. package/dist/exports/design-system/components/Meter/README.md +43 -0
  43. package/dist/exports/design-system/components/Meter/preview.html +19 -0
  44. package/dist/exports/design-system/components/NavigationMenu/README.md +148 -0
  45. package/dist/exports/design-system/components/NavigationMenu/preview.html +19 -0
  46. package/dist/exports/design-system/components/NumberField/README.md +58 -0
  47. package/dist/exports/design-system/components/NumberField/preview.html +19 -0
  48. package/dist/exports/design-system/components/OTPField/README.md +39 -0
  49. package/dist/exports/design-system/components/OTPField/preview.html +19 -0
  50. package/dist/exports/design-system/components/Popover/README.md +56 -0
  51. package/dist/exports/design-system/components/Popover/preview.html +19 -0
  52. package/dist/exports/design-system/components/PreviewCard/README.md +74 -0
  53. package/dist/exports/design-system/components/PreviewCard/preview.html +19 -0
  54. package/dist/exports/design-system/components/Progress/README.md +58 -0
  55. package/dist/exports/design-system/components/Progress/preview.html +19 -0
  56. package/dist/exports/design-system/components/Radio/README.md +74 -0
  57. package/dist/exports/design-system/components/Radio/preview.html +19 -0
  58. package/dist/exports/design-system/components/ScrollArea/README.md +62 -0
  59. package/dist/exports/design-system/components/ScrollArea/preview.html +40 -0
  60. package/dist/exports/design-system/components/Select/README.md +84 -0
  61. package/dist/exports/design-system/components/Select/preview.html +19 -0
  62. package/dist/exports/design-system/components/Separator/README.md +37 -0
  63. package/dist/exports/design-system/components/Separator/preview.html +19 -0
  64. package/dist/exports/design-system/components/Slider/README.md +44 -0
  65. package/dist/exports/design-system/components/Slider/preview.html +19 -0
  66. package/dist/exports/design-system/components/Switch/README.md +34 -0
  67. package/dist/exports/design-system/components/Switch/preview.html +19 -0
  68. package/dist/exports/design-system/components/Tabs/README.md +56 -0
  69. package/dist/exports/design-system/components/Tabs/preview.html +19 -0
  70. package/dist/exports/design-system/components/Toast/README.md +78 -0
  71. package/dist/exports/design-system/components/Toast/preview.html +19 -0
  72. package/dist/exports/design-system/components/Toggle/README.md +32 -0
  73. package/dist/exports/design-system/components/Toggle/preview.html +19 -0
  74. package/dist/exports/design-system/components/ToggleGroup/README.md +40 -0
  75. package/dist/exports/design-system/components/ToggleGroup/preview.html +19 -0
  76. package/dist/exports/design-system/components/Toolbar/README.md +65 -0
  77. package/dist/exports/design-system/components/Toolbar/preview.html +19 -0
  78. package/dist/exports/design-system/components/Tooltip/README.md +46 -0
  79. package/dist/exports/design-system/components/Tooltip/preview.html +19 -0
  80. package/dist/exports/design-system/components/bundle.css +9881 -0
  81. package/dist/exports/design-system/components/bundle.js +5 -0
  82. package/dist/exports/design-system/components/index.d.ts +107 -0
  83. package/dist/exports/design-system/tokens.json +3063 -0
  84. package/dist/exports/shadcn.css +111 -0
  85. package/dist/exports/tailwind.css +1230 -36
  86. package/package.json +4 -2
package/README.md CHANGED
@@ -9,7 +9,12 @@ import '@scattered-light/loomiere-mojave/tokens.css';
9
9
  import '@scattered-light/loomiere-mojave/utilities.css';
10
10
  ```
11
11
 
12
- It ships everything `loomiere build` writes: `tokens.css`, `utilities.css`, `tokens` (JS), `tokens.json`, `pairs.json`, and `exports/*` for Tailwind, MUI, Chakra, Figma and DTCG. AG Grid themes have short paths:
12
+ It ships everything `loomiere build` writes: `tokens.css`, `utilities.css`, `tokens` (JS), `tokens.json`, `pairs.json`, and `exports/*` for Tailwind, shadcn/ui, MUI, Chakra, Figma, DTCG, a Claude Design System (`exports/design-system/`) and `AGENTS.md`. Tailwind, shadcn/ui and AG Grid have short paths:
13
+
14
+ ```css
15
+ @import "tailwindcss";
16
+ @import "@scattered-light/loomiere-mojave/tailwind.css"; /* or shadcn.css for shadcn/ui */
17
+ ```
13
18
 
14
19
  ```ts
15
20
  import { withBrand } from '@scattered-light/loomiere-mojave/ag-grid/v36';
@@ -0,0 +1,150 @@
1
+ # Mojave theme: guide for agents
2
+
3
+ This folder is a Loomiere theme. Load `tokens.css` (every token as a `--sl-` variable, light and dark) and `utilities.css` (text styles, focus ring, brand pairs). Framework adapters sit in `exports/`: `tailwind.css` (Tailwind v4: text styles by tier such as `text-base`, concept classes such as `bg-field` and `text-link`, no bare sizes like `text-sm`), `shadcn.css` (shadcn/ui), `mui.js`, `chakra.js`, AG Grid themes, `tokens.dtcg.json`. `tokens.json` lists every token with its path, value, modes and the reason it exists; read a token's `description` before using it.
4
+
5
+ Components: `@scattered-light/loomiere-base-ui` (Base UI parts styled by class name; import `@scattered-light/loomiere-base-ui/styles.css` after the theme). `exports/design-system/components/<Name>/README.md` lists each component's classes and an example.
6
+
7
+ Change the brand only in the brand file and rebuild (`loomiere build`); never edit generated files.
8
+
9
+ Mojave: warm desert neutrals with a violet primary and ember accent.
10
+
11
+ Every value in this system is a CSS variable with the `--sl-` prefix. Reach for the semantic tokens (surfaces, text, borders, fills, emphasis); use a palette step only when no semantic token says what you mean. Never paste a hex value: the variables carry light and dark, high contrast and color vision modes, and a palette or role change in the brand reaches everything that uses them.
12
+
13
+ ### Color
14
+
15
+ The **chrome** role is the neutral (stone) palette: surfaces, text, borders and quiet controls. The **accent** role is the primary (mirage) palette: links, focus and the loudest actions. Status colors (success, warning, error, info) mean only their status; pair each with a word or an icon, never color alone.
16
+
17
+ #### Surfaces and text
18
+
19
+ | Token | Use |
20
+ |---|---|
21
+ | `--sl-surface-canvas` | The page itself. Paper in light mode, the darkest neutral in dark mode. |
22
+ | `--sl-surface-raised` | Cards and panels one level above the canvas. |
23
+ | `--sl-surface-overlay` | Popups, menus and code blocks that sit above raised surfaces. |
24
+ | `--sl-surface-modal` | Dialogs and drawers. Paper in light mode; in dark mode one step lighter than the page, so a modal lifts off the dimmed page under it. |
25
+ | `--sl-surface-tray` | The strip behind a row of controls (toolbars, toggle groups). A step off the page in both themes, so the controls sitting on it stand out, while secondary and accent text on it still pass AA. |
26
+ | `--sl-surface-inverse` | Dark-on-light flip for small floating things such as tooltips. Inside a brand pair it becomes the pair's text color. |
27
+ | `--sl-text-primary` | Body text and headings. The highest-contrast neutral. |
28
+ | `--sl-text-secondary` | Supporting text such as descriptions and helper copy. Over 7:1 on every surface, and darker still under prefers-contrast: more. |
29
+ | `--sl-text-tertiary` | Placeholders, captions and metadata. The lightest text that still passes AA (4.5:1) on every surface. |
30
+ | `--sl-text-disabled` | Text in disabled controls. Deliberately below AA, which WCAG allows for disabled UI. |
31
+ | `--sl-text-accent` | Accent text such as active tabs. One step darker than the interactive color so it stays AA as text. |
32
+ | `--sl-text-on-primary` | Text on the accent fill: that step's own on-color, so it reads on any accent the brand picks. |
33
+ | `--sl-text-on-tint` | Text on an accent wash (interactive.tint*). Stays in the accent family. |
34
+ | `--sl-text-on-inverse-surface` | Text on surface.inverse (tooltips): the on-color of the inverse step, so it passes AA in both themes. |
35
+
36
+ #### Borders, fills and interaction
37
+
38
+ | Token | Use |
39
+ |---|---|
40
+ | `--sl-border-subtle` | Hairlines inside a surface (table rows, list separators) that should barely register. |
41
+ | `--sl-border-default` | Everyday dividers and control outlines. Darkens under prefers-contrast: more. |
42
+ | `--sl-border-strong` | Borders that identify a control, such as inputs and unchecked checkboxes. 3:1 against the canvas, as WCAG asks for control boundaries. |
43
+ | `--sl-border-control` | Edge of a small control (checkbox, radio, switch) that must be found before it is filled. |
44
+ | `--sl-border-control-hover` | Control edge under the pointer: one clear step darker than border.control. |
45
+ | `--sl-border-accent` | Borders that signal selection or the active item. |
46
+ | `--sl-fill-subtle` | Lightest fill: hovered rows, chips, empty tracks. |
47
+ | `--sl-fill-default` | Standard fill: slider and switch tracks, pressed rows. |
48
+ | `--sl-fill-strong` | Heaviest fill: scroll thumbs, slider marks, hovered tracks. |
49
+ | `--sl-fill-inverse` | A small solid chip in the chrome color that flips with the theme: dark on light pages, light on dark ones. Keyboard keys use it. |
50
+ | `--sl-interactive-default` | Primary accent for buttons, links and selected states. Step 600 is 6.1:1 on paper; step 400 is 5.6:1 on the dark canvas. |
51
+ | `--sl-interactive-hover` | Hover state of the main accent. One step away from default in the direction of more contrast. |
52
+ | `--sl-interactive-active` | Pressed state of the main accent. Darker than hover so the press is felt. |
53
+ | `--sl-interactive-tint` | Faint accent wash behind a ghost or outline control on hover, or a selected row. |
54
+ | `--sl-interactive-tint-hover` | Accent wash for a highlighted menu item or a pressed toggle. |
55
+ | `--sl-interactive-tint-active` | Accent wash for a selected or pressed item: one step past tint-hover. |
56
+ | `--sl-focus-ring` | Focus ring color. Uses the interactive accent so focus reads as "this is the thing you can act on". |
57
+
58
+ #### Status
59
+
60
+ | Token | Use |
61
+ |---|---|
62
+ | `--sl-status-success` | Confirmations and completed states. |
63
+ | `--sl-status-warning` | Warnings, and the required-field marker. |
64
+ | `--sl-status-error` | Errors and destructive actions. |
65
+ | `--sl-status-info` | Neutral notices and help. |
66
+ | `--sl-status-error-dark` | Error color for text or icons that need more contrast than the base color. |
67
+ | `--sl-status-error-light` | Error tint for backgrounds behind error messages. |
68
+
69
+ Each status has `-dark` (text and icons that need more contrast) and `-light` (the tint behind a message) variants.
70
+
71
+ #### Palettes
72
+
73
+ Palettes: `neutral` (stone), `primary` (mirage), `secondary` (ember), `tertiary` (dune), `quaternary` (silhouette), `success`, `warning`, `error`, `info`, `data`. Steps run from 50 (lightest) to the darkest step, and each step is placed by its contrast against paper, so a step number means the same contrast in every palette: text on paper needs 500 or darker (4.5:1). Every step has an on-color, `--sl-color-<palette>-on-<step>`, for text or icons placed on it.
74
+
75
+ The `data` palette (`--sl-color-data-<n>`) is for charts only: series colors, never UI.
76
+
77
+ #### Emphasis
78
+
79
+ Controls come in four levels of loudness. Pick the level by how much the action matters, not by color; the brand decides what each level looks like.
80
+
81
+ | Level | Looks like | Use for |
82
+ |---|---|---|
83
+ | `bold` | solid in accent | The one main action in a view. |
84
+ | `standard` | outline in accent | Secondary actions beside a bold one. |
85
+ | `subtle` | soft in chrome | Frequent, low-stakes actions such as toolbar buttons. |
86
+ | `quiet` | outline in chrome | Actions that should stay out of the way until needed. |
87
+
88
+ Set it with `data-emphasis="bold|standard|subtle|quiet"` on a Button or any element styled from `--sl-emphasis-<level>-bg|fg|border` (with `-hover` and `-active`). On Button, `data-variant` is an alias: `solid` = bold, `outline` = standard, `ghost` = quiet.
89
+
90
+ #### Color scopes
91
+
92
+ `data-color="<palette>"` on any element repaints everything inside it in that palette (`primary`, `secondary`, `error`, `accent`, `chrome`...): a destructive button is `<Button data-emphasis="bold" data-color="error">`.
93
+
94
+ #### Brand pairs
95
+
96
+ A pair is a background with its own text and accent, checked to meet AA. Put `class="sl-pair-<name>"` on a band, card or callout and everything inside (text, links, buttons, focus) takes the pair's colors.
97
+
98
+ | Pair | Use |
99
+ |---|---|
100
+ | `.sl-pair-ember-dune` | warm callouts and toasts. |
101
+ | `.sl-pair-mirage-deep` | a dark brand band. |
102
+ | `.sl-pair-stone-soft` | a quiet inset panel that flips in dark mode. |
103
+
104
+ ### Typography
105
+
106
+ Families: display 'Funnel Display', sans-serif, body 'Barlow Semi Condensed', sans-serif, mono 'Roboto Mono', monospace.
107
+
108
+ All text uses one whole text style, never a size or weight on its own: `class="text-style-<name>"`, or the `--sl-font-<name>-*` variables (font-family, font-size, font-weight, line-height, letter-spacing) together. Styles come in tiers named for why the text is that size:
109
+
110
+ - **minimize**: the smallest functional text: captions, fine print, dense metadata. Variants: `trigger`, `selected`, `link`, `subtitle`, `subtitle-label`.
111
+ - **condense**: compact UI: small controls, table cells, secondary labels. Variants: `trigger`, `selected`, `link`, `subtitle`, `subtitle-label`.
112
+ - **base**: the default UI and body text. Variants: `selected`, `label`, `link`, `subtitle`, `trigger`.
113
+ - **magnify**: emphasized body text: lead paragraphs, larger controls. Variants: `trigger`.
114
+ - **maximize**: display text for headings and hero copy, in steps xs to 4xl. Variants: `2xl`, `3xl`, `4xl`, `lg`, `md`, `sm`, `xl`, `xs`.
115
+ - **code**: code, in the mono family.
116
+
117
+ Inside a tier, `-trigger` is for buttons and triggers, `-selected` for the current tab, toggle or nav item, `-link` for links, `-subtitle` for subheads and `-label` for form labels. Sizes below the base are fixed; the base and up grow with the viewport.
118
+
119
+ ### Space, shape and depth
120
+
121
+ Space is a 4px grid: `--sl-space-<n>` is n × 4px (`space-4` = 16px). Use the steps; never a number in between.
122
+
123
+ Corners are chosen by what a thing is, not by size:
124
+
125
+ | Token | Use |
126
+ |---|---|
127
+ | `--sl-radius-control` | Inputs, buttons and other controls you click or type in. |
128
+ | `--sl-radius-item` | Rows inside menus and lists, so highlighted items keep a soft edge inside the popup. |
129
+ | `--sl-radius-surface` | Cards, popovers and panels. |
130
+ | `--sl-radius-chrome` | App chrome such as toolbars and menubars. |
131
+ | `--sl-radius-modal` | Dialogs get the largest radius so they read as a separate layer. |
132
+ | `--sl-radius-pill` | Fully rounded ends for pills, badges and switches. |
133
+ | `--sl-radius-minimal` | Square corners for things that tile edge to edge. |
134
+
135
+ Depth: `--sl-elevation-xs` to `-2xl`, lowest first. Popups, menus and dialogs already carry theirs. Borders: `--sl-stroke-default` everywhere, `-emphasis` for selected or focused edges.
136
+
137
+ ### Focus and states
138
+
139
+ Keyboard focus is one ring, `--sl-focus-outline` with `--sl-focus-outline-offset`, plus a soft halo in `--sl-focus-halo-color`. Never remove it; the `.focus-ring` utility applies it. Hover moves one step toward more contrast, pressed one more. Disabled controls use `--sl-text-disabled` and `--sl-interactive-disabled`.
140
+
141
+ ### Modes
142
+
143
+ Light and dark: `data-theme="light|dark"` on the root, or the system setting when neither is set. High contrast follows `prefers-contrast: more`. Color vision themes: `data-vision="deuteranopia|protanopia|tritanopia|achromatopsia"`, each designed from this brand. Never hand-pick dark colors; the tokens already flip.
144
+
145
+ ### Components
146
+
147
+ The components are [Base UI](https://base-ui.com) parts styled by class name: `Accordion`, `AlertDialog`, `Autocomplete`, `Avatar`, `Button`, `Checkbox`, `CheckboxGroup`, `Collapsible`, `Combobox`, `ContextMenu`, `Dialog`, `Drawer`, `Field`, `Fieldset`, `Form`, `Input`, `Menu`, `Menubar`, `Meter`, `NavigationMenu`, `NumberField`, `OTPField`, `Popover`, `PreviewCard`, `Progress`, `Radio`, `ScrollArea`, `Select`, `Separator`, `Slider`, `Switch`, `Tabs`, `Toast`, `Toggle`, `ToggleGroup`, `Toolbar`, `Tooltip`. Each component's README lists the classes its parts take and the data attributes they answer to (`data-size="sm|lg"`, `data-emphasis`, `data-color`). In previews and designs they are `window.Loomiere.<Name>`; Button, Input, Field, Fieldset, Form and NavigationMenu are wrappers that put their classes on themselves.
148
+
149
+ Icons are Material Symbols Outlined by ligature name (`<span class="material-symbols-outlined">search</span>`, or `Loomiere.MaterialSymbol name="search"`), sized by the `.icon-<tier>` utilities to match the text beside them.
150
+
@@ -26,7 +26,16 @@
26
26
  "files": [
27
27
  "tailwind.css"
28
28
  ],
29
- "for": "Tailwind v4 projects: import after tailwindcss and tokens.css. Utilities like bg-accent-solid, text-fg, border-chrome-border."
29
+ "for": "Tailwind v4 projects: import after tailwindcss (it brings tokens.css along). Utilities like bg-accent-solid, text-fg, bg-emphasis-bg, and text styles by tier: text-base, text-magnify-trigger."
30
+ },
31
+ {
32
+ "id": "shadcn",
33
+ "name": "shadcn/ui",
34
+ "file": "shadcn.css",
35
+ "files": [
36
+ "shadcn.css"
37
+ ],
38
+ "for": "shadcn/ui on Tailwind v4: import after tailwindcss in place of the color blocks in globals.css. Dark mode follows data-theme (next-themes: attribute=\"data-theme\")."
30
39
  },
31
40
  {
32
41
  "id": "mui",
@@ -78,6 +87,95 @@
78
87
  "ag-grid-v32.css"
79
88
  ],
80
89
  "for": "AG Grid 31 and 32 (CSS themes): load after ag-theme-quartz.css and put class=\"ag-theme-quartz ag-theme-loomiere\" on the grid."
90
+ },
91
+ {
92
+ "id": "design-system",
93
+ "name": "Claude Design System",
94
+ "file": "design-system/README.md",
95
+ "files": [
96
+ "design-system/components/bundle.js",
97
+ "design-system/components/index.d.ts",
98
+ "design-system/components/Accordion/README.md",
99
+ "design-system/components/Accordion/preview.html",
100
+ "design-system/components/AlertDialog/README.md",
101
+ "design-system/components/AlertDialog/preview.html",
102
+ "design-system/components/Autocomplete/README.md",
103
+ "design-system/components/Autocomplete/preview.html",
104
+ "design-system/components/Avatar/README.md",
105
+ "design-system/components/Avatar/preview.html",
106
+ "design-system/components/Button/README.md",
107
+ "design-system/components/Button/preview.html",
108
+ "design-system/components/Checkbox/README.md",
109
+ "design-system/components/Checkbox/preview.html",
110
+ "design-system/components/CheckboxGroup/README.md",
111
+ "design-system/components/CheckboxGroup/preview.html",
112
+ "design-system/components/Collapsible/README.md",
113
+ "design-system/components/Collapsible/preview.html",
114
+ "design-system/components/Combobox/README.md",
115
+ "design-system/components/Combobox/preview.html",
116
+ "design-system/components/ContextMenu/README.md",
117
+ "design-system/components/ContextMenu/preview.html",
118
+ "design-system/components/Dialog/README.md",
119
+ "design-system/components/Dialog/preview.html",
120
+ "design-system/components/Drawer/README.md",
121
+ "design-system/components/Drawer/preview.html",
122
+ "design-system/components/Field/README.md",
123
+ "design-system/components/Field/preview.html",
124
+ "design-system/components/Fieldset/README.md",
125
+ "design-system/components/Fieldset/preview.html",
126
+ "design-system/components/Form/README.md",
127
+ "design-system/components/Form/preview.html",
128
+ "design-system/components/Input/README.md",
129
+ "design-system/components/Input/preview.html",
130
+ "design-system/components/Menu/README.md",
131
+ "design-system/components/Menu/preview.html",
132
+ "design-system/components/Menubar/README.md",
133
+ "design-system/components/Menubar/preview.html",
134
+ "design-system/components/Meter/README.md",
135
+ "design-system/components/Meter/preview.html",
136
+ "design-system/components/NavigationMenu/README.md",
137
+ "design-system/components/NavigationMenu/preview.html",
138
+ "design-system/components/NumberField/README.md",
139
+ "design-system/components/NumberField/preview.html",
140
+ "design-system/components/OTPField/README.md",
141
+ "design-system/components/OTPField/preview.html",
142
+ "design-system/components/Popover/README.md",
143
+ "design-system/components/Popover/preview.html",
144
+ "design-system/components/PreviewCard/README.md",
145
+ "design-system/components/PreviewCard/preview.html",
146
+ "design-system/components/Progress/README.md",
147
+ "design-system/components/Progress/preview.html",
148
+ "design-system/components/Radio/README.md",
149
+ "design-system/components/Radio/preview.html",
150
+ "design-system/components/ScrollArea/README.md",
151
+ "design-system/components/ScrollArea/preview.html",
152
+ "design-system/components/Select/README.md",
153
+ "design-system/components/Select/preview.html",
154
+ "design-system/components/Separator/README.md",
155
+ "design-system/components/Separator/preview.html",
156
+ "design-system/components/Slider/README.md",
157
+ "design-system/components/Slider/preview.html",
158
+ "design-system/components/Switch/README.md",
159
+ "design-system/components/Switch/preview.html",
160
+ "design-system/components/Tabs/README.md",
161
+ "design-system/components/Tabs/preview.html",
162
+ "design-system/components/Toast/README.md",
163
+ "design-system/components/Toast/preview.html",
164
+ "design-system/components/Toggle/README.md",
165
+ "design-system/components/Toggle/preview.html",
166
+ "design-system/components/ToggleGroup/README.md",
167
+ "design-system/components/ToggleGroup/preview.html",
168
+ "design-system/components/Toolbar/README.md",
169
+ "design-system/components/Toolbar/preview.html",
170
+ "design-system/components/Tooltip/README.md",
171
+ "design-system/components/Tooltip/preview.html",
172
+ "design-system/components/bundle.css",
173
+ "design-system/README.md",
174
+ "design-system/components/Cover/preview.html",
175
+ "design-system/tokens.json",
176
+ "AGENTS.md"
177
+ ],
178
+ "for": "A Design System artifact on claude.ai, so Claude designs, makes decks and builds UI with this brand. Also AGENTS.md: the brand book for coding agents."
81
179
  }
82
180
  ]
83
181
  }
@@ -0,0 +1,142 @@
1
+ Mojave: warm desert neutrals with a violet primary and ember accent.
2
+
3
+ Every value in this system is a CSS variable with the `--sl-` prefix. Reach for the semantic tokens (surfaces, text, borders, fills, emphasis); use a palette step only when no semantic token says what you mean. Never paste a hex value: the variables carry light and dark, high contrast and color vision modes, and a palette or role change in the brand reaches everything that uses them.
4
+
5
+ ## Color
6
+
7
+ The **chrome** role is the neutral (stone) palette: surfaces, text, borders and quiet controls. The **accent** role is the primary (mirage) palette: links, focus and the loudest actions. Status colors (success, warning, error, info) mean only their status; pair each with a word or an icon, never color alone.
8
+
9
+ ### Surfaces and text
10
+
11
+ | Token | Use |
12
+ |---|---|
13
+ | `--sl-surface-canvas` | The page itself. Paper in light mode, the darkest neutral in dark mode. |
14
+ | `--sl-surface-raised` | Cards and panels one level above the canvas. |
15
+ | `--sl-surface-overlay` | Popups, menus and code blocks that sit above raised surfaces. |
16
+ | `--sl-surface-modal` | Dialogs and drawers. Paper in light mode; in dark mode one step lighter than the page, so a modal lifts off the dimmed page under it. |
17
+ | `--sl-surface-tray` | The strip behind a row of controls (toolbars, toggle groups). A step off the page in both themes, so the controls sitting on it stand out, while secondary and accent text on it still pass AA. |
18
+ | `--sl-surface-inverse` | Dark-on-light flip for small floating things such as tooltips. Inside a brand pair it becomes the pair's text color. |
19
+ | `--sl-text-primary` | Body text and headings. The highest-contrast neutral. |
20
+ | `--sl-text-secondary` | Supporting text such as descriptions and helper copy. Over 7:1 on every surface, and darker still under prefers-contrast: more. |
21
+ | `--sl-text-tertiary` | Placeholders, captions and metadata. The lightest text that still passes AA (4.5:1) on every surface. |
22
+ | `--sl-text-disabled` | Text in disabled controls. Deliberately below AA, which WCAG allows for disabled UI. |
23
+ | `--sl-text-accent` | Accent text such as active tabs. One step darker than the interactive color so it stays AA as text. |
24
+ | `--sl-text-on-primary` | Text on the accent fill: that step's own on-color, so it reads on any accent the brand picks. |
25
+ | `--sl-text-on-tint` | Text on an accent wash (interactive.tint*). Stays in the accent family. |
26
+ | `--sl-text-on-inverse-surface` | Text on surface.inverse (tooltips): the on-color of the inverse step, so it passes AA in both themes. |
27
+
28
+ ### Borders, fills and interaction
29
+
30
+ | Token | Use |
31
+ |---|---|
32
+ | `--sl-border-subtle` | Hairlines inside a surface (table rows, list separators) that should barely register. |
33
+ | `--sl-border-default` | Everyday dividers and control outlines. Darkens under prefers-contrast: more. |
34
+ | `--sl-border-strong` | Borders that identify a control, such as inputs and unchecked checkboxes. 3:1 against the canvas, as WCAG asks for control boundaries. |
35
+ | `--sl-border-control` | Edge of a small control (checkbox, radio, switch) that must be found before it is filled. |
36
+ | `--sl-border-control-hover` | Control edge under the pointer: one clear step darker than border.control. |
37
+ | `--sl-border-accent` | Borders that signal selection or the active item. |
38
+ | `--sl-fill-subtle` | Lightest fill: hovered rows, chips, empty tracks. |
39
+ | `--sl-fill-default` | Standard fill: slider and switch tracks, pressed rows. |
40
+ | `--sl-fill-strong` | Heaviest fill: scroll thumbs, slider marks, hovered tracks. |
41
+ | `--sl-fill-inverse` | A small solid chip in the chrome color that flips with the theme: dark on light pages, light on dark ones. Keyboard keys use it. |
42
+ | `--sl-interactive-default` | Primary accent for buttons, links and selected states. Step 600 is 6.1:1 on paper; step 400 is 5.6:1 on the dark canvas. |
43
+ | `--sl-interactive-hover` | Hover state of the main accent. One step away from default in the direction of more contrast. |
44
+ | `--sl-interactive-active` | Pressed state of the main accent. Darker than hover so the press is felt. |
45
+ | `--sl-interactive-tint` | Faint accent wash behind a ghost or outline control on hover, or a selected row. |
46
+ | `--sl-interactive-tint-hover` | Accent wash for a highlighted menu item or a pressed toggle. |
47
+ | `--sl-interactive-tint-active` | Accent wash for a selected or pressed item: one step past tint-hover. |
48
+ | `--sl-focus-ring` | Focus ring color. Uses the interactive accent so focus reads as "this is the thing you can act on". |
49
+
50
+ ### Status
51
+
52
+ | Token | Use |
53
+ |---|---|
54
+ | `--sl-status-success` | Confirmations and completed states. |
55
+ | `--sl-status-warning` | Warnings, and the required-field marker. |
56
+ | `--sl-status-error` | Errors and destructive actions. |
57
+ | `--sl-status-info` | Neutral notices and help. |
58
+ | `--sl-status-error-dark` | Error color for text or icons that need more contrast than the base color. |
59
+ | `--sl-status-error-light` | Error tint for backgrounds behind error messages. |
60
+
61
+ Each status has `-dark` (text and icons that need more contrast) and `-light` (the tint behind a message) variants.
62
+
63
+ ### Palettes
64
+
65
+ Palettes: `neutral` (stone), `primary` (mirage), `secondary` (ember), `tertiary` (dune), `quaternary` (silhouette), `success`, `warning`, `error`, `info`, `data`. Steps run from 50 (lightest) to the darkest step, and each step is placed by its contrast against paper, so a step number means the same contrast in every palette: text on paper needs 500 or darker (4.5:1). Every step has an on-color, `--sl-color-<palette>-on-<step>`, for text or icons placed on it.
66
+
67
+ The `data` palette (`--sl-color-data-<n>`) is for charts only: series colors, never UI.
68
+
69
+ ### Emphasis
70
+
71
+ Controls come in four levels of loudness. Pick the level by how much the action matters, not by color; the brand decides what each level looks like.
72
+
73
+ | Level | Looks like | Use for |
74
+ |---|---|---|
75
+ | `bold` | solid in accent | The one main action in a view. |
76
+ | `standard` | outline in accent | Secondary actions beside a bold one. |
77
+ | `subtle` | soft in chrome | Frequent, low-stakes actions such as toolbar buttons. |
78
+ | `quiet` | outline in chrome | Actions that should stay out of the way until needed. |
79
+
80
+ Set it with `data-emphasis="bold|standard|subtle|quiet"` on a Button or any element styled from `--sl-emphasis-<level>-bg|fg|border` (with `-hover` and `-active`). On Button, `data-variant` is an alias: `solid` = bold, `outline` = standard, `ghost` = quiet.
81
+
82
+ ### Color scopes
83
+
84
+ `data-color="<palette>"` on any element repaints everything inside it in that palette (`primary`, `secondary`, `error`, `accent`, `chrome`...): a destructive button is `<Button data-emphasis="bold" data-color="error">`.
85
+
86
+ ### Brand pairs
87
+
88
+ A pair is a background with its own text and accent, checked to meet AA. Put `class="sl-pair-<name>"` on a band, card or callout and everything inside (text, links, buttons, focus) takes the pair's colors.
89
+
90
+ | Pair | Use |
91
+ |---|---|
92
+ | `.sl-pair-ember-dune` | warm callouts and toasts. |
93
+ | `.sl-pair-mirage-deep` | a dark brand band. |
94
+ | `.sl-pair-stone-soft` | a quiet inset panel that flips in dark mode. |
95
+
96
+ ## Typography
97
+
98
+ Families: display 'Funnel Display', sans-serif, body 'Barlow Semi Condensed', sans-serif, mono 'Roboto Mono', monospace.
99
+
100
+ All text uses one whole text style, never a size or weight on its own: `class="text-style-<name>"`, or the `--sl-font-<name>-*` variables (font-family, font-size, font-weight, line-height, letter-spacing) together. Styles come in tiers named for why the text is that size:
101
+
102
+ - **minimize**: the smallest functional text: captions, fine print, dense metadata. Variants: `trigger`, `selected`, `link`, `subtitle`, `subtitle-label`.
103
+ - **condense**: compact UI: small controls, table cells, secondary labels. Variants: `trigger`, `selected`, `link`, `subtitle`, `subtitle-label`.
104
+ - **base**: the default UI and body text. Variants: `selected`, `label`, `link`, `subtitle`, `trigger`.
105
+ - **magnify**: emphasized body text: lead paragraphs, larger controls. Variants: `trigger`.
106
+ - **maximize**: display text for headings and hero copy, in steps xs to 4xl. Variants: `2xl`, `3xl`, `4xl`, `lg`, `md`, `sm`, `xl`, `xs`.
107
+ - **code**: code, in the mono family.
108
+
109
+ Inside a tier, `-trigger` is for buttons and triggers, `-selected` for the current tab, toggle or nav item, `-link` for links, `-subtitle` for subheads and `-label` for form labels. Sizes below the base are fixed; the base and up grow with the viewport.
110
+
111
+ ## Space, shape and depth
112
+
113
+ Space is a 4px grid: `--sl-space-<n>` is n × 4px (`space-4` = 16px). Use the steps; never a number in between.
114
+
115
+ Corners are chosen by what a thing is, not by size:
116
+
117
+ | Token | Use |
118
+ |---|---|
119
+ | `--sl-radius-control` | Inputs, buttons and other controls you click or type in. |
120
+ | `--sl-radius-item` | Rows inside menus and lists, so highlighted items keep a soft edge inside the popup. |
121
+ | `--sl-radius-surface` | Cards, popovers and panels. |
122
+ | `--sl-radius-chrome` | App chrome such as toolbars and menubars. |
123
+ | `--sl-radius-modal` | Dialogs get the largest radius so they read as a separate layer. |
124
+ | `--sl-radius-pill` | Fully rounded ends for pills, badges and switches. |
125
+ | `--sl-radius-minimal` | Square corners for things that tile edge to edge. |
126
+
127
+ Depth: `--sl-elevation-xs` to `-2xl`, lowest first. Popups, menus and dialogs already carry theirs. Borders: `--sl-stroke-default` everywhere, `-emphasis` for selected or focused edges.
128
+
129
+ ## Focus and states
130
+
131
+ Keyboard focus is one ring, `--sl-focus-outline` with `--sl-focus-outline-offset`, plus a soft halo in `--sl-focus-halo-color`. Never remove it; the `.focus-ring` utility applies it. Hover moves one step toward more contrast, pressed one more. Disabled controls use `--sl-text-disabled` and `--sl-interactive-disabled`.
132
+
133
+ ## Modes
134
+
135
+ Light and dark: `data-theme="light|dark"` on the root, or the system setting when neither is set. High contrast follows `prefers-contrast: more`. Color vision themes: `data-vision="deuteranopia|protanopia|tritanopia|achromatopsia"`, each designed from this brand. Never hand-pick dark colors; the tokens already flip.
136
+
137
+ ## Components
138
+
139
+ The components are [Base UI](https://base-ui.com) parts styled by class name: `Accordion`, `AlertDialog`, `Autocomplete`, `Avatar`, `Button`, `Checkbox`, `CheckboxGroup`, `Collapsible`, `Combobox`, `ContextMenu`, `Dialog`, `Drawer`, `Field`, `Fieldset`, `Form`, `Input`, `Menu`, `Menubar`, `Meter`, `NavigationMenu`, `NumberField`, `OTPField`, `Popover`, `PreviewCard`, `Progress`, `Radio`, `ScrollArea`, `Select`, `Separator`, `Slider`, `Switch`, `Tabs`, `Toast`, `Toggle`, `ToggleGroup`, `Toolbar`, `Tooltip`. Each component's README lists the classes its parts take and the data attributes they answer to (`data-size="sm|lg"`, `data-emphasis`, `data-color`). In previews and designs they are `window.Loomiere.<Name>`; Button, Input, Field, Fieldset, Form and NavigationMenu are wrappers that put their classes on themselves.
140
+
141
+ Icons are Material Symbols Outlined by ligature name (`<span class="material-symbols-outlined">search</span>`, or `Loomiere.MaterialSymbol name="search"`), sized by the `.icon-<tier>` utilities to match the text beside them.
142
+
@@ -0,0 +1,97 @@
1
+ # Accordion
2
+
3
+ The Base UI Accordion styled by the theme. No component tokens. Hover, press, chevron, divider and motion are the disclosure concept (tokens/semantic/disclosure.json); the trigger is the maximize-md heading and the panel is base text. The accordion sits on whatever surface holds it.
4
+
5
+ Use `Loomiere.Accordion` (`import { Accordion } from '@base-ui/react/accordion'` in an app) and give each part the class below; the styles target those classes, not Base UI's own markup.
6
+
7
+ Base UI docs: https://base-ui.com/react/components/accordion
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+ | `Accordion` | `data-variant`: `separated`, `bordered` |
14
+ | `AccordionItem` | |
15
+ | `AccordionHeader` | |
16
+ | `AccordionTrigger` | `data-disabled`; `data-panel-open` |
17
+ | `AccordionIcon` | |
18
+ | `AccordionPanel` | `data-starting-style`; `data-ending-style` |
19
+ | `AccordionContent` | |
20
+
21
+ Base UI sets the state attributes (`data-checked`, `data-open`, `data-disabled`...) itself. Set `data-size`, `data-emphasis`, `data-variant` and `data-color` yourself; `data-color` takes any palette name (`primary`, `secondary`, `error`...) and repaints the part in it.
22
+
23
+ ## Example
24
+
25
+ From the Accordion stories (`Default`):
26
+
27
+ ```tsx
28
+ export const Default: Story = {
29
+ render: () => (
30
+ <div style={{ width: '600px' }}>
31
+ <Accordion.Root className="Accordion" defaultValue={[0]}>
32
+ <Accordion.Item className="AccordionItem" value={0}>
33
+ <Accordion.Header className="AccordionHeader">
34
+ <Accordion.Trigger className="AccordionTrigger">
35
+ What is Base UI?
36
+ <MaterialSymbol
37
+ name="expand_more"
38
+ className="AccordionIcon"
39
+ aria-hidden
40
+ style={{ fontSize: 'var(--sl-accordion-icon-size, 1.25rem)' }}
41
+ />
42
+ </Accordion.Trigger>
43
+ </Accordion.Header>
44
+ <Accordion.Panel className="AccordionPanel">
45
+ <div className="AccordionContent">
46
+ Base UI is a library of headless (unstyled) React components and low-level hooks.
47
+ You gain complete control over your app's CSS and accessibility features.
48
+ </div>
49
+ </Accordion.Panel>
50
+ </Accordion.Item>
51
+
52
+ <Accordion.Item className="AccordionItem" value={1}>
53
+ <Accordion.Header className="AccordionHeader">
54
+ <Accordion.Trigger className="AccordionTrigger">
55
+ Why use Base UI?
56
+ <MaterialSymbol
57
+ name="expand_more"
58
+ className="AccordionIcon"
59
+ aria-hidden
60
+ style={{ fontSize: 'var(--sl-accordion-icon-size, 1.25rem)' }}
61
+ />
62
+ </Accordion.Trigger>
63
+ </Accordion.Header>
64
+ <Accordion.Panel className="AccordionPanel">
65
+ <div className="AccordionContent">
66
+ Base UI gives you complete control over styling while handling all the complex
67
+ accessibility and interaction logic for you.
68
+ </div>
69
+ </Accordion.Panel>
70
+ </Accordion.Item>
71
+
72
+ <Accordion.Item className="AccordionItem" value={2}>
73
+ <Accordion.Header className="AccordionHeader">
74
+ <Accordion.Trigger className="AccordionTrigger">
75
+ How do I style it?
76
+ <MaterialSymbol
77
+ name="expand_more"
78
+ className="AccordionIcon"
79
+ aria-hidden
80
+ style={{ fontSize: 'var(--sl-accordion-icon-size, 1.25rem)' }}
81
+ />
82
+ </Accordion.Trigger>
83
+ </Accordion.Header>
84
+ <Accordion.Panel className="AccordionPanel">
85
+ <div className="AccordionContent">
86
+ You apply class names to each component part and style them with CSS.
87
+ Base UI handles all the accessibility and interaction logic automatically.
88
+ </div>
89
+ </Accordion.Panel>
90
+ </Accordion.Item>
91
+ </Accordion.Root>
92
+ </div>
93
+ ),
94
+ };
95
+ ```
96
+
97
+ The preview also shows `SingleOpen`, `Separated`, `Bordered`.
@@ -0,0 +1,19 @@
1
+ <!-- @dsCard group="Disclosure" height=480 subtitle="Default / SingleOpen / Separated / Bordered" -->
2
+ <!doctype html>
3
+ <html>
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <style>
7
+ body { margin: 0; padding: var(--sl-space-4, 16px); background: var(--sl-surface-canvas); color: var(--sl-text-primary); }
8
+ #root { display: grid; gap: var(--sl-space-5, 20px); }
9
+ .ds-story-name { margin: 0 0 var(--sl-space-2, 8px); font: var(--sl-font-minimize-label-font, 500 10px sans-serif); color: var(--sl-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script>
15
+ (()=>{var v=Object.create;var l=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var f=(a,c)=>()=>(c||a((c={exports:{}}).exports,c),c.exports),S=(a,c)=>{for(var r in c)l(a,r,{get:c[r],enumerable:!0})},P=(a,c,r,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let n of I(c))!h.call(a,n)&&n!==r&&l(a,n,{get:()=>c[n],enumerable:!(s=y(c,n))||s.enumerable});return a};var T=(a,c,r)=>(r=a!=null?v(u(a)):{},P(c||!a||!a.__esModule?l(r,"default",{value:a,enumerable:!0}):r,a));var p=f((_,g)=>{g.exports=window.Loomiere.Base});var A={};S(A,{Bordered:()=>b,Default:()=>x,Separated:()=>w,SingleOpen:()=>z,default:()=>m});var o=T(p(),1);var t=window.React;function e(a,c,r){let{children:s,...n}=c||{};return r!==void 0&&(n.key=r),s===void 0?t.createElement(a,n):Array.isArray(s)?t.createElement(a,n,...s):t.createElement(a,n,s)}var k=t.Fragment;function i({name:a,className:c,...r}){let s=["material-symbols-outlined",c].filter(Boolean).join(" ");return e("span",{className:s,...r,children:a})}var H={title:"Components/Accordion",component:o.Accordion.Root,parameters:{layout:"centered"},tags:["autodocs"]},m=H,x={render:()=>e("div",{style:{width:"600px"},children:e(o.Accordion.Root,{className:"Accordion",defaultValue:[0],children:[e(o.Accordion.Item,{className:"AccordionItem",value:0,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["What is Base UI?",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"Base UI is a library of headless (unstyled) React components and low-level hooks. You gain complete control over your app's CSS and accessibility features."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:1,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Why use Base UI?",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"Base UI gives you complete control over styling while handling all the complex accessibility and interaction logic for you."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:2,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["How do I style it?",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"You apply class names to each component part and style them with CSS. Base UI handles all the accessibility and interaction logic automatically."})})]})]})})},z={render:()=>e("div",{style:{width:"600px"},children:e(o.Accordion.Root,{className:"Accordion",defaultValue:[0],multiple:!1,children:[e(o.Accordion.Item,{className:"AccordionItem",value:0,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Section 1",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"Only one section can be open at a time. Try opening another section - this one will close."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:1,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Section 2",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"Opening this will automatically close Section 1."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:2,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Section 3",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"This is a common pattern for FAQs and settings panels."})})]})]})})},w={render:()=>e("div",{style:{width:"600px"},children:e(o.Accordion.Root,{className:"Accordion","data-variant":"separated",defaultValue:[0],children:[e(o.Accordion.Item,{className:"AccordionItem",value:0,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Card-like Item 1",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"Notice the gaps between items and individual borders. Each item looks like a separate card."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:1,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Card-like Item 2",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"This variant is great for settings panels or feature lists."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:2,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Card-like Item 3",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"Each item is visually distinct and separated."})})]})]})})},b={render:()=>e("div",{style:{width:"600px"},children:e(o.Accordion.Root,{className:"Accordion","data-variant":"bordered",defaultValue:[0],children:[e(o.Accordion.Item,{className:"AccordionItem",value:0,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Bordered Accordion",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"This variant has a border around the entire accordion container."})})]}),e(o.Accordion.Item,{className:"AccordionItem",value:1,children:[e(o.Accordion.Header,{className:"AccordionHeader",children:e(o.Accordion.Trigger,{className:"AccordionTrigger",children:["Another Section",e(i,{name:"expand_more",className:"AccordionIcon","aria-hidden":!0,style:{fontSize:"var(--sl-accordion-icon-size, 1.25rem)"}})]})}),e(o.Accordion.Panel,{className:"AccordionPanel",children:e("div",{className:"AccordionContent",children:"All items are contained within a single bordered container."})})]})]})})};var d=window.React,N=m||{},C=["Default","SingleOpen","Separated","Bordered"];function R({id:a}){let c=A[a],r={...N.args||{},...c.args||{}};return(c.render||(n=>d.createElement(N.component,n)))(r,{args:r,id:a,name:a})}var E=C.map(a=>d.createElement("section",{key:a,className:"ds-story"},d.createElement("p",{className:"ds-story-name"},a.replace(/([a-z])([A-Z])/g,"$1 $2")),d.createElement("div",{className:"ds-story-body"},d.createElement(R,{id:a}))));window.ReactDOM.createRoot(document.getElementById("root")).render(d.createElement(d.Fragment,null,E));})();
16
+
17
+ </script>
18
+ </body>
19
+ </html>
@@ -0,0 +1,52 @@
1
+ # AlertDialog
2
+
3
+ The Base UI AlertDialog styled by the theme. No component tokens and no rules of its own. An alert dialog looks exactly like a dialog, so its backdrop, popup, title, description and actions are styled with the dialog's in Dialog.css. Its buttons are .Button elements: the confirming one bold, a cancel quiet, and a destructive one bold with data-color="error".
4
+
5
+ Use `Loomiere.AlertDialog` (`import { AlertDialog } from '@base-ui/react/alert-dialog'` in an app) and give each part the class below; the styles target those classes, not Base UI's own markup.
6
+
7
+ Base UI docs: https://base-ui.com/react/components/alert-dialog
8
+
9
+ ## Classes
10
+
11
+ | Class | Data attributes it answers to |
12
+ |---|---|
13
+
14
+ Base UI sets the state attributes (`data-checked`, `data-open`, `data-disabled`...) itself. Set `data-size`, `data-emphasis`, `data-variant` and `data-color` yourself; `data-color` takes any palette name (`primary`, `secondary`, `error`...) and repaints the part in it.
15
+
16
+ ## Example
17
+
18
+ From the AlertDialog stories (`Default`):
19
+
20
+ ```tsx
21
+ export const Default: Story = {
22
+ render: () => (
23
+ <AlertDialog.Root>
24
+ <AlertDialog.Trigger className="Button">
25
+ Delete Account
26
+ </AlertDialog.Trigger>
27
+ <AlertDialog.Portal>
28
+ <AlertDialog.Backdrop className="AlertDialogBackdrop" />
29
+ <AlertDialog.Popup className="AlertDialogPopup">
30
+ <AlertDialog.Title className="AlertDialogTitle">
31
+ Are you absolutely sure?
32
+ </AlertDialog.Title>
33
+ <AlertDialog.Description className="AlertDialogDescription">
34
+ This action cannot be undone. This will permanently delete your account
35
+ and remove your data from our servers.
36
+ </AlertDialog.Description>
37
+ <div className="AlertDialogActions">
38
+ <AlertDialog.Close className="Button" data-variant="ghost">
39
+ Cancel
40
+ </AlertDialog.Close>
41
+ <AlertDialog.Close className="Button" data-color="error">
42
+ Delete Account
43
+ </AlertDialog.Close>
44
+ </div>
45
+ </AlertDialog.Popup>
46
+ </AlertDialog.Portal>
47
+ </AlertDialog.Root>
48
+ ),
49
+ };
50
+ ```
51
+
52
+ The preview also shows `Warning`.