@olwiba/cn 0.1.36 → 0.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5171,6 +5171,46 @@ var Toaster = ({
5171
5171
  height: 0.75rem;
5172
5172
  width: 0.75rem;
5173
5173
  }
5174
+ /* Reserve the corner the close button now occupies.
5175
+ sonner's own button straddles the toast's edge (a -35%/-35%
5176
+ transform), so it can never touch the content. Moving it inside gave
5177
+ it a neater home and took that guarantee away with it: on a toast
5178
+ whose title runs the width of the card, the cross landed on the
5179
+ text. Padding is the other half of that decision. */
5180
+ [data-sonner-toaster] [data-sonner-toast][data-styled='true']:has([data-close-button]) {
5181
+ padding-right: 2rem;
5182
+ }
5183
+ /* Type scale. sonner renders title and description at the same weight
5184
+ and size, so a one-line toast reads as a sentence rather than a
5185
+ result \u2014 which is most of why these looked unfinished next to the
5186
+ richer notify() ones. */
5187
+ [data-sonner-toaster] [data-sonner-toast][data-styled='true'] [data-title] {
5188
+ font-weight: 500;
5189
+ line-height: 1.35;
5190
+ }
5191
+ [data-sonner-toaster] [data-sonner-toast][data-styled='true'] [data-description] {
5192
+ margin-top: 0.185rem;
5193
+ font-size: 0.8125rem;
5194
+ line-height: 1.45;
5195
+ opacity: 0.75;
5196
+ }
5197
+ /* Buttons inherit the toast's own colour rather than the global
5198
+ primary, so an action on a richColors error still reads against red
5199
+ instead of disappearing into it. */
5200
+ [data-sonner-toaster] [data-sonner-toast][data-styled='true'] [data-button] {
5201
+ height: 1.75rem;
5202
+ border-radius: var(--radius-sm);
5203
+ font-size: 0.75rem;
5204
+ font-weight: 500;
5205
+ }
5206
+ [data-sonner-toaster] [data-sonner-toast][data-styled='true'] [data-action] {
5207
+ background: color-mix(in oklab, currentColor 90%, transparent);
5208
+ color: var(--normal-bg);
5209
+ }
5210
+ [data-sonner-toaster] [data-sonner-toast][data-styled='true'] [data-cancel] {
5211
+ background: color-mix(in oklab, currentColor 10%, transparent);
5212
+ color: inherit;
5213
+ }
5174
5214
  [data-sonner-toaster] [data-sonner-toast][data-styled='true']:hover [data-close-button]:hover {
5175
5215
  background: color-mix(in oklab, currentColor 12%, transparent);
5176
5216
  border-color: transparent;