@youcan/celeste 0.6.61 → 0.6.63
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/celeste.css +70 -58
- package/dist/cjs/button.js +1 -1
- package/dist/cjs/dropdown-menu-item.js +1 -1
- package/dist/cjs/dropdown-menu.js +12 -9
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +9 -1
- package/dist/es/button.js +1 -1
- package/dist/es/dropdown-menu-item.js +1 -1
- package/dist/es/dropdown-menu.js +14 -11
- package/package.json +3 -3
- package/src/components/button/button.vue +5 -0
- package/src/components/button/stories/button.stories.ts +20 -0
- package/src/components/dropdown-menu/dropdown-menu-item.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu.vue +12 -7
- package/src/components/dropdown-menu/stories/dropdown-menu.stories.ts +1 -1
package/dist/celeste.css
CHANGED
|
@@ -1277,7 +1277,7 @@ to {
|
|
|
1277
1277
|
border-color: var(--color-stroke-soft-200);
|
|
1278
1278
|
background-color: var(--color-bg-white-0);
|
|
1279
1279
|
color: var(--color-state-faded-base);
|
|
1280
|
-
}.celeste-button[data-v-
|
|
1280
|
+
}.celeste-button[data-v-6c1800fd] {
|
|
1281
1281
|
display: inline-flex;
|
|
1282
1282
|
box-sizing: border-box;
|
|
1283
1283
|
align-items: center;
|
|
@@ -1292,217 +1292,229 @@ to {
|
|
|
1292
1292
|
text-decoration: none;
|
|
1293
1293
|
cursor: pointer;
|
|
1294
1294
|
}
|
|
1295
|
-
.celeste-button[data-v-
|
|
1295
|
+
.celeste-button[data-v-6c1800fd]:disabled {
|
|
1296
1296
|
background-color: var(--color-bg-weak-50);
|
|
1297
1297
|
color: var(--color-text-disabled-300);
|
|
1298
1298
|
cursor: default;
|
|
1299
1299
|
}
|
|
1300
|
-
.celeste-button[data-v-
|
|
1300
|
+
.celeste-button[data-v-6c1800fd] i {
|
|
1301
1301
|
flex-shrink: 0;
|
|
1302
1302
|
width: 20px;
|
|
1303
1303
|
height: 20px;
|
|
1304
1304
|
}
|
|
1305
|
-
.celeste-button-size-xxs[data-v-
|
|
1305
|
+
.celeste-button-size-xxs[data-v-6c1800fd] {
|
|
1306
1306
|
gap: var(--spacing-4);
|
|
1307
1307
|
height: 28px;
|
|
1308
1308
|
padding: var(--spacing-4) var(--spacing-6);
|
|
1309
1309
|
border-radius: var(--radius-8);
|
|
1310
1310
|
}
|
|
1311
|
-
.celeste-button-size-
|
|
1311
|
+
.celeste-button-size-xxs[data-v-6c1800fd]:has(> :only-child:is(i)) {
|
|
1312
|
+
padding: var(--spacing-4);
|
|
1313
|
+
}
|
|
1314
|
+
.celeste-button-size-xs[data-v-6c1800fd] {
|
|
1312
1315
|
gap: var(--spacing-4);
|
|
1313
1316
|
height: 32px;
|
|
1314
1317
|
padding: var(--spacing-6) var(--spacing-8);
|
|
1315
1318
|
border-radius: var(--radius-8);
|
|
1316
1319
|
}
|
|
1317
|
-
.celeste-button-size-
|
|
1320
|
+
.celeste-button-size-xs[data-v-6c1800fd]:has(> :only-child:is(i)) {
|
|
1321
|
+
padding: var(--spacing-6);
|
|
1322
|
+
}
|
|
1323
|
+
.celeste-button-size-sm[data-v-6c1800fd] {
|
|
1318
1324
|
gap: var(--spacing-6);
|
|
1319
1325
|
height: 36px;
|
|
1320
1326
|
padding: var(--spacing-8) var(--spacing-10);
|
|
1321
1327
|
border-radius: var(--radius-8);
|
|
1322
1328
|
}
|
|
1323
|
-
.celeste-button-size-
|
|
1329
|
+
.celeste-button-size-sm[data-v-6c1800fd]:has(> :only-child:is(i)) {
|
|
1330
|
+
padding: var(--spacing-8);
|
|
1331
|
+
}
|
|
1332
|
+
.celeste-button-size-md[data-v-6c1800fd] {
|
|
1324
1333
|
gap: var(--spacing-6);
|
|
1325
1334
|
height: 40px;
|
|
1326
1335
|
padding: var(--spacing-10) var(--spacing-12);
|
|
1327
1336
|
border-radius: var(--radius-10);
|
|
1328
1337
|
}
|
|
1329
|
-
.celeste-button-
|
|
1338
|
+
.celeste-button-size-md[data-v-6c1800fd]:has(> :only-child:is(i)) {
|
|
1339
|
+
padding: var(--spacing-10);
|
|
1340
|
+
}
|
|
1341
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled) {
|
|
1330
1342
|
border-color: var(--color-primary-base);
|
|
1331
1343
|
background-color: var(--color-primary-base);
|
|
1332
1344
|
box-shadow: none;
|
|
1333
1345
|
color: var(--color-text-white-0);
|
|
1334
1346
|
}
|
|
1335
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1347
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1336
1348
|
border-color: var(--color-primary-darker);
|
|
1337
1349
|
background-color: var(--color-primary-darker);
|
|
1338
1350
|
color: var(--color-text-white-0);
|
|
1339
1351
|
}
|
|
1340
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1352
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1341
1353
|
outline: none;
|
|
1342
1354
|
box-shadow: var(--shadow-buttons-primary-focus);
|
|
1343
1355
|
}
|
|
1344
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1356
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled) {
|
|
1345
1357
|
border-color: var(--color-primary-base);
|
|
1346
1358
|
background-color: transparent;
|
|
1347
1359
|
box-shadow: none;
|
|
1348
1360
|
color: var(--color-primary-base);
|
|
1349
1361
|
}
|
|
1350
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1362
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1351
1363
|
border-color: transparent;
|
|
1352
1364
|
background-color: var(--color-primary-alpha-10);
|
|
1353
1365
|
color: var(--color-primary-base);
|
|
1354
1366
|
}
|
|
1355
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1367
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1356
1368
|
outline: none;
|
|
1357
1369
|
box-shadow: var(--shadow-buttons-primary-focus);
|
|
1358
1370
|
}
|
|
1359
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1371
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled) {
|
|
1360
1372
|
border-color: transparent;
|
|
1361
1373
|
background-color: var(--color-primary-alpha-10);
|
|
1362
1374
|
box-shadow: none;
|
|
1363
1375
|
color: var(--color-primary-base);
|
|
1364
1376
|
}
|
|
1365
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1377
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1366
1378
|
border-color: var(--color-primary-base);
|
|
1367
1379
|
background-color: transparent;
|
|
1368
1380
|
color: var(--color-primary-base);
|
|
1369
1381
|
}
|
|
1370
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1382
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1371
1383
|
outline: none;
|
|
1372
1384
|
box-shadow: var(--shadow-buttons-primary-focus);
|
|
1373
1385
|
}
|
|
1374
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1386
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled) {
|
|
1375
1387
|
border-color: transparent;
|
|
1376
1388
|
background-color: transparent;
|
|
1377
1389
|
box-shadow: none;
|
|
1378
1390
|
color: var(--color-primary-base);
|
|
1379
1391
|
}
|
|
1380
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1392
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1381
1393
|
border-color: transparent;
|
|
1382
1394
|
background-color: var(--color-primary-alpha-10);
|
|
1383
1395
|
color: var(--color-primary-base);
|
|
1384
1396
|
}
|
|
1385
|
-
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1397
|
+
.celeste-button-intent-primary:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1386
1398
|
outline: none;
|
|
1387
1399
|
box-shadow: var(--shadow-buttons-primary-focus);
|
|
1388
1400
|
}
|
|
1389
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1401
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled) {
|
|
1390
1402
|
border-color: var(--color-bg-strong-950);
|
|
1391
1403
|
background-color: var(--color-bg-strong-950);
|
|
1392
1404
|
box-shadow: none;
|
|
1393
1405
|
color: var(--color-text-white-0);
|
|
1394
1406
|
}
|
|
1395
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1407
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1396
1408
|
border-color: transparent;
|
|
1397
1409
|
background-color: var(--color-bg-surface-800);
|
|
1398
1410
|
color: var(--color-text-white-0);
|
|
1399
1411
|
}
|
|
1400
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1412
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1401
1413
|
outline: none;
|
|
1402
1414
|
box-shadow: var(--shadow-buttons-important-focus);
|
|
1403
1415
|
}
|
|
1404
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1416
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled) {
|
|
1405
1417
|
border-color: var(--color-bg-soft-200);
|
|
1406
1418
|
background-color: transparent;
|
|
1407
1419
|
box-shadow: var(--shadow-regular-xs);
|
|
1408
1420
|
color: var(--color-text-sub-600);
|
|
1409
1421
|
}
|
|
1410
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1422
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1411
1423
|
border-color: transparent;
|
|
1412
1424
|
background-color: var(--color-bg-weak-50);
|
|
1413
1425
|
color: var(--color-text-strong-950);
|
|
1414
1426
|
}
|
|
1415
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1427
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1416
1428
|
outline: none;
|
|
1417
1429
|
box-shadow: var(--shadow-buttons-important-focus);
|
|
1418
1430
|
}
|
|
1419
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1431
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled) {
|
|
1420
1432
|
border-color: var(--color-bg-weak-50);
|
|
1421
1433
|
background-color: var(--color-bg-weak-50);
|
|
1422
1434
|
box-shadow: none;
|
|
1423
1435
|
color: var(--color-text-sub-600);
|
|
1424
1436
|
}
|
|
1425
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1437
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1426
1438
|
border-color: var(--color-bg-soft-200);
|
|
1427
1439
|
background-color: transparent;
|
|
1428
1440
|
color: var(--color-text-strong-950);
|
|
1429
1441
|
}
|
|
1430
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1442
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1431
1443
|
outline: none;
|
|
1432
1444
|
box-shadow: var(--shadow-buttons-important-focus);
|
|
1433
1445
|
}
|
|
1434
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1446
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled) {
|
|
1435
1447
|
border-color: transparent;
|
|
1436
1448
|
background-color: transparent;
|
|
1437
1449
|
box-shadow: none;
|
|
1438
1450
|
color: var(--color-text-sub-600);
|
|
1439
1451
|
}
|
|
1440
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1452
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1441
1453
|
border-color: transparent;
|
|
1442
1454
|
background-color: var(--color-bg-weak-50);
|
|
1443
1455
|
color: var(--color-text-strong-950);
|
|
1444
1456
|
}
|
|
1445
|
-
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1457
|
+
.celeste-button-intent-neutral:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1446
1458
|
outline: none;
|
|
1447
1459
|
box-shadow: var(--shadow-buttons-important-focus);
|
|
1448
1460
|
}
|
|
1449
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1461
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled) {
|
|
1450
1462
|
border-color: var(--color-state-error-base);
|
|
1451
1463
|
background-color: var(--color-state-error-base);
|
|
1452
1464
|
box-shadow: none;
|
|
1453
1465
|
color: var(--color-text-white-0);
|
|
1454
1466
|
}
|
|
1455
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1467
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1456
1468
|
border-color: var(--color-red-700);
|
|
1457
1469
|
background-color: var(--color-red-700);
|
|
1458
1470
|
color: var(--color-text-white-0);
|
|
1459
1471
|
}
|
|
1460
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-fill[data-v-
|
|
1472
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-fill[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1461
1473
|
outline: none;
|
|
1462
1474
|
box-shadow: var(--shadow-buttons-error-focus);
|
|
1463
1475
|
}
|
|
1464
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1476
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled) {
|
|
1465
1477
|
border-color: var(--color-state-error-base);
|
|
1466
1478
|
background-color: transparent;
|
|
1467
1479
|
box-shadow: none;
|
|
1468
1480
|
color: var(--color-state-error-base);
|
|
1469
1481
|
}
|
|
1470
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1482
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1471
1483
|
border-color: transparent;
|
|
1472
1484
|
background-color: var(--color-red-alpha-10);
|
|
1473
1485
|
color: var(--color-state-error-base);
|
|
1474
1486
|
}
|
|
1475
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-stroke[data-v-
|
|
1487
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-stroke[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1476
1488
|
outline: none;
|
|
1477
1489
|
box-shadow: var(--shadow-buttons-error-focus);
|
|
1478
1490
|
}
|
|
1479
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1491
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled) {
|
|
1480
1492
|
border-color: transparent;
|
|
1481
1493
|
background-color: var(--color-red-alpha-10);
|
|
1482
1494
|
box-shadow: none;
|
|
1483
1495
|
color: var(--color-state-error-base);
|
|
1484
1496
|
}
|
|
1485
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1497
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1486
1498
|
border-color: var(--color-state-error-base);
|
|
1487
1499
|
background-color: transparent;
|
|
1488
1500
|
color: var(--color-state-error-base);
|
|
1489
1501
|
}
|
|
1490
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-lighter[data-v-
|
|
1502
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-lighter[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1491
1503
|
outline: none;
|
|
1492
1504
|
box-shadow: var(--shadow-buttons-error-focus);
|
|
1493
1505
|
}
|
|
1494
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1506
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled) {
|
|
1495
1507
|
border-color: transparent;
|
|
1496
1508
|
background-color: transparent;
|
|
1497
1509
|
box-shadow: none;
|
|
1498
1510
|
color: var(--color-state-error-base);
|
|
1499
1511
|
}
|
|
1500
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1512
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled):hover:not(:disabled) {
|
|
1501
1513
|
border-color: transparent;
|
|
1502
1514
|
background-color: var(--color-red-alpha-10);
|
|
1503
1515
|
color: var(--color-state-error-base);
|
|
1504
1516
|
}
|
|
1505
|
-
.celeste-button-intent-error:not(:disabled).celeste-button-variant-ghost[data-v-
|
|
1517
|
+
.celeste-button-intent-error:not(:disabled).celeste-button-variant-ghost[data-v-6c1800fd]:not(:disabled):focus:not(:disabled) {
|
|
1506
1518
|
outline: none;
|
|
1507
1519
|
box-shadow: var(--shadow-buttons-error-focus);
|
|
1508
1520
|
}@property --celeste-fbutton-bg-start {
|
|
@@ -3301,7 +3313,7 @@ to {
|
|
|
3301
3313
|
display: flex;
|
|
3302
3314
|
flex-direction: column;
|
|
3303
3315
|
gap: var(--spacing-4);
|
|
3304
|
-
}.celeste-dropdown-menu-item[data-v-
|
|
3316
|
+
}.celeste-dropdown-menu-item[data-v-1c18b80a] {
|
|
3305
3317
|
display: flex;
|
|
3306
3318
|
align-items: center;
|
|
3307
3319
|
padding: var(--spacing-8);
|
|
@@ -3314,21 +3326,21 @@ to {
|
|
|
3314
3326
|
cursor: pointer;
|
|
3315
3327
|
gap: var(--spacing-8);
|
|
3316
3328
|
}
|
|
3317
|
-
.celeste-dropdown-menu-item i[data-v-
|
|
3329
|
+
.celeste-dropdown-menu-item i[data-v-1c18b80a] {
|
|
3318
3330
|
color: var(--color-icon-sub-600);
|
|
3319
3331
|
}
|
|
3320
|
-
.celeste-dropdown-menu-item[data-v-
|
|
3332
|
+
.celeste-dropdown-menu-item[data-v-1c18b80a]:focus-visible, .celeste-dropdown-menu-item[data-v-1c18b80a]:not([data-disabled]):hover, .celeste-dropdown-menu-item[data-highlighted][data-v-1c18b80a] {
|
|
3321
3333
|
outline: none;
|
|
3322
3334
|
background: var(--color-bg-weak-50);
|
|
3323
3335
|
}
|
|
3324
|
-
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-body[data-v-
|
|
3336
|
+
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-body[data-v-1c18b80a] {
|
|
3325
3337
|
display: flex;
|
|
3326
3338
|
flex: 1;
|
|
3327
3339
|
align-items: center;
|
|
3328
3340
|
gap: var(--spacing-4);
|
|
3329
3341
|
}
|
|
3330
|
-
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-
|
|
3331
|
-
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-
|
|
3342
|
+
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-1c18b80a],
|
|
3343
|
+
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] {
|
|
3332
3344
|
display: flex;
|
|
3333
3345
|
align-items: center;
|
|
3334
3346
|
justify-content: center;
|
|
@@ -3336,20 +3348,20 @@ to {
|
|
|
3336
3348
|
height: fit-content;
|
|
3337
3349
|
color: var(--color-icon-sub-600);
|
|
3338
3350
|
}
|
|
3339
|
-
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-
|
|
3340
|
-
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-
|
|
3351
|
+
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-prefix[data-v-1c18b80a] i,
|
|
3352
|
+
.celeste-dropdown-menu-item .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] i {
|
|
3341
3353
|
color: var(--color-icon-sub-600);
|
|
3342
3354
|
}
|
|
3343
|
-
.celeste-dropdown-menu-item[data-disabled][data-v-
|
|
3355
|
+
.celeste-dropdown-menu-item[data-disabled][data-v-1c18b80a] {
|
|
3344
3356
|
color: var(--color-text-disabled-300);
|
|
3345
|
-
|
|
3357
|
+
pointer-events: none;
|
|
3346
3358
|
}
|
|
3347
|
-
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-
|
|
3348
|
-
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-
|
|
3359
|
+
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-1c18b80a],
|
|
3360
|
+
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] {
|
|
3349
3361
|
color: var(--color-text-disabled-300);
|
|
3350
3362
|
}
|
|
3351
|
-
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-
|
|
3352
|
-
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-
|
|
3363
|
+
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-prefix[data-v-1c18b80a] i,
|
|
3364
|
+
.celeste-dropdown-menu-item[data-disabled] .celeste-dropdown-menu-item-suffix[data-v-1c18b80a] i {
|
|
3353
3365
|
color: var(--color-icon-disabled-300);
|
|
3354
3366
|
}.celeste-dropdown-menu-label[data-v-392ac57c] {
|
|
3355
3367
|
display: flex;
|
|
@@ -3468,7 +3480,7 @@ to {
|
|
|
3468
3480
|
}
|
|
3469
3481
|
.celeste-dropdown-menu-trigger[data-disabled][data-v-003a2030] i {
|
|
3470
3482
|
color: var(--color-icon-disabled-300);
|
|
3471
|
-
}[data-v-
|
|
3483
|
+
}[data-v-1da28738] {
|
|
3472
3484
|
box-sizing: border-box;
|
|
3473
3485
|
}.celeste-file-upload-area[data-v-cfdea6ac] {
|
|
3474
3486
|
display: flex;
|
package/dist/cjs/button.js
CHANGED
|
@@ -36,5 +36,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
const Button = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
39
|
+
const Button = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-6c1800fd"]]);
|
|
40
40
|
module.exports = Button;
|
|
@@ -50,5 +50,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
const dropdownMenuItem = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
53
|
+
const dropdownMenuItem = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-1c18b80a"]]);
|
|
54
54
|
module.exports = dropdownMenuItem;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const Mo = require("vue");
|
|
3
3
|
const useDelegatedProps = require("./use-delegated-props.js");
|
|
4
|
+
const clsx = require("./chunks/clsx.js");
|
|
4
5
|
const index = require("./chunks/index.js");
|
|
5
6
|
;/* empty css */
|
|
6
7
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
@@ -10,24 +11,26 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
10
11
|
defaultOpen: { type: Boolean },
|
|
11
12
|
open: { type: Boolean },
|
|
12
13
|
dir: {},
|
|
13
|
-
modal: { type: Boolean }
|
|
14
|
+
modal: { type: Boolean },
|
|
15
|
+
class: {}
|
|
14
16
|
},
|
|
15
|
-
|
|
17
|
+
emits: ["update:open"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
16
19
|
const props = __props;
|
|
17
|
-
const
|
|
18
|
-
const
|
|
20
|
+
const emits = __emit;
|
|
21
|
+
const delegatedProps = useDelegatedProps.useDelegatedProps(props, "class");
|
|
22
|
+
const forwarded = index.xe(delegatedProps, emits);
|
|
19
23
|
return (_ctx, _cache) => {
|
|
20
|
-
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.sh), Mo.mergeProps(Mo.unref(
|
|
21
|
-
|
|
22
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
|
|
24
|
+
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.sh), Mo.mergeProps(Mo.unref(forwarded), {
|
|
25
|
+
class: Mo.unref(clsx.clsx)("celeste-dropdown-menu", props.class)
|
|
23
26
|
}), {
|
|
24
27
|
default: Mo.withCtx(() => [
|
|
25
28
|
Mo.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
26
29
|
]),
|
|
27
30
|
_: 3
|
|
28
|
-
}, 16, ["
|
|
31
|
+
}, 16, ["class"]);
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
|
-
const dropdownMenu = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
35
|
+
const dropdownMenu = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-1da28738"]]);
|
|
33
36
|
module.exports = dropdownMenu;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
1
2
|
import { DropdownMenuRootProps } from 'radix-vue';
|
|
3
|
+
type __VLS_Props = DropdownMenuRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
2
6
|
declare function __VLS_template(): {
|
|
3
7
|
attrs: Partial<{}>;
|
|
4
8
|
slots: {
|
|
@@ -8,7 +12,11 @@ declare function __VLS_template(): {
|
|
|
8
12
|
rootEl: any;
|
|
9
13
|
};
|
|
10
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:open": (payload: boolean) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:open"?: ((payload: boolean) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
21
|
export default _default;
|
|
14
22
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/dist/es/button.js
CHANGED
|
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
38
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6c1800fd"]]);
|
|
39
39
|
export {
|
|
40
40
|
Button as default
|
|
41
41
|
};
|
|
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
const dropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
52
|
+
const dropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1c18b80a"]]);
|
|
53
53
|
export {
|
|
54
54
|
dropdownMenuItem as default
|
|
55
55
|
};
|
package/dist/es/dropdown-menu.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { useDelegatedProps } from "./use-delegated-props.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as clsx } from "./chunks/clsx.js";
|
|
4
|
+
import { x as xe, af as sh } from "./chunks/index.js";
|
|
4
5
|
/* empty css */
|
|
5
6
|
import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -9,26 +10,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
10
|
defaultOpen: { type: Boolean },
|
|
10
11
|
open: { type: Boolean },
|
|
11
12
|
dir: {},
|
|
12
|
-
modal: { type: Boolean }
|
|
13
|
+
modal: { type: Boolean },
|
|
14
|
+
class: {}
|
|
13
15
|
},
|
|
14
|
-
|
|
16
|
+
emits: ["update:open"],
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
15
18
|
const props = __props;
|
|
16
|
-
const
|
|
17
|
-
const
|
|
19
|
+
const emits = __emit;
|
|
20
|
+
const delegatedProps = useDelegatedProps(props, "class");
|
|
21
|
+
const forwarded = xe(delegatedProps, emits);
|
|
18
22
|
return (_ctx, _cache) => {
|
|
19
|
-
return openBlock(), createBlock(unref(sh), mergeProps(unref(
|
|
20
|
-
|
|
21
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
|
|
23
|
+
return openBlock(), createBlock(unref(sh), mergeProps(unref(forwarded), {
|
|
24
|
+
class: unref(clsx)("celeste-dropdown-menu", props.class)
|
|
22
25
|
}), {
|
|
23
26
|
default: withCtx(() => [
|
|
24
27
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
25
28
|
]),
|
|
26
29
|
_: 3
|
|
27
|
-
}, 16, ["
|
|
30
|
+
}, 16, ["class"]);
|
|
28
31
|
};
|
|
29
32
|
}
|
|
30
33
|
});
|
|
31
|
-
const dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
34
|
+
const dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1da28738"]]);
|
|
32
35
|
export {
|
|
33
36
|
dropdownMenu as default
|
|
34
37
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/celeste",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.63",
|
|
5
5
|
"author": "YouCan <tech@youcan.shop>",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"youcan",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"radix-vue": "^1.9.12",
|
|
45
45
|
"tinycolor2": "^1.6.0",
|
|
46
46
|
"vue-sonner": "^2.0.2",
|
|
47
|
-
"@youcan/celeste-icons": "0.6.
|
|
48
|
-
"@youcan/celeste-tokens": "0.6.
|
|
47
|
+
"@youcan/celeste-icons": "0.6.63",
|
|
48
|
+
"@youcan/celeste-tokens": "0.6.63"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@chromatic-com/storybook": "^4.1.1",
|
|
@@ -38,6 +38,7 @@ export interface ButtonProps extends PrimitiveProps {
|
|
|
38
38
|
|
|
39
39
|
<style lang="scss" scoped>
|
|
40
40
|
@use 'sass:map';
|
|
41
|
+
@use 'sass:list';
|
|
41
42
|
|
|
42
43
|
$size-map: (
|
|
43
44
|
'xxs': (
|
|
@@ -247,6 +248,10 @@ $hover-map: (
|
|
|
247
248
|
height: map.get($v, height);
|
|
248
249
|
padding: map.get($v, padding);
|
|
249
250
|
border-radius: map.get($v, border-radius);
|
|
251
|
+
|
|
252
|
+
&:has(> :only-child:is(i)) {
|
|
253
|
+
padding: list.nth(map.get($v, padding), 1);
|
|
254
|
+
}
|
|
250
255
|
}
|
|
251
256
|
}
|
|
252
257
|
|
|
@@ -29,3 +29,23 @@ export const Default: Story = {
|
|
|
29
29
|
`,
|
|
30
30
|
}),
|
|
31
31
|
};
|
|
32
|
+
|
|
33
|
+
export const IconOnly: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
size: 'sm',
|
|
36
|
+
intent: 'neutral',
|
|
37
|
+
variant: 'stroke',
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
render: args => ({
|
|
41
|
+
components: { Button },
|
|
42
|
+
setup() {
|
|
43
|
+
return { args };
|
|
44
|
+
},
|
|
45
|
+
template: `
|
|
46
|
+
<Button v-bind="args">
|
|
47
|
+
<i class="i-celeste-translate"></i>
|
|
48
|
+
</Button>
|
|
49
|
+
`,
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
3
|
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { DropdownMenuRoot, type DropdownMenuRootEmits, type DropdownMenuRootProps } from 'radix-vue';
|
|
6
|
+
import { useForwardPropsEmits } from 'radix-vue';
|
|
5
7
|
|
|
6
|
-
const props = defineProps<DropdownMenuRootProps>();
|
|
8
|
+
const props = defineProps<DropdownMenuRootProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
const emits = defineEmits<DropdownMenuRootEmits>();
|
|
7
10
|
|
|
8
|
-
const delegatedProps = useDelegatedProps(props, '
|
|
9
|
-
|
|
10
|
-
const open = ref(false);
|
|
11
|
+
const delegatedProps = useDelegatedProps(props, 'class');
|
|
12
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
<template>
|
|
14
|
-
<DropdownMenuRoot
|
|
16
|
+
<DropdownMenuRoot
|
|
17
|
+
v-bind="forwarded"
|
|
18
|
+
:class="clsx('celeste-dropdown-menu', props.class)"
|
|
19
|
+
>
|
|
15
20
|
<slot />
|
|
16
21
|
</DropdownMenuRoot>
|
|
17
22
|
</template>
|