@thewhatmatters/wmds 0.4.27 → 0.4.28
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 +50 -0
- package/CONSUMING.md +62 -1
- package/bin/wmds-check.mjs +47 -0
- package/dist/colors.css +92 -0
- package/dist/components/atoms/Badge/badgeStyles.js +6 -6
- package/dist/components/atoms/Band/Band.d.ts +27 -0
- package/dist/components/atoms/Band/Band.d.ts.map +1 -0
- package/dist/components/atoms/Band/Band.js +22 -0
- package/dist/components/atoms/Band/bandStyles.d.ts +20 -0
- package/dist/components/atoms/Band/bandStyles.d.ts.map +1 -0
- package/dist/components/atoms/Band/bandStyles.js +23 -0
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.js +12 -5
- package/dist/components/atoms/Button/buttonStyles.d.ts +1 -1
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStyles.js +2 -2
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +69 -68
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.js +1 -1
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/IconButton.js +13 -12
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +2 -2
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/iconButtonStyles.js +1 -1
- package/dist/components/atoms/InlinePill/InlinePill.d.ts +42 -0
- package/dist/components/atoms/InlinePill/InlinePill.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/InlinePill.js +48 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts +27 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.js +19 -0
- package/dist/components/atoms/Input/Input.d.ts +6 -3
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.d.ts +1 -1
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.js +3 -3
- package/dist/components/atoms/Skeleton/skeletonStyles.js +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +45 -44
- package/dist/components/atoms/Switch/switchStyles.d.ts +1 -1
- package/dist/components/atoms/Switch/switchStyles.d.ts.map +1 -1
- package/dist/components/atoms/Switch/switchStyles.js +1 -1
- package/dist/components/atoms/TextArea/textareaShellStyles.js +3 -3
- package/dist/components/molecules/Accordion/accordionStyles.d.ts +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.js +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +80 -122
- package/dist/components/molecules/Card/cardStyles.js +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts.map +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.js +1 -1
- package/dist/components/molecules/Chip/chipStyles.js +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js +30 -27
- package/dist/components/molecules/Dropdown/dropdownStyles.js +1 -1
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts +14 -0
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts.map +1 -0
- package/dist/components/{organisms/Tab/tabOverflow.js → molecules/Dropdown/resolveOverflow.js} +2 -2
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts +70 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.js +155 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts +71 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.js +61 -0
- package/dist/components/molecules/Field/Field.d.ts.map +1 -1
- package/dist/components/molecules/Field/Field.js +11 -10
- package/dist/components/molecules/LogView/logViewStyles.d.ts +1 -1
- package/dist/components/molecules/LogView/logViewStyles.d.ts.map +1 -1
- package/dist/components/molecules/LogView/logViewStyles.js +1 -1
- package/dist/components/molecules/PillGroup/pillGroupStyles.js +1 -1
- package/dist/components/molecules/Search/searchStyles.js +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +3 -3
- package/dist/components/molecules/Select/Select.d.ts +3 -1
- package/dist/components/molecules/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.js +75 -119
- package/dist/components/molecules/Select/selectStyles.js +3 -3
- package/dist/components/molecules/Stat/statStyles.d.ts +1 -1
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
- package/dist/components/molecules/Stat/statStyles.js +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.d.ts.map +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.js +35 -35
- package/dist/components/organisms/AppShell/AppShell.d.ts +2 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/AppShell.js +138 -129
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +2 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/appShellStyles.js +2 -2
- package/dist/components/organisms/Dialog/AlertDialog.d.ts +7 -1
- package/dist/components/organisms/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/AlertDialog.js +54 -50
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +52 -71
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +14 -1
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/dialogStyles.js +3 -3
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts.map +1 -1
- package/dist/components/organisms/FilterPanel/FilterPanel.js +52 -42
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +6 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.js +54 -66
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/components/organisms/MoreMenu/MoreMenu.js +45 -101
- package/dist/components/organisms/Panel/Panel.d.ts.map +1 -1
- package/dist/components/organisms/Panel/Panel.js +44 -53
- package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +69 -90
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +0 -9
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +236 -286
- package/dist/components/organisms/SiteNav/siteNavStyles.js +1 -1
- package/dist/components/organisms/Tab/Tab.d.ts.map +1 -1
- package/dist/components/organisms/Tab/Tab.js +77 -127
- package/dist/components/organisms/Tab/tabStyles.d.ts +2 -1
- package/dist/components/organisms/Tab/tabStyles.d.ts.map +1 -1
- package/dist/components/organisms/Tab/tabStyles.js +2 -2
- package/dist/fonts.css +10 -0
- package/dist/grid.css +38 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -131
- package/dist/lib/contrast.d.ts +11 -0
- package/dist/lib/contrast.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.d.ts +27 -1
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +87 -25
- package/dist/lib/typography.d.ts +1 -1
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/shape.css +24 -3
- package/dist/styles.css +1 -1
- package/dist/typography.css +55 -8
- package/docs/components.md +4 -2
- package/docs/exports.json +55 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +39 -0
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
- package/docs/patterns/components-copyfield--copied.tsx +1 -1
- package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
- package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +54 -0
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +1 -1
- package/docs/patterns/components-logview--log-viewer.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
- package/docs/patterns/components-table--approvals.tsx +1 -1
- package/docs/patterns/components-table--basic.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +17 -1
- package/package.json +1 -1
- package/dist/components/organisms/Tab/tabOverflow.d.ts +0 -14
- package/dist/components/organisms/Tab/tabOverflow.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,56 @@ Every release of `@thewhatmatters/wmds` is listed here, newest first.
|
|
|
7
7
|
- **Pasted patterns:** when a release changes a **Pattern — …** story's Show code, it is named under Consumer actions so apps re-copy it.
|
|
8
8
|
- **How to add an entry** (contributors): add your change to the top entry. If that version is already on npm (`npm view @thewhatmatters/wmds versions`), start a new entry above it and bump `version` in `package.json` to match. `npm run check:changelog` enforces the format.
|
|
9
9
|
|
|
10
|
+
## 0.4.28
|
|
11
|
+
|
|
12
|
+
**AlertDialog takes a body, Input takes a rich label, and dialogs get a roomier edge.**
|
|
13
|
+
|
|
14
|
+
- **InlinePill** (new): a pill that sits inside running text and scales with it (em-sized), with an optional picture on its left held in the pill's padding so it never parts from its word. `useInlinePillsPopIn()` pops the pictures in one after another when the text scrolls into view, on the WMDS motion tokens; nothing under reduced motion. Not a control: `Chip` and `Badge` stay UI-sized. Story **Components/InlinePill**, with a 390px long-word test.
|
|
15
|
+
- **AlertDialog** `children` (new) — content between the description and the actions, such as a typed-confirmation **Input**. It renders outside the description `<p>`, so `aria-describedby` still names the description alone. Cancel still takes initial focus. Without `children` the markup is unchanged.
|
|
16
|
+
- **Input** `label` is now `ReactNode` (was `string`), so a label can read "Type **@handle** to confirm". The `<label htmlFor>` association is unchanged, and the whole label is the field's accessible name. A string label behaves as before.
|
|
17
|
+
- **Pattern — alert dialog (typed confirmation delete)** is new on **Components/Dialog**: Delete stays off until the typed value matches the handle (a leading `@`, case, and surrounding spaces are ignored), and the field clears on reopen. **Pattern — rich label** is new on **Components/Input**.
|
|
18
|
+
- New interaction test **Internal/Interactions/Overlay → AlertDialog — typed confirmation**.
|
|
19
|
+
- **Dialog** and **AlertDialog** edge inset is **24px** on every side, phones included (was 16px): header, body, and footer share the same horizontal inset, and the panel's top and bottom are 24px. A pill action now clears the 16px panel radius instead of sitting in the corner. **Sheet**, **Panel**, and **Card** keep their 16px layout. `dialogStyles` adds `dialogPanelInsetXClasses`, `dialogHeaderInsetTopClasses`, `dialogFooterInsetBottomClasses`.
|
|
20
|
+
- **Dialog**, **Sheet**, and **IntakeModal** scroll lock no longer leaves a pale strip at the trailing edge on platforms with classic scrollbars: `html { scrollbar-gutter: stable }` kept that strip after the body stopped scrolling, and the fixed scrim cannot paint into it. While a modal is open the gutter is released and the body takes its width as `padding-right`, so the page behind does not move and the scrim reaches the edge.
|
|
21
|
+
- **Loading keeps keyboard focus.** **Button** `status="loading"` (and `"error"` with `disableOnError`), **IconButton** `loading`, **Checkbox** `loading`, and **Switch** `loading` set `aria-disabled` and ignore presses instead of setting native `disabled`, which dropped focus to `<body>` mid-submit. `disabled` still sets native `disabled`. **FilterPanel** Clear all moves focus to the first group (rail) or the results button (Sheet) as it disables itself. New interaction test **Internal/Interactions/Button → a loading button keeps keyboard focus and ignores presses**.
|
|
22
|
+
- **Field** `description` now reaches the control: Field appends its description id to the single child's `aria-describedby` (keeping the child's own ids) instead of setting it on the wrapper `<div>`, where screen readers ignored it. A multi-control Field keeps it on its `role="group"`. **Select** takes `aria-describedby` (new) and joins it with its own `description`. New interaction test **Internal/Interactions/Form controls → Field — description describes the control**.
|
|
23
|
+
- **AlertDialog** (and **Dialog** with `dismissOnBackdrop={false}`): a press on the scrim no longer moves focus to `<body>`, where the next Tab left the dialog. The interaction test **AlertDialog — confirm and cancel** now presses the scrim and checks focus stays inside.
|
|
24
|
+
- **AppShell** has a skip link (new): the first Tab shows "Skip to content" over the top-start corner, and Enter moves focus to `<main>` without changing the URL. `labels.skipToContent` (new) words it. New interaction test **Internal/Interactions/AppShell → the first Tab reaches a skip link that moves focus to the page**.
|
|
25
|
+
- **SiteNav**: while the compact bar is pinned (`placement="fixed"` or a `scrollContainer`), the page (or that container) gets `scroll-padding-top` of `--site-nav-height` plus 16px, so an element focused with Tab scrolls into view below the bar instead of under it. The previous value comes back when the bar unpins or unmounts. New interaction test **Internal/Interactions/SiteNav → pinned compact bar keeps focused elements out from under it**.
|
|
26
|
+
- **Dialog**, **Sheet**, **IntakeModal**, and **Panel** share one open/close lifecycle (`useOverlayLifecycle` in `lib/dialogOverlay`, internal). What changes for users:
|
|
27
|
+
- **Escape closes only the topmost overlay**, so an AlertDialog over a Sheet no longer closes both. An Escape that a control inside already handled (`defaultPrevented`) is left alone.
|
|
28
|
+
- **Dialog** and **IntakeModal** make the page behind inert, as **Sheet** already did, so a screen reader's virtual cursor stays in the modal.
|
|
29
|
+
- **Panel** moves focus into itself on open (its first control).
|
|
30
|
+
- On close, focus returns to the opener only if it is still in the page and focus has not moved on elsewhere; otherwise it goes to `<main>`. This was Sheet-only before.
|
|
31
|
+
- Stacked modals share one scroll lock, so the page scrolls again however they close (closing them out of order used to leave it locked).
|
|
32
|
+
- New interaction tests in **Internal/Interactions/Overlay lifecycle** cover the shared lifecycle and each of the four overlays.
|
|
33
|
+
- **IntakeModal** `dismissOnEscape` (new, default `true`): set `false` so Escape cannot drop typed answers.
|
|
34
|
+
- **Menus share one behaviour** (`useDropdownMenu`, internal, in the Dropdown folder). **Select**, **MoreMenu**, and **Breadcrumb**'s "…" menu:
|
|
35
|
+
- **Escape** closes only the menu and returns focus to its trigger, so a menu inside a **Dialog** or **Sheet** no longer closes the overlay too. An Escape during IME composition is ignored by menus and overlays.
|
|
36
|
+
- **Tab** closes the menu. A press outside closes it (`pointerdown`, so touch works too). Scroll and resize keep it attached to its trigger.
|
|
37
|
+
- **Keyboard:** ArrowDown/ArrowUp, Home/End, and type-ahead; disabled rows are skipped.
|
|
38
|
+
- **Screen readers hear the active row.** **Select**'s trigger is a select-only `combobox` naming the active option with `aria-activedescendant`. **MoreMenu** and Breadcrumb move real focus onto the rows; Space chooses a row like Enter does.
|
|
39
|
+
- **Tab** and **SiteNav** More menus use it too, through one overflow module (`useOverflowMenu`) that owns measuring, the fit, and the More menu. SiteNav no longer reaches into Tab. More menus now follow their trigger on scroll instead of closing, and stop listening for Escape on the whole page.
|
|
40
|
+
- **SiteNav** More rows are real links (`<a href>`), so Cmd-click and middle-click open a new tab.
|
|
41
|
+
- **Tab**: More now sits beside the `tablist` instead of inside it (a `tablist` may only own tabs), which clears the accessibility violations its overflow stories were waiving.
|
|
42
|
+
- New interaction tests in **Internal/Interactions/Menus** cover the shared behaviour and all five menus, including a Select and a MoreMenu inside a **Dialog** and a Breadcrumb inside a **Sheet**, where Escape closes the menu and leaves the overlay open.
|
|
43
|
+
- **Dropdown.Item** forwards its ref. A row that is both active and selected now shows the active fill, so focus is visible on it.
|
|
44
|
+
- **Theme** sets `color-scheme` (new): `light` on `:root` and `dark` under `[data-theme="dark"]`, so native scrollbars, form controls, and autofill follow the theme instead of staying light in dark mode.
|
|
45
|
+
- **`docs/exports.json`** now lists all 41 lib helpers `src/index.ts` exports (was 12). Nothing was added to or removed from the package. `npm run validate:manifest` now also fails when `src/index.ts` exports a lib helper the manifest does not list.
|
|
46
|
+
|
|
47
|
+
- **Brand kit (new).** A client's brand is now a short `brand.css` of allow-listed knobs (**CONSUMING.md → Brand kit**):
|
|
48
|
+
- **Type:** `--font-display` (every `type-display-*` step; unset follows `--font-family-heading`), `--font-display-weight`, `--font-display-tracking`, `--font-display-case`, and a `--font-serif` slot. `--font-family-heading` is now allow-listed too. With none set, type renders as before.
|
|
49
|
+
- **New display steps:** `type-display-hero` (fluid to 16vw, `--text-display-hero-size` knob) and `type-display-xl` (44px → 136px), both with tight leading and safe word breaks on phones.
|
|
50
|
+
- **Section colours:** `--color-brand-surface` / `--color-on-brand-surface` (default: the navy) and `--color-field` / `--color-on-field` (default: the primary), each with an optional `-muted` step.
|
|
51
|
+
- **Band (new component):** `tone` `default` / `inverse` / `field` sets `data-tone`, which remaps surface, text, border, fill and focus roles so every component inside re-skins. It holds its own `grid-page`; inside a `grid-page` it bleeds to the viewport edges (no horizontal scrollbar) and keeps the page's columns. `spacing` `md` / `lg` / `none`. New stories **Components/Band → Pattern — page in bands** and **Foundations/Brand kit → Theme a client** (the offer-sheet values with a contrast table); new interaction tests **Internal/Interactions/Band**.
|
|
52
|
+
- **wmds-check** `brand-contrast` (new, error): fails an on-colour or muted step under 4.5:1 on its colour, for primary, brand surface and field, when both are hex in the same CSS rule. It now reads the app's `.css` files.
|
|
53
|
+
- **TextSequence** word masks reach 0.08em above and to the sides of each word, so tall caps on tight display leading and outline strokes aren't clipped. Layout is unchanged.
|
|
54
|
+
- **Design knobs for shape (new).** `--radius-control` (default pill) and `--radius-surface` (default 16px) reshape every control and surface. Set them on `:root`, or on a wrapper with Tailwind (`[--radius-control:4px]`), for rectangular buttons, inputs, selects, chips, badges and tabs, and squarer cards and menus. Avatars, dots, spinners, radios, switches and progress bars stay round. Defaults are unchanged: every component renders as before. **CONSUMING.md → Design knobs**; new story **Foundations/Shape → Design knobs — rectangular controls**; new interaction test **Internal/Interactions/Shape**.
|
|
55
|
+
|
|
56
|
+
### Consumer actions
|
|
57
|
+
|
|
58
|
+
None. To ask for a typed confirmation, pass an **Input** as `children` of **AlertDialog** and set `confirmDisabled` until the value matches. Copy **Components/Dialog → Pattern — alert dialog (typed confirmation delete)**. A **Dialog** or **AlertDialog** is 16px wider on each side's content inset and 16px taller (8px top, 8px bottom); check the narrowest phone width. No `className` change is needed. `npx wmds-check` now reads your `.css` files: if `brand-contrast` fails on an existing `--color-on-primary`, pick an ink that clears 4.5:1 (or mark a deliberate exception with `/* wmds-check-ignore brand-contrast <reason> */` on the line above). To carry a client's type and section colours, see **CONSUMING.md → Brand kit** and replace hand-rolled section colours with **Band** `tone`.
|
|
59
|
+
|
|
10
60
|
## 0.4.27
|
|
11
61
|
|
|
12
62
|
**An opt-in counter for the Carousel.**
|
package/CONSUMING.md
CHANGED
|
@@ -316,6 +316,67 @@ Browse [lucide.dev/icons](https://lucide.dev/icons/).
|
|
|
316
316
|
|
|
317
317
|
## Customization
|
|
318
318
|
|
|
319
|
+
### Design knobs (shape)
|
|
320
|
+
|
|
321
|
+
A site whose design isn't WMDS's default shape (rectangular buttons instead of pills, squarer cards) changes it with **design knobs**: allow-listed CSS variables that every component reads. Don't restyle components with `className`. A knob reshapes every component inside the element it's set on, and keeps focus rings, hit areas and nested radii consistent.
|
|
322
|
+
|
|
323
|
+
| Knob | Default | Reshapes |
|
|
324
|
+
|------|---------|----------|
|
|
325
|
+
| `--radius-control` | pill | Button, IconButton, Input, Search, Select, Chip, PillGroup, Badge, SegmentedControl, Tab, the compact SiteNav bar. Multi-line controls (TextArea, NavList rows) use 12px or the knob, whichever is smaller. |
|
|
326
|
+
| `--radius-surface` | `16px` | Card layout shells and occupants, Dropdown menus, Toast, ChatQa, Carousel. Smaller surfaces scale with it: Stat, LogView and Skeleton at ¾ (12px), a padded Card at ½ (8px). |
|
|
327
|
+
|
|
328
|
+
Avatars, status dots, spinners, radios, switches, progress bars and chart marks stay round.
|
|
329
|
+
|
|
330
|
+
Set knobs for the whole app on `:root` in `brand.css` (below), or for one page or section with a Tailwind arbitrary property on a plain wrapper:
|
|
331
|
+
|
|
332
|
+
```tsx
|
|
333
|
+
<main className="grid-page [--radius-control:4px] [--radius-surface:6px]">…</main>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Derived radii (`--radius-control-inner`, `--radius-control-box`, `--radius-surface-md`, `--radius-surface-sm`, `--radius-card-shell`, `--radius-card-body`) follow the knobs; don't set them. See **Foundations → Shape → Design knobs — rectangular controls**.
|
|
337
|
+
|
|
338
|
+
### Brand kit (type and section colours)
|
|
339
|
+
|
|
340
|
+
A client's brand on WMDS is a short `brand.css` (imported after `styles.css`, unlayered) that sets **allow-listed** knobs. Each knob is read by every component that needs it; nothing else is overridable, so contrast and layout stay guaranteed.
|
|
341
|
+
|
|
342
|
+
| Knob | Default | Reads it |
|
|
343
|
+
|------|---------|----------|
|
|
344
|
+
| `--font-family-heading` | Geist | `type-heading-*`, and every display step when `--font-display` is unset |
|
|
345
|
+
| `--font-display` | unset (the heading face) | every `type-display-*` step (`hero`, `xl`, `1`, `2`, `3`) |
|
|
346
|
+
| `--font-display-weight` | each step's own (700 / 600) | display steps: set `400` for a one-weight face, so nothing is faux-bolded |
|
|
347
|
+
| `--font-display-tracking` | each step's own | display steps: `0` for a condensed face |
|
|
348
|
+
| `--font-display-case` | unset | display steps: `uppercase` for a face set in capitals (the accessible name stays the written text) |
|
|
349
|
+
| `--font-serif` | system serif | a slot: point `--font-display` or `--font-family-heading` at `var(--font-serif)` |
|
|
350
|
+
| `--text-display-hero-size` | `clamp(3.5rem, 16vw, 16rem)` | `type-display-hero` (a condensed face carries more vw) |
|
|
351
|
+
| `--color-brand-surface` / `--color-on-brand-surface` | the navy / white | **Band** `tone="inverse"` |
|
|
352
|
+
| `--color-on-brand-surface-muted` | 72% of the ink on the surface | secondary text on `inverse` |
|
|
353
|
+
| `--color-field` / `--color-on-field` | the primary pair | **Band** `tone="field"` |
|
|
354
|
+
| `--color-on-field-muted` | the ink itself | secondary text on `field` |
|
|
355
|
+
|
|
356
|
+
The font knobs also work on a section wrapper (`[--font-display:…]`); set the colour pairs on `:root` (and `[data-theme="dark"]` if they differ there). Load the face yourself (`next/font` or `@fontsource/*`).
|
|
357
|
+
|
|
358
|
+
**Display steps:** `type-display-hero` (fluid to 16vw, 0.92 leading) and `type-display-xl` (44px → 136px, 0.9 leading) sit above `type-display-1`; both break long words rather than overflow a phone. **TextSequence** word masks keep 0.08em headroom above and to the sides, so tall caps and outline strokes aren't clipped.
|
|
359
|
+
|
|
360
|
+
**Contrast:** every on-colour and muted step needs **4.5:1** on its colour. `npx wmds-check` reads the app's CSS and fails a hex pair under that (`brand-contrast`, an error). Pairs it can't resolve (a `var()` or `color-mix`) aren't checked, so check those yourself.
|
|
361
|
+
|
|
362
|
+
```css
|
|
363
|
+
/* brand.css — the reference client (Foundations → Brand kit → Theme a client) */
|
|
364
|
+
:root {
|
|
365
|
+
--font-display: "Anton", Impact, sans-serif;
|
|
366
|
+
--font-display-weight: 400;
|
|
367
|
+
--font-display-tracking: 0;
|
|
368
|
+
--font-display-case: uppercase;
|
|
369
|
+
--text-display-hero-size: clamp(4rem, 17.5vw, 18rem);
|
|
370
|
+
--color-brand-surface: #120d08;
|
|
371
|
+
--color-on-brand-surface: #f3e3c3;
|
|
372
|
+
--color-on-brand-surface-muted: #a89a80;
|
|
373
|
+
--color-field: #e2522b;
|
|
374
|
+
--color-on-field: #120d08;
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Sections then use **Band** `tone="inverse"` / `"field"`: it re-skins everything inside and bleeds full width on the page's own columns (**Components → Band**).
|
|
379
|
+
|
|
319
380
|
### Brand override (`--color-primary`)
|
|
320
381
|
|
|
321
382
|
The **only** per-app color hook is the primary brand color. The WhatMatters default palette stays in **`src/theme/colors.css`**; an app overrides it by redefining the allowlisted tokens on `:root` (light) and `[data-theme="dark"]` (dark) in a stylesheet imported **after** `@thewhatmatters/wmds/styles.css`.
|
|
@@ -359,4 +420,4 @@ Rules:
|
|
|
359
420
|
- Set both the light and the dark value. Leaving `[data-theme="dark"]` unset falls back to the WhatMatters dark primary, not to your light value.
|
|
360
421
|
- Check contrast for `--color-on-primary` on your primary and for `--color-primary` on `--color-body` in both themes.
|
|
361
422
|
|
|
362
|
-
**Not overridable per app
|
|
423
|
+
**Not overridable per app** (beyond the Brand kit and Design knobs above): brand navy (`--color-brand` `#011272`, `--color-on-brand`, `--color-brand-outline`, `--color-brand-soft`, `--color-on-brand-hover`), accent (`--color-accent*`, `--color-on-accent`), status (`--color-error*`, `--color-success*`, `--color-warning*`, `--color-info*`), chart series, typography (`--font-*`, `--line-height-*`, `type-*`, except the Brand kit knobs), and grid (`--grid-*`, `--spacing`). Those roles are the shared WMDS contract — change them in `src/theme/`, rebuild, and bump the package. Do **not** fork component visuals with per-app utility overrides — extend WMDS via new variants/patterns in the design system repo.
|
package/bin/wmds-check.mjs
CHANGED
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
* content, data, handlers, and exports may change
|
|
19
19
|
* pattern-stale warn a pasted pattern's header names an older package version
|
|
20
20
|
* pattern-removed error a pasted pattern's id no longer ships
|
|
21
|
+
* brand-contrast error a brand-kit pair in the app's CSS under WCAG AA 4.5:1: --color-on-X (and
|
|
22
|
+
* --color-on-X-muted) on --color-X, for primary, brand-surface and field,
|
|
23
|
+
* when both are hex values in the same rule
|
|
21
24
|
*
|
|
22
25
|
* Silence one line with a trailing or preceding comment: `wmds-check-ignore raw-control <reason>`.
|
|
23
26
|
* The checks are line-based heuristics, not a parser: they favor few false negatives, and every
|
|
@@ -50,6 +53,7 @@ try {
|
|
|
50
53
|
|
|
51
54
|
const skipDirs = new Set(["node_modules", ".next", "dist", "build", "out", ".git", "coverage", "storybook-static"]);
|
|
52
55
|
const files = [];
|
|
56
|
+
const cssFiles = [];
|
|
53
57
|
const walk = (dir) => {
|
|
54
58
|
for (const name of readdirSync(dir)) {
|
|
55
59
|
const file = path.join(dir, name);
|
|
@@ -57,6 +61,8 @@ const walk = (dir) => {
|
|
|
57
61
|
if (!skipDirs.has(name)) walk(file);
|
|
58
62
|
} else if (/\.(tsx|jsx|ts|js|mdx)$/.test(name) && !/\.(test|spec|stories)\./.test(name)) {
|
|
59
63
|
files.push(file);
|
|
64
|
+
} else if (/\.css$/.test(name)) {
|
|
65
|
+
cssFiles.push(file);
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
};
|
|
@@ -259,6 +265,47 @@ for (const file of files) {
|
|
|
259
265
|
}
|
|
260
266
|
}
|
|
261
267
|
|
|
268
|
+
// Brand-kit contrast. Innermost rule blocks only, so a pair inside @media is read as its own rule.
|
|
269
|
+
const brandPairs = ["primary", "brand-surface", "field"];
|
|
270
|
+
const channel = (value) => {
|
|
271
|
+
const c = value / 255;
|
|
272
|
+
return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
273
|
+
};
|
|
274
|
+
const luminance = (hex) => {
|
|
275
|
+
let digits = hex.slice(1);
|
|
276
|
+
if (digits.length === 3 || digits.length === 4) digits = [...digits].map((d) => d + d).join("");
|
|
277
|
+
if (digits.length === 8 && digits.slice(6) !== "ff") return null; // translucent: depends on what's behind
|
|
278
|
+
const [r, g, b] = [0, 2, 4].map((i) => parseInt(digits.slice(i, i + 2), 16));
|
|
279
|
+
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
|
|
280
|
+
};
|
|
281
|
+
const contrast = (a, b) => {
|
|
282
|
+
const [la, lb] = [luminance(a), luminance(b)];
|
|
283
|
+
if (la === null || lb === null) return null;
|
|
284
|
+
return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);
|
|
285
|
+
};
|
|
286
|
+
for (const file of cssFiles) {
|
|
287
|
+
const source = readFileSync(file, "utf8");
|
|
288
|
+
const lines = source.split("\n");
|
|
289
|
+
for (const block of source.matchAll(/\{([^{}]*)\}/g)) {
|
|
290
|
+
const values = new Map();
|
|
291
|
+
for (const declaration of block[1].matchAll(/(--color-[\w-]+)\s*:\s*(#[0-9a-fA-F]{3,8})\b/g)) {
|
|
292
|
+
const index = block.index + 1 + declaration.index;
|
|
293
|
+
values.set(declaration[1], { hex: declaration[2].toLowerCase(), line: source.slice(0, index).split("\n").length });
|
|
294
|
+
}
|
|
295
|
+
for (const name of brandPairs) {
|
|
296
|
+
const background = values.get(`--color-${name}`);
|
|
297
|
+
if (!background) continue;
|
|
298
|
+
for (const ink of [`--color-on-${name}`, `--color-on-${name}-muted`]) {
|
|
299
|
+
const on = values.get(ink);
|
|
300
|
+
const ratio = on && contrast(on.hex, background.hex);
|
|
301
|
+
if (ratio && ratio < 4.5 && !ignored(lines, on.line - 1, "brand-contrast")) {
|
|
302
|
+
report(file, on.line, "brand-contrast", "error", `${ink} ${on.hex} on --color-${name} ${background.hex} is ${ratio.toFixed(2)}:1 — text needs 4.5:1`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
262
309
|
const errors = findings.filter((finding) => finding.severity === "error").length;
|
|
263
310
|
const warnings = findings.length - errors;
|
|
264
311
|
|
package/dist/colors.css
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* Brand actions: primary / on-primary (WhatMatters — separate from accent).
|
|
10
10
|
*/
|
|
11
11
|
:root {
|
|
12
|
+
/* Native UI (scrollbars, form controls, autofill) follows the theme. */
|
|
13
|
+
color-scheme: light;
|
|
14
|
+
|
|
12
15
|
/* Surface hierarchy — body/muted lightened for softer inset wells (test) */
|
|
13
16
|
--color-background-body: #f8f8f8;
|
|
14
17
|
--color-background-surface: #ffffff;
|
|
@@ -102,6 +105,23 @@
|
|
|
102
105
|
*/
|
|
103
106
|
--color-brand-tint: color-mix(in srgb, var(--color-brand) 10%, transparent);
|
|
104
107
|
|
|
108
|
+
/*
|
|
109
|
+
* Brand kit colour roles (apps may set these on :root, like --color-primary; CONSUMING.md → Brand kit).
|
|
110
|
+
* Read by **Band** `tone` (the `[data-tone]` scopes at the end of this file). Two pairs only, so every
|
|
111
|
+
* on-colour stays checkable: `npx wmds-check` fails a pair under 4.5:1.
|
|
112
|
+
* - brand surface: a dark section in the brand's own colour (`tone="inverse"`). Default: the navy.
|
|
113
|
+
* - field: a saturated section colour (`tone="field"`). Default: the primary.
|
|
114
|
+
* `*-muted` is the secondary text step on that colour; it must clear 4.5:1 too.
|
|
115
|
+
*/
|
|
116
|
+
--color-brand-surface: var(--color-brand);
|
|
117
|
+
--color-on-brand-surface: var(--color-on-brand);
|
|
118
|
+
--color-field: var(--color-primary);
|
|
119
|
+
--color-on-field: var(--color-on-primary);
|
|
120
|
+
/*
|
|
121
|
+
* The muted steps (`--color-on-brand-surface-muted`, `--color-on-field-muted`) are optional and read
|
|
122
|
+
* with fallbacks in the tone scopes below, so they follow their pair wherever it's set.
|
|
123
|
+
*/
|
|
124
|
+
|
|
105
125
|
/* Derived from --color-primary — 62% clears WCAG 3:1 on white and #f8f8f8 */
|
|
106
126
|
--color-focus-ring: color-mix(in srgb, var(--color-primary) 62%, transparent);
|
|
107
127
|
|
|
@@ -155,6 +175,7 @@
|
|
|
155
175
|
}
|
|
156
176
|
|
|
157
177
|
[data-theme="dark"] {
|
|
178
|
+
color-scheme: dark;
|
|
158
179
|
--color-background-body: #1b1b1b;
|
|
159
180
|
--color-background-surface: #262626;
|
|
160
181
|
--color-background-card: #1b1b1b;
|
|
@@ -290,3 +311,74 @@
|
|
|
290
311
|
|
|
291
312
|
--color-skeleton: color-mix(in srgb, var(--color-text-primary) 8%, var(--color-background-muted));
|
|
292
313
|
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Band tones — `[data-tone]` remaps the surface, text, border and fill roles to a brand-kit pair,
|
|
317
|
+
* the way `[data-theme]` swaps the palette, so every component inside re-skins. Set by **Band**.
|
|
318
|
+
* `inverse` also carries `data-theme="dark"`, so status, chart, shadow and focus roles take their dark
|
|
319
|
+
* values, and this block (later in the file) overrides the surfaces and text on the same element.
|
|
320
|
+
* Status colours are not remapped on `field`: keep validation messages off a field band.
|
|
321
|
+
*/
|
|
322
|
+
[data-tone="inverse"] {
|
|
323
|
+
--tone-bg: var(--color-brand-surface);
|
|
324
|
+
--tone-fg: var(--color-on-brand-surface);
|
|
325
|
+
/* Default: 72% of the ink on the surface (on the navy, about #b8bdd8, 8.7:1). */
|
|
326
|
+
--tone-muted: var(
|
|
327
|
+
--color-on-brand-surface-muted,
|
|
328
|
+
color-mix(in srgb, var(--color-on-brand-surface) 72%, var(--color-brand-surface))
|
|
329
|
+
);
|
|
330
|
+
/* Cards lift 6% toward the ink; the muted step keeps its contrast on the light side. */
|
|
331
|
+
--tone-raised: color-mix(in srgb, var(--tone-fg) 6%, var(--tone-bg));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
[data-tone="field"] {
|
|
335
|
+
--tone-bg: var(--color-field);
|
|
336
|
+
--tone-fg: var(--color-on-field);
|
|
337
|
+
/* Default: the ink itself, since a lighter step on a mid-tone field would fall under 4.5:1. */
|
|
338
|
+
--tone-muted: var(--color-on-field-muted, var(--color-on-field));
|
|
339
|
+
/* A tinted card would pull a mid-tone field under 4.5:1, so cards sit flat on the field. */
|
|
340
|
+
--tone-raised: var(--tone-bg);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
[data-tone="inverse"],
|
|
344
|
+
[data-tone="field"] {
|
|
345
|
+
--color-background-body: var(--tone-bg);
|
|
346
|
+
--color-background-surface: var(--tone-raised);
|
|
347
|
+
--color-background-card: var(--tone-raised);
|
|
348
|
+
--color-background-popover: var(--tone-raised);
|
|
349
|
+
--color-background-muted: var(--tone-bg);
|
|
350
|
+
|
|
351
|
+
--color-text-primary: var(--tone-fg);
|
|
352
|
+
--color-text-secondary: var(--tone-muted);
|
|
353
|
+
--color-text-disabled: color-mix(in srgb, var(--tone-fg) 45%, var(--tone-bg));
|
|
354
|
+
--color-text-accent: var(--tone-fg);
|
|
355
|
+
|
|
356
|
+
--color-accent: var(--tone-fg);
|
|
357
|
+
--color-accent-muted: color-mix(in srgb, var(--tone-fg) 10%, var(--tone-bg));
|
|
358
|
+
--color-on-accent: var(--tone-bg);
|
|
359
|
+
|
|
360
|
+
--color-neutral: color-mix(in srgb, var(--tone-fg) 10%, transparent);
|
|
361
|
+
--color-overlay-hover: color-mix(in srgb, var(--tone-fg) 8%, transparent);
|
|
362
|
+
--color-overlay-pressed: color-mix(in srgb, var(--tone-fg) 14%, transparent);
|
|
363
|
+
/* stateColors.css derives these on :root; derive them again here so they follow the tone. */
|
|
364
|
+
--color-ghost-foreground: var(--tone-fg);
|
|
365
|
+
--color-secondary-hover: var(--color-overlay-hover);
|
|
366
|
+
--color-secondary-active: var(--color-overlay-pressed);
|
|
367
|
+
--color-ghost-hover: var(--color-overlay-hover);
|
|
368
|
+
--color-ghost-active: var(--color-overlay-pressed);
|
|
369
|
+
|
|
370
|
+
--color-border: color-mix(in srgb, var(--tone-fg) 16%, transparent);
|
|
371
|
+
--color-border-emphasized: color-mix(in srgb, var(--tone-fg) 32%, transparent);
|
|
372
|
+
/* Control edges need 3:1; the muted text step clears 4.5:1. */
|
|
373
|
+
--color-border-control: var(--tone-muted);
|
|
374
|
+
--color-fill-selected: color-mix(in srgb, var(--tone-fg) 14%, var(--tone-bg));
|
|
375
|
+
--color-elevation-edge: color-mix(in srgb, var(--tone-fg) 16%, transparent);
|
|
376
|
+
--color-elevation-surface: var(--tone-raised);
|
|
377
|
+
|
|
378
|
+
--color-skeleton: color-mix(in srgb, var(--tone-fg) 12%, var(--tone-bg));
|
|
379
|
+
/* The ink itself: a primary-tinted ring can vanish on a saturated field. */
|
|
380
|
+
--color-focus-ring: var(--tone-fg);
|
|
381
|
+
|
|
382
|
+
background-color: var(--color-background-body);
|
|
383
|
+
color: var(--color-text-primary);
|
|
384
|
+
}
|
|
@@ -32,8 +32,8 @@ var r = [
|
|
|
32
32
|
failed: "bg-error",
|
|
33
33
|
warning: "bg-warning"
|
|
34
34
|
}, l = "animate-status-dot-pulse", u = {
|
|
35
|
-
sm: `${t.sm} gap-1.5 rounded-
|
|
36
|
-
md: `${t.md} gap-2 rounded-
|
|
35
|
+
sm: `${t.sm} gap-1.5 rounded-[var(--radius-control)] px-2.5 text-xs leading-none tabular-nums`,
|
|
36
|
+
md: `${t.md} gap-2 rounded-[var(--radius-control)] px-3 text-sm leading-none tabular-nums`
|
|
37
37
|
}, d = "inline-flex shrink-0 items-center justify-center font-sans font-medium normal-case tracking-normal", f = {
|
|
38
38
|
neutral: "border border-border bg-secondary text-secondary-foreground shadow-raised",
|
|
39
39
|
info: "bg-info text-on-info",
|
|
@@ -57,14 +57,14 @@ function h(e, t) {
|
|
|
57
57
|
return t === "outline" ? m[e] : t === "muted" ? p[e] : f[e];
|
|
58
58
|
}
|
|
59
59
|
var g = "!font-mono !text-[length:var(--font-size-sm)] !font-normal !uppercase !tracking-[0.14em]", _ = e("relative cursor-pointer decoration-1 underline-offset-2 hover:underline", "after:absolute after:inset-x-0 after:top-1/2 after:h-11 after:-translate-y-1/2 after:content-['']", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body", "transition-[border-color,text-decoration-color]", n("fast")), v = "hover:border-fg", y = {
|
|
60
|
-
sm: "h-5 rounded-
|
|
61
|
-
md: "h-6 rounded-
|
|
60
|
+
sm: "h-5 rounded-[var(--radius-control)] px-2 text-xs leading-none",
|
|
61
|
+
md: "h-6 rounded-[var(--radius-control)] px-2.5 text-sm leading-none"
|
|
62
62
|
}, b = {
|
|
63
63
|
sm: "gap-1",
|
|
64
64
|
md: "gap-1.5"
|
|
65
65
|
}, x = {
|
|
66
|
-
sm: "h-5 gap-1 rounded-
|
|
67
|
-
md: "h-6 gap-1.5 rounded-
|
|
66
|
+
sm: "h-5 gap-1 rounded-[var(--radius-control)] py-0 pl-0 pr-2 text-xs leading-none",
|
|
67
|
+
md: "h-6 gap-1.5 rounded-[var(--radius-control)] py-0 pl-0 pr-2.5 text-sm leading-none"
|
|
68
68
|
}, S = {
|
|
69
69
|
sm: "size-3 shrink-0 stroke-current",
|
|
70
70
|
md: "size-3.5 shrink-0 stroke-current"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AriaAttributes, ReactNode } from "react";
|
|
2
|
+
import { type BandElement, type BandSpacing, type BandTone } from "./bandStyles";
|
|
3
|
+
export { bandElements, bandSpacings, bandTones, type BandElement, type BandSpacing, type BandTone, } from "./bandStyles";
|
|
4
|
+
/** Layout-only — margin or grid placement of the band itself. */
|
|
5
|
+
export type BandLayoutClassName = string;
|
|
6
|
+
export interface BandProps {
|
|
7
|
+
/** Section content, placed on the band's own `grid-page` columns with `col-span-*` / `col-start-*`. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** `default` keeps the page's colours; `inverse` (brand surface) and `field` re-skin everything inside. */
|
|
10
|
+
tone?: BandTone;
|
|
11
|
+
/** Space above and below the content: `md` (default) 48px, `lg` 96px, `none`. */
|
|
12
|
+
spacing?: BandSpacing;
|
|
13
|
+
/** The band element. Default: `section`. */
|
|
14
|
+
as?: BandElement;
|
|
15
|
+
id?: string;
|
|
16
|
+
"aria-label"?: AriaAttributes["aria-label"];
|
|
17
|
+
"aria-labelledby"?: AriaAttributes["aria-labelledby"];
|
|
18
|
+
className?: BandLayoutClassName;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A full-bleed page section in one of the brand kit's tones. Its tone remaps the surface, text,
|
|
22
|
+
* border and fill roles (`data-tone`), so every WMDS component inside re-skins with no `className`.
|
|
23
|
+
* It holds its own `grid-page` on the shared `--grid-*` tokens, so its columns line up with the
|
|
24
|
+
* page's; placed inside a `grid-page` it bleeds to the viewport edges and keeps the page's columns.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Band({ children, tone, spacing, as: Element, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className, }: BandProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=Band.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Band.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Band/Band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,QAAQ,GACd,MAAM,cAAc,CAAC;AAEtB,iEAAiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,SAAS;IACxB,uGAAuG;IACvG,QAAQ,EAAE,SAAS,CAAC;IACpB,2GAA2G;IAC3G,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,iFAAiF;IACjF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,4CAA4C;IAC5C,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAC5C,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,IAAgB,EAChB,OAAc,EACd,EAAE,EAAE,OAAmB,EACvB,EAAE,EACF,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAS,GACV,EAAE,SAAS,+BAeX"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
import { bandClasses as t, bandElements as n, bandPageClasses as r, bandSpacingClasses as i, bandSpacings as a, bandTones as o } from "./bandStyles.js";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/atoms/Band/Band.tsx
|
|
6
|
+
function c({ children: n, tone: a = "default", spacing: o = "md", as: c = "section", id: l, "aria-label": u, "aria-labelledby": d, className: f }) {
|
|
7
|
+
return /* @__PURE__ */ s(c, {
|
|
8
|
+
id: l,
|
|
9
|
+
"aria-label": u,
|
|
10
|
+
"aria-labelledby": d,
|
|
11
|
+
className: e(t, i[o], f),
|
|
12
|
+
"data-band": "",
|
|
13
|
+
"data-tone": a,
|
|
14
|
+
"data-theme": a === "inverse" ? "dark" : void 0,
|
|
15
|
+
children: /* @__PURE__ */ s("div", {
|
|
16
|
+
className: r,
|
|
17
|
+
children: n
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { c as Band, n as bandElements, a as bandSpacings, o as bandTones };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const bandTones: readonly ["default", "inverse", "field"];
|
|
2
|
+
/**
|
|
3
|
+
* `default` — the page's own colours. `inverse` — the brand surface (`--color-brand-surface`, a dark
|
|
4
|
+
* section; dark status, chart and focus roles). `field` — the saturated section colour (`--color-field`).
|
|
5
|
+
*/
|
|
6
|
+
export type BandTone = (typeof bandTones)[number];
|
|
7
|
+
export declare const bandSpacings: readonly ["md", "lg", "none"];
|
|
8
|
+
/** Space above and below the content: `md` (default) 48px, `lg` 96px, `none` 0. */
|
|
9
|
+
export type BandSpacing = (typeof bandSpacings)[number];
|
|
10
|
+
export declare const bandElements: readonly ["section", "div", "header", "footer", "aside"];
|
|
11
|
+
export type BandElement = (typeof bandElements)[number];
|
|
12
|
+
/**
|
|
13
|
+
* Full-width block; the inner `grid-page` keeps its columns and margins (grid.css → Band). Inside a
|
|
14
|
+
* parent `grid-page` it spans every column: a band is full width by definition.
|
|
15
|
+
*/
|
|
16
|
+
export declare const bandClasses = "relative col-[1/-1] block w-full min-w-0";
|
|
17
|
+
/** The inner page drops its own block padding; Band's spacing is the section's. */
|
|
18
|
+
export declare const bandPageClasses = "grid-page !py-0";
|
|
19
|
+
export declare const bandSpacingClasses: Record<BandSpacing, string>;
|
|
20
|
+
//# sourceMappingURL=bandStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bandStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Band/bandStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,0CAA2C,CAAC;AAElE;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD,eAAO,MAAM,YAAY,+BAAgC,CAAC;AAE1D,mFAAmF;AACnF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,YAAY,0DAA2D,CAAC;AAErF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,6CAA6C,CAAC;AAEtE,mFAAmF;AACnF,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAI1D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/atoms/Band/bandStyles.ts
|
|
3
|
+
var e = [
|
|
4
|
+
"default",
|
|
5
|
+
"inverse",
|
|
6
|
+
"field"
|
|
7
|
+
], t = [
|
|
8
|
+
"md",
|
|
9
|
+
"lg",
|
|
10
|
+
"none"
|
|
11
|
+
], n = [
|
|
12
|
+
"section",
|
|
13
|
+
"div",
|
|
14
|
+
"header",
|
|
15
|
+
"footer",
|
|
16
|
+
"aside"
|
|
17
|
+
], r = "relative col-[1/-1] block w-full min-w-0", i = "grid-page !py-0", a = {
|
|
18
|
+
md: "py-[calc(var(--leading-base)*2)]",
|
|
19
|
+
lg: "py-[calc(var(--leading-base)*4)]",
|
|
20
|
+
none: ""
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as bandClasses, n as bandElements, i as bandPageClasses, a as bandSpacingClasses, t as bandSpacings, e as bandTones };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonStatusButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAC3C;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,kEAAkE;IAClE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ButtonStatusButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAC3C;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,kEAAkE;IAClE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,uHA6E7B,CAAC"}
|
|
@@ -9,13 +9,14 @@ import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
|
9
9
|
import { motion as m } from "motion/react";
|
|
10
10
|
//#region src/components/atoms/Button/ButtonStatusButton.tsx
|
|
11
11
|
var h = d(function({ status: d, role: h = "primary", size: g = "md", statusLabels: _, icon: v, disableOnError: y = !1, disabled: b, className: x, children: S, type: C = "button", onClick: w, "aria-label": T, "aria-pressed": E, "aria-keyshortcuts": D, id: O, name: k, form: A, ...j }, M) {
|
|
12
|
-
let N = u(S, _)[d], P = b
|
|
12
|
+
let N = u(S, _)[d], P = !b && (d === "loading" || d === "error" && y), F = b || P, I = r(d, h);
|
|
13
13
|
return /* @__PURE__ */ p(m.button, {
|
|
14
14
|
...j,
|
|
15
15
|
ref: M,
|
|
16
16
|
type: C,
|
|
17
17
|
layout: !0,
|
|
18
|
-
disabled:
|
|
18
|
+
disabled: b,
|
|
19
|
+
"aria-disabled": P || void 0,
|
|
19
20
|
"aria-busy": d === "loading" || void 0,
|
|
20
21
|
"aria-live": "polite",
|
|
21
22
|
"aria-label": T,
|
|
@@ -24,12 +25,18 @@ var h = d(function({ status: d, role: h = "primary", size: g = "md", statusLabel
|
|
|
24
25
|
"data-role": h,
|
|
25
26
|
"data-size": g,
|
|
26
27
|
"data-status": d,
|
|
27
|
-
animate:
|
|
28
|
+
animate: I,
|
|
28
29
|
initial: !1,
|
|
29
30
|
className: e(t, "justify-center", l[g], (d !== "idle" || v != null) && c[g], n, i(d, h), "overflow-hidden", x),
|
|
30
|
-
whileTap:
|
|
31
|
+
whileTap: F ? void 0 : { scale: .98 },
|
|
31
32
|
transition: a,
|
|
32
|
-
onClick:
|
|
33
|
+
onClick: (e) => {
|
|
34
|
+
if (P) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
w?.(e);
|
|
39
|
+
},
|
|
33
40
|
id: O,
|
|
34
41
|
name: k,
|
|
35
42
|
form: A,
|
|
@@ -4,7 +4,7 @@ export type ButtonRole = (typeof buttonRoles)[number];
|
|
|
4
4
|
export type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
5
5
|
export type IconButtonSize = ButtonSize;
|
|
6
6
|
/** All action buttons are pills by default — `layout="row"` for flat full-width detail lines. */
|
|
7
|
-
export declare const buttonPillClass = "rounded-
|
|
7
|
+
export declare const buttonPillClass = "rounded-[var(--radius-control)]";
|
|
8
8
|
export declare const buttonLayouts: readonly ["pill", "row", "nav"];
|
|
9
9
|
export type ButtonLayout = (typeof buttonLayouts)[number];
|
|
10
10
|
/** `layout="row"` width: `fill` (default) spans the container; `hug` sizes to its content. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStyles.ts"],"names":[],"mappings":"AAMA,uEAAuE;AACvE,eAAO,MAAM,WAAW,oGAQd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC;AAExC,iGAAiG;AACjG,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"buttonStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStyles.ts"],"names":[],"mappings":"AAMA,uEAAuE;AACvE,eAAO,MAAM,WAAW,oGAQd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC;AAExC,iGAAiG;AACjG,eAAO,MAAM,eAAe,oCAAoC,CAAC;AAEjE,eAAO,MAAM,aAAa,iCAAkC,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,8FAA8F;AAC9F,eAAO,MAAM,YAAY,0BAA2B,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,uGAAuG;AACvG,eAAO,MAAM,YAAY,8BAA+B,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,sGAAsG;AACtG,eAAO,MAAM,cAAc,8BAA+B,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,eAAO,MAAM,iBAAiB,QAUd,CAAC;AAEjB,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAmBxD,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,yBAAyB,4FACqD,CAAC;AAE5F,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAG1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,2GACuE,CAAC;AAE3G,oGAAoG;AACpG,eAAO,MAAM,yBAAyB,kDAAkD,CAAC;AAEzF,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,kGAC0D,CAAC;AAElG,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAK9D,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAK5D,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKhE,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,oBAAoB,QAK+C,CAAC;AAEjF,eAAO,MAAM,sBAAsB,QAEqB,CAAC;AAEzD,mHAAmH;AACnH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAG7D,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,QAGqB,CAAC;AAEzD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAI/D"}
|
|
@@ -10,7 +10,7 @@ var i = [
|
|
|
10
10
|
"inverse",
|
|
11
11
|
"outline",
|
|
12
12
|
"inverse-outline"
|
|
13
|
-
], a = "rounded-
|
|
13
|
+
], a = "rounded-[var(--radius-control)]", o = [
|
|
14
14
|
"pill",
|
|
15
15
|
"row",
|
|
16
16
|
"nav"
|
|
@@ -48,7 +48,7 @@ var i = [
|
|
|
48
48
|
}, x = "flex cursor-pointer items-center font-sans tracking-normal transition-[color,background-color,outline-color] " + n("fast") + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50", S = "h-auto min-h-0 rounded-md px-1.5 py-1 text-left font-normal focus-visible:ring-inset focus-visible:ring-offset-0", C = {
|
|
49
49
|
fill: "w-full justify-between gap-3",
|
|
50
50
|
hug: "w-auto justify-start gap-1.5"
|
|
51
|
-
}, w = "h-auto min-h-0 w-full justify-start gap-2.5 rounded-
|
|
51
|
+
}, w = "h-auto min-h-0 w-full justify-start gap-2.5 rounded-[var(--radius-control-box)] px-2.5 py-2 text-left text-sm font-normal leading-[var(--line-height-sm)] focus-visible:ring-inset focus-visible:ring-offset-0";
|
|
52
52
|
function T(e) {
|
|
53
53
|
return e ? "bg-secondary text-secondary-foreground" : "bg-transparent text-muted hover:bg-ghost-hover hover:text-fg";
|
|
54
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAIf,OAAO,EAoBL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAcD;;;GAGG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAIf,OAAO,EAoBL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAcD;;;GAGG;AACH,eAAO,MAAM,QAAQ,4GAgNnB,CAAC"}
|