opui-css 4.1.0 → 5.0.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 (90) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/MIGRATING.md +23 -1
  3. package/README.md +1 -1
  4. package/components/AGENTS.md +20 -19
  5. package/components/Accordion/Accordion.astro +3 -3
  6. package/components/Anchor/Anchor.astro +2 -2
  7. package/components/Avatar/Avatar.astro +2 -8
  8. package/components/Badge/Badge.astro +12 -7
  9. package/components/Button/Button.astro +1 -1
  10. package/components/ButtonGroup/ButtonGroup.astro +1 -1
  11. package/components/Callout/Callout.astro +3 -3
  12. package/components/Card/Card.astro +3 -3
  13. package/components/Checkbox/Checkbox.astro +6 -6
  14. package/components/Chip/Chip.astro +5 -5
  15. package/components/ClassicSelect/ClassicSelect.astro +6 -6
  16. package/components/DescriptionList/Description.astro +1 -1
  17. package/components/DescriptionList/DescriptionList.astro +2 -2
  18. package/components/DescriptionList/Item.astro +1 -1
  19. package/components/DescriptionList/Term.astro +1 -1
  20. package/components/Dialog/Dialog.astro +3 -3
  21. package/components/Divider/Divider.astro +4 -1
  22. package/components/Drawer/Drawer.astro +5 -5
  23. package/components/Drawer/DrawerFooter.astro +1 -1
  24. package/components/Drawer/DrawerHeader.astro +1 -1
  25. package/components/FieldDescription/FieldDescription.astro +1 -1
  26. package/components/FieldGroup/FieldGroup.astro +1 -1
  27. package/components/FieldLegend/FieldLegend.astro +1 -1
  28. package/components/FieldSet/FieldSet.astro +1 -1
  29. package/components/Form/Form.astro +1 -1
  30. package/components/IconButton/IconButton.astro +1 -1
  31. package/components/List/List.astro +5 -5
  32. package/components/ListItem/ListItem.astro +12 -12
  33. package/components/Progress/Progress.astro +1 -1
  34. package/components/Radio/Radio.astro +5 -5
  35. package/components/Range/Range.astro +8 -8
  36. package/components/Select/Select.astro +13 -13
  37. package/components/Switch/Switch.astro +8 -8
  38. package/components/Table/Table.astro +4 -1
  39. package/components/Tabs/Tabs.astro +1 -1
  40. package/components/Tabs/TabsItem.astro +1 -1
  41. package/components/Tabs/TabsPanel.astro +1 -1
  42. package/components/Tabs/TabsTab.astro +1 -1
  43. package/components/TextField/TextField.astro +13 -13
  44. package/components/Textarea/Textarea.astro +13 -13
  45. package/components/Toast/Toast.astro +6 -6
  46. package/components/ToggleButton/ToggleButton.astro +3 -3
  47. package/components/ToggleGroup/ToggleGroup.astro +3 -3
  48. package/components/Tooltip/Tooltip.astro +1 -1
  49. package/core/utils.css +4 -4
  50. package/css/components/accordion.css +11 -11
  51. package/css/components/anchor.css +3 -3
  52. package/css/components/avatar.css +5 -5
  53. package/css/components/badge.css +14 -14
  54. package/css/components/button-group.css +16 -16
  55. package/css/components/button.css +12 -12
  56. package/css/components/callout.css +9 -9
  57. package/css/components/card.css +12 -12
  58. package/css/components/checkbox.css +13 -13
  59. package/css/components/chip.css +5 -5
  60. package/css/components/description-list.css +11 -8
  61. package/css/components/dialog.css +3 -3
  62. package/css/components/divider.css +4 -4
  63. package/css/components/drawer.css +21 -21
  64. package/css/components/form.css +18 -18
  65. package/css/components/icon-button.css +9 -9
  66. package/css/components/link.css +1 -1
  67. package/css/components/list.css +29 -29
  68. package/css/components/progress.css +4 -4
  69. package/css/components/radio.css +10 -10
  70. package/css/components/range.css +31 -31
  71. package/css/components/select.css +4 -4
  72. package/css/components/spinner.css +1 -1
  73. package/css/components/switch.css +23 -23
  74. package/css/components/table.css +3 -3
  75. package/css/components/tabs.css +14 -8
  76. package/css/components/text-field.css +47 -47
  77. package/css/components/text-input.css +7 -7
  78. package/css/components/textarea.css +3 -3
  79. package/css/components/toast.css +12 -12
  80. package/css/components/toggle-button.css +6 -6
  81. package/css/components/toggle-group.css +10 -10
  82. package/css/components/tooltip.css +6 -6
  83. package/css/components/typography.css +30 -30
  84. package/css/js/toast.js +7 -7
  85. package/css/theme.css +8 -8
  86. package/dist/opui.components.css +407 -398
  87. package/dist/opui.components.css.map +1 -1
  88. package/dist/opui.css +419 -410
  89. package/dist/opui.css.map +1 -1
  90. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.0.0 - 2026-05-21
