@pimolu/web-styles 0.0.0-stage → 0.1.0-beta.10

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 (145) hide show
  1. package/README.fr.md +125 -0
  2. package/README.md +124 -2
  3. package/dist/accordion.css +194 -0
  4. package/dist/alert.css +147 -0
  5. package/dist/anchor.css +121 -0
  6. package/dist/api-table.css +111 -0
  7. package/dist/app-shell.css +237 -0
  8. package/dist/arc-carousel.css +261 -0
  9. package/dist/aspect-ratio.css +34 -0
  10. package/dist/audio-player.css +327 -0
  11. package/dist/avatar-group.css +58 -0
  12. package/dist/avatar.css +130 -0
  13. package/dist/badge.css +185 -0
  14. package/dist/banner.css +145 -0
  15. package/dist/box.css +39 -0
  16. package/dist/breadcrumbs.css +48 -0
  17. package/dist/button-group.css +84 -0
  18. package/dist/button.css +284 -0
  19. package/dist/calendar.css +221 -0
  20. package/dist/card.css +163 -0
  21. package/dist/carousel.css +244 -0
  22. package/dist/cascader.css +273 -0
  23. package/dist/center.css +20 -0
  24. package/dist/chart.css +377 -0
  25. package/dist/chat.css +518 -0
  26. package/dist/checkbox.css +184 -0
  27. package/dist/circular-progress.css +125 -0
  28. package/dist/code-block.css +169 -0
  29. package/dist/code.css +81 -0
  30. package/dist/color-picker.css +295 -0
  31. package/dist/combobox.css +306 -0
  32. package/dist/command.css +241 -0
  33. package/dist/container.css +36 -0
  34. package/dist/context-menu.css +105 -0
  35. package/dist/coverflow-carousel.css +251 -0
  36. package/dist/currency-input.css +134 -0
  37. package/dist/dashboard-layout.css +244 -0
  38. package/dist/data-grid.css +515 -0
  39. package/dist/data-table.css +191 -0
  40. package/dist/date-picker.css +200 -0
  41. package/dist/date-range-picker.css +260 -0
  42. package/dist/description-list.css +76 -0
  43. package/dist/dialog.css +183 -0
  44. package/dist/docs-layout.css +196 -0
  45. package/dist/drawer.css +219 -0
  46. package/dist/dropdown-menu.css +82 -0
  47. package/dist/dropzone.css +248 -0
  48. package/dist/empty-state.css +120 -0
  49. package/dist/file-manager.css +408 -0
  50. package/dist/file-upload.css +235 -0
  51. package/dist/flex.css +70 -0
  52. package/dist/focus-scope.css +13 -0
  53. package/dist/footer.css +200 -0
  54. package/dist/form-field.css +141 -0
  55. package/dist/form.css +75 -0
  56. package/dist/gantt.css +406 -0
  57. package/dist/grid.css +51 -0
  58. package/dist/hero.css +176 -0
  59. package/dist/hover-card.css +76 -0
  60. package/dist/image-cropper.css +431 -0
  61. package/dist/image.css +158 -0
  62. package/dist/input-group.css +447 -0
  63. package/dist/input.css +271 -0
  64. package/dist/kanban.css +473 -0
  65. package/dist/label.css +39 -0
  66. package/dist/layered.css +23822 -0
  67. package/dist/lightbox.css +286 -0
  68. package/dist/link.css +66 -0
  69. package/dist/list.css +111 -0
  70. package/dist/loading-overlay.css +103 -0
  71. package/dist/masked-input.css +134 -0
  72. package/dist/mentions.css +212 -0
  73. package/dist/menubar.css +140 -0
  74. package/dist/modal.css +186 -0
  75. package/dist/motion.css +36 -0
  76. package/dist/multi-carousel.css +260 -0
  77. package/dist/multi-select.css +399 -0
  78. package/dist/navbar.css +574 -0
  79. package/dist/navigation-menu.css +132 -0
  80. package/dist/notification-center.css +331 -0
  81. package/dist/number-input.css +196 -0
  82. package/dist/page-header.css +169 -0
  83. package/dist/pagination.css +92 -0
  84. package/dist/password-input.css +303 -0
  85. package/dist/pdf-viewer.css +148 -0
  86. package/dist/peek-carousel.css +250 -0
  87. package/dist/phone-input.css +182 -0
  88. package/dist/pimolu.css +23521 -0
  89. package/dist/pimolu.min.css +1 -0
  90. package/dist/pin-input.css +121 -0
  91. package/dist/popconfirm.css +95 -0
  92. package/dist/popover.css +94 -0
  93. package/dist/progress.css +105 -0
  94. package/dist/prose.css +296 -0
  95. package/dist/qr-code.css +17 -0
  96. package/dist/radio.css +220 -0
  97. package/dist/range-slider.css +221 -0
  98. package/dist/rating.css +122 -0
  99. package/dist/resizable.css +122 -0
  100. package/dist/result.css +118 -0
  101. package/dist/scheduler.css +385 -0
  102. package/dist/scroll-area.css +55 -0
  103. package/dist/search-input.css +41 -0
  104. package/dist/segmented-control.css +176 -0
  105. package/dist/select.css +298 -0
  106. package/dist/separator.css +66 -0
  107. package/dist/sidebar.css +308 -0
  108. package/dist/signature.css +189 -0
  109. package/dist/skeleton.css +90 -0
  110. package/dist/slider.css +233 -0
  111. package/dist/spacer.css +20 -0
  112. package/dist/spinner.css +165 -0
  113. package/dist/split-button.css +100 -0
  114. package/dist/stack-carousel.css +250 -0
  115. package/dist/stack.css +58 -0
  116. package/dist/stat.css +159 -0
  117. package/dist/stepper.css +155 -0
  118. package/dist/switch.css +194 -0
  119. package/dist/table-of-contents.css +90 -0
  120. package/dist/table.css +184 -0
  121. package/dist/tabs.css +424 -0
  122. package/dist/tags-input.css +236 -0
  123. package/dist/textarea.css +208 -0
  124. package/dist/theme-builder.css +269 -0
  125. package/dist/themes.css +129 -0
  126. package/dist/thumbnail-carousel.css +244 -0
  127. package/dist/time-picker.css +174 -0
  128. package/dist/timeline.css +195 -0
  129. package/dist/toast.css +356 -0
  130. package/dist/toggle-group.css +21 -0
  131. package/dist/toggle.css +102 -0
  132. package/dist/tokens.css +902 -0
  133. package/dist/toolbar.css +161 -0
  134. package/dist/tooltip.css +95 -0
  135. package/dist/tour.css +196 -0
  136. package/dist/transfer.css +426 -0
  137. package/dist/tree-select.css +340 -0
  138. package/dist/tree-table.css +173 -0
  139. package/dist/tree-view.css +83 -0
  140. package/dist/typography.css +92 -0
  141. package/dist/video-player.css +299 -0
  142. package/dist/virtual-list.css +59 -0
  143. package/dist/visually-hidden.css +44 -0
  144. package/dist/watermark.css +41 -0
  145. package/package.json +174 -4
