@cueplusplus/ui 0.17.0 → 0.18.1
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/CHANGELOG.md +84 -0
- package/dist/chrome/empty-state.js +8 -4
- package/dist/chrome/navigation-menu.js +3 -2
- package/dist/chrome/panel.js +2 -1
- package/dist/chrome/row.js +4 -3
- package/dist/chrome/scroll-area.js +4 -3
- package/dist/chrome/segmented-control.js +2 -1
- package/dist/chrome/tabs.js +5 -2
- package/dist/chrome/toolbar.js +5 -3
- package/dist/color/color-field.d.ts +7 -0
- package/dist/date/_trigger.js +4 -1
- package/dist/date/calendar.js +15 -9
- package/dist/forms/_chassis.d.ts +10 -2
- package/dist/forms/_chassis.js +15 -5
- package/dist/forms/_listbox.js +18 -13
- package/dist/forms/checkbox.js +9 -6
- package/dist/forms/field.js +5 -5
- package/dist/forms/input-group.js +11 -2
- package/dist/forms/multi-select.js +4 -3
- package/dist/forms/number-field.js +6 -3
- package/dist/forms/otp-field.js +15 -6
- package/dist/forms/radio-group.js +7 -5
- package/dist/forms/select.js +8 -5
- package/dist/forms/slider.js +5 -3
- package/dist/forms/switch.js +6 -4
- package/dist/forms/tags-input.js +4 -3
- package/dist/forms/textarea.js +2 -1
- package/dist/forms/toggle-group.js +2 -1
- package/dist/forms/toggle.js +3 -1
- package/dist/instruments/meter.js +2 -1
- package/dist/instruments/progress.js +6 -3
- package/dist/instruments/stat.js +5 -3
- package/dist/instruments/table.js +3 -2
- package/dist/layout/_collapse.js +24 -8
- package/dist/layout/accordion.js +2 -1
- package/dist/layout/breadcrumb.js +8 -7
- package/dist/layout/card.js +2 -1
- package/dist/layout/collapsible.js +2 -1
- package/dist/layout/link.d.ts +14 -0
- package/dist/layout/link.js +4 -4
- package/dist/layout/pagination.js +7 -8
- package/dist/overlays/_surface.d.ts +4 -4
- package/dist/overlays/_surface.js +8 -7
- package/dist/overlays/alert-dialog.js +1 -1
- package/dist/overlays/command-palette.js +23 -8
- package/dist/overlays/dialog.js +1 -1
- package/dist/overlays/drawer.js +8 -1
- package/dist/overlays/hover-card.js +3 -1
- package/dist/overlays/popover.js +2 -1
- package/dist/overlays/toast.js +8 -4
- package/dist/overlays/tooltip.js +3 -4
- package/dist/primitives/avatar.js +6 -2
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/button.js +10 -7
- package/dist/primitives/chip.d.ts +1 -37
- package/dist/primitives/chip.js +14 -46
- package/dist/primitives/icon-button.d.ts +1 -1
- package/dist/primitives/kbd.js +2 -2
- package/dist/primitives/skeleton.js +2 -1
- package/dist/system/_style-accordion-rule.js +32 -0
- package/dist/system/_style-avatar.js +20 -0
- package/dist/system/_style-body-leading.js +1 -3
- package/dist/system/_style-body.js +7 -2
- package/dist/system/_style-caption-ink.js +17 -0
- package/dist/system/_style-caption-size.js +19 -0
- package/dist/system/_style-caption-weight.js +18 -0
- package/dist/system/_style-card-gap.js +14 -0
- package/dist/system/_style-cell.js +18 -0
- package/dist/system/_style-check-glyph.js +14 -0
- package/dist/system/_style-check.js +8 -1
- package/dist/system/_style-chip.js +41 -1
- package/dist/system/_style-choice-gap.js +15 -0
- package/dist/system/_style-collapse.js +81 -1
- package/dist/system/_style-control-gap.js +14 -0
- package/dist/system/_style-control-label.js +8 -1
- package/dist/system/_style-crumb.js +44 -0
- package/dist/system/_style-day.js +25 -0
- package/dist/system/_style-disabled.js +70 -0
- package/dist/system/_style-disclosure.js +21 -0
- package/dist/system/_style-empty-state.js +42 -0
- package/dist/system/_style-field-chassis.js +38 -0
- package/dist/system/_style-field-gap.js +12 -0
- package/dist/system/_style-glyph-ink.js +20 -0
- package/dist/system/_style-glyph-opacity.js +20 -0
- package/dist/system/_style-glyph-size.js +21 -0
- package/dist/system/_style-group-gap.js +15 -0
- package/dist/system/_style-group-label-pad.js +14 -0
- package/dist/system/_style-group-label.js +24 -0
- package/dist/system/_style-help.js +10 -1
- package/dist/system/_style-hover-card-width.js +15 -0
- package/dist/system/_style-kbd.js +13 -1
- package/dist/system/_style-link.js +15 -3
- package/dist/system/_style-menu.js +14 -1
- package/dist/system/_style-meter.js +15 -0
- package/dist/system/_style-nav-menu.js +48 -0
- package/dist/system/_style-option.js +61 -4
- package/dist/system/_style-otp.js +15 -0
- package/dist/system/_style-outline-hover.js +18 -0
- package/dist/system/_style-page.js +17 -0
- package/dist/system/_style-palette.js +18 -0
- package/dist/system/_style-panel.js +21 -0
- package/dist/system/_style-popover-width.js +15 -0
- package/dist/system/_style-radio.js +19 -0
- package/dist/system/_style-row-disabled.js +17 -0
- package/dist/system/_style-row.js +30 -0
- package/dist/system/_style-scrollbar.js +19 -0
- package/dist/system/_style-segment-pad.js +15 -0
- package/dist/system/_style-skeleton.js +15 -0
- package/dist/system/_style-slider.js +26 -0
- package/dist/system/_style-stat.js +31 -0
- package/dist/system/_style-stepper.js +16 -0
- package/dist/system/_style-switch.js +26 -0
- package/dist/system/_style-tab-hover.js +15 -0
- package/dist/system/_style-text-focus.js +26 -0
- package/dist/system/_style-toast.js +22 -0
- package/dist/system/_style-toggle.js +50 -0
- package/dist/system/_style-toolbar.js +23 -0
- package/dist/system/_style-tooltip.js +30 -1
- package/manifest/components/accordion.json +22 -1
- package/manifest/components/alert-dialog.json +7 -0
- package/manifest/components/app-bar.json +42 -0
- package/manifest/components/autocomplete.json +48 -1
- package/manifest/components/avatar-group.json +7 -0
- package/manifest/components/avatar.json +7 -0
- package/manifest/components/breadcrumb.json +7 -2
- package/manifest/components/button.json +16 -1
- package/manifest/components/calendar.json +6 -0
- package/manifest/components/card.json +1 -0
- package/manifest/components/channel-matrix.json +6 -0
- package/manifest/components/chart-tooltip-content.json +6 -0
- package/manifest/components/checkbox-group.json +22 -1
- package/manifest/components/checkbox.json +22 -1
- package/manifest/components/chip.json +6 -0
- package/manifest/components/collapsible.json +22 -0
- package/manifest/components/color-field.json +29 -0
- package/manifest/components/color-picker.json +19 -0
- package/manifest/components/combobox.json +48 -1
- package/manifest/components/command-palette.json +11 -0
- package/manifest/components/composer.json +19 -0
- package/manifest/components/context-menu.json +6 -0
- package/manifest/components/date-field.json +18 -0
- package/manifest/components/date-picker.json +22 -0
- package/manifest/components/date-range-picker.json +22 -0
- package/manifest/components/dialog.json +7 -0
- package/manifest/components/disclosure.json +22 -0
- package/manifest/components/dmx-bar.json +6 -0
- package/manifest/components/dmx-strip.json +6 -0
- package/manifest/components/drawer.json +7 -0
- package/manifest/components/dropdown-menu.json +6 -0
- package/manifest/components/empty-state.json +13 -0
- package/manifest/components/env-var-input.json +19 -0
- package/manifest/components/field-description.json +2 -1
- package/manifest/components/field-error.json +2 -1
- package/manifest/components/field-label.json +2 -1
- package/manifest/components/field.json +2 -1
- package/manifest/components/hover-card.json +8 -0
- package/manifest/components/input-group.json +21 -0
- package/manifest/components/input.json +19 -0
- package/manifest/components/kbd.json +2 -0
- package/manifest/components/link.json +23 -0
- package/manifest/components/menubar.json +6 -0
- package/manifest/components/meter.json +1 -0
- package/manifest/components/multi-select.json +49 -1
- package/manifest/components/musical-time-input.json +19 -0
- package/manifest/components/navigation-menu.json +16 -0
- package/manifest/components/number-field.json +21 -0
- package/manifest/components/otp-field.json +20 -0
- package/manifest/components/pagination.json +19 -0
- package/manifest/components/panel-header.json +3 -0
- package/manifest/components/panel.json +3 -0
- package/manifest/components/password-input.json +19 -0
- package/manifest/components/popover.json +7 -0
- package/manifest/components/progress.json +4 -0
- package/manifest/components/radio-group.json +6 -0
- package/manifest/components/radio.json +6 -0
- package/manifest/components/row.json +3 -0
- package/manifest/components/scroll-area.json +3 -1
- package/manifest/components/scrollable-tabs-list.json +3 -0
- package/manifest/components/scrub-input.json +19 -0
- package/manifest/components/seam-list.json +3 -0
- package/manifest/components/search-input.json +19 -0
- package/manifest/components/segmented-control.json +1 -0
- package/manifest/components/select.json +25 -0
- package/manifest/components/sheet.json +6 -0
- package/manifest/components/skeleton.json +2 -0
- package/manifest/components/slider.json +8 -0
- package/manifest/components/stat.json +8 -0
- package/manifest/components/switch.json +22 -0
- package/manifest/components/table-scroll-region.json +2 -0
- package/manifest/components/table.json +2 -0
- package/manifest/components/tabs.json +3 -0
- package/manifest/components/tags-input.json +49 -1
- package/manifest/components/textarea.json +19 -0
- package/manifest/components/theme-configurator.json +6 -0
- package/manifest/components/time-field.json +18 -0
- package/manifest/components/toast.json +9 -0
- package/manifest/components/toggle-group.json +2 -1
- package/manifest/components/toggle.json +28 -0
- package/manifest/components/toolbar.json +19 -0
- package/manifest/components/tooltip.json +11 -0
- package/manifest/fixtures.json +45 -0
- package/manifest/manifest.json +84 -84
- package/manifest/tokens.json +155 -1
- package/package.json +5 -5
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/system/_style-otp.ts
|
|
2
|
+
/**
|
|
3
|
+
* The gap between an OTP field's slots (round 6, spec §11, lane R6.P:
|
|
4
|
+
* `style-otp-gap`), falling back to the `space-2` it drew. coss.com/ui sets its
|
|
5
|
+
* slots 8px apart (P166.gap).
|
|
6
|
+
*
|
|
7
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
8
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
9
|
+
* reason: one component's tokens per file.
|
|
10
|
+
*
|
|
11
|
+
* @internal Not part of the public API.
|
|
12
|
+
*/
|
|
13
|
+
const OTP_GAP = "gap-[var(--cue-style-otp-gap,var(--cue-space-2))]";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OTP_GAP };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/system/_style-outline-hover.ts
|
|
2
|
+
/**
|
|
3
|
+
* An outline button's hover (round 6, spec §11, lane R6.P:
|
|
4
|
+
* `style-outline-hover-ground`, `style-outline-hover-edge`), falling back to
|
|
5
|
+
* the transparent ground and `accent` edge it drew. coss.com/ui's outline
|
|
6
|
+
* button fills a faint ink on hover and keeps its rim grey (P145.outline,
|
|
7
|
+
* P145.outline-edge).
|
|
8
|
+
*
|
|
9
|
+
* **Optional** (spec §3.0). Its own module for docgen's reason: one token per
|
|
10
|
+
* file, so only the components that read it are credited with it.
|
|
11
|
+
*
|
|
12
|
+
* @internal Not part of the public API.
|
|
13
|
+
*/
|
|
14
|
+
const OUTLINE_HOVER_GROUND = "hover:bg-[color:var(--cue-style-outline-hover-ground,transparent)]";
|
|
15
|
+
/** @see OUTLINE_HOVER_GROUND */
|
|
16
|
+
const OUTLINE_HOVER_EDGE = "hover:border-[color:var(--cue-style-outline-hover-edge,var(--cue-accent))]";
|
|
17
|
+
//#endregion
|
|
18
|
+
export { OUTLINE_HOVER_EDGE, OUTLINE_HOVER_GROUND };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/system/_style-page.ts
|
|
2
|
+
/**
|
|
3
|
+
* Pagination's current page (round 6, spec §11, lane R6.P:
|
|
4
|
+
* `style-page-current-ground`, `style-page-current-rim`, `style-page-current-edge`),
|
|
5
|
+
* falling back to the `accent-soft` fill and no rim, as it drew. coss.com/ui marks the
|
|
6
|
+
* current page as an outline button: the surface, in a 1px rim (P167.current,
|
|
7
|
+
* P167.current-edge).
|
|
8
|
+
*
|
|
9
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
10
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
11
|
+
* reason: one component's tokens per file.
|
|
12
|
+
*
|
|
13
|
+
* @internal Not part of the public API.
|
|
14
|
+
*/
|
|
15
|
+
const PAGE_CURRENT = "border-solid border-[length:var(--cue-style-page-current-rim,0px)] border-[color:var(--cue-style-page-current-edge,transparent)] bg-[color:var(--cue-style-page-current-ground,var(--cue-accent-soft))] text-accent";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PAGE_CURRENT };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/system/_style-palette.ts
|
|
2
|
+
/**
|
|
3
|
+
* The command palette's own parts (round 6, spec §11, lane R6.P): the rule under
|
|
4
|
+
* its search field (`style-palette-rule`), falling back to the `border` it
|
|
5
|
+
* drew, and its footer's block padding (`style-palette-footer-pad`), falling
|
|
6
|
+
* back to `space-2`. coss.com/ui draws no rule there and pads its footer 12px
|
|
7
|
+
* (P152.input-rule, P152.footer).
|
|
8
|
+
*
|
|
9
|
+
* **Optional** (spec §3.0). Its own module for docgen's reason: one token per
|
|
10
|
+
* file, so only the components that read it are credited with it.
|
|
11
|
+
*
|
|
12
|
+
* @internal Not part of the public API.
|
|
13
|
+
*/
|
|
14
|
+
const PALETTE_RULE = "border-[color:var(--cue-style-palette-rule,var(--cue-border))]";
|
|
15
|
+
/** @see PALETTE_RULE */
|
|
16
|
+
const PALETTE_FOOTER_PAD = "py-[var(--cue-style-palette-footer-pad,var(--cue-space-2))]";
|
|
17
|
+
//#endregion
|
|
18
|
+
export { PALETTE_FOOTER_PAD, PALETTE_RULE };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/system/_style-panel.ts
|
|
2
|
+
/**
|
|
3
|
+
* A panel header's padding and rule (round 6, spec §11, lane R6.P:
|
|
4
|
+
* `style-panel-pad-y`, `style-panel-pad-x`, `style-panel-rule`), falling back
|
|
5
|
+
* to the row paddings and the `border` it drew. coss.com/ui's frame panel pads
|
|
6
|
+
* its header 16px by 20px and draws no rule under it (P158, P158.pad-inline,
|
|
7
|
+
* P158.header-rule).
|
|
8
|
+
*
|
|
9
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
10
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
11
|
+
* reason: one component's tokens per file.
|
|
12
|
+
*
|
|
13
|
+
* @internal Not part of the public API.
|
|
14
|
+
*/
|
|
15
|
+
const PANEL_PAD_Y = "py-[var(--cue-style-panel-pad-y,var(--cue-pad-row-y))]";
|
|
16
|
+
/** @see PANEL_PAD_Y */
|
|
17
|
+
const PANEL_PAD_X = "px-[var(--cue-style-panel-pad-x,var(--cue-pad-row-x))]";
|
|
18
|
+
/** @see PANEL_PAD_Y */
|
|
19
|
+
const PANEL_RULE = "border-[color:var(--cue-style-panel-rule,var(--cue-border))]";
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PANEL_PAD_X, PANEL_PAD_Y, PANEL_RULE };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/system/_style-popover-width.ts
|
|
2
|
+
/**
|
|
3
|
+
* A popover's width (round 6, spec §11, lane R6.P: `style-popover-width`), falling
|
|
4
|
+
* back to the `auto` it drew, sized to its content under its viewport cap.
|
|
5
|
+
* coss.com/ui's popover is 320px (`w-80`, P168.width).
|
|
6
|
+
*
|
|
7
|
+
* **Optional** (spec §3.0): declared by `porcelain` alone, and the reader falls
|
|
8
|
+
* back to what the component drew. Its own module for docgen's reason: one
|
|
9
|
+
* component's tokens per file.
|
|
10
|
+
*
|
|
11
|
+
* @internal Not part of the public API.
|
|
12
|
+
*/
|
|
13
|
+
const POPOVER_WIDTH = "w-[var(--cue-style-popover-width,auto)]";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { POPOVER_WIDTH };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/system/_style-radio.ts
|
|
2
|
+
/**
|
|
3
|
+
* A checked radio (round 6, spec §11, lane R6.P): its ground
|
|
4
|
+
* (`style-radio-checked-ground`), falling back to the `sunken` it keeps; its dot's
|
|
5
|
+
* ink and size (`style-radio-dot-ink`, `style-radio-dot-size`), falling back to
|
|
6
|
+
* the `accent` half-size dot it drew. coss.com/ui fills a checked radio in `fg`
|
|
7
|
+
* around a 6px dot in the page ground (P171.checked-edge, P171.dot-size).
|
|
8
|
+
*
|
|
9
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
10
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
11
|
+
* reason: one component's tokens per file.
|
|
12
|
+
*
|
|
13
|
+
* @internal Not part of the public API.
|
|
14
|
+
*/
|
|
15
|
+
const RADIO_CHECKED_GROUND = "data-[checked]:bg-[color:var(--cue-style-radio-checked-ground,var(--cue-sunken))]";
|
|
16
|
+
/** @see RADIO_CHECKED_GROUND */
|
|
17
|
+
const RADIO_DOT = "size-[var(--cue-style-radio-dot-size,calc(1/2*100%))] bg-[color:var(--cue-style-radio-dot-ink,var(--cue-accent))]";
|
|
18
|
+
//#endregion
|
|
19
|
+
export { RADIO_CHECKED_GROUND, RADIO_DOT };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/system/_style-row-disabled.ts
|
|
2
|
+
/**
|
|
3
|
+
* A disabled row's fade in a menu, a command palette and a listbox (round 6,
|
|
4
|
+
* spec §11, lane R6.P: `style-row-disabled-opacity`), falling back to the 0.4 it
|
|
5
|
+
* drew. Its own name rather than `style-disabled-opacity`: a set that lifts the
|
|
6
|
+
* controls' fade to 1 and dims them by ink (Tender) would otherwise leave a
|
|
7
|
+
* disabled row undimmed. coss.com/ui fades its disabled menu row to 0.64
|
|
8
|
+
* (P163.disabled).
|
|
9
|
+
*
|
|
10
|
+
* **Optional** (spec §3.0). Its own module for docgen's reason: one token per
|
|
11
|
+
* file, so only the components that read it are credited with it.
|
|
12
|
+
*
|
|
13
|
+
* @internal Not part of the public API.
|
|
14
|
+
*/
|
|
15
|
+
const ROW_DISABLED_OPACITY = "data-[disabled]:opacity-[var(--cue-style-row-disabled-opacity,0.4)]";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ROW_DISABLED_OPACITY };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/system/_style-row.ts
|
|
2
|
+
/**
|
|
3
|
+
* `Row` in the rule idiom (round 6, spec §11, lane R6.T: `style-row-ink`,
|
|
4
|
+
* `style-row-block-pad`, `style-row-rule-style`).
|
|
5
|
+
*
|
|
6
|
+
* stripe.com's list with dividers (`.hds-list--show-dividers`) draws each item
|
|
7
|
+
* in its soft ink (`--hds-color-text-soft`), pads its foot 16px and rules it
|
|
8
|
+
* 1px dashed in its quiet border ink (`.hds-list__item--showDivider`, T136).
|
|
9
|
+
* Each reader falls back to the class it replaced: `text-fg`, the row's
|
|
10
|
+
* `--cue-pad-row-y`, and the solid of the `--tw-border-style` slot the rule's
|
|
11
|
+
* `border-t` reads (`_style-footer-rule.ts` gives the reason for the slot).
|
|
12
|
+
* The block pad and the rule style apply to the rule idiom only; a seam row
|
|
13
|
+
* (`SeamList`) keeps its own.
|
|
14
|
+
*
|
|
15
|
+
* @internal Not part of the public API.
|
|
16
|
+
*/
|
|
17
|
+
const ROW_INK = "text-[color:var(--cue-style-row-ink,var(--cue-fg))]";
|
|
18
|
+
/**
|
|
19
|
+
* A ruled row's block padding, at zero specificity (`:where()`), the only
|
|
20
|
+
* `py` a ruled row carries: a consumer's own `py-*` beats it wherever
|
|
21
|
+
* Tailwind emits the two, as it beat the `py-(--cue-pad-row-y)` this replaced —
|
|
22
|
+
* a consumer composing `rowVariants({ className: "py-2" })` on its own element
|
|
23
|
+
* kept its padding before round 6, and an arbitrary-value reader, emitted after
|
|
24
|
+
* `py-2`, took it away (the closing pass's adversarial review).
|
|
25
|
+
*/
|
|
26
|
+
const ROW_BLOCK_PAD = "[:where(&)]:py-[var(--cue-style-row-block-pad,var(--cue-pad-row-y))]";
|
|
27
|
+
/** The line style of the rule a ruled row draws above itself. */
|
|
28
|
+
const ROW_RULE_STYLE = "[--tw-border-style:var(--cue-style-row-rule-style,solid)]";
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ROW_BLOCK_PAD, ROW_INK, ROW_RULE_STYLE };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/system/_style-scrollbar.ts
|
|
2
|
+
/**
|
|
3
|
+
* A scroll area's bar and thumb (round 6, spec §11, lane R6.P: `style-scrollbar-size`,
|
|
4
|
+
* `style-scrollbar-thumb`), falling back to the `space-3` bar and the
|
|
5
|
+
* `border-strong` thumb it drew. coss.com/ui's bar is 6px (P172, P172.thumb).
|
|
6
|
+
*
|
|
7
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
8
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
9
|
+
* reason: one component's tokens per file.
|
|
10
|
+
*
|
|
11
|
+
* @internal Not part of the public API.
|
|
12
|
+
*/
|
|
13
|
+
const SCROLLBAR_SIZE_V = "data-[orientation=vertical]:w-[var(--cue-style-scrollbar-size,var(--cue-space-3))]";
|
|
14
|
+
/** @see SCROLLBAR_SIZE_V */
|
|
15
|
+
const SCROLLBAR_SIZE_H = "data-[orientation=horizontal]:h-[var(--cue-style-scrollbar-size,var(--cue-space-3))]";
|
|
16
|
+
/** @see SCROLLBAR_SIZE_V */
|
|
17
|
+
const SCROLLBAR_THUMB = "bg-[color:var(--cue-style-scrollbar-thumb,var(--cue-border-strong))]";
|
|
18
|
+
//#endregion
|
|
19
|
+
export { SCROLLBAR_SIZE_H, SCROLLBAR_SIZE_V, SCROLLBAR_THUMB };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/system/_style-segment-pad.ts
|
|
2
|
+
/**
|
|
3
|
+
* A tab's and a segment's inline padding at the md step (round 6, spec §11, lane
|
|
4
|
+
* R6.P: `style-segment-pad`), falling back to the `space-4` both drew. coss.com/ui
|
|
5
|
+
* pads both 9px (P182.pad, P173.item-pad).
|
|
6
|
+
*
|
|
7
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
8
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
9
|
+
* reason: one component's tokens per file.
|
|
10
|
+
*
|
|
11
|
+
* @internal Not part of the public API.
|
|
12
|
+
*/
|
|
13
|
+
const SEGMENT_PAD = "px-[var(--cue-style-segment-pad,var(--cue-space-4))]";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SEGMENT_PAD };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/system/_style-skeleton.ts
|
|
2
|
+
/**
|
|
3
|
+
* A skeleton block's corner (round 6, spec §11, lane R6.P: `style-skeleton-radius`),
|
|
4
|
+
* falling back to the `rounded-control` corner it drew. coss.com/ui rounds its
|
|
5
|
+
* skeletons 6px (P177.radius).
|
|
6
|
+
*
|
|
7
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
8
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
9
|
+
* reason: one component's tokens per file.
|
|
10
|
+
*
|
|
11
|
+
* @internal Not part of the public API.
|
|
12
|
+
*/
|
|
13
|
+
const SKELETON_RADIUS = "rounded-[var(--cue-style-skeleton-radius,calc(var(--cue-radius-control)*var(--cue-radius-scale)))]";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SKELETON_RADIUS };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/system/_style-slider.ts
|
|
2
|
+
/**
|
|
3
|
+
* A slider's rail and thumb (round 6, spec §11, lane R6.P): the rail's height and
|
|
4
|
+
* ink (`style-slider-track-height`, `style-slider-track-ink`), falling back to
|
|
5
|
+
* the `h-0.5` and `border` it drew; the thumb's size, fill, rim width and rim
|
|
6
|
+
* ink (`style-slider-thumb-size`, `-fill`, `-rim`, `-edge`), falling back to
|
|
7
|
+
* its 8px `accent` dot with no rim. coss.com/ui draws a 4px rail in its input
|
|
8
|
+
* ink and a 16px (20px on a phone) white thumb in a 1px rim (P178).
|
|
9
|
+
*
|
|
10
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
11
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
12
|
+
* reason: one component's tokens per file.
|
|
13
|
+
*
|
|
14
|
+
* @internal Not part of the public API.
|
|
15
|
+
*/
|
|
16
|
+
const SLIDER_TRACK_HEIGHT = "h-[var(--cue-style-slider-track-height,0.125rem)]";
|
|
17
|
+
/** @see SLIDER_TRACK_HEIGHT */
|
|
18
|
+
const SLIDER_TRACK_INK = "bg-[color:var(--cue-style-slider-track-ink,var(--cue-border))]";
|
|
19
|
+
/** @see SLIDER_TRACK_HEIGHT */
|
|
20
|
+
const SLIDER_THUMB_SIZE = "size-[var(--cue-style-slider-thumb-size,0.5rem)]";
|
|
21
|
+
/** @see SLIDER_TRACK_HEIGHT */
|
|
22
|
+
const SLIDER_THUMB_FILL = "bg-[color:var(--cue-style-slider-thumb-fill,var(--cue-accent))]";
|
|
23
|
+
/** @see SLIDER_TRACK_HEIGHT — a width, so a set that names none draws no rim at all. */
|
|
24
|
+
const SLIDER_THUMB_RIM = "border-solid border-[length:var(--cue-style-slider-thumb-rim,0px)] border-[color:var(--cue-style-slider-thumb-edge,transparent)]";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { SLIDER_THUMB_FILL, SLIDER_THUMB_RIM, SLIDER_THUMB_SIZE, SLIDER_TRACK_HEIGHT, SLIDER_TRACK_INK };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/system/_style-stat.ts
|
|
2
|
+
/**
|
|
3
|
+
* `Stat`'s value, detail and gap (round 6, spec §11, lane R6.T:
|
|
4
|
+
* `style-stat-size`, `-weight`, `-leading`, `-tracking`,
|
|
5
|
+
* `style-stat-detail-size`, `-detail-leading`, `style-stat-gap`).
|
|
6
|
+
*
|
|
7
|
+
* stripe.com sets a stat's value in its xxl text rung (`hds-text--xxl`: 48px,
|
|
8
|
+
* 40px on phones, at 300, 1.0 and 1.07 leading, −0.02em and −0.01em
|
|
9
|
+
* tracking) and its description in its body rung (`hds-text--md`: 16px at
|
|
10
|
+
* 300 and 1.4), 12px apart (`.hds-stat`'s gap), T137. Each reader falls back
|
|
11
|
+
* to the class it replaced: the value's `text-title`, inherited weight,
|
|
12
|
+
* `leading-none` and inherited tracking; the detail's `text-label` and
|
|
13
|
+
* inherited leading; and `space-2` times 1.
|
|
14
|
+
*
|
|
15
|
+
* @internal Not part of the public API.
|
|
16
|
+
*/
|
|
17
|
+
const STAT_SIZE = "text-[length:var(--cue-style-stat-size,var(--cue-text-title))]";
|
|
18
|
+
/** The value's weight. */
|
|
19
|
+
const STAT_WEIGHT = "font-[number:var(--cue-style-stat-weight,inherit)]";
|
|
20
|
+
/** The value's leading. */
|
|
21
|
+
const STAT_LEADING = "leading-[var(--cue-style-stat-leading,1)]";
|
|
22
|
+
/** The value's tracking. */
|
|
23
|
+
const STAT_TRACKING = "tracking-[var(--cue-style-stat-tracking,inherit)]";
|
|
24
|
+
/** The detail's size. */
|
|
25
|
+
const STAT_DETAIL_SIZE = "text-[length:var(--cue-style-stat-detail-size,var(--cue-text-label))]";
|
|
26
|
+
/** The detail's leading. */
|
|
27
|
+
const STAT_DETAIL_LEADING = "leading-[var(--cue-style-stat-detail-leading,inherit)]";
|
|
28
|
+
/** The gap between the label, the value and the detail. */
|
|
29
|
+
const STAT_GAP = "gap-[calc(var(--cue-space-2)*var(--cue-style-stat-gap,1))]";
|
|
30
|
+
//#endregion
|
|
31
|
+
export { STAT_DETAIL_LEADING, STAT_DETAIL_SIZE, STAT_GAP, STAT_LEADING, STAT_SIZE, STAT_TRACKING, STAT_WEIGHT };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/system/_style-stepper.ts
|
|
2
|
+
/**
|
|
3
|
+
* A number field's stepper width at the md step (round 6, spec §11, lane R6.P:
|
|
4
|
+
* `style-stepper-width`), falling back to the square `control-md` box it drew.
|
|
5
|
+
* coss.com/ui's steppers are 38px wide (40px on a phone) beside a 32px field
|
|
6
|
+
* (P165.stepper).
|
|
7
|
+
*
|
|
8
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
9
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
10
|
+
* reason: one component's tokens per file.
|
|
11
|
+
*
|
|
12
|
+
* @internal Not part of the public API.
|
|
13
|
+
*/
|
|
14
|
+
const STEPPER_WIDTH = "w-[var(--cue-style-stepper-width,var(--cue-control-md))]";
|
|
15
|
+
//#endregion
|
|
16
|
+
export { STEPPER_WIDTH };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/system/_style-switch.ts
|
|
2
|
+
/**
|
|
3
|
+
* The switch's thumb (round 6, spec §11, lane R6.T: `style-switch-thumb`,
|
|
4
|
+
* `style-switch-disabled-thumb`).
|
|
5
|
+
*
|
|
6
|
+
* stripe.com's thumb is white in every state (`--hds-color-input-icon-onSolid`),
|
|
7
|
+
* and its disabled thumb is its quiet border ink (`--hds-color-input-icon-disabled`,
|
|
8
|
+
* #d4dee9). Ours was `fg-muted` at rest and `accent-fg` when checked. The one
|
|
9
|
+
* name serves both states, each falling back to what it drew (T146); the
|
|
10
|
+
* disabled thumb reads its own, falling back to the resting state's value.
|
|
11
|
+
*
|
|
12
|
+
* @internal Not part of the public API.
|
|
13
|
+
*/
|
|
14
|
+
const SWITCH_THUMB = "bg-[color:var(--cue-style-switch-thumb,var(--cue-fg-muted))]";
|
|
15
|
+
/** The checked thumb: the same name, falling back to `accent-fg`. */
|
|
16
|
+
const SWITCH_THUMB_CHECKED = "data-[checked]:bg-[color:var(--cue-style-switch-thumb,var(--cue-accent-fg))]";
|
|
17
|
+
/** The disabled thumb, unchecked and checked, each falling back through the thumb's own name to what it drew. */
|
|
18
|
+
const SWITCH_THUMB_DISABLED = "data-[disabled]:bg-[color:var(--cue-style-switch-disabled-thumb,var(--cue-style-switch-thumb,var(--cue-fg-muted)))] data-[disabled]:data-[checked]:bg-[color:var(--cue-style-switch-disabled-thumb,var(--cue-style-switch-thumb,var(--cue-accent-fg)))]";
|
|
19
|
+
/**
|
|
20
|
+
* The switch track's rim (round 6, spec §11, lane R6.P: `style-switch-edge`),
|
|
21
|
+
* falling back to the `border` it drew at rest and the `border-strong` on hover.
|
|
22
|
+
* coss.com/ui's unchecked track draws no rim (P180.track-edge).
|
|
23
|
+
*/
|
|
24
|
+
const SWITCH_EDGE = "border-[color:var(--cue-style-switch-edge,var(--cue-border))] hover:border-[color:var(--cue-style-switch-edge,var(--cue-border-strong))]";
|
|
25
|
+
//#endregion
|
|
26
|
+
export { SWITCH_EDGE, SWITCH_THUMB, SWITCH_THUMB_CHECKED, SWITCH_THUMB_DISABLED };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/system/_style-tab-hover.ts
|
|
2
|
+
/**
|
|
3
|
+
* An idle tab's hover ink (round 6, spec §11, lane R6.P: `style-tab-hover-ink`),
|
|
4
|
+
* falling back to the `fg` it drew. coss.com/ui's idle tabs keep their muted ink
|
|
5
|
+
* under the pointer (P182.hover).
|
|
6
|
+
*
|
|
7
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
8
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
9
|
+
* reason: one component's tokens per file.
|
|
10
|
+
*
|
|
11
|
+
* @internal Not part of the public API.
|
|
12
|
+
*/
|
|
13
|
+
const TAB_HOVER_INK = "hover:text-[color:var(--cue-style-tab-hover-ink,var(--cue-fg))]";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TAB_HOVER_INK };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FOCUS_RING_PAINT } from "./_focus-ring.js";
|
|
2
|
+
//#region src/system/_style-text-focus.ts
|
|
3
|
+
/**
|
|
4
|
+
* The focus ring of a text control — a link, and a disclosure's trigger —
|
|
5
|
+
* with its offset read from the style set (round 6, spec §11, lane R6.T:
|
|
6
|
+
* `style-text-focus-offset`).
|
|
7
|
+
*
|
|
8
|
+
* `_focus-ring.ts`'s fixed shapes are the ring every other site draws; these
|
|
9
|
+
* two compose its width and colour ({@link FOCUS_RING_PAINT}) with an offset
|
|
10
|
+
* a Look may move, as the button chassis does with `style-focus-offset`. Each
|
|
11
|
+
* falls back to the fixed shape it replaces: the disclosure's two pixels in
|
|
12
|
+
* (`FOCUS_RING_INSET_2`, because sections sit inside `overflow-hidden` panels)
|
|
13
|
+
* and the link's two pixels clear (`FOCUS_RING_OFFSET_2`). stripe.com draws
|
|
14
|
+
* both rings 3px clear (`--hds-focus-outline-offset` on `.hds-link` and on the
|
|
15
|
+
* accordion's summary), so tender sets `3px` (T128, T144).
|
|
16
|
+
*
|
|
17
|
+
* A name of its own, not `style-focus-offset`: the source draws its buttons'
|
|
18
|
+
* rings at another offset (`--hds-focus-outline-button-offset`, T50).
|
|
19
|
+
*
|
|
20
|
+
* @internal Not part of the public API.
|
|
21
|
+
*/
|
|
22
|
+
const COLLAPSE_FOCUS_RING = `${FOCUS_RING_PAINT} focus-visible:outline-offset-[var(--cue-style-text-focus-offset,-2px)]`;
|
|
23
|
+
/** A link's focus ring: as {@link COLLAPSE_FOCUS_RING}, falling back to two pixels clear. */
|
|
24
|
+
const LINK_FOCUS_RING = `${FOCUS_RING_PAINT} focus-visible:outline-offset-[var(--cue-style-text-focus-offset,2px)]`;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { COLLAPSE_FOCUS_RING, LINK_FOCUS_RING };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/system/_style-toast.ts
|
|
2
|
+
/**
|
|
3
|
+
* A toast's padding and width (round 6, spec §11, lane R6.P: `style-toast-pad-y`,
|
|
4
|
+
* `style-toast-pad-x`, `style-toast-width`), falling back to the `space-3` block
|
|
5
|
+
* and `space-4` inline-start padding and the 20rem viewport it drew; the
|
|
6
|
+
* inline-end padding keeps its room for the close button. coss.com/ui pads its
|
|
7
|
+
* toast 12px by 14px and sets it 360px wide (P184.pad, P184.pad-inline,
|
|
8
|
+
* P184.width).
|
|
9
|
+
*
|
|
10
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
11
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
12
|
+
* reason: one component's tokens per file.
|
|
13
|
+
*
|
|
14
|
+
* @internal Not part of the public API.
|
|
15
|
+
*/
|
|
16
|
+
const TOAST_PAD_Y = "py-[var(--cue-style-toast-pad-y,var(--cue-space-3))]";
|
|
17
|
+
/** @see TOAST_PAD_Y */
|
|
18
|
+
const TOAST_PAD_X = "pl-[var(--cue-style-toast-pad-x,var(--cue-space-4))]";
|
|
19
|
+
/** @see TOAST_PAD_Y */
|
|
20
|
+
const TOAST_WIDTH = "w-[var(--cue-style-toast-width,20rem)]";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { TOAST_PAD_X, TOAST_PAD_Y, TOAST_WIDTH };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/system/_style-toggle.ts
|
|
2
|
+
/**
|
|
3
|
+
* `Toggle` — and so `ToggleGroup`'s items — at rest and pressed (round 6, spec
|
|
4
|
+
* §11, lane R6.T: `style-toggle-edge`, `style-toggle-ink`,
|
|
5
|
+
* `style-toggle-pressed-ground`, `style-toggle-pressed-edge`).
|
|
6
|
+
*
|
|
7
|
+
* stripe.com's select tiles (`.hds-select-tile`, one of N options drawn as
|
|
8
|
+
* tiles) stand in its field edge at rest (`--hds-color-input-border-default`)
|
|
9
|
+
* with its field text ink (`--hds-color-input-text-solid`), and a selected
|
|
10
|
+
* tile fills with a 12% lilac and edges in its brand-400 (T155). Ours drew a
|
|
11
|
+
* transparent edge in `fg-muted`, and `accent-soft` with no edge when
|
|
12
|
+
* pressed. Each reader falls back to the class it replaced.
|
|
13
|
+
*
|
|
14
|
+
* @internal Not part of the public API.
|
|
15
|
+
*/
|
|
16
|
+
const TOGGLE_EDGE = "border-[color:var(--cue-style-toggle-edge,transparent)]";
|
|
17
|
+
/** A toggle's resting ink. */
|
|
18
|
+
const TOGGLE_INK = "text-[color:var(--cue-style-toggle-ink,var(--cue-fg-muted))]";
|
|
19
|
+
/** A pressed toggle's ground. */
|
|
20
|
+
const TOGGLE_PRESSED_GROUND = "data-[pressed]:bg-[color:var(--cue-style-toggle-pressed-ground,var(--cue-accent-soft))]";
|
|
21
|
+
/** A pressed toggle's edge. */
|
|
22
|
+
const TOGGLE_PRESSED_EDGE = "data-[pressed]:border-[color:var(--cue-style-toggle-pressed-edge,transparent)]";
|
|
23
|
+
/**
|
|
24
|
+
* A pressed toggle's ink (round 6, spec §11, lane R6.K: `style-toggle-pressed-ink`),
|
|
25
|
+
* falling back to the `accent` it drew. replit.com's pressed filter pill is
|
|
26
|
+
* white on an ink fill (K148).
|
|
27
|
+
*/
|
|
28
|
+
const TOGGLE_PRESSED_INK = "data-[pressed]:text-[color:var(--cue-style-toggle-pressed-ink,var(--cue-accent))]";
|
|
29
|
+
/**
|
|
30
|
+
* The hover state (lanes R6.T and R6.K: `style-toggle-hover-edge`, `-hover-ground`,
|
|
31
|
+
* `-hover-ink`). replit.com's filter pills hover by darkening their edge alone
|
|
32
|
+
* (#d8d5cf to #a8a49d), keeping a transparent ground and their resting ink,
|
|
33
|
+
* where ours filled `surface-2` and inked `fg` (K148). Each falls back to what
|
|
34
|
+
* the toggle drew under the pointer: its resting edge (through `style-toggle-edge`),
|
|
35
|
+
* `surface-2` and `fg`.
|
|
36
|
+
*/
|
|
37
|
+
const TOGGLE_HOVER_EDGE = "hover:border-[color:var(--cue-style-toggle-hover-edge,var(--cue-style-toggle-edge,transparent))]";
|
|
38
|
+
/** @see TOGGLE_HOVER_EDGE */
|
|
39
|
+
const TOGGLE_HOVER_GROUND = "hover:bg-[color:var(--cue-style-toggle-hover-ground,var(--cue-surface-2))]";
|
|
40
|
+
/** @see TOGGLE_HOVER_EDGE */
|
|
41
|
+
const TOGGLE_HOVER_INK = "hover:text-[color:var(--cue-style-toggle-hover-ink,var(--cue-fg))]";
|
|
42
|
+
/**
|
|
43
|
+
* A disabled toggle's ink and edge, through the disabled names every control reads
|
|
44
|
+
* (`style-disabled-ink`, `style-disabled-edge`), each falling back to the toggle's own resting value;
|
|
45
|
+
* the fade reads `style-disabled-opacity` as the other controls' does. stripe.com's disabled tile
|
|
46
|
+
* pales its ink and draws its disabled border (T155.disabled, T155.disabled-edge).
|
|
47
|
+
*/
|
|
48
|
+
const TOGGLE_DISABLED = "data-[disabled]:text-[color:var(--cue-style-disabled-ink,var(--cue-style-toggle-ink,var(--cue-fg-muted)))] data-[disabled]:border-[color:var(--cue-style-disabled-edge,var(--cue-style-toggle-edge,transparent))]";
|
|
49
|
+
//#endregion
|
|
50
|
+
export { TOGGLE_DISABLED, TOGGLE_EDGE, TOGGLE_HOVER_EDGE, TOGGLE_HOVER_GROUND, TOGGLE_HOVER_INK, TOGGLE_INK, TOGGLE_PRESSED_EDGE, TOGGLE_PRESSED_GROUND, TOGGLE_PRESSED_INK };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/system/_style-toolbar.ts
|
|
2
|
+
/**
|
|
3
|
+
* The toolbar as a framed bar (round 6, spec §11, lane R6.P): its rim on the sides
|
|
4
|
+
* it did not draw (`style-toolbar-rim`, a width, falling back to `0px`, so the
|
|
5
|
+
* bar keeps only its bottom rule) and the rim's ink (`style-toolbar-edge`,
|
|
6
|
+
* falling back to `border`); its corner, padding, height and gap
|
|
7
|
+
* (`style-toolbar-radius`, `-pad`, `-height`, `-gap`), falling back to the
|
|
8
|
+
* square, inline-padded, `chrome-toolbar`-tall strip it drew; and a separator's
|
|
9
|
+
* height (`style-toolbar-separator-height`), falling back to `60%`. coss.com/ui
|
|
10
|
+
* draws its toolbar as a 14px-rounded bar in a 1px rim, 4px in, its groups 8px
|
|
11
|
+
* apart and its separators 20px tall (P185).
|
|
12
|
+
*
|
|
13
|
+
* **Optional** (spec §3.0): each name is declared by `porcelain` alone and each
|
|
14
|
+
* reader falls back to what the component drew. Its own module for docgen's
|
|
15
|
+
* reason: one component's tokens per file.
|
|
16
|
+
*
|
|
17
|
+
* @internal Not part of the public API.
|
|
18
|
+
*/
|
|
19
|
+
const TOOLBAR_FRAME = "border-t-[length:var(--cue-style-toolbar-rim,0px)] border-x-[length:var(--cue-style-toolbar-rim,0px)] border-[color:var(--cue-style-toolbar-edge,var(--cue-border))] rounded-[var(--cue-style-toolbar-radius,0px)] p-[var(--cue-style-toolbar-pad,0_var(--cue-pad-row-x))] h-[var(--cue-style-toolbar-height,var(--cue-chrome-toolbar))] gap-[var(--cue-style-toolbar-gap,var(--cue-space-2))]";
|
|
20
|
+
/** @see TOOLBAR_FRAME */
|
|
21
|
+
const TOOLBAR_SEPARATOR_HEIGHT = "data-[orientation=vertical]:h-[var(--cue-style-toolbar-separator-height,60%)]";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { TOOLBAR_FRAME, TOOLBAR_SEPARATOR_HEIGHT };
|
|
@@ -13,5 +13,34 @@
|
|
|
13
13
|
const TOOLTIP_SIZE = "text-[length:var(--cue-style-help-size,var(--cue-text-label))]";
|
|
14
14
|
/** @see TOOLTIP_SIZE */
|
|
15
15
|
const TOOLTIP_PAD = "p-[var(--cue-style-tooltip-pad,var(--cue-space-2)_var(--cue-space-3))]";
|
|
16
|
+
/**
|
|
17
|
+
* The tooltip's tracking (round 6, spec §11, lane R6.T: `style-tooltip-tracking`),
|
|
18
|
+
* falling back to the `inherit` it drew (no tracking class of its own).
|
|
19
|
+
* stripe.com's tooltip sets 0.2px on its 15px text, 0.0133em (T131).
|
|
20
|
+
*/
|
|
21
|
+
const TOOLTIP_TRACKING = "tracking-[var(--cue-style-tooltip-tracking,inherit)]";
|
|
22
|
+
/**
|
|
23
|
+
* The tooltip's corner (round 6, spec §11, lane R6.T: `style-tooltip-radius`), falling back to the
|
|
24
|
+
* overlay corner it drew. stripe.com's overlays take three corners — its dialog 16px, its select
|
|
25
|
+
* popover 4px (which `radius-overlay` follows), its tooltip 8px (T131.radius) — and the dialog already
|
|
26
|
+
* has `style-dialog-radius`. Scaled by `radius-scale` as the dialog's is: `rounded-overlay` is
|
|
27
|
+
* `calc(var(--cue-radius-overlay) * var(--cue-radius-scale))`, and a reader without the scale drew
|
|
28
|
+
* 6px where the tooltip drew 4.5px at ultra-compact (the closing pass's adversarial review).
|
|
29
|
+
*/
|
|
30
|
+
const TOOLTIP_RADIUS = "rounded-[calc(var(--cue-style-tooltip-radius,var(--cue-radius-overlay))*var(--cue-radius-scale))]";
|
|
31
|
+
/**
|
|
32
|
+
* The tooltip's face (round 6, spec §11, lane R6.Z: `style-tooltip-face`),
|
|
33
|
+
* falling back through the control face to the mono it drew. greptile.com's
|
|
34
|
+
* seat tooltip is Space Mono beside its DM Sans buttons (Z115).
|
|
35
|
+
*/
|
|
36
|
+
const TOOLTIP_FACE = "font-[family-name:var(--cue-style-tooltip-face,var(--cue-style-control-face,var(--cue-font-mono)))]";
|
|
37
|
+
/** The tooltip's ink (`style-tooltip-ink`), falling back to the `fg` it drew; greptile.com's is slate (Z115). */
|
|
38
|
+
const TOOLTIP_INK = "text-[color:var(--cue-style-tooltip-ink,var(--cue-fg))]";
|
|
39
|
+
/**
|
|
40
|
+
* The tooltip's leading (`style-tooltip-leading`), falling back through the
|
|
41
|
+
* body leading to the `leading-ui` it drew (`BODY_LEADING`). greptile.com's
|
|
42
|
+
* tooltip sets a 20px line on 10px type (Z115).
|
|
43
|
+
*/
|
|
44
|
+
const TOOLTIP_LEADING = "leading-[var(--cue-style-tooltip-leading,var(--cue-style-body-leading,var(--cue-leading-ui)))]";
|
|
16
45
|
//#endregion
|
|
17
|
-
export { TOOLTIP_PAD, TOOLTIP_SIZE };
|
|
46
|
+
export { TOOLTIP_FACE, TOOLTIP_INK, TOOLTIP_LEADING, TOOLTIP_PAD, TOOLTIP_RADIUS, TOOLTIP_SIZE, TOOLTIP_TRACKING };
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
{
|
|
40
40
|
"name": "Item",
|
|
41
41
|
"usage": "Accordion.Item",
|
|
42
|
-
"description": "One section.\n\nSeparation is a hairline the section draws above itself, dropped on the first\none — so a stack shows rules *between* sections and none against the rim of\nwhatever contains them. Same rule as `Row`, for the same reason.",
|
|
42
|
+
"description": "One section.\n\nSeparation is a hairline the section draws above itself, dropped on the first\none — so a stack shows rules *between* sections and none against the rim of\nwhatever contains them. Same rule as `Row`, for the same reason. Its line\nstyle is the style set's (`style-accordion-rule-style`), solid by default,\nand so is its ink (`style-accordion-rule-ink`, round 6 lane R6.Z), `border`\nby default.",
|
|
43
43
|
"props": [
|
|
44
44
|
{
|
|
45
45
|
"name": "className",
|
|
@@ -144,11 +144,32 @@
|
|
|
144
144
|
"--cue-space-1",
|
|
145
145
|
"--cue-space-3",
|
|
146
146
|
"--cue-space-4",
|
|
147
|
+
"--cue-style-accordion-rule-ink",
|
|
148
|
+
"--cue-style-accordion-rule-style",
|
|
149
|
+
"--cue-style-body-face",
|
|
150
|
+
"--cue-style-collapse-body-ink",
|
|
151
|
+
"--cue-style-collapse-body-leading",
|
|
152
|
+
"--cue-style-collapse-body-pad",
|
|
153
|
+
"--cue-style-collapse-body-size",
|
|
154
|
+
"--cue-style-collapse-body-tracking",
|
|
155
|
+
"--cue-style-collapse-caret-ink",
|
|
156
|
+
"--cue-style-collapse-caret-opacity",
|
|
157
|
+
"--cue-style-collapse-caret-size",
|
|
158
|
+
"--cue-style-collapse-gap",
|
|
147
159
|
"--cue-style-collapse-height",
|
|
160
|
+
"--cue-style-collapse-hover-ground",
|
|
161
|
+
"--cue-style-collapse-hover-ink",
|
|
162
|
+
"--cue-style-collapse-leading",
|
|
163
|
+
"--cue-style-collapse-open-ink",
|
|
164
|
+
"--cue-style-collapse-pad",
|
|
165
|
+
"--cue-style-collapse-radius",
|
|
166
|
+
"--cue-style-collapse-size",
|
|
167
|
+
"--cue-style-collapse-weight",
|
|
148
168
|
"--cue-style-control-face",
|
|
149
169
|
"--cue-style-focus-width",
|
|
150
170
|
"--cue-style-label-weight",
|
|
151
171
|
"--cue-style-quiet-ink",
|
|
172
|
+
"--cue-style-text-focus-offset",
|
|
152
173
|
"--cue-text-ui"
|
|
153
174
|
],
|
|
154
175
|
"summary": "A stack of sections, one or several open at a time.",
|
|
@@ -200,7 +200,11 @@
|
|
|
200
200
|
"--cue-style-body-size",
|
|
201
201
|
"--cue-style-body-weight",
|
|
202
202
|
"--cue-style-control-face",
|
|
203
|
+
"--cue-style-dialog-radius",
|
|
203
204
|
"--cue-style-display-variation",
|
|
205
|
+
"--cue-style-group-label-ink",
|
|
206
|
+
"--cue-style-group-label-pad",
|
|
207
|
+
"--cue-style-group-label-size",
|
|
204
208
|
"--cue-style-heading-ink",
|
|
205
209
|
"--cue-style-label-case",
|
|
206
210
|
"--cue-style-label-face",
|
|
@@ -210,10 +214,13 @@
|
|
|
210
214
|
"--cue-style-label-weight",
|
|
211
215
|
"--cue-style-menu-highlight",
|
|
212
216
|
"--cue-style-menu-item-radius",
|
|
217
|
+
"--cue-style-menu-min-width",
|
|
218
|
+
"--cue-style-menu-separator-inset",
|
|
213
219
|
"--cue-style-overlay-ground",
|
|
214
220
|
"--cue-style-overlay-title-leading",
|
|
215
221
|
"--cue-style-overlay-title-size",
|
|
216
222
|
"--cue-style-quiet-ink",
|
|
223
|
+
"--cue-style-row-disabled-opacity",
|
|
217
224
|
"--cue-style-title-face",
|
|
218
225
|
"--cue-style-title-weight",
|
|
219
226
|
"--cue-surface-2",
|