4
+
5
+ ### Breaking
6
+
7
+ This is technically very breaking, but with a little prompting from you it's probably not a big deal for you. Hopefully you'll understand the reasoning behind this.
8
+
9
+ Every OPUI-owned class now has a `ui-` prefix. This eliminates collisions with consumer styles and makes library classes self-identifying in the DOM.
10
+
11
+ - Component prop API is **unchanged**: `<Button size="small" variant="outlined" color="primary">` works exactly as before.
12
+ - Raw HTML / CSS users **must** rename every library class. `<button class="button outlined">` → `<button class="ui-button ui-outlined">`. `.button { ... }` overrides → `.ui-button { ... }`.
13
+ - CSS custom properties (`--primary`, `--surface-default`, `--size-3`, …) are unchanged.
14
+ - The framework component renders prefixed classes (`<button class="ui-button ui-small ui-outlined ui-primary">`); only the rendered HTML changes, not the public prop API.
15
+ - **Divider**, **Progress**, **Table**, **Tabs**, and **Description List** now render and style prefixed classes end-to-end (`.ui-divider`, `.ui-progress`, `.ui-table`, `.ui-tab-label`, `.ui-tab-panel`, `.ui-term`). Plain `<hr>`, `<progress>`, and `<table>` elements no longer pick up library styles unless the class is present.
16
+ - **Toggle Button**: pressed state no longer adds an unprefixed `selected` class.
17
+ - **Avatar**: removed unused `spacing` prop and related group gap classes.
18
+
19
+ #### Migration
20
+
21
+ Run a project-wide find/replace per token, prompt or whatever. Below are all the classes that got a `ui-` prefix.
22
+
23
+ <details>
24
+ <summary>Migrated classes</summary>
25
+
26
+ `abbr`, `accordion`, `actions`, `align-end`, `anchor`, `anchor-floating`, `auto-fit`, `avatar`, `backdrop-transparent`, `badge`, `badge-indicator`, `block-end`, `block-start`, `blockquote`, `border-filled`, `border-primary`, `border-tonal`, `border-top`, `bordered`, `button`, `button-group`, `callout`, `caption`, `card`, `checkbox`, `chip`, `cite`, `close-button`, `code-block`, `content`, `critical`, `dark`, `default`, `del`, `dense`, `description`, `description-list`, `dfn`, `dialog`, `disabled`, `divider`, `dot`, `dotted`, `drawer`, `elevated`, `end`, `end-end`, `end-start`, `end-text`, `exiting`, `field`, `field-description`, `field-group`, `fieldset`, `fieldset-item`, `filled`, `footer`, `form`, `gutterless`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `header`, `hgroup`, `icon`, `icon-button`, `icon-checked`, `icon-only`, `icon-unchecked`, `info`, `inline-end`, `inline-start`, `ins`, `inset`, `invisible`, `item`, `kbd`, `label`, `large`, `legend`, `light`, `link`, `list`, `mark`, `multiline`, `neutral`, `not-rich-text`, `outlined`, `overline`, `p`, `prefix`, `primary`, `progress`, `radio`, `range`, `rich-text`, `rounded`, `row`, `s`, `samp`, `scroll-lock`, `select`, `small`, `spacious`, `spread`, `squared`, `squircle`, `sr-only`, `stack`, `start`, `start-start`, `start-text`, `sub`, `success`, `suffix`, `sup`, `switch`, `tab-input`, `tab-label`, `tab-panel`, `table`, `tabs`, `term`, `text`, `text-field`, `textarea`, `title`, `toast`, `toggle-button`, `toggle-group`, `tonal`, `tooltip`, `transparent`, `u`, `value`, `var`, `vertical`, `warning`, `with-arrow`, `x-small`.
27
+
28
+ </details>
29
+
30
+ After the search/replace, do a visual smoke test — there is no automated codemod for consumer projects.
31
+
3
32
  ## 4.1.0 - 2026-05-18