package/README.fr.md ADDED
@@ -0,0 +1,125 @@
1
+ # @pimolu/web-styles
2
+
3
+ **Un langage visuel, exprimé en CSS natif.**
4
+
5
+ La couche de style derrière Pimolu UI. Chargez une feuille complète, optez pour des couches CSS prévisibles, ou assemblez uniquement le CSS des composants utilisés. Aucune dépendance à Tailwind, aucun runtime CSS-in-JS.
6
+
7
+ [Démarrage rapide](https://pimolu.com/docs/quick-start) · [Thèmes](https://pimolu.com/docs/theming) · [Personnalisation](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md) · [Source](https://github.com/pimoludev/ui/tree/main/packages/web-styles)
8
+
9
+ > **Bêta :** `0.1.0-beta.10` est une prévisualisation. Les entrées CSS publiques et les tokens visuels peuvent évoluer avant `1.0.0`.
10
+
11
+ ## Pourquoi les styles Pimolu ?
12
+
13
+ - **Un import, le système complet.** `styles.css` combine les tokens primitifs, les thèmes sémantiques, les sept presets et chaque feuille de composant.
14
+ - **Des surcharges sans `!important`.** `layered.css` place la bibliothèque dans une couche `pimolu` pour que les règles applicatives et les utilitaires Tailwind gagnent de façon prévisible.
15
+ - **Le CSS par composant quand vous en avez besoin.** Chaque famille possède un sous-chemin CSS exporté : une petite application peut charger seulement les fondations et les contrôles utilisés.
16
+ - **CSS natif, zéro runtime.** Aucun calcul de style en JavaScript et aucun nom de classe généré. Les changements de thème passent par des attributs.
17
+ - **Des versions alignées.** Le CSS et React sont publiés à la même version. Gardez-les ensemble.
18
+
19
+ ## En bref
20
+
21
+ | | |
22
+ | --- | --- |
23
+ | Entrées | `styles.css`, `layered.css`, `tokens.css`, `themes.css`, `pimolu.min.css` |
24
+ | Styles de composants | 129 sous-chemins CSS exportés |
25
+ | Fondations | Tokens, thèmes sémantiques, sept presets visuels |
26
+ | Thèmes | Clair et sombre, y compris la préférence système via le Provider |
27
+ | Presets | default, adaptive, cartoon, glass, luxury, monochrome, neo-brutalism |
28
+ | Runtime | Aucun — Tailwind ou CSS-in-JS non requis |
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pnpm add @pimolu/web-styles@beta
34
+ ```
35
+
36
+ Vous utilisez aussi les composants React ?
37
+
38
+ ```bash
39
+ pnpm add @pimolu/react@beta @pimolu/web-styles@beta
40
+ ```
41
+
42
+ ## Feuille complète
43
+
44
+ Importez-la une fois au point d'entrée de l'application :
45
+
46
+ ```css
47
+ @import "@pimolu/web-styles/styles.css";
48
+ ```
49
+
50
+ Définissez ensuite le mode de couleur et le preset sur un conteneur, ou laissez `PimoluProvider` le faire :
51
+
52
+ ```html
53
+ <div data-pimolu-theme="dark" data-pimolu-style="glass">
54
+ <!-- Votre application -->
55
+ </div>
56
+ ```
57
+
58
+ Une version minifiée est disponible :
59
+
60
+ ```css
61
+ @import "@pimolu/web-styles/pimolu.min.css";
62
+ ```
63
+
64
+ ## Des surcharges prévisibles
65
+
66
+ Utilisez l'entrée en couches quand le CSS applicatif doit surcharger Pimolu sans escalade de spécificité :
67
+
68
+ ```css
69
+ @import "@pimolu/web-styles/layered.css";
70
+
71
+ .checkout-action:hover:enabled {
72
+ background: var(--pimolu-success);
73
+ color: var(--pimolu-success-foreground);
74
+ }
75
+ ```
76
+
77
+ Importez `styles.css` ou `layered.css`, pas les deux. Avec Tailwind v4, déclarez l'ordre complet des couches avant l'un ou l'autre :
78
+
79
+ ```css
80
+ @layer theme, base, pimolu, components, utilities;
81
+ @import "tailwindcss/theme.css" layer(theme);
82
+ @import "@pimolu/web-styles/layered.css";
83
+ @import "tailwindcss/utilities.css" layer(utilities);
84
+ ```
85
+
86
+ Le contrat de personnalisation couvre les hooks de panneaux, le scope des portails et les responsabilités d'accessibilité.
87
+
88
+ ## Assembler uniquement le nécessaire
89
+
90
+ Installez les fondations et importez le CSS des composants utilisés :
91
+
92
+ ```bash
93
+ pnpm add @pimolu/web-styles@beta @pimolu/themes@beta
94
+ ```
95
+
96
+ ```css
97
+ @import "@pimolu/themes/styles.css";
98
+ @import "@pimolu/themes/presets.css";
99
+ @import "@pimolu/web-styles/button.css";
100
+ @import "@pimolu/web-styles/input.css";
101
+ @import "@pimolu/web-styles/card.css";
102
+ ```
103
+
104
+ Chaque famille possède son sous-chemin, de `accordion.css` à `watermark.css`. Gardez les versions CSS et React alignées.
105
+
106
+ ## La famille de packages
107
+
108
+ | Package | Rôle |
109
+ | --- | --- |
110
+ | [`@pimolu/react`](https://www.npmjs.com/package/@pimolu/react) | Composants, hooks et layouts React |
111
+ | [`@pimolu/web-styles`](https://www.npmjs.com/package/@pimolu/web-styles) | CSS complet, entrée en couches et CSS par composant |
112
+ | [`@pimolu/themes`](https://www.npmjs.com/package/@pimolu/themes) | Thèmes clair/sombre, sept presets et données visuelles |
113
+ | [`@pimolu/design-tokens`](https://www.npmjs.com/package/@pimolu/design-tokens) | Tokens primitifs en CSS et JSON |
114
+ | [`@pimolu/core`](https://www.npmjs.com/package/@pimolu/core) | Utilitaire de classes de variantes indépendant du framework |
115
+
116
+ ## Documentation et état
117
+
118
+ - [Démarrage rapide](https://pimolu.com/docs/quick-start)
119
+ - [Thèmes et presets](https://pimolu.com/docs/theming)
120
+ - [Contrat de personnalisation](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md)
121
+ - [Source et issues](https://github.com/pimoludev/ui)
122
+
123
+ Pimolu UI est en bêta. Le registre React est implémenté ; les registres native, Angular et web components sont des directions futures. La revue visuelle et d'assistance technique complète reste ouverte.
124
+
125
+ MIT © Pimolu
package/README.md CHANGED
@@ -1,3 +1,125 @@
1
- # Temporary Holding Version
1
+ # @pimolu/web-styles
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
+ **One visual language, expressed in plain CSS.**
4
+
5
+ The styling layer behind Pimolu UI. Load one complete stylesheet, opt into predictable cascade layers, or assemble only the component CSS your application uses. No Tailwind requirement and no CSS-in-JS runtime.
6
+
7
+ [Quick start](https://pimolu.com/docs/quick-start) · [Theming](https://pimolu.com/docs/theming) · [Customization](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md) · [Source](https://github.com/pimoludev/ui/tree/main/packages/web-styles)
8
+
9
+ > **Beta:** `0.1.0-beta.10` is a preview. Public CSS entry points and visual tokens may change before `1.0.0`.
10
+
11
+ ## Why Pimolu styles?
12
+
13
+ - **One import, the complete system.** `styles.css` combines primitive tokens, semantic themes, all seven presets and every component stylesheet.
14
+ - **Overrides without `!important`.** `layered.css` places the library in a `pimolu` cascade layer so normal application rules and Tailwind utilities can win predictably.
15
+ - **Component-level CSS when you need it.** Every family has an exported CSS subpath, so a small application can load only the foundations and controls it uses. `tokens.css` provides every custom property and `themes.css` the light/dark semantic themes, both without component rules. okens.css provides every custom property and hemes.css the light/dark semantic themes, both without component rules.
16
+ - **Plain CSS, zero runtime.** No style calculations in JavaScript and no generated class names. Theme changes are attribute-driven.
17
+ - **Aligned releases.** The CSS and React packages ship at the same version. Keep them together.
18
+
19
+ ## At a glance
20
+
21
+ | | |
22
+ | --- | --- |
23
+ | Entries | `styles.css`, `layered.css`, `tokens.css`, `themes.css`, `pimolu.min.css` |
24
+ | Component styles | 129 exported CSS subpaths |
25
+ | Foundations | Tokens, semantic themes, seven visual presets |
26
+ | Themes | Light and dark, including system preference through the Provider |
27
+ | Presets | default, adaptive, cartoon, glass, luxury, monochrome, neo-brutalism |
28
+ | Runtime | None — no Tailwind or CSS-in-JS required |
29
+
30
+ ## Install
31
+
32
+ ```bash
33
+ pnpm add @pimolu/web-styles@latest
34
+ ```
35
+
36
+ Using React components as well?
37
+
38
+ ```bash
39
+ pnpm add @pimolu/react@latest @pimolu/web-styles@latest
40
+ ```
41
+
42
+ ## Complete stylesheet
43
+
44
+ Import it once in your application entry:
45
+
46
+ ```css
47
+ @import "@pimolu/web-styles/styles.css";
48
+ ```
49
+
50
+ Then set the colour mode and preset on a container, or let `PimoluProvider` do it:
51
+
52
+ ```html
53
+ <div data-pimolu-theme="dark" data-pimolu-style="glass">
54
+ <!-- Your application -->
55
+ </div>
56
+ ```
57
+
58
+ A pre-minified build is available as:
59
+
60
+ ```css
61
+ @import "@pimolu/web-styles/pimolu.min.css";
62
+ ```
63
+
64
+ ## Predictable overrides
65
+
66
+ Use the layered entry when application CSS must override Pimolu without specificity escalation:
67
+
68
+ ```css
69
+ @import "@pimolu/web-styles/layered.css";
70
+
71
+ .checkout-action:hover:enabled {
72
+ background: var(--pimolu-success);
73
+ color: var(--pimolu-success-foreground);
74
+ }
75
+ ```
76
+
77
+ Import either `styles.css` or `layered.css`, not both. With Tailwind v4, declare the complete layer order before importing either entry:
78
+
79
+ ```css
80
+ @layer theme, base, pimolu, components, utilities;
81
+ @import "tailwindcss/theme.css" layer(theme);
82
+ @import "@pimolu/web-styles/layered.css";
83
+ @import "tailwindcss/utilities.css" layer(utilities);
84
+ ```
85
+
86
+ The customization contract covers panel hooks, portal scope and accessibility responsibilities.
87
+
88
+ ## Assemble only what you use
89
+
90
+ Install the foundations package and import the component CSS you need:
91
+
92
+ ```bash
93
+ pnpm add @pimolu/web-styles@latest @pimolu/themes@latest
94
+ ```
95
+
96
+ ```css
97
+ @import "@pimolu/themes/styles.css";
98
+ @import "@pimolu/themes/presets.css";
99
+ @import "@pimolu/web-styles/button.css";
100
+ @import "@pimolu/web-styles/input.css";
101
+ @import "@pimolu/web-styles/card.css";
102
+ ```
103
+
104
+ Each family has its own exported subpath, from `accordion.css` to `watermark.css`. Keep CSS and React versions aligned.
105
+
106
+ ## The package family
107
+
108
+ | Package | Role |
109
+ | --- | --- |
110
+ | [`@pimolu/react`](https://www.npmjs.com/package/@pimolu/react) | React components, hooks and layouts |
111
+ | [`@pimolu/web-styles`](https://www.npmjs.com/package/@pimolu/web-styles) | Plain CSS bundle, layered entry and per-component CSS |
112
+ | [`@pimolu/themes`](https://www.npmjs.com/package/@pimolu/themes) | Light/dark themes, seven presets and visual data |
113
+ | [`@pimolu/design-tokens`](https://www.npmjs.com/package/@pimolu/design-tokens) | Primitive tokens in CSS and JSON |
114
+ | [`@pimolu/core`](https://www.npmjs.com/package/@pimolu/core) | Framework-independent variant class utility |
115
+
116
+ ## Documentation and status
117
+
118
+ - [Quick start](https://pimolu.com/docs/quick-start)
119
+ - [Theming and presets](https://pimolu.com/docs/theming)
120
+ - [Customization contract](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md)
121
+ - [Source and issues](https://github.com/pimoludev/ui)
122
+
123
+ Pimolu UI is a beta. The React registry is implemented; native, Angular and web-component registries are future directions. The full visual and assistive-technology audit remains open.
124
+
125
+ MIT © Pimolu
@@ -0,0 +1,194 @@
1
+ /* src/motion.css */
2
+ :root {
3
+ --pimolu-interaction-duration: 150ms;
4
+ --pimolu-interaction-easing: ease-out;
5
+ }
6
+ :where(.pimolu-card, .pimolu-badge, .pimolu-avatar, .pimolu-table__row, .pimolu-command__item, .pimolu-toolbar__button, .pimolu-toolbar__link, .pimolu-navbar__item, .pimolu-navbar__toggle, .pimolu-accordion__trigger) {
7
+ transition:
8
+ background-color var(--pimolu-interaction-duration, 150ms) var(--pimolu-interaction-easing, ease-out),
9
+ border-color var(--pimolu-interaction-duration, 150ms) var(--pimolu-interaction-easing, ease-out),
10
+ color var(--pimolu-interaction-duration, 150ms) var(--pimolu-interaction-easing, ease-out),
11
+ box-shadow var(--pimolu-interaction-duration, 150ms) var(--pimolu-interaction-easing, ease-out);
12
+ }
13
+ :where([data-pimolu-motion=off], [data-pimolu-motion=off] *),
14
+ :where([data-pimolu-motion=off], [data-pimolu-motion=off] *)::before,
15
+ :where([data-pimolu-motion=off], [data-pimolu-motion=off] *)::after {
16
+ animation: none !important;
17
+ transition: none !important;
18
+ scroll-behavior: auto !important;
19
+ }
20
+ :where([data-pimolu-motion=off]) .pimolu-accordion__content[hidden],
21
+ :where([data-pimolu-motion=off]) .pimolu-accordion__content[data-state=closing] {
22
+ display: none !important;
23
+ }
24
+ @media (prefers-reduced-motion: reduce) {
25
+ :where([class^=pimolu-], [class*=" pimolu-"]),
26
+ :where([class^=pimolu-], [class*=" pimolu-"])::before,
27
+ :where([class^=pimolu-], [class*=" pimolu-"])::after {
28
+ animation: none !important;
29
+ transition: none !important;
30
+ scroll-behavior: auto !important;
31
+ }
32
+ .pimolu-accordion__content[hidden],
33
+ .pimolu-accordion__content[data-state=closing] {
34
+ display: none !important;
35
+ }
36
+ }
37
+
38
+ /* src/accordion.css */
39
+ .pimolu-accordion {
40
+ min-width: 0;
41
+ color: var(--pimolu-foreground);
42
+ font-family: var(--pimolu-font-body, inherit);
43
+ }
44
+ .pimolu-accordion__item {
45
+ min-width: 0;
46
+ }
47
+ .pimolu-accordion--default .pimolu-accordion__item {
48
+ border-block-end: 1px solid var(--pimolu-border);
49
+ }
50
+ .pimolu-accordion--default .pimolu-accordion__item:first-child {
51
+ border-block-start: 1px solid var(--pimolu-border);
52
+ }
53
+ .pimolu-accordion--separated {
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: 8px;
57
+ }
58
+ .pimolu-accordion--separated .pimolu-accordion__item {
59
+ border: var(--pimolu-control-border-width, 1px) solid var(--pimolu-border);
60
+ border-radius: var(--pimolu-radius-md, 8px);
61
+ background: var( --pimolu-surface, var(--pimolu-background) );
62
+ }
63
+ .pimolu-accordion__trigger {
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: space-between;
67
+ gap: 12px;
68
+ box-sizing: border-box;
69
+ width: 100%;
70
+ padding: 16px 0;
71
+ border: 0;
72
+ background: transparent;
73
+ color: inherit;
74
+ font: inherit;
75
+ font-size: 0.9375rem;
76
+ font-weight: 500;
77
+ line-height: 1.4;
78
+ text-align: start;
79
+ cursor: pointer;
80
+ }
81
+ .pimolu-accordion--separated .pimolu-accordion__trigger {
82
+ padding: 14px 16px;
83
+ }
84
+ .pimolu-accordion--ghost .pimolu-accordion__trigger {
85
+ padding: 10px 8px;
86
+ border-radius: var(--pimolu-radius-sm, 4px);
87
+ }
88
+ .pimolu-accordion__trigger:hover:not(:disabled) {
89
+ color: var(--pimolu-primary);
90
+ }
91
+ .pimolu-accordion--ghost .pimolu-accordion__trigger:hover:not(:disabled) {
92
+ background: var(--pimolu-muted);
93
+ }
94
+ .pimolu-accordion__trigger:focus-visible {
95
+ outline: 2px solid var(--pimolu-focus-ring, currentColor);
96
+ outline-offset: 2px;
97
+ }
98
+ .pimolu-accordion__trigger:disabled {
99
+ opacity: 0.55;
100
+ cursor: not-allowed;
101
+ }
102
+ .pimolu-accordion__label {
103
+ min-width: 0;
104
+ overflow-wrap: anywhere;
105
+ }
106
+ .pimolu-accordion__chevron {
107
+ flex: none;
108
+ color: var(--pimolu-muted-foreground);
109
+ transition: transform 150ms ease, color 150ms ease;
110
+ }
111
+ .pimolu-accordion__trigger[data-state=open] .pimolu-accordion__chevron {
112
+ color: var(--pimolu-primary);
113
+ transform: rotate(180deg);
114
+ }
115
+ .pimolu-accordion__content {
116
+ display: grid;
117
+ grid-template-rows: 1fr;
118
+ min-width: 0;
119
+ color: var(--pimolu-muted-foreground);
120
+ font-size: 0.875rem;
121
+ line-height: 1.6;
122
+ }
123
+ .pimolu-accordion__content[hidden] {
124
+ display: none;
125
+ }
126
+ .pimolu-accordion__content-clip {
127
+ min-height: 0;
128
+ overflow: hidden;
129
+ }
130
+ .pimolu-accordion__content[data-state=open] {
131
+ animation: pimolu-accordion-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
132
+ }
133
+ .pimolu-accordion__content[data-state=closing] {
134
+ display: grid;
135
+ animation: pimolu-accordion-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
136
+ }
137
+ .pimolu-accordion[data-animated=false] .pimolu-accordion__content {
138
+ animation: none;
139
+ }
140
+ .pimolu-accordion[data-animated=false] .pimolu-accordion__chevron {
141
+ transition: none;
142
+ }
143
+ .pimolu-accordion__content-inner {
144
+ padding: 0 0 16px;
145
+ overflow-wrap: anywhere;
146
+ }
147
+ .pimolu-accordion--separated .pimolu-accordion__content-inner {
148
+ padding: 0 16px 16px;
149
+ }
150
+ .pimolu-accordion--ghost .pimolu-accordion__content-inner {
151
+ padding: 0 8px 12px;
152
+ }
153
+ @keyframes pimolu-accordion-in {
154
+ from {
155
+ grid-template-rows: 0fr;
156
+ opacity: 0;
157
+ transform: translateY(-3px);
158
+ }
159
+ to {
160
+ grid-template-rows: 1fr;
161
+ opacity: 1;
162
+ transform: translateY(0);
163
+ }
164
+ }
165
+ @keyframes pimolu-accordion-out {
166
+ from {
167
+ grid-template-rows: 1fr;
168
+ opacity: 1;
169
+ }
170
+ to {
171
+ grid-template-rows: 0fr;
172
+ opacity: 0;
173
+ }
174
+ }
175
+ @media (prefers-reduced-motion: reduce) {
176
+ .pimolu-accordion__chevron {
177
+ transition: none;
178
+ }
179
+ .pimolu-accordion__content[data-state=open] {
180
+ animation: none;
181
+ }
182
+ .pimolu-accordion__content[data-state=closing] {
183
+ display: none;
184
+ animation: none;
185
+ }
186
+ }
187
+ @media (forced-colors: active) {
188
+ .pimolu-accordion__item {
189
+ border-color: CanvasText;
190
+ }
191
+ .pimolu-accordion__trigger:focus-visible {
192
+ outline-color: Highlight;
193
+ }
194
+ }
package/dist/alert.css ADDED
@@ -0,0 +1,147 @@
1
+ /* src/alert.css */
2
+ .pimolu-alert {
3
+ --pimolu-alert-tone: var( --pimolu-primary, #4f46e5 );
4
+ --pimolu-alert-background: color-mix( in srgb, var(--pimolu-alert-tone) 7%, var(--pimolu-surface, var(--pimolu-background)) );
5
+ --pimolu-alert-border: color-mix( in srgb, var(--pimolu-alert-tone) 30%, var(--pimolu-border, transparent) );
6
+ display: flex;
7
+ align-items: flex-start;
8
+ gap: 12px;
9
+ box-sizing: border-box;
10
+ width: 100%;
11
+ min-width: 0;
12
+ padding: 12px 14px;
13
+ border: var(--pimolu-control-border-width, 1px) solid var(--pimolu-alert-border);
14
+ border-inline-start: 3px solid var(--pimolu-alert-tone);
15
+ border-radius: var(--pimolu-radius-md, 8px);
16
+ background: var(--pimolu-alert-background);
17
+ color: var(--pimolu-foreground, currentColor);
18
+ font-family: var(--pimolu-font-body, inherit);
19
+ font-size: 0.875rem;
20
+ line-height: 1.5;
21
+ transition: background-color 150ms ease, border-color 150ms ease;
22
+ }
23
+ .pimolu-alert--info {
24
+ --pimolu-alert-tone: var(--pimolu-primary, #4f46e5);
25
+ }
26
+ .pimolu-alert--success {
27
+ --pimolu-alert-tone: var(--pimolu-success, #15803d);
28
+ }
29
+ .pimolu-alert--warning {
30
+ --pimolu-alert-tone: var(--pimolu-warning, #d97706);
31
+ }
32
+ .pimolu-alert--danger {
33
+ --pimolu-alert-tone: var(--pimolu-danger, #dc2626);
34
+ }
35
+ .pimolu-alert--neutral {
36
+ --pimolu-alert-tone: var( --pimolu-muted-foreground, var(--pimolu-foreground, #525252) );
37
+ --pimolu-alert-background: var( --pimolu-surface, var(--pimolu-background) );
38
+ --pimolu-alert-border: var( --pimolu-border, color-mix( in srgb, var(--pimolu-foreground, #525252) 20%, transparent ) );
39
+ }
40
+ .pimolu-alert__icon {
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ flex: 0 0 auto;
45
+ width: 20px;
46
+ height: 20px;
47
+ margin-top: 1px;
48
+ color: var(--pimolu-alert-tone);
49
+ }
50
+ .pimolu-alert__icon svg {
51
+ display: block;
52
+ width: 100%;
53
+ height: 100%;
54
+ }
55
+ .pimolu-alert__content {
56
+ display: flex;
57
+ flex-direction: column;
58
+ flex: 1 1 auto;
59
+ gap: 2px;
60
+ min-width: 0;
61
+ }
62
+ .pimolu-alert__title {
63
+ margin: 0;
64
+ color: var(--pimolu-foreground, currentColor);
65
+ font-size: 0.875rem;
66
+ font-weight: 600;
67
+ line-height: 1.4;
68
+ overflow-wrap: anywhere;
69
+ }
70
+ .pimolu-alert__description {
71
+ margin: 0;
72
+ color: color-mix(in srgb, var(--pimolu-muted-foreground, currentColor) 55%, var(--pimolu-foreground, currentColor));
73
+ font-size: 0.875rem;
74
+ line-height: 1.5;
75
+ text-wrap: pretty;
76
+ overflow-wrap: anywhere;
77
+ }
78
+ .pimolu-alert__body {
79
+ min-width: 0;
80
+ overflow-wrap: anywhere;
81
+ }
82
+ .pimolu-alert__body > :first-child {
83
+ margin-top: 0;
84
+ }
85
+ .pimolu-alert__body > :last-child {
86
+ margin-bottom: 0;
87
+ }
88
+ .pimolu-alert__actions {
89
+ display: flex;
90
+ flex-wrap: wrap;
91
+ align-items: center;
92
+ gap: 8px;
93
+ margin-top: 8px;
94
+ }
95
+ .pimolu-alert__dismiss {
96
+ display: inline-flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ flex: 0 0 auto;
100
+ width: 28px;
101
+ height: 28px;
102
+ margin: -4px -4px 0 0;
103
+ padding: 0;
104
+ border: 0;
105
+ border-radius: var(--pimolu-radius-sm, 4px);
106
+ background: transparent;
107
+ color: var( --pimolu-muted-foreground, var(--pimolu-foreground) );
108
+ line-height: 0;
109
+ cursor: pointer;
110
+ transition: background-color 120ms ease, color 120ms ease;
111
+ }
112
+ .pimolu-alert__dismiss:hover {
113
+ background: var(--pimolu-muted, rgba(0, 0, 0, 0.08));
114
+ color: var(--pimolu-foreground);
115
+ }
116
+ .pimolu-alert__dismiss:focus-visible {
117
+ outline: 2px solid var(--pimolu-focus-ring, var(--pimolu-primary, currentColor));
118
+ outline-offset: 2px;
119
+ }
120
+ @media (max-width: 480px) {
121
+ .pimolu-alert {
122
+ gap: 10px;
123
+ padding: 10px 12px;
124
+ }
125
+ }
126
+ @media (prefers-reduced-motion: reduce) {
127
+ .pimolu-alert,
128
+ .pimolu-alert__dismiss {
129
+ transition: none;
130
+ }
131
+ }
132
+ @media (forced-colors: active) {
133
+ .pimolu-alert {
134
+ border-color: CanvasText;
135
+ border-inline-start-color: CanvasText;
136
+ background: Canvas;
137
+ color: CanvasText;
138
+ }
139
+ .pimolu-alert__icon,
140
+ .pimolu-alert__title,
141
+ .pimolu-alert__description {
142
+ color: CanvasText;
143
+ }
144
+ .pimolu-alert__dismiss {
145
+ color: ButtonText;
146
+ }
147
+ }