@thewhatmatters/wmds 0.4.30 → 0.4.32
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 +45 -0
- package/bin/wmds-check.mjs +38 -0
- 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/Breadcrumb/breadcrumbStyles.d.ts +1 -1
- package/dist/components/molecules/Breadcrumb/breadcrumbStyles.js +2 -2
- 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/Field/fieldStyles.d.ts +1 -1
- package/dist/components/molecules/Field/fieldStyles.js +1 -1
- package/dist/components/molecules/HeroIntro/HeroIntro.d.ts +8 -2
- package/dist/components/molecules/HeroIntro/HeroIntro.d.ts.map +1 -1
- package/dist/components/molecules/HeroIntro/HeroIntro.js +30 -22
- package/dist/components/molecules/HeroIntro/heroIntroStyles.d.ts +9 -2
- package/dist/components/molecules/HeroIntro/heroIntroStyles.d.ts.map +1 -1
- package/dist/components/molecules/HeroIntro/heroIntroStyles.js +2 -2
- 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/molecules/TileGrid/tileGridStyles.js +1 -1
- package/dist/components/organisms/Carousel/carouselStyles.js +3 -3
- package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +4 -0
- package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -1
- package/dist/components/organisms/FooterReveal/footerRevealStyles.js +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +13 -6
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +305 -252
- package/dist/components/organisms/SiteNav/siteNavStyles.d.ts +33 -5
- package/dist/components/organisms/SiteNav/siteNavStyles.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/siteNavStyles.js +3 -3
- package/dist/components/organisms/SiteNav/useSiteNavMobileMenu.d.ts +17 -0
- package/dist/components/organisms/SiteNav/useSiteNavMobileMenu.d.ts.map +1 -0
- package/dist/components/organisms/SiteNav/useSiteNavMobileMenu.js +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/dialogOverlay.d.ts +8 -0
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +45 -26
- package/dist/styles.css +1 -1
- package/docs/components.md +3 -2
- package/docs/exports.json +16 -2
- 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 +2 -2
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +2 -2
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +2 -2
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +2 -2
- package/docs/patterns/components-herointro--with-actions.tsx +22 -0
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +2 -2
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +2 -2
- 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 +2 -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 +3 -3
- 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 +2 -2
- 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 +3 -3
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +3 -3
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +3 -3
- package/docs/patterns/guides-post-page--post-page.tsx +3 -3
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +6 -6
- package/docs/patterns/guides-resource-detail--detail.tsx +2 -2
- package/docs/patterns/index.json +17 -1
- package/package.json +1 -1
|
@@ -1,84 +1,85 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import "../Input/inputShellStyles.js";
|
|
4
|
-
import { InputStatusBanner as t } from "../inputShared/InputStatusBanner.js";
|
|
5
|
-
import { radioCircleClassesFor as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { Fragment as
|
|
4
|
+
import { InputStatusBanner as t, warnStatusWithoutMessage as n } from "../inputShared/InputStatusBanner.js";
|
|
5
|
+
import { radioCircleClassesFor as r, radioDescriptionClasses as i, radioDescriptionRowClasses as a, radioDotClasses as o, radioDotSizeClasses as s, radioHiddenInputClasses as c, radioHitTargetDescriptionAlignClasses as l, radioHitTargetSizeClasses as u, radioLabelClassesFor as d, radioRowBaseClasses as f, radioRowSizeClasses as p, radioSizes as m, radioStatusBannerClassesFor as h, radioTextColumnClasses as g } from "./radioStyles.js";
|
|
6
|
+
import { forwardRef as _, useId as v, useState as y } from "react";
|
|
7
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/atoms/Radio/Radio.tsx
|
|
9
|
-
var
|
|
9
|
+
var C = {
|
|
10
10
|
sm: "sm",
|
|
11
11
|
md: "md"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function w(e) {
|
|
14
14
|
e.message != null && e.status == null && console.warn("[WMDS Radio] `message` requires `status`.");
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
var T = _(function({ size: m = "md", label: _, labelHidden: T = !1, description: E, status: D, message: O, className: k, disabled: A, checked: j, defaultChecked: M, id: N, onChange: P, ...F }, I) {
|
|
17
|
+
n("Radio", D, O);
|
|
18
|
+
let L = v(), R = N ?? L;
|
|
19
|
+
w({
|
|
20
|
+
status: D,
|
|
21
|
+
message: O
|
|
21
22
|
});
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
].filter(Boolean).join(" ") || void 0,
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
className: e("relative flex shrink-0 items-center justify-center",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
...
|
|
32
|
-
ref:
|
|
33
|
-
id:
|
|
23
|
+
let z = j !== void 0, [B, V] = y(M ?? !1), H = z ? !!j : B, U = O != null && O.length > 0 && D != null, W = U ? `${R}-message` : void 0, G = E != null && !T ? `${R}-description` : void 0, K = [
|
|
24
|
+
F["aria-describedby"],
|
|
25
|
+
G,
|
|
26
|
+
W
|
|
27
|
+
].filter(Boolean).join(" ") || void 0, q = (e) => {
|
|
28
|
+
z || V(e.target.checked), P?.(e);
|
|
29
|
+
}, J = r(m, H, A, U ? void 0 : D), Y = E != null && !T, X = (t) => /* @__PURE__ */ S("span", {
|
|
30
|
+
className: e("relative flex shrink-0 items-center justify-center", u[m], t),
|
|
31
|
+
children: [/* @__PURE__ */ x("input", {
|
|
32
|
+
...F,
|
|
33
|
+
ref: I,
|
|
34
|
+
id: R,
|
|
34
35
|
type: "radio",
|
|
35
|
-
checked:
|
|
36
|
-
defaultChecked:
|
|
37
|
-
disabled:
|
|
38
|
-
"aria-invalid":
|
|
39
|
-
"aria-describedby":
|
|
40
|
-
onChange:
|
|
41
|
-
className:
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
-
className:
|
|
36
|
+
checked: z ? j : void 0,
|
|
37
|
+
defaultChecked: z ? void 0 : M,
|
|
38
|
+
disabled: A,
|
|
39
|
+
"aria-invalid": D === "error" || void 0,
|
|
40
|
+
"aria-describedby": K,
|
|
41
|
+
onChange: q,
|
|
42
|
+
className: c
|
|
43
|
+
}), /* @__PURE__ */ x("span", {
|
|
44
|
+
className: J,
|
|
44
45
|
"aria-hidden": !0,
|
|
45
|
-
children:
|
|
46
|
+
children: H ? /* @__PURE__ */ x("span", { className: e(s[m], o) }) : null
|
|
46
47
|
})]
|
|
47
|
-
}),
|
|
48
|
-
htmlFor:
|
|
49
|
-
className: e(
|
|
50
|
-
children:
|
|
48
|
+
}), Z = /* @__PURE__ */ x("label", {
|
|
49
|
+
htmlFor: R,
|
|
50
|
+
className: e(f, !Y && "items-center", !Y && p[m], A && "cursor-not-allowed", k),
|
|
51
|
+
children: T ? /* @__PURE__ */ S(b, { children: [X(), /* @__PURE__ */ x("span", {
|
|
51
52
|
className: "sr-only",
|
|
52
|
-
children:
|
|
53
|
-
})] }) :
|
|
54
|
-
className:
|
|
55
|
-
children: [
|
|
56
|
-
className:
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
-
className:
|
|
59
|
-
children:
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
-
id:
|
|
62
|
-
className:
|
|
63
|
-
children:
|
|
53
|
+
children: _
|
|
54
|
+
})] }) : Y ? /* @__PURE__ */ S("span", {
|
|
55
|
+
className: a[m],
|
|
56
|
+
children: [X(l[m]), /* @__PURE__ */ S("span", {
|
|
57
|
+
className: g,
|
|
58
|
+
children: [/* @__PURE__ */ x("span", {
|
|
59
|
+
className: d(A, !0),
|
|
60
|
+
children: _
|
|
61
|
+
}), /* @__PURE__ */ x("span", {
|
|
62
|
+
id: G,
|
|
63
|
+
className: i,
|
|
64
|
+
children: E
|
|
64
65
|
})]
|
|
65
66
|
})]
|
|
66
|
-
}) : /* @__PURE__ */
|
|
67
|
-
className:
|
|
68
|
-
children:
|
|
67
|
+
}) : /* @__PURE__ */ S(b, { children: [X(), /* @__PURE__ */ x("span", {
|
|
68
|
+
className: d(A),
|
|
69
|
+
children: _
|
|
69
70
|
})] })
|
|
70
71
|
});
|
|
71
|
-
return !
|
|
72
|
+
return !U || D == null || W == null ? Z : /* @__PURE__ */ S("div", {
|
|
72
73
|
className: "flex w-full flex-col gap-1.5",
|
|
73
|
-
children: [
|
|
74
|
-
status:
|
|
75
|
-
message:
|
|
76
|
-
messageId:
|
|
77
|
-
size:
|
|
74
|
+
children: [Z, /* @__PURE__ */ x(t, {
|
|
75
|
+
status: D,
|
|
76
|
+
message: O,
|
|
77
|
+
messageId: W,
|
|
78
|
+
size: C[m],
|
|
78
79
|
messagePosition: "bottom",
|
|
79
|
-
bannerClassName:
|
|
80
|
+
bannerClassName: h(D)
|
|
80
81
|
})]
|
|
81
82
|
});
|
|
82
83
|
});
|
|
83
84
|
//#endregion
|
|
84
|
-
export {
|
|
85
|
+
export { T as Radio, m as radioSizes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAMf,OAAO,EAkBL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAa,WAAW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AE5E,qDAAqD;AACrD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC;AAaD;;;GAGG;AACH,eAAO,MAAM,MAAM,0GAgLjB,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { motionTransitionProp as t } from "../../../lib/motion.js";
|
|
4
4
|
import "../Input/inputShellStyles.js";
|
|
5
|
-
import { InputStatusBanner as ee } from "../inputShared/InputStatusBanner.js";
|
|
6
|
-
import { switchDescriptionClasses as
|
|
7
|
-
import { forwardRef as
|
|
5
|
+
import { InputStatusBanner as ee, warnStatusWithoutMessage as n } from "../inputShared/InputStatusBanner.js";
|
|
6
|
+
import { switchDescriptionClasses as te, switchDescriptionRowClasses as r, switchHiddenInputClasses as i, switchHitTargetDescriptionAlignClasses as ne, switchHitTargetSizeClasses as re, switchLabelClassesFor as a, switchLayouts as o, switchRowBaseClasses as ie, switchRowLabelOnlyClasses as s, switchRowSizeClasses as ae, switchSettingsRowClasses as oe, switchSizes as c, switchStatusBannerClassesFor as l, switchTextColumnClasses as u, switchThumbClasses as d, switchThumbOffsetPx as f, switchThumbSizeClasses as p, switchTrackClassesFor as se } from "./switchStyles.js";
|
|
7
|
+
import { forwardRef as m, useId as ce, useState as h } from "react";
|
|
8
8
|
import { Loader2 as g } from "lucide-react";
|
|
9
9
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
10
|
import { motion as b } from "motion/react";
|
|
@@ -16,24 +16,25 @@ var x = {
|
|
|
16
16
|
function S(e) {
|
|
17
17
|
e.message != null && e.status == null && console.warn("[WMDS Switch] `message` requires `status`.");
|
|
18
18
|
}
|
|
19
|
-
var C =
|
|
20
|
-
|
|
19
|
+
var C = m(function({ size: o = "md", layout: c = "inline", label: m, labelHidden: C = !1, description: w, status: T, message: E, loading: D = !1, className: O, disabled: k, readOnly: A, checked: j, defaultChecked: M, id: N, onChange: P, ...F }, I) {
|
|
20
|
+
n("Switch", T, E);
|
|
21
|
+
let L = ce(), R = N ?? L;
|
|
21
22
|
S({
|
|
22
23
|
status: T,
|
|
23
24
|
message: E
|
|
24
25
|
});
|
|
25
|
-
let z = j !== void 0, [B, V] =
|
|
26
|
+
let z = j !== void 0, [B, V] = h(M ?? !1), H = z ? !!j : B, U = k || D, W = D && !k, G = E != null && E.length > 0 && T != null, K = G ? `${R}-message` : void 0, q = w != null && !C ? `${R}-description` : void 0, le = [
|
|
26
27
|
F["aria-describedby"],
|
|
27
28
|
q,
|
|
28
29
|
K
|
|
29
|
-
].filter(Boolean).join(" ") || void 0,
|
|
30
|
+
].filter(Boolean).join(" ") || void 0, ue = (e) => {
|
|
30
31
|
if (A || W) {
|
|
31
32
|
e.preventDefault();
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
35
|
z || V(e.target.checked), P?.(e);
|
|
35
|
-
},
|
|
36
|
-
className: e("relative flex shrink-0 items-center justify-center",
|
|
36
|
+
}, de = se(o, H, U, G ? void 0 : T), J = w != null && !C, Y = t("fast"), X = f[o], Z = (t) => /* @__PURE__ */ y("span", {
|
|
37
|
+
className: e("relative flex shrink-0 items-center justify-center", re[o], t),
|
|
37
38
|
children: [/* @__PURE__ */ v("input", {
|
|
38
39
|
...F,
|
|
39
40
|
ref: I,
|
|
@@ -46,15 +47,15 @@ var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden
|
|
|
46
47
|
"aria-disabled": W || void 0,
|
|
47
48
|
readOnly: A,
|
|
48
49
|
"aria-invalid": T === "error" || void 0,
|
|
49
|
-
"aria-describedby":
|
|
50
|
+
"aria-describedby": le,
|
|
50
51
|
"aria-busy": D || void 0,
|
|
51
|
-
onChange:
|
|
52
|
-
className:
|
|
52
|
+
onChange: ue,
|
|
53
|
+
className: i
|
|
53
54
|
}), /* @__PURE__ */ v("span", {
|
|
54
|
-
className:
|
|
55
|
+
className: de,
|
|
55
56
|
"aria-hidden": !0,
|
|
56
57
|
children: D ? /* @__PURE__ */ v(b.span, {
|
|
57
|
-
className: e(
|
|
58
|
+
className: e(p[o], "flex items-center justify-center"),
|
|
58
59
|
animate: { x: H ? X : 0 },
|
|
59
60
|
transition: Y,
|
|
60
61
|
children: /* @__PURE__ */ v(g, {
|
|
@@ -62,36 +63,36 @@ var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden
|
|
|
62
63
|
strokeWidth: 2
|
|
63
64
|
})
|
|
64
65
|
}) : /* @__PURE__ */ v(b.span, {
|
|
65
|
-
className: e(
|
|
66
|
+
className: e(d, p[o]),
|
|
66
67
|
animate: { x: H ? X : 0 },
|
|
67
68
|
transition: Y
|
|
68
69
|
})
|
|
69
70
|
})]
|
|
70
71
|
}), Q = C ? /* @__PURE__ */ v("span", {
|
|
71
72
|
className: "sr-only",
|
|
72
|
-
children:
|
|
73
|
+
children: m
|
|
73
74
|
}) : /* @__PURE__ */ y("span", {
|
|
74
|
-
className:
|
|
75
|
+
className: u,
|
|
75
76
|
children: [/* @__PURE__ */ v("span", {
|
|
76
|
-
className:
|
|
77
|
-
children:
|
|
77
|
+
className: a(U, J),
|
|
78
|
+
children: m
|
|
78
79
|
}), J ? /* @__PURE__ */ v("span", {
|
|
79
80
|
id: q,
|
|
80
|
-
className:
|
|
81
|
+
className: te,
|
|
81
82
|
children: w
|
|
82
83
|
}) : null]
|
|
83
84
|
}), $ = /* @__PURE__ */ v("label", {
|
|
84
85
|
htmlFor: R,
|
|
85
|
-
className: e(
|
|
86
|
+
className: e(ie, c === "settings" ? oe : s, c === "inline" && !J && ae[o], c === "inline" && J && void 0, U && "cursor-not-allowed", O),
|
|
86
87
|
children: C ? /* @__PURE__ */ y(_, { children: [Z(), /* @__PURE__ */ v("span", {
|
|
87
88
|
className: "sr-only",
|
|
88
|
-
children:
|
|
89
|
-
})] }) :
|
|
90
|
-
className:
|
|
91
|
-
children: [Z(
|
|
89
|
+
children: m
|
|
90
|
+
})] }) : c === "settings" ? /* @__PURE__ */ y(_, { children: [Q, Z()] }) : J ? /* @__PURE__ */ y("span", {
|
|
91
|
+
className: r[o],
|
|
92
|
+
children: [Z(ne[o]), Q]
|
|
92
93
|
}) : /* @__PURE__ */ y(_, { children: [Z(), C ? null : /* @__PURE__ */ v("span", {
|
|
93
|
-
className:
|
|
94
|
-
children:
|
|
94
|
+
className: a(U),
|
|
95
|
+
children: m
|
|
95
96
|
})] })
|
|
96
97
|
});
|
|
97
98
|
return !G || T == null || K == null ? $ : /* @__PURE__ */ y("div", {
|
|
@@ -100,11 +101,11 @@ var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden
|
|
|
100
101
|
status: T,
|
|
101
102
|
message: E,
|
|
102
103
|
messageId: K,
|
|
103
|
-
size: x[
|
|
104
|
+
size: x[o],
|
|
104
105
|
messagePosition: "bottom",
|
|
105
|
-
bannerClassName:
|
|
106
|
+
bannerClassName: l(T)
|
|
106
107
|
})]
|
|
107
108
|
});
|
|
108
109
|
});
|
|
109
110
|
//#endregion
|
|
110
|
-
export { C as Switch,
|
|
111
|
+
export { C as Switch, o as switchLayouts, c as switchSizes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/at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2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
|
-
import { inputAttachedFieldClasses as n, inputCompoundShellClassesFor as r, inputControlStackClasses as i, inputDisabledClasses as a, inputFieldStackClasses as o, inputStatusGapClasses as
|
|
5
|
-
import { InputStatusBanner as c } from "../inputShared/InputStatusBanner.js";
|
|
6
|
-
import { InputTrailingAffordance as
|
|
7
|
-
import { textareaBaseClasses as
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import { Fragment as
|
|
4
|
+
import { inputAttachedFieldClasses as n, inputCompoundShellClassesFor as r, inputControlStackClasses as i, inputDisabledClasses as a, inputFieldStackClasses as o, inputStatusGapClasses as ee } from "../Input/inputShellStyles.js";
|
|
5
|
+
import { InputStatusBanner as s, warnStatusWithoutMessage as c } from "../inputShared/InputStatusBanner.js";
|
|
6
|
+
import { InputTrailingAffordance as l } from "../inputShared/InputTrailingAffordance.js";
|
|
7
|
+
import { textareaBaseClasses as u, textareaCompoundFieldPaddingClasses as d, textareaCompoundInnerFieldClassesFor as f, textareaFixedPaddingClasses as p, textareaInlineClasses as m, textareaMinHeightClasses as h, textareaResizeClasses as g, textareaResizes as _, textareaShellFieldClasses as v, textareaSoloShellClassesFor as te, textareaStatusBannerClassesFor as y, textareaTrailingInsetClasses as b, textareaTrailingInsetPositionClasses as x } from "./textareaShellStyles.js";
|
|
8
|
+
import { forwardRef as S, useId as C } from "react";
|
|
9
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/atoms/TextArea/TextArea.tsx
|
|
11
|
-
function
|
|
11
|
+
function D(e) {
|
|
12
12
|
e.label == null && e["aria-label"] == null && e["aria-labelledby"] == null && console.warn("[WMDS TextArea] Provide `label`, `aria-label`, or `aria-labelledby`.");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function O(e) {
|
|
15
15
|
e.message != null && e.status == null && console.warn("[WMDS TextArea] `message` requires `status`."), e.inline && (e.label != null || e.description != null || e.liveStatus != null || e.status != null || e.message != null) && console.warn("[WMDS TextArea] `inline` is for PromptBar only — omit label, description, and validation.");
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
var k = S(function({ size: s = "md", label: _, description: y, status: S, message: k, liveStatus: A, messagePosition: j = "bottom", loading: M = !1, rows: N = 4, resize: P = "vertical", inline: F = !1, className: I, disabled: L, id: R, "aria-describedby": z, ...B }, V) {
|
|
18
|
+
c("TextArea", S, k);
|
|
19
|
+
let H = C(), U = R ?? H;
|
|
20
|
+
D({
|
|
21
|
+
label: _,
|
|
21
22
|
"aria-label": B["aria-label"],
|
|
22
23
|
"aria-labelledby": B["aria-labelledby"]
|
|
23
|
-
}),
|
|
24
|
-
status:
|
|
25
|
-
message:
|
|
24
|
+
}), O({
|
|
25
|
+
status: S,
|
|
26
|
+
message: k,
|
|
26
27
|
inline: F,
|
|
27
|
-
label:
|
|
28
|
-
description:
|
|
28
|
+
label: _,
|
|
29
|
+
description: y,
|
|
29
30
|
liveStatus: A
|
|
30
31
|
});
|
|
31
|
-
let W =
|
|
32
|
+
let W = k != null && k.length > 0 && S != null, G = !W && (M || S != null), K = y == null ? void 0 : `${U}-description`, q = W ? `${U}-message` : void 0, J = [
|
|
32
33
|
z,
|
|
33
34
|
K,
|
|
34
35
|
q
|
|
35
36
|
].filter(Boolean).join(" ") || void 0;
|
|
36
|
-
if (F) return /* @__PURE__ */
|
|
37
|
+
if (F) return /* @__PURE__ */ T("textarea", {
|
|
37
38
|
...B,
|
|
38
39
|
ref: V,
|
|
39
40
|
id: U,
|
|
40
41
|
rows: N,
|
|
41
42
|
disabled: L,
|
|
42
|
-
"aria-invalid":
|
|
43
|
+
"aria-invalid": S === "error" || void 0,
|
|
43
44
|
"aria-describedby": J,
|
|
44
|
-
className: e(a,
|
|
45
|
+
className: e(a, m, I)
|
|
45
46
|
});
|
|
46
|
-
let Y = /* @__PURE__ */
|
|
47
|
+
let Y = /* @__PURE__ */ T("textarea", {
|
|
47
48
|
...B,
|
|
48
49
|
ref: V,
|
|
49
50
|
id: U,
|
|
50
51
|
rows: N,
|
|
51
52
|
disabled: L,
|
|
52
|
-
"aria-invalid":
|
|
53
|
+
"aria-invalid": S === "error" || void 0,
|
|
53
54
|
"aria-describedby": J,
|
|
54
|
-
className: e(a,
|
|
55
|
-
}), X = G ? /* @__PURE__ */
|
|
56
|
-
className: e(
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
size:
|
|
59
|
-
status: M ? void 0 :
|
|
55
|
+
className: e(a, g[P], u, p[s], h[s], v, G && ee[s], W && e(n, "rounded-none border-0 shadow-none focus-visible:!outline-none focus-visible:!ring-0", "rounded-none"))
|
|
56
|
+
}), X = G ? /* @__PURE__ */ T("span", {
|
|
57
|
+
className: e(b, x[s]),
|
|
58
|
+
children: /* @__PURE__ */ T(l, {
|
|
59
|
+
size: s,
|
|
60
|
+
status: M ? void 0 : S,
|
|
60
61
|
loading: M
|
|
61
62
|
})
|
|
62
|
-
}) : null, Z = /* @__PURE__ */
|
|
63
|
-
className: e(
|
|
63
|
+
}) : null, Z = /* @__PURE__ */ E(w, { children: [Y, X] }), re = /* @__PURE__ */ T("div", {
|
|
64
|
+
className: e(te(s, S === "success" ? void 0 : S, P), I),
|
|
64
65
|
children: Z
|
|
65
|
-
}),
|
|
66
|
-
className: e("relative w-full",
|
|
66
|
+
}), ie = /* @__PURE__ */ T("div", {
|
|
67
|
+
className: e("relative w-full", d(P, s)),
|
|
67
68
|
children: Z
|
|
68
|
-
}), Q = W &&
|
|
69
|
-
status:
|
|
70
|
-
message:
|
|
69
|
+
}), Q = W && S != null && q != null ? /* @__PURE__ */ T(ne, {
|
|
70
|
+
status: S,
|
|
71
|
+
message: k,
|
|
71
72
|
messageId: q,
|
|
72
|
-
size:
|
|
73
|
+
size: s,
|
|
73
74
|
messagePosition: j
|
|
74
|
-
}) : null, $ = W &&
|
|
75
|
-
className: r(
|
|
75
|
+
}) : null, $ = W && S != null ? /* @__PURE__ */ E("div", {
|
|
76
|
+
className: r(s, S),
|
|
76
77
|
children: [
|
|
77
78
|
j === "top" ? Q : null,
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
className:
|
|
80
|
-
children:
|
|
79
|
+
/* @__PURE__ */ T("div", {
|
|
80
|
+
className: f(s, S, j),
|
|
81
|
+
children: ie
|
|
81
82
|
}),
|
|
82
83
|
j === "bottom" ? Q : null
|
|
83
84
|
]
|
|
84
|
-
}) : /* @__PURE__ */
|
|
85
|
+
}) : /* @__PURE__ */ T("div", {
|
|
85
86
|
className: i,
|
|
86
|
-
children:
|
|
87
|
+
children: re
|
|
87
88
|
});
|
|
88
|
-
return
|
|
89
|
+
return _ == null && y == null && A == null ? $ : /* @__PURE__ */ E("div", {
|
|
89
90
|
className: o,
|
|
90
91
|
children: [
|
|
91
|
-
|
|
92
|
+
_ == null ? null : /* @__PURE__ */ T("label", {
|
|
92
93
|
htmlFor: U,
|
|
93
94
|
className: e(t("ui-label"), L && "opacity-50"),
|
|
94
|
-
children:
|
|
95
|
+
children: _
|
|
95
96
|
}),
|
|
96
|
-
|
|
97
|
-
K == null ? null : /* @__PURE__ */ w("p", {
|
|
97
|
+
K == null ? null : /* @__PURE__ */ T("p", {
|
|
98
98
|
id: K,
|
|
99
99
|
className: t("caption"),
|
|
100
|
-
children:
|
|
100
|
+
children: y
|
|
101
101
|
}),
|
|
102
|
-
|
|
102
|
+
$,
|
|
103
|
+
A == null ? null : /* @__PURE__ */ T("p", {
|
|
103
104
|
role: "status",
|
|
104
105
|
"aria-live": "polite",
|
|
105
106
|
id: `${U}-live-status`,
|
|
@@ -109,15 +110,15 @@ var O = x(function({ size: c = "md", label: h, description: v, status: x, messag
|
|
|
109
110
|
]
|
|
110
111
|
});
|
|
111
112
|
});
|
|
112
|
-
function
|
|
113
|
-
return /* @__PURE__ */
|
|
113
|
+
function ne({ status: e, message: t, messageId: n, size: r, messagePosition: i }) {
|
|
114
|
+
return /* @__PURE__ */ T(s, {
|
|
114
115
|
status: e,
|
|
115
116
|
message: t,
|
|
116
117
|
messageId: n,
|
|
117
118
|
size: r,
|
|
118
119
|
messagePosition: i,
|
|
119
|
-
bannerClassName:
|
|
120
|
+
bannerClassName: y(e, r, i)
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
//#endregion
|
|
123
|
-
export {
|
|
124
|
+
export { k as TextArea, _ as textareaResizes };
|
|
@@ -19,8 +19,8 @@ var g = [
|
|
|
19
19
|
md: "min-h-24",
|
|
20
20
|
lg: "min-h-28"
|
|
21
21
|
}, b = {
|
|
22
|
-
sm: "px-2.5 py-2 text-xs leading-normal",
|
|
23
|
-
md: "px-3 py-2.5 text-sm leading-normal",
|
|
22
|
+
sm: "px-2.5 py-2 text-xs pointer-coarse:text-base leading-normal",
|
|
23
|
+
md: "px-3 py-2.5 text-sm pointer-coarse:text-base leading-normal",
|
|
24
24
|
lg: "px-4 py-3 text-base leading-normal"
|
|
25
25
|
}, x = {
|
|
26
26
|
sm: "pr-2.5 pb-2.5",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type InputMessagePosition, type InputSize, type InputStatus } from "../Input/inputShellStyles";
|
|
2
|
+
/**
|
|
3
|
+
* Errors and validation V10: an error or a warning always says what's wrong. Warns in the console when a
|
|
4
|
+
* field has `status="error"` or `"warning"` and no `message`; a status-only success tick is fine.
|
|
5
|
+
*/
|
|
6
|
+
export declare function warnStatusWithoutMessage(component: string, status: InputStatus | undefined, message: unknown): void;
|
|
2
7
|
/** Tinted validation band — shared by **Input** and **TextArea** (ADR-0006). */
|
|
3
8
|
export declare function InputStatusBanner({ status, message, messageId, size, messagePosition, bannerClassName, className, }: {
|
|
4
9
|
status: InputStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputStatusBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/inputShared/InputStatusBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"InputStatusBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/inputShared/InputStatusBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAkBnC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,QAI5G;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,SAAS,EACT,IAAI,EACJ,eAAe,EACf,eAAe,EACf,SAAS,GACV,EAAE;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,eAAe,EAAE,oBAAoB,CAAC;IACtC,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAmBA"}
|
|
@@ -12,13 +12,24 @@ function c({ status: e }) {
|
|
|
12
12
|
"aria-hidden": !0
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
var l = {
|
|
16
|
+
error: "Error:",
|
|
17
|
+
warning: "Warning:",
|
|
18
|
+
success: null
|
|
19
|
+
};
|
|
20
|
+
function u(e, t, n) {
|
|
21
|
+
(t === "error" || t === "warning") && (n == null || n === "") && console.warn(`[WMDS ${e}] \`status="${t}"\` needs a \`message\` that says what's wrong and how to fix it.`);
|
|
22
|
+
}
|
|
23
|
+
function d({ status: n, message: r, messageId: i, size: a, messagePosition: u, bannerClassName: d, className: f }) {
|
|
16
24
|
return /* @__PURE__ */ s("p", {
|
|
17
25
|
id: i,
|
|
18
|
-
className: e(
|
|
26
|
+
className: e(d ?? t(n, a, u), "text-xs font-normal tracking-normal", f),
|
|
19
27
|
role: n === "error" ? "alert" : "status",
|
|
20
|
-
children: [/* @__PURE__ */ o(c, { status: n }), /* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ o(c, { status: n }), /* @__PURE__ */ s("span", { children: [l[n] == null ? null : /* @__PURE__ */ s("span", {
|
|
29
|
+
className: "sr-only",
|
|
30
|
+
children: [l[n], " "]
|
|
31
|
+
}), r] })]
|
|
21
32
|
});
|
|
22
33
|
}
|
|
23
34
|
//#endregion
|
|
24
|
-
export {
|
|
35
|
+
export { d as InputStatusBanner, u as warnStatusWithoutMessage };
|
|
@@ -4,7 +4,7 @@ export type BreadcrumbSeparator = (typeof breadcrumbSeparators)[number];
|
|
|
4
4
|
export declare const breadcrumbVariants: readonly ["sans", "mono"];
|
|
5
5
|
/** `sans` (default) — body type. `mono` — `type-eyebrow` caps, for editorial pages beside **SectionCaption**. */
|
|
6
6
|
export type BreadcrumbVariant = (typeof breadcrumbVariants)[number];
|
|
7
|
-
export declare const breadcrumbListClasses = "m-0 flex min-w-0 list-none flex-wrap items-center gap-x-1.5 gap-y-1 p-0
|
|
7
|
+
export declare const breadcrumbListClasses = "m-0 flex min-w-0 list-none flex-wrap items-center gap-x-1.5 gap-y-1 p-0 md:gap-x-2";
|
|
8
8
|
export declare const breadcrumbVariantClasses: Record<BreadcrumbVariant, string>;
|
|
9
9
|
export declare const breadcrumbItemClasses = "inline-flex min-w-0 items-center";
|
|
10
10
|
/**
|
|
@@ -3,9 +3,9 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
4
|
import { motionTransition as n } from "../../../lib/motion.js";
|
|
5
5
|
//#region src/components/molecules/Breadcrumb/breadcrumbStyles.ts
|
|
6
|
-
var r = ["chevron", "slash"], i = ["sans", "mono"], a = "m-0 flex min-w-0 list-none flex-wrap items-center gap-x-1.5 gap-y-1 p-0
|
|
6
|
+
var r = ["chevron", "slash"], i = ["sans", "mono"], a = "m-0 flex min-w-0 list-none flex-wrap items-center gap-x-1.5 gap-y-1 p-0 md:gap-x-2", o = {
|
|
7
7
|
sans: e(t("body"), "text-muted"),
|
|
8
8
|
mono: t("eyebrow")
|
|
9
|
-
}, s = "inline-flex min-w-0 items-center", c = "block max-w-[10rem] truncate
|
|
9
|
+
}, s = "inline-flex min-w-0 items-center", c = "block max-w-[10rem] truncate md:max-w-[16rem] lg:max-w-[24rem]", l = e(c, "py-0.5 -my-0.5", "rounded-sm text-muted underline decoration-transparent decoration-solid underline-offset-4", "transition-[color,text-decoration-color]", n("fast"), "hover:text-fg hover:decoration-current", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body"), u = e(c, "text-fg"), d = e(c, "text-muted"), f = "inline-flex shrink-0 items-center text-muted", p = "select-none", m = "relative -mx-2.5 -my-2 inline-flex";
|
|
10
10
|
//#endregion
|
|
11
11
|
export { s as breadcrumbItemClasses, l as breadcrumbLinkClasses, a as breadcrumbListClasses, m as breadcrumbMoreClasses, u as breadcrumbPageClasses, f as breadcrumbSeparatorClasses, r as breadcrumbSeparators, p as breadcrumbSlashClasses, d as breadcrumbTextClasses, o as breadcrumbVariantClasses, i as breadcrumbVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAUL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,KAAK,wBAAwB,EAC7B,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,qDAAqD;AACrD,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,4BAA4B,CAAC;CAC1C;AAkBD,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,WAAmB,EACnB,WAAW,EACX,MAAM,EACN,cAAc,EACd,WAAwB,EACxB,IAAW,EACX,QAAgB,EAChB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAUL,KA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