4
33
 
5
34
  ### Breaking
package/MIGRATING.md CHANGED
@@ -1,3 +1,25 @@
1
+ # Migrating from v4 to v5
2
+
3
+ v5 prefixes every OPUI-owned class with `ui-`. The component prop API is unchanged; only the rendered class names change.
4
+
5
+ If you use the framework component (e.g. `<Button size="small" variant="outlined">`), you don't need to do anything — the component emits the prefixed classes for you.
6
+
7
+ If you use raw HTML or write CSS that targets library classes, you must rename every reference:
8
+
9
+ ```diff
10
+ - <button class="button outlined small">Save</button>
11
+ + <button class="ui-button ui-outlined ui-small">Save</button>
12
+ ```
13
+
14
+ ```diff
15
+ - .button.filled { /* override */ }
16
+ + .ui-button.ui-filled { /* override */ }
17
+ ```
18
+
19
+ The full list of renamed tokens is in [CHANGELOG.md](./CHANGELOG.md#500). Run a project-wide find/replace per token, then visually smoke test.
20
+
21
+ CSS custom properties (`--primary`, `--surface-default`, `--size-3`, …) are unchanged.
22
+
1
23
  # Migrating from v3 to v4
2
24
 
3
25
  v4 is a full re-platform.
@@ -78,7 +100,7 @@ import { Button, Dialog, Tabs } from "opui-css/astro"
78
100
 
79
101
  `astro` is an _optional_ peer — only required if you actually import from `opui-css/astro`. Pure-CSS consumers won't see a peer warning.
80
102
 
81
- The components emit the same class names the v3 docs documented, so existing styles keep working.
103
+ Astro components emit prefixed `ui-` classes (see the v4 → v5 section at the top of this file). Raw HTML and CSS overrides must use those prefixed names.
82
104
 
83
105
  ## 8. Cascade layers
84
106
 
package/README.md CHANGED
@@ -38,7 +38,7 @@ Drop a pre-bundled stylesheet into any page and use the documented class names:
38
38
  ```html
39
39
  <link rel="stylesheet" href="https://unpkg.com/opui-css/dist/opui.css" />
40
40
 
41
- <button class="button primary">Click me</button>
41
+ <button class="ui-button ui-primary">Click me</button>
42
42
  ```
43
43
 
44
44
  `dist/opui.css` is a single self-contained file (Open Props + normalize + theme + every component + utils, in the correct cascade layers). `dist/opui.components.css` is the same minus tokens and reset for users who already have those.
@@ -68,32 +68,33 @@ const { as: Tag = Astro.props.href ? "a" : "button", ...rest } = Astro.props
68
68
  - **Override**: Allow manual override via the `as` prop.
69
69
 
70
70
  ### Styling Inheritance
71
- Components should often inherit styles from others (e.g., `Dialog` looking like a `Card`). Use conditional classes to apply the inherited base class.
71
+ Components should often inherit styles from others (e.g., `Dialog` looking like a `Card`). Use conditional classes to apply the inherited base class. All library classes are prefixed with `ui-`.
72
72
 
73
73
  ```astro
74
- <dialog class:list={["dialog", { card: variant }, variant, className]} {...rest}>
74
+ <dialog class:list={["ui-dialog", { "ui-card": variant }, variant && `ui-${variant}`, className]} {...rest}>
75
75
  ```
76
76
 
77
77
  ---
78
78
 
79
79
  ## 3. Class Management
80
80
 
81
- Use `class:list` exclusively. Follow this order for readability:
82
- 1. **Component Base Class**: The primary CSS class (e.g., `"button"`).
83
- 2. **State Objects**: Boolean flags (e.g., `{ active, disabled, error }`).
84
- 3. **Variant Props**: Direct string values from props (e.g., `size`, `variant`).
85
- 4. **External Class**: Always include `className` at the end to allow for overrides.
81
+ Use `class:list` exclusively. Every library-owned class is prefixed with `ui-`; the public prop API stays unprefixed (`<Button size="small" variant="outlined">`) and the component interpolates the prefix when rendering.
82
+
83
+ Follow this order for readability:
84
+ 1. **Component Base Class**: The primary CSS class, prefixed (e.g., `"ui-button"`).
85
+ 2. **State Objects**: Boolean flags as quoted prefixed keys (e.g., `{ "ui-disabled": disabled }`).
86
+ 3. **Variant Props**: Interpolate the prefix from the prop value (e.g., `size && \`ui-${size}\``).
87
+ 4. **External Class**: Always include `className` at the end to allow for overrides. Do not prefix `className`.
86
88
 
87
89
  ```astro
88
90
  <div
89
91
  class:list={[
90
- "chip",
92
+ "ui-chip",
91
93
  {
92
- multiline: isMultiline,
93
- selected,
94
+ "ui-multiline": isMultiline,
94
95
  },
95
- size,
96
- variant,
96
+ size && `ui-${size}`,
97
+ variant && `ui-${variant}`,
97
98
  className,
98
99
  ]}
99
100
  >
@@ -107,9 +108,9 @@ Use `class:list` exclusively. Follow this order for readability:
107
108
  For simple text-based components, provide both a `label` prop and a default slot.
108
109
 
109
110
  ```astro
110
- <div class="component">
111
+ <div class="ui-component">
111
112
  { (label || Astro.slots.has("default")) && (
112
- <span class="text">
113
+ <span class="ui-text">
113
114
  {label}
114
115
  <slot />
115
116
  </span>
@@ -121,10 +122,10 @@ For simple text-based components, provide both a `label` prop and a default slot
121
122
  Use named slots for specific functional areas. Check for existence before rendering wrapper tags.
122
123
 
123
124
  ```astro
124
- <div class="card">
125
+ <div class="ui-card">
125
126
  {Astro.slots.has("header") && <header><slot name="header" /></header>}
126
127
  <slot />
127
- {Astro.slots.has("actions") && <footer class="actions"><slot name="actions" /></footer>}
128
+ {Astro.slots.has("actions") && <footer class="ui-actions"><slot name="actions" /></footer>}
128
129
  </div>
129
130
  ```
130
131
 
@@ -136,10 +137,10 @@ Use named slots for specific functional areas. Check for existence before render
136
137
  Most inputs should be wrapped in a `<label>` to provide a larger hit area and built-in accessibility.
137
138
 
138
139
  ```astro
139
- <label class:list={["field", { disabled, error }]}>
140
- <span class="label">{label}</span>
140
+ <label class:list={["ui-field", { "ui-disabled": disabled, "ui-critical": error }]}>
141
+ <span class="ui-label">{label}</span>
141
142
  <input type="text" {...rest} />
142
- {endText && <span class="end-text">{endText}</span>}
143
+ {endText && <span class="ui-end-text">{endText}</span>}
143
144
  </label>
144
145
  ```
145
146
 
@@ -18,7 +18,7 @@ const contentId = $id("content")
18
18
 
19
19
  <details
20
20
  name={name}
21
- class:list={["accordion", "card", variant, className]}
21
+ class:list={["ui-accordion", "ui-card", variant && `ui-${variant}`, className]}
22
22
  open={open}
23
23
  {...rest}
24
24
  >
@@ -27,14 +27,14 @@ const contentId = $id("content")
27
27
  <summary id={summaryId} aria-controls={contentId}><slot name="summary" /><slot name="marker" /></summary>
28
28
 
29
29
  <!-- Content -->
30
- <div id={contentId} class="content" role="region" aria-labelledby={summaryId}>
30
+ <div id={contentId} class="ui-content" role="region" aria-labelledby={summaryId}>
31
31
  <slot />
32
32
  </div>
33
33
 
34
34
  <!-- Actions -->
35
35
  {
36
36
  Astro.slots.has("actions") && (
37
- <div class="actions">
37
+ <div class="ui-actions">
38
38
  <slot name="actions" />
39
39
  </div>
40
40
  )
@@ -35,7 +35,7 @@ const positionArea = alignment
35
35
  : {}
36
36
  ---
37
37
 
38
- <span class:list={["anchor", className]} style={positionArea} {...rest}>
38
+ <span class:list={["ui-anchor", className]} style={positionArea} {...rest}>
39
39
  {
40
40
  isHover ? (
41
41
  <span {...({ interestfor: id } as any)}>
@@ -45,7 +45,7 @@ const positionArea = alignment
45
45
  <slot />
46
46
  )
47
47
  }
48
- <span class="anchor-floating" id={id} popover={isHover ? "hint" : undefined}>
48
+ <span class="ui-anchor-floating" id={id} popover={isHover ? "hint" : undefined}>
49
49
  <slot name="anchored" />
50
50
  </span>
51
51
  </span>
@@ -6,7 +6,6 @@ type Props = {
6
6
  class?: string
7
7
  href?: string
8
8
  isGroup?: boolean
9
- spacing?: "small" | "x-small"
10
9
  src?: string
11
10
  variant?: "squared" | "rounded" | "squircle"
12
11
  }
@@ -19,7 +18,6 @@ const {
19
18
  class: className,
20
19
  href,
21
20
  isGroup,
22
- spacing,
23
21
  src,
24
22
  variant,
25
23
  ...rest
@@ -31,12 +29,8 @@ const Tag = as || (href ? "a" : "div")
31
29
  <!-- prettier-ignore -->
32
30
  <Tag
33
31
  class:list={[
34
- { avatar: !isGroup },
35
- !isGroup && variant,
36
- {
37
- "gap-small": isGroup && spacing === "small",
38
- "gap-x-small": isGroup && spacing === "x-small",
39
- },
32
+ { "ui-avatar": !isGroup },
33
+ !isGroup && variant && `ui-${variant}`,
40
34
  className,
41
35
  ]}
42
36
  href={href}
@@ -36,19 +36,24 @@ const positionArea =
36
36
  <Anchor
37
37
  alignment={positionArea}
38
38
  class:list={[
39
- "badge",
39
+ "ui-badge",
40
40
  {
41
- dot,
42
- invisible,
41
+ "ui-dot": dot,
42
+ "ui-invisible": invisible,
43
43
  },
44
- alignment,
44
+ alignment && `ui-${alignment}`,
45
45
  className,
46
- color,
46
+ color && `ui-${color}`,
47
47
  ]}
48
48
  {...rest}
49
49
  >
50
50
  <slot />
51
- <span class="badge-indicator" slot="anchored" aria-label={label?.toString()}
52
- >{dot ? "" : label}</span
51
+ <span
52
+ class="ui-badge-indicator"
53
+ slot="anchored"
54
+ aria-label={label?.toString()}
53
55
  >
56
+ {dot ? "" : label}
57
+ {!dot && <slot name="indicator" />}
58
+ </span>
54
59
  </Anchor>
@@ -39,7 +39,7 @@ const isButton = Tag === "button"
39
39
 
40
40
  <!-- prettier-ignore -->
41
41
  <Tag
42
- class:list={["button", { disabled: isButton && disabled }, size, variant, color, className]}
42
+ class:list={["ui-button", { "ui-disabled": isButton && disabled }, size && `ui-${size}`, variant && `ui-${variant}`, color && `ui-${color}`, className]}
43
43
  disabled={isButton ? disabled : undefined}
44
44
  href={href}
45
45
  {...rest}><slot /></Tag>
@@ -21,7 +21,7 @@ const {
21
21
  ---
22
22
 
23
23
  <div
24
- class:list={["button-group", color, size, variant, orientation, className]}
24
+ class:list={["ui-button-group", color && `ui-${color}`, size && `ui-${size}`, variant && `ui-${variant}`, orientation && `ui-${orientation}`, className]}
25
25
  role="group"
26
26
  {...rest}
27
27
  >
@@ -13,7 +13,7 @@ const { class: className, severity, variant, ...rest } = Astro.props
13
13
 
14
14
  <article
15
15
  role="note"
16
- class:list={["callout", variant, severity, className]}
16
+ class:list={["ui-callout", variant && `ui-${variant}`, severity && `ui-${severity}`, className]}
17
17
  {...rest}
18
18
  >
19
19
  <slot name="icon">
@@ -63,11 +63,11 @@ const { class: className, severity, variant, ...rest } = Astro.props
63
63
  )
64
64
  }
65
65
  </slot>
66
- <div class="content">
66
+ <div class="ui-content">
67
67
  {
68
68
  Astro.slots.has("title") && (
69
69
  <!-- prettier-ignore -->
70
- <h3 class="title"><slot name="title" /></h3>
70
+ <h3 class="ui-title"><slot name="title" /></h3>
71
71
  )
72
72
  }
73
73
  <slot />
@@ -10,7 +10,7 @@ export const title = "Card"
10
10
  const { variant, actionsAlign, class: className, ...rest } = Astro.props
11
11
  ---
12
12
 
13
- <div class:list={["card", variant, className]} {...rest}>
13
+ <div class:list={["ui-card", variant && `ui-${variant}`, className]} {...rest}>
14
14
  {
15
15
  Astro.slots.has("header") && (
16
16
  <hgroup>
@@ -20,7 +20,7 @@ const { variant, actionsAlign, class: className, ...rest } = Astro.props
20
20
  }
21
21
  {
22
22
  Astro.slots.has("content") && (
23
- <div class="content">
23
+ <div class="ui-content">
24
24
  <slot name="content" />
25
25
  </div>
26
26
  )
@@ -28,7 +28,7 @@ const { variant, actionsAlign, class: className, ...rest } = Astro.props
28
28
  <slot />
29
29
  {
30
30
  Astro.slots.has("actions") && (
31
- <div class:list={["actions", actionsAlign && `align-${actionsAlign}`]}>
31
+ <div class:list={["ui-actions", actionsAlign && `ui-align-${actionsAlign}`]}>
32
32
  <slot name="actions" />
33
33
  </div>
34
34
  )
@@ -45,11 +45,11 @@ const finalName = name || currentFieldName
45
45
 
46
46
  <label
47
47
  class:list={[
48
- "checkbox",
49
- size,
48
+ "ui-checkbox",
49
+ size && `ui-${size}`,
50
50
  {
51
- stack,
52
- spread,
51
+ "ui-stack": stack,
52
+ "ui-spread": spread,
53
53
  },
54
54
  className,
55
55
  ]}
@@ -66,11 +66,11 @@ const finalName = name || currentFieldName
66
66
  {value}
67
67
  {...rest}
68
68
  />
69
- <!-- prettier-ignore --><span class:list={[hideLabel ? "sr-only" : "label"]}><slot /></span>
69
+ <!-- prettier-ignore --><span class:list={[hideLabel ? "ui-sr-only" : "ui-label"]}><slot /></span>
70
70
  {
71
71
  Astro.slots.has("end-text") && (
72
72
  <!-- prettier-ignore -->
73
- <span id={endTextId} class="end-text"><slot name="end-text" /></span>
73
+ <span id={endTextId} class="ui-end-text"><slot name="end-text" /></span>
74
74
  )
75
75
  }
76
76
  </label>
@@ -25,13 +25,13 @@ const {
25
25
  <!-- prettier-ignore -->
26
26
  <Tag
27
27
  class:list={[
28
- "chip",
28
+ "ui-chip",
29
29
  {
30
- multiline,
30
+ "ui-multiline": multiline,
31
31
  },
32
- size,
33
- variant,
32
+ size && `ui-${size}`,
33
+ variant && `ui-${variant}`,
34
34
  className,
35
35
  ]}
36
36
  {...rest}
37
- ><slot name="start" /><slot />{label && <span class="text">{label}</span>}<slot name="end" /></Tag>
37
+ ><slot name="start" /><slot />{label && <span class="ui-text">{label}</span>}<slot name="end" /></Tag>
@@ -45,10 +45,10 @@ const labelId = $id("select-label")
45
45
 
46
46
  <label
47
47
  class:list={[
48
- "select",
49
- size,
48
+ "ui-select",
49
+ size && `ui-${size}`,
50
50
  {
51
- filled: variant === "filled",
51
+ "ui-filled": variant === "filled",
52
52
  },
53
53
  className,
54
54
  ]}
@@ -57,10 +57,10 @@ const labelId = $id("select-label")
57
57
  {
58
58
  label && (
59
59
  <!-- prettier-ignore -->
60
- <span class="label" id={labelId}>{label}</span>
60
+ <span class="ui-label" id={labelId}>{label}</span>
61
61
  )
62
62
  }
63
- <span class="field">
63
+ <span class="ui-field">
64
64
  <select
65
65
  aria-labelledby={label ? labelId : undefined}
66
66
  disabled={disabled}
@@ -77,7 +77,7 @@ const labelId = $id("select-label")
77
77
  {
78
78
  endText && (
79
79
  <!-- prettier-ignore -->
80
- <span class="end-text">{endText}</span>
80
+ <span class="ui-end-text">{endText}</span>
81
81
  )
82
82
  }
83
83
  </label>
@@ -7,6 +7,6 @@ type Props = {
7
7
  const { class: className, ...rest } = Astro.props
8
8
  ---
9
9
 
10
- <dd class:list={["description", className]} {...rest}>
10
+ <dd class:list={["ui-description", className]} {...rest}>
11
11
  <slot />
12
12
  </dd>
@@ -12,8 +12,8 @@ const { bordered, class: className, ...rest } = Astro.props
12
12
 
13
13
  <dl
14
14
  class:list={[
15
- "description-list",
16
- { bordered: bordered, dotted: bordered === "dotted" },
15
+ "ui-description-list",
16
+ { "ui-bordered": bordered, "ui-dotted": bordered === "dotted" },
17
17
  className,
18
18
  ]}
19
19
  {...rest}
@@ -7,6 +7,6 @@ type Props = {
7
7
  const { class: className, ...rest } = Astro.props
8
8
  ---
9
9
 
10
- <div class:list={["item", className]} {...rest}>
10
+ <div class:list={["ui-item", className]} {...rest}>
11
11
  <slot />
12
12
  </div>
@@ -7,6 +7,6 @@ type Props = {
7
7
  const { class: className, ...rest } = Astro.props
8
8
  ---
9
9
 
10
- <dt class:list={["term", className]} {...rest}>
10
+ <dt class:list={["ui-term", className]} {...rest}>
11
11
  <slot />
12
12
  </dt>
@@ -12,7 +12,7 @@ const { actionsAlign, class: className, closedby, ...rest } = Astro.props
12
12
  ---
13
13
 
14
14
  <dialog
15
- class:list={["dialog card elevated", className]}
15
+ class:list={["ui-dialog ui-card ui-elevated", className]}
16
16
  closedby={closedby}
17
17
  {...rest}
18
18
  >
@@ -25,7 +25,7 @@ const { actionsAlign, class: className, closedby, ...rest } = Astro.props
25
25
  }
26
26
  {
27
27
  Astro.slots.has("content") && (
28
- <div class="content">
28
+ <div class="ui-content">
29
29
  <slot name="content" />
30
30
  </div>
31
31
  )
@@ -33,7 +33,7 @@ const { actionsAlign, class: className, closedby, ...rest } = Astro.props
33
33
  <slot />
34
34
  {
35
35
  Astro.slots.has("actions") && (
36
- <div class:list={["actions", actionsAlign && `align-${actionsAlign}`]}>
36
+ <div class:list={["ui-actions", actionsAlign && `ui-align-${actionsAlign}`]}>
37
37
  <slot name="actions" />
38
38
  </div>
39
39
  )
@@ -11,4 +11,7 @@ const { class: className, variant, ...rest } = Astro.props
11
11
  const variantClass = variant ? `border-${variant}` : ""
12
12
  ---
13
13
 
14
- <hr class:list={["divider", className, variantClass]} {...rest} />
14
+ <hr
15
+ class:list={["ui-divider", className, variantClass && `ui-${variantClass}`]}
16
+ {...rest}
17
+ />
@@ -28,11 +28,11 @@ const drawerId = id || $id("drawer")
28
28
  <dialog
29
29
  closedby={closedby}
30
30
  class:list={[
31
- "drawer",
32
- side,
31
+ "ui-drawer",
32
+ side && `ui-${side}`,
33
33
  {
34
- "backdrop-transparent": backdrop === "transparent",
35
- "scroll-lock": scrollLock,
34
+ "ui-backdrop-transparent": backdrop === "transparent",
35
+ "ui-scroll-lock": scrollLock,
36
36
  },
37
37
  className,
38
38
  ]}
@@ -41,7 +41,7 @@ const drawerId = id || $id("drawer")
41
41
  >
42
42
  {Astro.slots.has("header") && <slot name="header" />}
43
43
 
44
- <div class="content">
44
+ <div class="ui-content">
45
45
  <slot name="content" />
46
46
  </div>
47
47
 
@@ -9,6 +9,6 @@ export const title = "Drawer Footer"
9
9
  const { class: className, ...rest } = Astro.props
10
10
  ---
11
11
 
12
- <div class:list={["footer", className]} {...rest}>
12
+ <div class:list={["ui-footer", className]} {...rest}>
13
13
  <slot />
14
14
  </div>
@@ -12,7 +12,7 @@ export const title = "Drawer Header"
12
12
  const { class: className, heading, ...rest } = Astro.props
13
13
  ---
14
14
 
15
- <div class:list={["header", className]} {...rest}>
15
+ <div class:list={["ui-header", className]} {...rest}>
16
16
  {heading && <span>{heading}</span>}
17
17
  <slot />
18
18
  <IconButton onclick="this.closest('dialog').close()" title="Close">
@@ -10,4 +10,4 @@ const { class: className, ...rest } = Astro.props
10
10
  ---
11
11
 
12
12
  <!-- prettier-ignore -->
13
- <p class:list={["field-description", className]} {...rest}><slot /></p>
13
+ <p class:list={["ui-field-description", className]} {...rest}><slot /></p>
@@ -24,7 +24,7 @@ try {
24
24
  ---
25
25
 
26
26
  <div
27
- class:list={["field-group", direction, className]}
27
+ class:list={["ui-field-group", direction && `ui-${direction}`, className]}
28
28
  {...rest}
29
29
  role="group"
30
30
  set:html={html}
@@ -12,4 +12,4 @@ const isLegend = Tag === "legend"
12
12
  ---
13
13
 
14
14
  <!-- prettier-ignore -->
15
- <Tag class:list={[{ legend: !isLegend }, className]} {...rest}><slot /></Tag>
15
+ <Tag class:list={[{ "ui-legend": !isLegend }, className]} {...rest}><slot /></Tag>
@@ -10,6 +10,6 @@ export const title = "Field Set"
10
10
  const { as: Tag = "fieldset", class: className, ...rest } = Astro.props
11
11
  ---
12
12
 
13
- <Tag class:list={["fieldset", className]} {...rest}>
13
+ <Tag class:list={["ui-fieldset", className]} {...rest}>
14
14
  <slot />
15
15
  </Tag>
@@ -10,6 +10,6 @@ export const title = "Form"
10
10
  const { as: Tag = "form", class: className, ...rest } = Astro.props
11
11
  ---
12
12
 
13
- <Tag class:list={["form", className]} {...rest}>
13
+ <Tag class:list={["ui-form", className]} {...rest}>
14
14
  <slot />
15
15
  </Tag>
@@ -23,4 +23,4 @@ const {
23
23
  ---
24
24
 
25
25
  <!-- prettier-ignore -->
26
- <Tag class:list={["icon-button", size, variant, color, className]} href={href} {...rest}><slot /></Tag>
26
+ <Tag class:list={["ui-icon-button", size && `ui-${size}`, variant && `ui-${variant}`, color && `ui-${color}`, className]} href={href} {...rest}><slot /></Tag>
@@ -21,13 +21,13 @@ const {
21
21
 
22
22
  <ul
23
23
  class:list={[
24
- "list",
24
+ "ui-list",
25
25
  {
26
- bordered,
27
- dense,
28
- gutterless,
26
+ "ui-bordered": bordered,
27
+ "ui-dense": dense,
28
+ "ui-gutterless": gutterless,
29
29
  },
30
- variant,
30
+ variant && `ui-${variant}`,
31
31
  className,
32
32
  ]}
33
33
  {...rest}