ui-foundations 0.1.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.
- package/README.md +259 -0
- package/dist/assets/fonts/README.md +5 -0
- package/dist/assets/icons/location-roundtrip.svg +5 -0
- package/dist/assets/icons/location-track.svg +4 -0
- package/dist/assets/icons/location.svg +4 -0
- package/dist/assets/icons/lock-checkmark.svg +4 -0
- package/dist/assets/icons/lock-close.svg +4 -0
- package/dist/assets/icons/lock-open.svg +5 -0
- package/dist/assets/icons/login.svg +4 -0
- package/dist/assets/icons/logout.svg +3 -0
- package/dist/assets/icons/loudspeaker.svg +3 -0
- package/dist/assets/icons/lounge-chair.svg +5 -0
- package/dist/assets/icons/luggage-backpack.svg +4 -0
- package/dist/assets/icons/luggage-backpacker.svg +4 -0
- package/dist/assets/icons/luggage-box.svg +5 -0
- package/dist/assets/icons/luggage-extra.svg +4 -0
- package/dist/assets/icons/luggage-golf.svg +4 -0
- package/dist/assets/icons/luggage-hand-plus.svg +5 -0
- package/dist/assets/icons/luggage-hand.svg +4 -0
- package/dist/assets/icons/luggage-liquids.svg +6 -0
- package/dist/assets/icons/luggage-notincluded.svg +3 -0
- package/dist/assets/icons/luggage-plus.svg +5 -0
- package/dist/assets/icons/luggage-sport.svg +4 -0
- package/dist/assets/icons/luggage-suitcase-extra.svg +5 -0
- package/dist/assets/icons/luggage-suitcase.svg +4 -0
- package/dist/assets/icons/luggage-trolley-extra.svg +5 -0
- package/dist/assets/icons/luggage-trolley.svg +3 -0
- package/dist/assets/icons/luggage-weekender.svg +4 -0
- package/dist/assets/icons/luggage.svg +3 -0
- package/dist/assets/icons/lying-chair.svg +4 -0
- package/dist/assets/icons/magnet.svg +3 -0
- package/dist/assets/icons/mail.svg +4 -0
- package/dist/assets/icons/map.svg +3 -0
- package/dist/assets/icons/meal-serving-plate.svg +5 -0
- package/dist/assets/icons/meal.svg +5 -0
- package/dist/assets/icons/medal.svg +4 -0
- package/dist/assets/icons/megaphone.svg +5 -0
- package/dist/assets/icons/menu-filter.svg +3 -0
- package/dist/assets/icons/menu.svg +3 -0
- package/dist/assets/icons/message-alert.svg +3 -0
- package/dist/assets/icons/message-info.svg +4 -0
- package/dist/assets/icons/message-love.svg +4 -0
- package/dist/assets/icons/message-push.svg +4 -0
- package/dist/assets/icons/message-text.svg +4 -0
- package/dist/assets/icons/message.svg +3 -0
- package/dist/assets/icons/mic.svg +4 -0
- package/dist/assets/icons/miniclub.svg +5 -0
- package/dist/assets/icons/minimize.svg +3 -0
- package/dist/assets/icons/minus-circled.svg +4 -0
- package/dist/assets/icons/minus-heavy.svg +3 -0
- package/dist/assets/icons/minus.svg +3 -0
- package/dist/assets/icons/moon.svg +3 -0
- package/dist/assets/icons/moose.svg +5 -0
- package/dist/assets/icons/mountain.svg +4 -0
- package/dist/assets/icons/mouth.svg +3 -0
- package/dist/assets/icons/muffin.svg +4 -0
- package/dist/assets/icons/museum.svg +3 -0
- package/dist/assets/icons/mustache.svg +3 -0
- package/dist/assets/icons/network.svg +3 -0
- package/dist/assets/icons/newsletter.svg +6 -0
- package/dist/assets/icons/none.svg +3 -0
- package/dist/assets/icons/nordic-walking.svg +3 -0
- package/dist/assets/icons/notepad.svg +3 -0
- package/dist/assets/icons/number.svg +3 -0
- package/dist/assets/icons/on-board-meals.svg +4 -0
- package/dist/assets/icons/paperjet.svg +4 -0
- package/dist/assets/icons/parasol.svg +4 -0
- package/dist/assets/icons/parking-garage.svg +4 -0
- package/dist/assets/icons/parking-time.svg +4 -0
- package/dist/assets/icons/pass-boarding.svg +4 -0
- package/dist/assets/icons/paw.svg +3 -0
- package/dist/assets/icons/pencil.svg +3 -0
- package/dist/assets/icons/pharmacy.svg +4 -0
- package/dist/assets/icons/phone-checkin.svg +4 -0
- package/dist/assets/icons/phone-push.svg +5 -0
- package/dist/assets/icons/phone.svg +3 -0
- package/dist/assets/icons/picture-mountain.svg +5 -0
- package/dist/assets/icons/picture-stack.svg +5 -0
- package/dist/assets/icons/picture-sunset.svg +4 -0
- package/dist/assets/icons/picture.svg +3 -0
- package/dist/assets/icons/piggy-bank.svg +5 -0
- package/dist/assets/icons/pin.svg +3 -0
- package/dist/assets/icons/play-circled.svg +4 -0
- package/dist/assets/icons/play-next.svg +3 -0
- package/dist/assets/icons/play-pause.svg +3 -0
- package/dist/assets/icons/play-prev.svg +3 -0
- package/dist/assets/icons/play-stop-circled.svg +4 -0
- package/dist/assets/icons/play-stop.svg +3 -0
- package/dist/assets/icons/play.svg +3 -0
- package/dist/assets/icons/plug.svg +3 -0
- package/dist/assets/icons/plus-circled.svg +4 -0
- package/dist/assets/icons/plus-heavy.svg +3 -0
- package/dist/assets/icons/plus.svg +3 -0
- package/dist/assets/icons/popsicle.svg +3 -0
- package/dist/assets/icons/postit.svg +4 -0
- package/dist/assets/icons/pricetag.svg +4 -0
- package/dist/assets/icons/printer.svg +5 -0
- package/dist/assets/icons/projector-canvas.svg +3 -0
- package/dist/assets/icons/puzzle.svg +3 -0
- package/dist/assets/icons/question-mark-bold.svg +4 -0
- package/dist/assets/icons/question-mark-circled.svg +4 -0
- package/dist/assets/icons/question-mark-ultrabold.svg +4 -0
- package/dist/assets/icons/question-mark.svg +3 -0
- package/dist/assets/icons/rainbow.svg +5 -0
- package/dist/assets/icons/reduced-circled.svg +4 -0
- package/dist/assets/icons/reduced.svg +3 -0
- package/dist/assets/icons/relax.svg +4 -0
- package/dist/assets/icons/resize.svg +4 -0
- package/dist/assets/icons/robot-smile.svg +16 -0
- package/dist/assets/icons/robot.svg +8 -0
- package/dist/assets/icons/room-location.svg +5 -0
- package/dist/assets/icons/room-selection.svg +5 -0
- package/dist/assets/icons/room-upgrade.svg +5 -0
- package/dist/assets/icons/running-shoe.svg +4 -0
- package/dist/assets/icons/sail.svg +3 -0
- package/dist/assets/icons/sailboat.svg +4 -0
- package/dist/assets/icons/sailing-yawl.svg +3 -0
- package/dist/assets/icons/save.svg +4 -0
- package/dist/assets/icons/scan-code.svg +5 -0
- package/dist/assets/icons/scissors.svg +4 -0
- package/dist/assets/icons/seal.svg +4 -0
- package/dist/assets/icons/search-heart.svg +4 -0
- package/dist/assets/icons/search-list.svg +4 -0
- package/dist/assets/icons/search.svg +4 -0
- package/dist/assets/icons/seat-check.svg +3 -0
- package/dist/assets/icons/seat-child.svg +4 -0
- package/dist/assets/icons/seat-comfort.svg +3 -0
- package/dist/assets/icons/seat-extra-legroom.svg +5 -0
- package/dist/assets/icons/seat-extra-space.svg +5 -0
- package/dist/assets/icons/seat-extra.svg +5 -0
- package/dist/assets/icons/seat-plus.svg +3 -0
- package/dist/assets/icons/seat-premium.svg +4 -0
- package/dist/assets/icons/seat-selection.svg +10 -0
- package/dist/assets/icons/seat-star.svg +3 -0
- package/dist/assets/icons/seat-top-booked.svg +5 -0
- package/dist/assets/icons/seat-top.svg +4 -0
- package/dist/assets/icons/seat.svg +3 -0
- package/dist/assets/icons/security-check.svg +7 -0
- package/dist/assets/icons/select.svg +3 -0
- package/dist/assets/icons/send.svg +3 -0
- package/dist/assets/icons/service-bell.svg +3 -0
- package/dist/assets/icons/serving-trolley.svg +6 -0
- package/dist/assets/icons/settings.svg +4 -0
- package/dist/assets/icons/sex-diversity.svg +3 -0
- package/dist/assets/icons/sex-female.svg +3 -0
- package/dist/assets/icons/sex-male.svg +3 -0
- package/dist/assets/icons/share-box.svg +4 -0
- package/dist/assets/icons/share.svg +6 -0
- package/dist/assets/icons/shield-check.svg +4 -0
- package/dist/assets/icons/shield-flex.svg +6 -0
- package/dist/assets/icons/shield-warning.svg +3 -0
- package/dist/assets/icons/shield.svg +3 -0
- package/dist/assets/icons/ship-river.svg +4 -0
- package/dist/assets/icons/ship.svg +5 -0
- package/dist/assets/icons/shoe.svg +3 -0
- package/dist/assets/icons/shop.svg +4 -0
- package/dist/assets/icons/shopping-bag-tui.svg +4 -0
- package/dist/assets/icons/shopping-bag.svg +4 -0
- package/dist/assets/icons/shoppingcart.svg +6 -0
- package/dist/assets/icons/shower-rain.svg +3 -0
- package/dist/assets/icons/shower.svg +3 -0
- package/dist/assets/icons/sign-airport.svg +4 -0
- package/dist/assets/icons/sign-bio.svg +5 -0
- package/dist/assets/icons/sign-directions.svg +12 -0
- package/dist/assets/icons/sign-first-aid.svg +4 -0
- package/dist/assets/icons/sign-gluten-free.svg +7 -0
- package/dist/assets/icons/sign-hotel.svg +3 -0
- package/dist/assets/icons/sign-info.svg +5 -0
- package/dist/assets/icons/sign-parking.svg +4 -0
- package/dist/assets/icons/sign-vegan.svg +4 -0
- package/dist/assets/icons/sign-vegetarian.svg +5 -0
- package/dist/assets/icons/signpost-direction.svg +3 -0
- package/dist/assets/icons/signpost-directions.svg +3 -0
- package/dist/assets/icons/signpost-hotel.svg +3 -0
- package/dist/assets/icons/ski-crosscountry.svg +4 -0
- package/dist/assets/icons/ski-mountain.svg +3 -0
- package/dist/assets/icons/snow.svg +3 -0
- package/dist/assets/icons/social-distancing.svg +5 -0
- package/dist/assets/icons/sort.svg +3 -0
- package/dist/assets/icons/square.svg +3 -0
- package/dist/assets/icons/star-circled.svg +4 -0
- package/dist/assets/icons/star-half.svg +3 -0
- package/dist/assets/icons/star.svg +3 -0
- package/dist/assets/icons/stats-bar.svg +3 -0
- package/dist/assets/icons/stats-growth.svg +4 -0
- package/dist/assets/icons/stats-pie.svg +4 -0
- package/dist/assets/icons/stats-rise.svg +3 -0
- package/dist/assets/icons/steering-wheel.svg +7 -0
- package/dist/assets/icons/steering.svg +3 -0
- package/dist/assets/icons/stewardess.svg +5 -0
- package/dist/assets/icons/suitcase-purchase.svg +5 -0
- package/dist/assets/icons/sum.svg +3 -0
- package/dist/assets/icons/sun-circled.svg +4 -0
- package/dist/assets/icons/sun-hours.svg +5 -0
- package/dist/assets/icons/sun-set.svg +3 -0
- package/dist/assets/icons/sun-tui-half.svg +4 -0
- package/dist/assets/icons/sun-tui.svg +4 -0
- package/dist/assets/icons/sun.svg +4 -0
- package/dist/assets/icons/surfing.svg +4 -0
- package/dist/assets/icons/swimming-bath.svg +3 -0
- package/dist/assets/icons/swimming-pool.svg +3 -0
- package/dist/assets/icons/sync-failed.svg +4 -0
- package/dist/assets/icons/sync.svg +4 -0
- package/dist/assets/icons/tape-measure.svg +4 -0
- package/dist/assets/icons/target-blank.svg +3 -0
- package/dist/assets/icons/target.svg +5 -0
- package/dist/assets/icons/teddy.svg +5 -0
- package/dist/assets/icons/temp-air.svg +5 -0
- package/dist/assets/icons/temp-low.svg +4 -0
- package/dist/assets/icons/temp-time.svg +7 -0
- package/dist/assets/icons/temp-water.svg +5 -0
- package/dist/assets/icons/temp.svg +4 -0
- package/dist/assets/icons/tennis-ball.svg +4 -0
- package/dist/assets/icons/tennis.svg +5 -0
- package/dist/assets/icons/tent.svg +4 -0
- package/dist/assets/icons/thumbnails.svg +3 -0
- package/dist/assets/icons/thumbs-up--down.svg +3 -0
- package/dist/assets/icons/thumbs-up.svg +3 -0
- package/dist/assets/icons/thunder.svg +3 -0
- package/dist/assets/icons/ticket-coins.svg +5 -0
- package/dist/assets/icons/ticket-envelope.svg +5 -0
- package/dist/assets/icons/ticket.svg +3 -0
- package/dist/assets/icons/tickets.svg +3 -0
- package/dist/assets/icons/tipi.svg +4 -0
- package/dist/assets/icons/toilet-paper.svg +5 -0
- package/dist/assets/icons/toilet.svg +3 -0
- package/dist/assets/icons/toolkit-cases-open.svg +3 -0
- package/dist/assets/icons/toolkit-cases.svg +3 -0
- package/dist/assets/icons/toolkit.svg +4 -0
- package/dist/assets/icons/towel.svg +3 -0
- package/dist/assets/icons/track.svg +3 -0
- package/dist/assets/icons/train.svg +4 -0
- package/dist/assets/icons/transfer-private.svg +5 -0
- package/dist/assets/icons/transfer-taxi.svg +4 -0
- package/dist/assets/icons/transfers-coach.svg +6 -0
- package/dist/assets/icons/transfers-train.svg +4 -0
- package/dist/assets/icons/trash-crossed.svg +3 -0
- package/dist/assets/icons/trash.svg +4 -0
- package/dist/assets/icons/travel-documents.svg +6 -0
- package/dist/assets/icons/travel-guide.svg +5 -0
- package/dist/assets/icons/travel-money.svg +4 -0
- package/dist/assets/icons/treats-in-flight.svg +4 -0
- package/dist/assets/icons/trolley-purchase.svg +5 -0
- package/dist/assets/icons/tub.svg +5 -0
- package/dist/assets/icons/tui-card.svg +4 -0
- package/dist/assets/icons/tui-chat.svg +5 -0
- package/dist/assets/icons/tui-cloud.svg +3 -0
- package/dist/assets/icons/tui-extras.svg +4 -0
- package/dist/assets/icons/typography.svg +3 -0
- package/dist/assets/icons/ui-banner.svg +4 -0
- package/dist/assets/icons/umbrella.svg +5 -0
- package/dist/assets/icons/undo.svg +4 -0
- package/dist/assets/icons/upload.svg +3 -0
- package/dist/assets/icons/user-business.svg +4 -0
- package/dist/assets/icons/user-casual.svg +4 -0
- package/dist/assets/icons/user-chat.svg +4 -0
- package/dist/assets/icons/user-circled.svg +4 -0
- package/dist/assets/icons/user-couple.svg +3 -0
- package/dist/assets/icons/user-driver.svg +6 -0
- package/dist/assets/icons/user-drivers.svg +4 -0
- package/dist/assets/icons/user-expert.svg +4 -0
- package/dist/assets/icons/user-family.svg +4 -0
- package/dist/assets/icons/user-friends.svg +3 -0
- package/dist/assets/icons/user-group.svg +4 -0
- package/dist/assets/icons/user-passport.svg +5 -0
- package/dist/assets/icons/user-plus.svg +3 -0
- package/dist/assets/icons/user-skipass.svg +4 -0
- package/dist/assets/icons/user-visa.svg +6 -0
- package/dist/assets/icons/user.svg +3 -0
- package/dist/assets/icons/users.svg +4 -0
- package/dist/assets/icons/view-hidden.svg +4 -0
- package/dist/assets/icons/view.svg +4 -0
- package/dist/assets/icons/villa.svg +4 -0
- package/dist/assets/icons/virtualtour.svg +4 -0
- package/dist/assets/icons/warehouse.svg +3 -0
- package/dist/assets/icons/wash-hands.svg +3 -0
- package/dist/assets/icons/watch.svg +3 -0
- package/dist/assets/icons/water-boiler.svg +4 -0
- package/dist/assets/icons/water-slide.svg +4 -0
- package/dist/assets/icons/water.svg +3 -0
- package/dist/assets/icons/welcome-pack.svg +3 -0
- package/dist/assets/icons/wellness.svg +6 -0
- package/dist/assets/icons/whatsapp.svg +4 -0
- package/dist/assets/icons/wheel.svg +6 -0
- package/dist/assets/icons/wheelchair.svg +4 -0
- package/dist/assets/icons/wifi.svg +3 -0
- package/dist/assets/icons/wind-surfing.svg +3 -0
- package/dist/assets/icons/world-globe.svg +4 -0
- package/dist/assets/icons/world-travel.svg +5 -0
- package/dist/assets/icons/world.svg +5 -0
- package/dist/core/base/base.css +13 -0
- package/dist/core/base/fonts.css +1 -0
- package/dist/core/base/reset.css +48 -0
- package/dist/core/base/typography.css +119 -0
- package/dist/core/index.css +12 -0
- package/dist/core/recipes/layout.css +24 -0
- package/dist/core/themes/mode.css +5 -0
- package/dist/main.css +1044 -0
- package/dist/react/button.js +95 -0
- package/dist/react/checkbox.js +43 -0
- package/dist/react/icon.js +50 -0
- package/dist/react/index.js +5 -0
- package/dist/react/input.js +12 -0
- package/dist/react/label.js +125 -0
- package/dist/tokens/css/brand-a.tokens.css +22 -0
- package/dist/tokens/css/brand-b.tokens.css +22 -0
- package/dist/tokens/css/color.dark.tokens.css +32 -0
- package/dist/tokens/css/color.light.tokens.css +32 -0
- package/dist/tokens/css/component.tokens.css +103 -0
- package/dist/tokens/css/primitives.tokens.css +127 -0
- package/dist/tokens/css/semantic.tokens.css +35 -0
- package/dist/tokens/json/brand-a.tokens.json +192 -0
- package/dist/tokens/json/brand-b.tokens.json +192 -0
- package/dist/tokens/json/color.dark.tokens.json +364 -0
- package/dist/tokens/json/color.light.tokens.json +364 -0
- package/dist/tokens/json/component.tokens.json +1101 -0
- package/dist/tokens/json/primitives.tokens.json +1077 -0
- package/dist/tokens/json/semantic.tokens.json +206 -0
- package/dist/tokens/tokens.yaml +4400 -0
- package/dist/tokens/ts/brand-a.tokens.ts +32 -0
- package/dist/tokens/ts/brand-b.tokens.ts +32 -0
- package/dist/tokens/ts/color.dark.tokens.ts +36 -0
- package/dist/tokens/ts/color.light.tokens.ts +36 -0
- package/dist/tokens/ts/component.tokens.ts +107 -0
- package/dist/tokens/ts/primitives.tokens.ts +152 -0
- package/dist/tokens/ts/semantic.tokens.ts +42 -0
- package/dist/ui/index.css +5 -0
- package/dist/ui/patterns/button.css +241 -0
- package/dist/ui/patterns/checkbox.css +97 -0
- package/dist/ui/patterns/icon.css +20 -0
- package/dist/ui/patterns/input.css +76 -0
- package/dist/ui/patterns/label.css +49 -0
- package/docs/foundations/foundation-001-token-layering.md +27 -0
- package/docs/foundations/foundation-002-naming-and-grouping.md +38 -0
- package/docs/foundations/foundation-003-color-semantics-and-status.md +35 -0
- package/docs/foundations/foundation-004-typography-scale-and-line-height.md +39 -0
- package/docs/foundations/foundation-005-responsive-breakpoints-and-containers.md +23 -0
- package/docs/foundations/foundation-006-z-index-layering.md +31 -0
- package/docs/foundations/foundation-007-typography-selectors-and-specificity.md +24 -0
- package/docs/foundations/foundation-008-mode-activation-and-consumer-control.md +27 -0
- package/docs/foundations/foundation-009-component-boundaries-and-utility.md +30 -0
- package/package.json +64 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/* Button token usage examples (ui-foundations) */
|
|
3
|
+
|
|
4
|
+
.button {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
background: var(--button-solid-container-background-default);
|
|
10
|
+
border-color: var(--button-solid-border-color-default);
|
|
11
|
+
border-width: var(--button-solid-border-size);
|
|
12
|
+
border-style: solid;
|
|
13
|
+
color: var(--button-solid-text-color-default);
|
|
14
|
+
border-radius: var(--button-border-radius);
|
|
15
|
+
padding-inline: var(--button-padding-inline);
|
|
16
|
+
padding-block: var(--button-padding-block);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
-webkit-text-fill-color: currentColor;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.button .label-content {
|
|
22
|
+
line-height: inherit;
|
|
23
|
+
color: inherit;
|
|
24
|
+
-webkit-text-fill-color: currentColor;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.button .label-content__text,
|
|
28
|
+
.button .icon {
|
|
29
|
+
color: inherit;
|
|
30
|
+
-webkit-text-fill-color: currentColor;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button.button--icon-only {
|
|
34
|
+
padding-inline: var(--button-padding-block);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.button:hover,
|
|
38
|
+
.button.is-hover {
|
|
39
|
+
background: linear-gradient(
|
|
40
|
+
0deg,
|
|
41
|
+
var(--button-overlay-hover),
|
|
42
|
+
var(--button-overlay-hover)
|
|
43
|
+
),
|
|
44
|
+
var(--button-solid-container-background-default);
|
|
45
|
+
border-color: var(--button-solid-border-color-hover);
|
|
46
|
+
color: var(--button-solid-text-color-hover);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.button:active,
|
|
50
|
+
.button.is-active {
|
|
51
|
+
background: linear-gradient(
|
|
52
|
+
0deg,
|
|
53
|
+
var(--button-overlay-active),
|
|
54
|
+
var(--button-overlay-active)
|
|
55
|
+
),
|
|
56
|
+
var(--button-solid-container-background-default);
|
|
57
|
+
border-color: var(--button-solid-border-color-active);
|
|
58
|
+
color: var(--button-solid-text-color-active);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.button:focus-visible,
|
|
62
|
+
.button.is-focus-visible {
|
|
63
|
+
background: var(--button-solid-container-background-focus);
|
|
64
|
+
border-color: var(--button-solid-border-color-focus);
|
|
65
|
+
color: var(--button-solid-text-color-default);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button.outline {
|
|
69
|
+
background: var(--button-outline-container-background-default);
|
|
70
|
+
border-color: var(--button-outline-border-color-default);
|
|
71
|
+
border-width: var(--button-outline-border-size);
|
|
72
|
+
border-style: solid;
|
|
73
|
+
color: var(--button-outline-text-color-default);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button.outline:hover,
|
|
77
|
+
.button.outline.is-hover {
|
|
78
|
+
background: linear-gradient(
|
|
79
|
+
0deg,
|
|
80
|
+
var(--button-overlay-hover),
|
|
81
|
+
var(--button-overlay-hover)
|
|
82
|
+
),
|
|
83
|
+
var(--button-outline-container-background-default);
|
|
84
|
+
border-color: var(--button-outline-border-color-hover);
|
|
85
|
+
color: var(--button-outline-text-color-default);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.button.outline:active,
|
|
89
|
+
.button.outline.is-active {
|
|
90
|
+
background: linear-gradient(
|
|
91
|
+
0deg,
|
|
92
|
+
var(--button-overlay-active),
|
|
93
|
+
var(--button-overlay-active)
|
|
94
|
+
),
|
|
95
|
+
var(--button-outline-container-background-default);
|
|
96
|
+
border-color: var(--button-outline-border-color-active);
|
|
97
|
+
color: var(--button-outline-text-color-active);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.button.outline:focus-visible,
|
|
101
|
+
.button.outline.is-focus-visible {
|
|
102
|
+
background: var(--button-outline-container-background-focus);
|
|
103
|
+
border-color: var(--button-outline-border-color-focus);
|
|
104
|
+
color: var(--button-outline-text-color-default);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.button.ghost {
|
|
108
|
+
background: var(--button-ghost-container-background-default);
|
|
109
|
+
border-color: var(--button-ghost-border-color-default);
|
|
110
|
+
border-width: var(--button-ghost-border-size);
|
|
111
|
+
border-style: solid;
|
|
112
|
+
color: var(--button-ghost-text-color-default);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.button.ghost:hover,
|
|
116
|
+
.button.ghost.is-hover {
|
|
117
|
+
background: linear-gradient(
|
|
118
|
+
0deg,
|
|
119
|
+
var(--button-overlay-hover),
|
|
120
|
+
var(--button-overlay-hover)
|
|
121
|
+
),
|
|
122
|
+
var(--button-ghost-container-background-default);
|
|
123
|
+
border-color: var(--button-ghost-border-color-hover);
|
|
124
|
+
color: var(--button-ghost-text-color-default);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.button.ghost:active,
|
|
128
|
+
.button.ghost.is-active {
|
|
129
|
+
background: linear-gradient(
|
|
130
|
+
0deg,
|
|
131
|
+
var(--button-overlay-active),
|
|
132
|
+
var(--button-overlay-active)
|
|
133
|
+
),
|
|
134
|
+
var(--button-ghost-container-background-default);
|
|
135
|
+
border-color: var(--button-ghost-border-color-active);
|
|
136
|
+
color: var(--button-ghost-text-color-active);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.button.ghost:focus-visible,
|
|
140
|
+
.button.ghost.is-focus-visible {
|
|
141
|
+
background: var(--button-ghost-container-background-focus);
|
|
142
|
+
border-color: var(--button-ghost-border-color-focus);
|
|
143
|
+
color: var(--button-ghost-text-color-default);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.button:disabled,
|
|
147
|
+
.button[disabled] {
|
|
148
|
+
cursor: not-allowed;
|
|
149
|
+
opacity: 0.6;
|
|
150
|
+
background: var(--button-container-background-disabled);
|
|
151
|
+
border-color: var(--button-border-color-disabled);
|
|
152
|
+
color: var(--button-text-color-disabled);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.button-group {
|
|
156
|
+
display: inline-flex;
|
|
157
|
+
align-items: stretch;
|
|
158
|
+
gap: var(--button-group-gap, var(--size-spacing-100, 0.25rem));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.button-group[data-orientation="vertical"] {
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.button-group[data-justify="stretch"] {
|
|
166
|
+
inline-size: 100%;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.button-group[data-justify="stretch"] > .button {
|
|
170
|
+
flex: 1 1 auto;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.button-group[data-attached="true"] {
|
|
175
|
+
gap: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.button-group[data-attached="true"] > .button {
|
|
179
|
+
border-radius: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.button-group[data-attached="true"]:not([data-orientation="vertical"])
|
|
183
|
+
> .button
|
|
184
|
+
+ .button {
|
|
185
|
+
border-inline-start-width: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.button-group[data-attached="true"][data-orientation="vertical"]
|
|
189
|
+
> .button
|
|
190
|
+
+ .button {
|
|
191
|
+
border-block-start-width: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.button-group[data-attached="true"]:not([data-orientation="vertical"])
|
|
195
|
+
> .button:first-child {
|
|
196
|
+
border-start-start-radius: var(
|
|
197
|
+
--button-group-border-radius,
|
|
198
|
+
var(--button-border-radius)
|
|
199
|
+
);
|
|
200
|
+
border-end-start-radius: var(
|
|
201
|
+
--button-group-border-radius,
|
|
202
|
+
var(--button-border-radius)
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.button-group[data-attached="true"]:not([data-orientation="vertical"])
|
|
207
|
+
> .button:last-child {
|
|
208
|
+
border-start-end-radius: var(
|
|
209
|
+
--button-group-border-radius,
|
|
210
|
+
var(--button-border-radius)
|
|
211
|
+
);
|
|
212
|
+
border-end-end-radius: var(
|
|
213
|
+
--button-group-border-radius,
|
|
214
|
+
var(--button-border-radius)
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.button-group[data-attached="true"][data-orientation="vertical"]
|
|
219
|
+
> .button:first-child {
|
|
220
|
+
border-start-start-radius: var(
|
|
221
|
+
--button-group-border-radius,
|
|
222
|
+
var(--button-border-radius)
|
|
223
|
+
);
|
|
224
|
+
border-start-end-radius: var(
|
|
225
|
+
--button-group-border-radius,
|
|
226
|
+
var(--button-border-radius)
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.button-group[data-attached="true"][data-orientation="vertical"]
|
|
231
|
+
> .button:last-child {
|
|
232
|
+
border-end-start-radius: var(
|
|
233
|
+
--button-group-border-radius,
|
|
234
|
+
var(--button-border-radius)
|
|
235
|
+
);
|
|
236
|
+
border-end-end-radius: var(
|
|
237
|
+
--button-group-border-radius,
|
|
238
|
+
var(--button-border-radius)
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.checkbox-field {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--typography-label-gap);
|
|
6
|
+
font-family: var(--typography-label-font-family);
|
|
7
|
+
font-weight: var(--typography-label-font-weight);
|
|
8
|
+
font-size: var(--typography-label-font-size);
|
|
9
|
+
line-height: var(--typography-label-line-height);
|
|
10
|
+
color: var(--color-text-default);
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.checkbox-field.is-disabled {
|
|
15
|
+
color: var(--color-text-disabled);
|
|
16
|
+
cursor: not-allowed;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.checkbox {
|
|
20
|
+
inline-size: var(--size-spacing-600);
|
|
21
|
+
block-size: var(--size-spacing-600);
|
|
22
|
+
margin: 0;
|
|
23
|
+
appearance: none;
|
|
24
|
+
display: inline-grid;
|
|
25
|
+
place-content: center;
|
|
26
|
+
border-style: solid;
|
|
27
|
+
border-width: var(--size-border-100);
|
|
28
|
+
border-color: var(--color-border-default);
|
|
29
|
+
border-radius: var(--brand-corner-input);
|
|
30
|
+
background: var(--color-fill-surface);
|
|
31
|
+
color: var(--color-text-inverse);
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.checkbox::after {
|
|
36
|
+
content: "";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.checkbox:checked,
|
|
40
|
+
.checkbox.is-checked {
|
|
41
|
+
border-color: var(--color-border-brand);
|
|
42
|
+
background: var(--color-fill-brand);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.checkbox:checked::after,
|
|
46
|
+
.checkbox.is-checked::after {
|
|
47
|
+
content: "\2713";
|
|
48
|
+
font-size: var(--typography-label-font-size);
|
|
49
|
+
line-height: var(--typography-label-line-height);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.checkbox:hover,
|
|
53
|
+
.checkbox.is-hover {
|
|
54
|
+
background:
|
|
55
|
+
linear-gradient(0deg, var(--color-overlay-hover), var(--color-overlay-hover)),
|
|
56
|
+
var(--color-fill-surface);
|
|
57
|
+
border-color: var(--color-border-brand);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.checkbox:checked:hover,
|
|
61
|
+
.checkbox.is-checked.is-hover {
|
|
62
|
+
background:
|
|
63
|
+
linear-gradient(0deg, var(--color-overlay-hover), var(--color-overlay-hover)),
|
|
64
|
+
var(--color-fill-brand);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.checkbox:active,
|
|
68
|
+
.checkbox.is-active {
|
|
69
|
+
background:
|
|
70
|
+
linear-gradient(0deg, var(--color-overlay-active), var(--color-overlay-active)),
|
|
71
|
+
var(--color-fill-surface);
|
|
72
|
+
border-color: var(--color-border-brand);
|
|
73
|
+
border-width: var(--size-border-200);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.checkbox:checked:active,
|
|
77
|
+
.checkbox.is-checked.is-active {
|
|
78
|
+
background:
|
|
79
|
+
linear-gradient(0deg, var(--color-overlay-active), var(--color-overlay-active)),
|
|
80
|
+
var(--color-fill-brand);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.checkbox:focus-visible,
|
|
84
|
+
.checkbox.is-focus-visible {
|
|
85
|
+
border-color: var(--color-border-brand);
|
|
86
|
+
outline: none;
|
|
87
|
+
box-shadow: 0 0 0 var(--shadow-focus, 0) var(--color-focus, transparent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.checkbox:disabled,
|
|
91
|
+
.checkbox.is-disabled {
|
|
92
|
+
border-color: var(--color-border-disabled);
|
|
93
|
+
background: var(--color-fill-disabled);
|
|
94
|
+
color: var(--color-text-disabled);
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.icon {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
inline-size: 1em;
|
|
5
|
+
block-size: 1em;
|
|
6
|
+
inline-size: 1lh;
|
|
7
|
+
block-size: 1lh;
|
|
8
|
+
line-height: inherit;
|
|
9
|
+
background-color: currentColor;
|
|
10
|
+
-webkit-mask-image: var(--icon-src);
|
|
11
|
+
mask-image: var(--icon-src);
|
|
12
|
+
-webkit-mask-repeat: no-repeat;
|
|
13
|
+
mask-repeat: no-repeat;
|
|
14
|
+
-webkit-mask-position: center;
|
|
15
|
+
mask-position: center;
|
|
16
|
+
-webkit-mask-size: contain;
|
|
17
|
+
mask-size: contain;
|
|
18
|
+
vertical-align: middle;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.input {
|
|
3
|
+
inline-size: 100%;
|
|
4
|
+
block-size: var(--input-height, var(--size-spacing-800));
|
|
5
|
+
appearance: none;
|
|
6
|
+
font-family: var(--input-font-family);
|
|
7
|
+
font-weight: var(--input-font-weight);
|
|
8
|
+
font-size: var(--input-font-size);
|
|
9
|
+
line-height: var(--input-line-height, var(--button-line-height, 1.5));
|
|
10
|
+
color: var(--input-text-text-color-default);
|
|
11
|
+
background: var(--input-text-container-background-default);
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: var(--input-border-size-default);
|
|
14
|
+
border-color: var(--input-text-border-color-default);
|
|
15
|
+
border-radius: var(--input-border-radius);
|
|
16
|
+
padding-inline: var(--input-padding-inline);
|
|
17
|
+
padding-block: var(--input-padding-block);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.input::placeholder {
|
|
21
|
+
color: var(--input-text-text-color-placeholder);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.input:hover,
|
|
25
|
+
.input.is-hover {
|
|
26
|
+
background:
|
|
27
|
+
linear-gradient(0deg, var(--input-overlay-hover), var(--input-overlay-hover)),
|
|
28
|
+
var(--input-text-container-background-default);
|
|
29
|
+
border-width: var(--input-border-size-hover);
|
|
30
|
+
padding-inline: calc(
|
|
31
|
+
var(--input-padding-inline) + var(--input-border-size-default) -
|
|
32
|
+
var(--input-border-size-hover)
|
|
33
|
+
);
|
|
34
|
+
padding-block: calc(
|
|
35
|
+
var(--input-padding-block) + var(--input-border-size-default) -
|
|
36
|
+
var(--input-border-size-hover)
|
|
37
|
+
);
|
|
38
|
+
border-color: var(--input-text-border-color-hover);
|
|
39
|
+
color: var(--input-text-text-color-hover);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.input:active,
|
|
43
|
+
.input.is-active {
|
|
44
|
+
background:
|
|
45
|
+
linear-gradient(0deg, var(--input-overlay-active), var(--input-overlay-active)),
|
|
46
|
+
var(--input-text-container-background-default);
|
|
47
|
+
border-width: var(--input-border-size-active);
|
|
48
|
+
padding-inline: calc(
|
|
49
|
+
var(--input-padding-inline) + var(--input-border-size-default) -
|
|
50
|
+
var(--input-border-size-active)
|
|
51
|
+
);
|
|
52
|
+
padding-block: calc(
|
|
53
|
+
var(--input-padding-block) + var(--input-border-size-default) -
|
|
54
|
+
var(--input-border-size-active)
|
|
55
|
+
);
|
|
56
|
+
border-color: var(--input-text-border-color-active);
|
|
57
|
+
color: var(--input-text-text-color-active);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.input:focus-visible,
|
|
61
|
+
.input.is-focus-visible {
|
|
62
|
+
background: var(--input-text-container-background-focus);
|
|
63
|
+
border-color: var(--input-text-border-color-focus);
|
|
64
|
+
outline: none;
|
|
65
|
+
box-shadow: 0 0 0 var(--shadow-focus, 0) var(--color-focus, transparent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.input:disabled,
|
|
69
|
+
.input[disabled],
|
|
70
|
+
.input.is-disabled {
|
|
71
|
+
cursor: not-allowed;
|
|
72
|
+
color: var(--input-text-color-disabled);
|
|
73
|
+
background: var(--input-container-background-disabled);
|
|
74
|
+
border-color: var(--input-border-color-disabled);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.label-content {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--label-gap, 0.5em);
|
|
6
|
+
line-height: inherit;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.label-content > .icon[data-slot] {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
line-height: inherit;
|
|
13
|
+
flex: 0 0 auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.label-content__text {
|
|
17
|
+
line-height: inherit;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.label-content.is-icon-only {
|
|
21
|
+
gap: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.field-label {
|
|
25
|
+
position: relative;
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--field-label-gap, 0.25em);
|
|
29
|
+
line-height: var(--field-label-line-height, inherit);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.field-label__required {
|
|
34
|
+
color: var(--field-label-required-color, currentColor);
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.field-label__required-text {
|
|
39
|
+
position: absolute;
|
|
40
|
+
inline-size: 1px;
|
|
41
|
+
block-size: 1px;
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: -1px;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
clip: rect(0, 0, 0, 0);
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
border: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Foundation-001: Token Layering Principles
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Define a stable token architecture that:
|
|
6
|
+
- aligns Figma Variables with CSS custom properties
|
|
7
|
+
- supports Light/Dark modes and multiple brands
|
|
8
|
+
- scales across components without duplication
|
|
9
|
+
- remains maintainable and code-aligned
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
1. Use four layers:
|
|
14
|
+
- **Core (Primitives)**: raw physical values (spacing, radii, borders, typography primitives, layout constants)
|
|
15
|
+
- **Color Modes (Light/Dark)**: raw color palettes (brand, neutral, overlays), no semantics
|
|
16
|
+
- **Semantics (Roles)**: meaning-based roles (`Color.Text.*`, `Color.Fill.*`, `Color.Border.*`, `Typography.*`, `Corner.*`)
|
|
17
|
+
- **Components (APIs)**: variants/parts/properties/states, referencing Semantic/Core tokens
|
|
18
|
+
|
|
19
|
+
2. Components must not introduce raw values for color, typography, or layout fundamentals.
|
|
20
|
+
|
|
21
|
+
3. Typography color must stay in semantic color roles, not inside typography role definitions.
|
|
22
|
+
|
|
23
|
+
## Implications
|
|
24
|
+
|
|
25
|
+
- Brand/mode changes happen primarily in Semantic/Mode mappings.
|
|
26
|
+
- Component APIs remain stable while references evolve.
|
|
27
|
+
- Layout constants (breakpoints, containers, z-index) stay centralized in Core.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Foundation-002: Naming and Grouping Conventions
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Keep token naming readable in Figma, searchable in code, and scalable across variants/states.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
1. Component tokens follow a variant-first path:
|
|
10
|
+
`Component.variant.part.property.state`
|
|
11
|
+
|
|
12
|
+
Examples:
|
|
13
|
+
- `Button.solid.container.background.default`
|
|
14
|
+
- `Button.outline.container.border-color.hover`
|
|
15
|
+
- `Button.ghost.label.text-color.disabled`
|
|
16
|
+
|
|
17
|
+
2. Semantic tokens remain role-based and component-agnostic:
|
|
18
|
+
- `Color.Text.Default`
|
|
19
|
+
- `Color.Fill.Surface`
|
|
20
|
+
- `Color.Border.Brand`
|
|
21
|
+
- `Typography.Label`
|
|
22
|
+
- `Corner.Medium`
|
|
23
|
+
|
|
24
|
+
3. States are always the last segment:
|
|
25
|
+
`...property.state`
|
|
26
|
+
|
|
27
|
+
Common states:
|
|
28
|
+
`default`, `hover`, `active`, `focus`, `disabled`
|
|
29
|
+
|
|
30
|
+
4. Naming style:
|
|
31
|
+
- Component name in PascalCase; subsequent segments in lowercase
|
|
32
|
+
- Multi-word properties in kebab-case (`border-color`, `line-height`)
|
|
33
|
+
- No device labels (`mobile/tablet/desktop`) in token names
|
|
34
|
+
|
|
35
|
+
## Implications
|
|
36
|
+
|
|
37
|
+
- Figma browsing remains predictable.
|
|
38
|
+
- Token APIs stay implementation-friendly while preserving semantic clarity.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Foundation-003: Color Semantics, Status vs State
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide a color model that supports brand/mode mapping and semantic meaning without component-level duplication.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
1. Keep raw palettes separate from semantics:
|
|
10
|
+
- `Brand.*`, `Neutral.*`, `Overlay.*` provide raw color sources
|
|
11
|
+
- `Color.Text.*`, `Color.Fill.*`, `Color.Border.*` provide semantic roles per mode
|
|
12
|
+
|
|
13
|
+
2. Semantic mappings are mode-scoped:
|
|
14
|
+
- Light mappings at `:root`
|
|
15
|
+
- Dark mappings at `:root[data-mode="dark"]`
|
|
16
|
+
- Mode activation policy is consumer-owned (see Foundation-008)
|
|
17
|
+
|
|
18
|
+
3. Status is semantic meaning (global):
|
|
19
|
+
- `Danger`, optionally `Warning`, `Success`, `Info`
|
|
20
|
+
- Applied across role families (Text/Fill/Border)
|
|
21
|
+
|
|
22
|
+
4. State is interaction behavior (component-level):
|
|
23
|
+
- `...background.hover`
|
|
24
|
+
- `...border-color.focus`
|
|
25
|
+
- `...text-color.disabled`
|
|
26
|
+
|
|
27
|
+
5. Support inverse readability via semantic roles where needed:
|
|
28
|
+
- `Color.Text.Inverse`
|
|
29
|
+
- optional `Color.Fill.Inverse`
|
|
30
|
+
|
|
31
|
+
## Implications
|
|
32
|
+
|
|
33
|
+
- Semantic APIs stay stable across modes.
|
|
34
|
+
- Components keep interaction logic without polluting global semantics.
|
|
35
|
+
- Multi-brand, multi-mode theming remains flexible.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Foundation-004: Typography Scale and Line Height
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Align typography between Figma and CSS with a predictable rhythm.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
1. Core typography primitives define:
|
|
10
|
+
- `Font.Size.*` (px)
|
|
11
|
+
- `LineHeight.*` (px, aligned to 4px grid)
|
|
12
|
+
- `Font.Weight.*`
|
|
13
|
+
- `Font.Family.*`
|
|
14
|
+
|
|
15
|
+
2. Line-height target:
|
|
16
|
+
- Use a 140% target
|
|
17
|
+
- Round to nearest 4px grid for published line-height primitives
|
|
18
|
+
|
|
19
|
+
3. Semantic typography roles (`Typography.*`) bundle:
|
|
20
|
+
- font-family
|
|
21
|
+
- font-size
|
|
22
|
+
- line-height
|
|
23
|
+
- font-weight
|
|
24
|
+
|
|
25
|
+
Example scale:
|
|
26
|
+
- xs (12) -> xs (16)
|
|
27
|
+
- sm (14) -> sm (20)
|
|
28
|
+
- md (16) -> md (24)
|
|
29
|
+
- lg (20) -> lg (28)
|
|
30
|
+
- xl (24) -> xl (32)
|
|
31
|
+
- 2xl (32) -> 2xl (44)
|
|
32
|
+
- 3xl (40) -> 3xl (56)
|
|
33
|
+
|
|
34
|
+
4. Typography roles must not include color; text color belongs to `Color.Text.*`.
|
|
35
|
+
|
|
36
|
+
## Implications
|
|
37
|
+
|
|
38
|
+
- Designers and engineers share the same typographic rhythm.
|
|
39
|
+
- Typography tokens remain reusable across components.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Foundation-005: Responsive Strategy (Breakpoints and Containers)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Keep responsive thresholds precise, stable, and reusable across viewport and component contexts.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
1. Viewport breakpoints are Core primitives:
|
|
10
|
+
- `Core.Breakpoint.*` (px)
|
|
11
|
+
|
|
12
|
+
2. Container query thresholds are separate Core primitives:
|
|
13
|
+
- `Core.Container.*` (px)
|
|
14
|
+
|
|
15
|
+
3. Breakpoints and container thresholds are not interchangeable.
|
|
16
|
+
|
|
17
|
+
4. Avoid device names and t-shirt sizes in Core tokens.
|
|
18
|
+
Numeric thresholds are the source of truth.
|
|
19
|
+
|
|
20
|
+
## Implications
|
|
21
|
+
|
|
22
|
+
- Clear separation between page-level and component-level responsiveness.
|
|
23
|
+
- Better long-term maintainability for responsive behavior.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Foundation-006: Z-Index and Layering Strategy
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Ensure predictable stacking behavior without scattered magic numbers.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
1. Define z-index values as Core primitives under `Core.ZIndex.*`.
|
|
10
|
+
|
|
11
|
+
2. Recommended base levels:
|
|
12
|
+
- `Core.ZIndex.Hidden = -1`
|
|
13
|
+
- `Core.ZIndex.Base = 0`
|
|
14
|
+
- `Core.ZIndex.Raised = 1`
|
|
15
|
+
|
|
16
|
+
3. Recommended overlay stack:
|
|
17
|
+
- `Core.ZIndex.DropdownBase = 900`
|
|
18
|
+
- `Core.ZIndex.Dropdown = 1000`
|
|
19
|
+
- `Core.ZIndex.Sticky = 1020`
|
|
20
|
+
- `Core.ZIndex.Fixed = 1030`
|
|
21
|
+
- `Core.ZIndex.ModalOverlay = 1040`
|
|
22
|
+
- `Core.ZIndex.Modal = 1050`
|
|
23
|
+
- `Core.ZIndex.Popover = 1060`
|
|
24
|
+
- `Core.ZIndex.Tooltip = 1070`
|
|
25
|
+
|
|
26
|
+
4. Components must reference these tokens and must not introduce new stacking numbers.
|
|
27
|
+
|
|
28
|
+
## Implications
|
|
29
|
+
|
|
30
|
+
- Layering remains predictable across components and products.
|
|
31
|
+
- Z-index conflicts are reduced.
|