@thewhatmatters/wmds 0.4.31 → 0.4.33
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 +40 -0
- package/bin/wmds-check.mjs +38 -0
- package/dist/colors.css +2 -1
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +73 -72
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.js +44 -49
- package/dist/components/atoms/Input/inputShellStyles.js +2 -2
- package/dist/components/atoms/Radio/Radio.d.ts.map +1 -1
- package/dist/components/atoms/Radio/Radio.js +61 -60
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +31 -30
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +56 -55
- package/dist/components/atoms/TextArea/textareaShellStyles.js +2 -2
- package/dist/components/atoms/inputShared/InputStatusBanner.d.ts +5 -0
- package/dist/components/atoms/inputShared/InputStatusBanner.d.ts.map +1 -1
- package/dist/components/atoms/inputShared/InputStatusBanner.js +15 -4
- package/dist/components/molecules/Card/Card.d.ts +10 -1
- package/dist/components/molecules/Card/Card.d.ts.map +1 -1
- package/dist/components/molecules/Card/Card.js +56 -43
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +53 -53
- package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -1
- package/dist/components/molecules/CopyField/copyFieldStyles.js +1 -1
- package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts +32 -0
- package/dist/components/molecules/ErrorSummary/ErrorSummary.d.ts.map +1 -0
- package/dist/components/molecules/ErrorSummary/ErrorSummary.js +37 -0
- package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts +12 -0
- package/dist/components/molecules/ErrorSummary/errorSummaryStyles.d.ts.map +1 -0
- package/dist/components/molecules/ErrorSummary/errorSummaryStyles.js +5 -0
- package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -1
- package/dist/components/molecules/IntakeForm/IntakeForm.js +4 -6
- package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +3 -2
- package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -1
- package/dist/components/molecules/PromptBar/promptBarStyles.js +2 -2
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/molecules/RadioGroup/RadioGroup.js +53 -53
- package/dist/components/molecules/Search/Search.d.ts +5 -0
- package/dist/components/molecules/Search/Search.d.ts.map +1 -1
- package/dist/components/molecules/Search/Search.js +14 -13
- package/dist/components/molecules/Search/searchStyles.d.ts +2 -1
- package/dist/components/molecules/Search/searchStyles.d.ts.map +1 -1
- package/dist/components/molecules/Search/searchStyles.js +4 -4
- package/dist/components/organisms/Carousel/Carousel.d.ts +21 -1
- package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/Carousel.js +319 -190
- package/dist/components/organisms/Carousel/carouselStyles.d.ts +9 -0
- package/dist/components/organisms/Carousel/carouselStyles.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/carouselStyles.js +12 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +99 -97
- package/dist/lib/compositionAudit.d.ts.map +1 -1
- package/dist/stateColors.css +2 -1
- package/dist/styles.css +1 -1
- package/docs/components.md +2 -1
- package/docs/exports.json +14 -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 +1 -1
- 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 +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +3 -3
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-errorsummary--contact-form.tsx +35 -0
- package/docs/patterns/components-field--horizontal-input.tsx +2 -2
- package/docs/patterns/components-field--horizontal-text-area.tsx +2 -2
- package/docs/patterns/components-field--multi-control.tsx +2 -2
- 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-herointro--with-actions.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 +3 -3
- 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 +3 -3
- 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 +9 -1
- package/package.json +1 -1
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import { InputStatusBanner as t } from "../../atoms/inputShared/InputStatusBanner.js";
|
|
4
|
-
import { radioStatusBannerClassesFor as
|
|
5
|
-
import { radioGroupDescriptionClasses as
|
|
6
|
-
import { RadioGroupProvider as
|
|
7
|
-
import { RadioGroupItem as
|
|
8
|
-
import { useId as
|
|
9
|
-
import { jsx as
|
|
3
|
+
import { InputStatusBanner as t, warnStatusWithoutMessage as n } from "../../atoms/inputShared/InputStatusBanner.js";
|
|
4
|
+
import { radioStatusBannerClassesFor as r } from "../../atoms/Radio/radioStyles.js";
|
|
5
|
+
import { radioGroupDescriptionClasses as i, radioGroupDescriptionSpacingClasses as a, radioGroupFieldStackClasses as o, radioGroupItemsClasses as s, radioGroupLabelClassesFor as c, radioGroupLegendLabelOnlySpacingClasses as l, radioGroupLegendWithDescriptionSpacingClasses as u, radioGroupMessageTopSpacingClasses as d, radioGroupOrientations as f } from "./radioGroupStyles.js";
|
|
6
|
+
import { RadioGroupProvider as p, useRadioGroupName as m } from "./RadioGroupContext.js";
|
|
7
|
+
import { RadioGroupItem as h } from "./RadioGroupItem.js";
|
|
8
|
+
import { useId as g, useMemo as _ } from "react";
|
|
9
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/molecules/RadioGroup/RadioGroup.tsx
|
|
11
|
-
var
|
|
11
|
+
var b = {
|
|
12
12
|
sm: "sm",
|
|
13
13
|
md: "md"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function x(e) {
|
|
16
16
|
e.message != null && e.status == null && console.warn("[WMDS RadioGroup] `message` requires `status`.");
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
status:
|
|
22
|
-
message:
|
|
23
|
-
});
|
|
24
|
-
let
|
|
25
|
-
name:
|
|
26
|
-
value:
|
|
27
|
-
onValueChange:
|
|
28
|
-
disabled:
|
|
29
|
-
size:
|
|
18
|
+
function S({ label: f, labelHidden: h = !1, description: S, value: C, onValueChange: w, name: T, orientation: E = "vertical", size: D = "md", disabled: O = !1, status: k, message: A, children: j, className: M }) {
|
|
19
|
+
let N = g(), P = m(T);
|
|
20
|
+
x({
|
|
21
|
+
status: k,
|
|
22
|
+
message: A
|
|
23
|
+
}), n("RadioGroup", k, A);
|
|
24
|
+
let F = f == null ? void 0 : `${N}-legend`, I = S == null ? void 0 : `${N}-description`, L = A != null && k != null ? `${N}-message` : void 0, R = [I, L].filter(Boolean).join(" ") || void 0, z = _(() => ({
|
|
25
|
+
name: P,
|
|
26
|
+
value: C,
|
|
27
|
+
onValueChange: w,
|
|
28
|
+
disabled: O,
|
|
29
|
+
size: D
|
|
30
30
|
}), [
|
|
31
|
-
|
|
32
|
-
S,
|
|
31
|
+
P,
|
|
33
32
|
C,
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
w,
|
|
34
|
+
O,
|
|
35
|
+
D
|
|
36
36
|
]);
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
disabled:
|
|
39
|
-
className: e(
|
|
37
|
+
return /* @__PURE__ */ y("fieldset", {
|
|
38
|
+
disabled: O,
|
|
39
|
+
className: e(o, "min-w-0 border-0 p-0", M),
|
|
40
40
|
children: [
|
|
41
|
-
|
|
42
|
-
id: P,
|
|
43
|
-
className: e(s(D), m && "sr-only", x == null ? c : l),
|
|
44
|
-
children: d
|
|
45
|
-
}),
|
|
46
|
-
x == null ? null : /* @__PURE__ */ _("p", {
|
|
41
|
+
f == null ? null : /* @__PURE__ */ v("legend", {
|
|
47
42
|
id: F,
|
|
48
|
-
className: e(
|
|
49
|
-
children:
|
|
43
|
+
className: e(c(O), h && "sr-only", S == null ? l : u),
|
|
44
|
+
children: f
|
|
45
|
+
}),
|
|
46
|
+
S == null ? null : /* @__PURE__ */ v("p", {
|
|
47
|
+
id: I,
|
|
48
|
+
className: e(i, a),
|
|
49
|
+
children: S
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ v("div", {
|
|
52
52
|
role: "radiogroup",
|
|
53
|
-
"aria-labelledby":
|
|
54
|
-
"aria-describedby":
|
|
55
|
-
"aria-invalid":
|
|
56
|
-
"aria-disabled":
|
|
57
|
-
className:
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
value:
|
|
60
|
-
children:
|
|
53
|
+
"aria-labelledby": F,
|
|
54
|
+
"aria-describedby": R,
|
|
55
|
+
"aria-invalid": k === "error" || void 0,
|
|
56
|
+
"aria-disabled": O || void 0,
|
|
57
|
+
className: s[E],
|
|
58
|
+
children: /* @__PURE__ */ v(p, {
|
|
59
|
+
value: z,
|
|
60
|
+
children: j
|
|
61
61
|
})
|
|
62
62
|
}),
|
|
63
|
-
|
|
64
|
-
status:
|
|
65
|
-
message:
|
|
66
|
-
messageId:
|
|
67
|
-
size:
|
|
63
|
+
A != null && k != null && L != null ? /* @__PURE__ */ v(t, {
|
|
64
|
+
status: k,
|
|
65
|
+
message: A,
|
|
66
|
+
messageId: L,
|
|
67
|
+
size: b[D],
|
|
68
68
|
messagePosition: "bottom",
|
|
69
|
-
bannerClassName: e(
|
|
69
|
+
bannerClassName: e(r(k), d)
|
|
70
70
|
}) : null
|
|
71
71
|
]
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
var
|
|
74
|
+
var C = Object.assign(S, { Item: h });
|
|
75
75
|
//#endregion
|
|
76
|
-
export {
|
|
76
|
+
export { C as RadioGroup, f as radioGroupOrientations };
|
|
@@ -7,6 +7,11 @@ export { searchSizes } from "./searchStyles";
|
|
|
7
7
|
export type SearchLayoutClassName = string;
|
|
8
8
|
export interface SearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
9
9
|
size?: SearchSize;
|
|
10
|
+
/**
|
|
11
|
+
* The field's name, read by screen readers (Labels and placeholders F7, F10). It may stay visually
|
|
12
|
+
* hidden: a search field alone with its button is the one place a hidden label is allowed.
|
|
13
|
+
*/
|
|
14
|
+
label?: string;
|
|
10
15
|
/** Trailing inset action — e.g. "Use my location", "GO". */
|
|
11
16
|
actionLabel: string;
|
|
12
17
|
onAction?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,mDAAmD;AACnD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC3D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,mDAAmD;AACnD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC3D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,0GA4CjB,CAAC"}
|
|
@@ -6,26 +6,27 @@ import { searchButtonSizeClasses as r, searchInlineInputClasses as i, searchInse
|
|
|
6
6
|
import { forwardRef as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/molecules/Search/Search.tsx
|
|
9
|
-
var d = c(function({ size: s = "md",
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */ u("div", {
|
|
12
|
-
className: e(o[s],
|
|
9
|
+
var d = c(function({ size: s = "md", label: c, actionLabel: d, onAction: f, actionRole: p = "primary", actionDisabled: m, icon: h, className: g, disabled: _, ...v }, y) {
|
|
10
|
+
let b = r[s];
|
|
11
|
+
return c == null && v["aria-label"] == null && v["aria-labelledby"] == null && console.warn("[WMDS Search] Provide `label` (it can stay hidden), `aria-label`, or `aria-labelledby`."), /* @__PURE__ */ u("div", {
|
|
12
|
+
className: e(o[s], g),
|
|
13
13
|
children: [/* @__PURE__ */ l(n, {
|
|
14
|
-
...
|
|
15
|
-
|
|
14
|
+
...v,
|
|
15
|
+
"aria-label": v["aria-label"] ?? c,
|
|
16
|
+
ref: y,
|
|
16
17
|
inline: !0,
|
|
17
18
|
size: "sm",
|
|
18
|
-
disabled:
|
|
19
|
-
icon:
|
|
19
|
+
disabled: _,
|
|
20
|
+
icon: h,
|
|
20
21
|
className: i[s]
|
|
21
22
|
}), /* @__PURE__ */ l(t, {
|
|
22
23
|
type: "button",
|
|
23
|
-
role:
|
|
24
|
-
size:
|
|
25
|
-
disabled:
|
|
24
|
+
role: p,
|
|
25
|
+
size: b,
|
|
26
|
+
disabled: _ || m,
|
|
26
27
|
className: a,
|
|
27
|
-
onClick:
|
|
28
|
-
children:
|
|
28
|
+
onClick: f,
|
|
29
|
+
children: d
|
|
29
30
|
})]
|
|
30
31
|
});
|
|
31
32
|
});
|
|
@@ -5,6 +5,7 @@ export declare const searchShellClasses: Record<SearchSize, string>;
|
|
|
5
5
|
/** Inline input track — shorter than solo Input md so the inset button can breathe. */
|
|
6
6
|
export declare const searchInlineInputClasses: Record<SearchSize, string>;
|
|
7
7
|
/** Lock inset action height to the inner track — not the full 44px shell. */
|
|
8
|
-
|
|
8
|
+
/** The inset action: 32px to look at, a 44px tap area on touch screens (F10). Its focus ring hugs the button (no offset, as in PromptBar), so it never runs over the pill's edge. */
|
|
9
|
+
export declare const searchInsetButtonClasses = "relative focus-visible:!ring-offset-0 h-8 min-h-8 max-h-8 shrink-0 self-center py-0 leading-none pointer-coarse:after:absolute pointer-coarse:after:-inset-1.5 pointer-coarse:after:content-['']";
|
|
9
10
|
export declare const searchButtonSizeClasses: Record<SearchSize, "xs" | "sm">;
|
|
10
11
|
//# sourceMappingURL=searchStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Search/searchStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uBAAwB,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"searchStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Search/searchStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uBAAwB,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAQtD,wHAAwH;AACxH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAGzD,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAG/D,CAAC;AAEF,6EAA6E;AAC7E,qLAAqL;AACrL,eAAO,MAAM,wBAAwB,qMAC+J,CAAC;AAErM,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,GAAG,IAAI,CAGnE,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { focusRingTransitionClasses as e } from "../../../lib/motion.js";
|
|
3
3
|
//#region src/components/molecules/Search/searchStyles.ts
|
|
4
|
-
var t = ["sm", "md"], n = "flex w-full items-center rounded-[var(--radius-control)] border border-border-control bg-surface focus-
|
|
4
|
+
var t = ["sm", "md"], n = "flex w-full items-center rounded-[var(--radius-control)] border border-border-control bg-surface has-[input:focus-visible]:outline-none has-[input:focus-visible]:ring-2 has-[input:focus-visible]:ring-focus-ring has-[input:focus-visible]:ring-offset-2 has-[input:focus-visible]:ring-offset-body " + e, r = {
|
|
5
5
|
sm: `${n} h-10 gap-1.5 p-1 pl-2`,
|
|
6
6
|
md: `${n} h-11 gap-2 p-1 pl-2`
|
|
7
7
|
}, i = {
|
|
8
|
-
sm: "h-7 min-h-0 px-2.5 text-xs leading-none",
|
|
9
|
-
md: "h-8 min-h-0 pl-4 pr-1 text-sm leading-none"
|
|
10
|
-
}, a = "h-8 min-h-8 max-h-8 shrink-0 self-center py-0 leading-none", o = {
|
|
8
|
+
sm: "h-7 min-h-0 px-2.5 text-xs pointer-coarse:text-base leading-none",
|
|
9
|
+
md: "h-8 min-h-0 pl-4 pr-1 text-sm pointer-coarse:text-base leading-none"
|
|
10
|
+
}, a = "relative focus-visible:!ring-offset-0 h-8 min-h-8 max-h-8 shrink-0 self-center py-0 leading-none pointer-coarse:after:absolute pointer-coarse:after:-inset-1.5 pointer-coarse:after:content-['']", o = {
|
|
11
11
|
sm: "xs",
|
|
12
12
|
md: "sm"
|
|
13
13
|
};
|
|
@@ -42,6 +42,26 @@ interface CarouselBaseProps {
|
|
|
42
42
|
/** Controlled: the row moves to this item (0-based) when it changes. */
|
|
43
43
|
activeIndex?: number;
|
|
44
44
|
labels?: Partial<CarouselLabels>;
|
|
45
|
+
/**
|
|
46
|
+
* Drift the row slowly on its own, back and forth between its ends (`true`, about 24px a second, or
|
|
47
|
+
* `{ speed }` in px a second). It holds while a pointer is over the row, while anything in it has focus,
|
|
48
|
+
* during a drag or a scrub, while the row is off screen or the tab hidden, and never runs under reduced
|
|
49
|
+
* motion. A Pause button sits beside the scrubber (WCAG 2.2.2: moving content can be stopped).
|
|
50
|
+
*/
|
|
51
|
+
autoplay?: boolean | {
|
|
52
|
+
speed?: number;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Repeat the items seamlessly: a copy follows the last one, and the row wraps back to the start as it passes
|
|
56
|
+
* one full set, so it never ends. With `autoplay` it drifts one way only. The scrubber and counter are
|
|
57
|
+
* hidden (a loop has no end to measure against). Needs enough items to fill the row at least once.
|
|
58
|
+
*/
|
|
59
|
+
loop?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* A badge that follows a mouse pointer over the row, e.g. a hand icon, to say "drag me". Decorative and
|
|
62
|
+
* hidden from assistive tech; only on devices with a fine pointer that can hover.
|
|
63
|
+
*/
|
|
64
|
+
cursor?: ReactNode;
|
|
45
65
|
/** **Carousel.Item** children, one per item. */
|
|
46
66
|
children?: ReactNode;
|
|
47
67
|
className?: CarouselLayoutClassName;
|
|
@@ -58,7 +78,7 @@ export interface CarouselItemProps {
|
|
|
58
78
|
* shift-wheel scrolling come from the browser; the pointer drag, the glide, and the scrubber are
|
|
59
79
|
* built on it.
|
|
60
80
|
*/
|
|
61
|
-
declare function CarouselRoot({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, itemWidth, snap, bleed, fade, progress, counter, onIndexChange, activeIndex, labels, children, className, }: CarouselProps): import("react").JSX.Element;
|
|
81
|
+
declare function CarouselRoot({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, itemWidth, snap, bleed, fade, progress, counter, onIndexChange, activeIndex, labels, autoplay, loop, cursor, children, className, }: CarouselProps): import("react").JSX.Element;
|
|
62
82
|
declare function CarouselItem({ children, className }: CarouselItemProps): import("react").JSX.Element;
|
|
63
83
|
export declare const Carousel: typeof CarouselRoot & {
|
|
64
84
|
Item: typeof CarouselItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAgBL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA4Bf,OAAO,EAmBL,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,uDAAuD;IACvD,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,4DAA4D;IAC5D,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACtD;AAED,gFAAgF;AAChF,KAAK,YAAY,GACb;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,GACnD;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAExD,UAAU,iBAAiB;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,iGAAiG;IACjG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0FAA0F;IAC1F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,qHAAqH;IACrH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AA4ED;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,EACpB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAoC,EACpC,IAAW,EACX,KAAa,EACb,IAAW,EACX,QAAmB,EACnB,OAAe,EACf,aAAa,EACb,WAAW,EACX,MAAM,EACN,QAAgB,EAChB,IAAY,EACZ,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,aAAa,+BAyoBf;AAUD,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,+BAe/D;AAED,eAAO,MAAM,QAAQ;;CAEnB,CAAC"}
|