@thewhatmatters/wmds 0.4.33 → 0.4.35
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 +70 -0
- package/bin/wmds-check.mjs +24 -0
- 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 +6 -6
- package/dist/components/atoms/Input/Input.d.ts +13 -3
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.js +102 -67
- package/dist/components/atoms/Input/autofillFields.d.ts +9 -0
- package/dist/components/atoms/Input/autofillFields.d.ts.map +1 -0
- package/dist/components/atoms/Input/autofillFields.js +8 -0
- package/dist/components/atoms/Input/fieldWidth.d.ts +19 -0
- package/dist/components/atoms/Input/fieldWidth.d.ts.map +1 -0
- package/dist/components/atoms/Input/fieldWidth.js +24 -0
- package/dist/components/atoms/Radio/radioStyles.d.ts +1 -1
- package/dist/components/atoms/Radio/radioStyles.d.ts.map +1 -1
- package/dist/components/atoms/Radio/radioStyles.js +6 -6
- package/dist/components/molecules/CalEmbed/CalEmbed.d.ts +6 -6
- package/dist/components/molecules/CalEmbed/CalEmbed.d.ts.map +1 -1
- package/dist/components/molecules/CalEmbed/CalEmbed.js +20 -15
- package/dist/components/molecules/Field/Field.d.ts +11 -3
- package/dist/components/molecules/Field/Field.d.ts.map +1 -1
- package/dist/components/molecules/Field/Field.js +45 -30
- package/dist/components/molecules/Field/fieldStyles.d.ts +9 -6
- package/dist/components/molecules/Field/fieldStyles.d.ts.map +1 -1
- package/dist/components/molecules/Field/fieldStyles.js +1 -1
- package/dist/components/molecules/IntakeForm/IntakeForm.d.ts +15 -5
- package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -1
- package/dist/components/molecules/IntakeForm/IntakeForm.js +110 -70
- package/dist/components/molecules/IntakeForm/IntakeHoneypot.d.ts +17 -0
- package/dist/components/molecules/IntakeForm/IntakeHoneypot.d.ts.map +1 -0
- package/dist/components/molecules/IntakeForm/IntakeHoneypot.js +29 -0
- package/dist/components/molecules/PillGroup/PillGroup.d.ts +7 -3
- package/dist/components/molecules/PillGroup/PillGroup.d.ts.map +1 -1
- package/dist/components/molecules/PillGroup/PillGroup.js +37 -27
- package/dist/components/molecules/PillGroup/pillGroupStyles.d.ts +3 -0
- package/dist/components/molecules/PillGroup/pillGroupStyles.d.ts.map +1 -1
- package/dist/components/molecules/PillGroup/pillGroupStyles.js +4 -3
- package/dist/components/molecules/Search/Search.d.ts +1 -1
- package/dist/components/molecules/Search/Search.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.d.ts +19 -1
- package/dist/components/molecules/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.js +102 -60
- package/dist/components/molecules/Select/selectStyles.d.ts +9 -1
- package/dist/components/molecules/Select/selectStyles.d.ts.map +1 -1
- package/dist/components/molecules/Select/selectStyles.js +11 -3
- package/dist/components/molecules/Select/usStateOptions.d.ts +8 -0
- package/dist/components/molecules/Select/usStateOptions.d.ts.map +1 -0
- package/dist/components/molecules/Select/usStateOptions.js +7 -0
- package/dist/components/molecules/StepProgress/StepProgress.d.ts.map +1 -1
- package/dist/components/molecules/StepProgress/StepProgress.js +1 -0
- package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.d.ts +14 -2
- package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.d.ts.map +1 -1
- package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.js +38 -33
- package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.d.ts +5 -1
- package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.d.ts.map +1 -1
- package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.js +3 -3
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +14 -2
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.js +94 -62
- package/dist/components/organisms/IntakeModal/intakeModalStyles.d.ts +3 -3
- package/dist/components/organisms/IntakeModal/intakeModalStyles.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/intakeModalStyles.js +1 -1
- package/dist/components/organisms/IntakeModal/useIntakeUrlState.d.ts +12 -0
- package/dist/components/organisms/IntakeModal/useIntakeUrlState.d.ts.map +1 -0
- package/dist/components/organisms/IntakeModal/useIntakeUrlState.js +16 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +145 -141
- package/dist/styles.css +1 -1
- package/docs/components.md +1 -1
- package/docs/exports.json +2 -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-above.tsx +16 -0
- 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 +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-errorsummary--contact-form.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-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 +8 -2
- 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 +2 -2
- 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 +2 -2
- 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 +5 -5
- package/package.json +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +0 -25
|
@@ -1,53 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import { pillGroupClasses as t,
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { jsx as
|
|
3
|
+
import { pillGroupClasses as t, pillGroupFieldClasses as n, pillGroupIdleClasses as r, pillGroupLabelClasses as i, pillGroupMutedClasses as a, pillGroupSelectedClasses as o } from "./pillGroupStyles.js";
|
|
4
|
+
import { createContext as s, useContext as c, useId as l } from "react";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/molecules/PillGroup/PillGroup.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let t =
|
|
7
|
+
var f = ["solid", "muted"], p = s(null);
|
|
8
|
+
function m(e) {
|
|
9
|
+
let t = c(p);
|
|
10
10
|
if (t == null) throw Error(`${e} must be used inside PillGroup.`);
|
|
11
11
|
return t;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return e ?
|
|
13
|
+
function h(e, t) {
|
|
14
|
+
return e ? o : t === "muted" ? a : r;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
|
|
16
|
+
function g({ label: r, "aria-label": a, value: o, onValueChange: s, children: c, className: f }) {
|
|
17
|
+
let m = l(), h = `${m}-label`;
|
|
18
|
+
r == null && a == null && console.warn("[WMDS PillGroup] Provide `label` (the question) or `aria-label`.");
|
|
19
|
+
let g = /* @__PURE__ */ u("div", {
|
|
20
|
+
role: "radiogroup",
|
|
21
|
+
"aria-label": r == null ? a : void 0,
|
|
22
|
+
"aria-labelledby": r == null ? void 0 : h,
|
|
23
|
+
className: e(t, r == null && f),
|
|
24
|
+
children: c
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ u(p.Provider, {
|
|
19
27
|
value: {
|
|
20
|
-
name:
|
|
21
|
-
value:
|
|
22
|
-
onValueChange:
|
|
28
|
+
name: m,
|
|
29
|
+
value: o,
|
|
30
|
+
onValueChange: s
|
|
23
31
|
},
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
children: r == null ? g : /* @__PURE__ */ d("div", {
|
|
33
|
+
className: e(n, f),
|
|
34
|
+
children: [/* @__PURE__ */ u("span", {
|
|
35
|
+
id: h,
|
|
36
|
+
className: i,
|
|
37
|
+
children: r
|
|
38
|
+
}), g]
|
|
29
39
|
})
|
|
30
40
|
});
|
|
31
41
|
}
|
|
32
|
-
function
|
|
33
|
-
let a =
|
|
34
|
-
return /* @__PURE__ */
|
|
42
|
+
function _({ value: t, children: n, emphasis: r = "solid", className: i }) {
|
|
43
|
+
let a = m("PillGroup.Item"), o = a.value === t;
|
|
44
|
+
return /* @__PURE__ */ d("label", {
|
|
35
45
|
className: "inline-flex",
|
|
36
46
|
"data-emphasis": r,
|
|
37
47
|
"data-value": t,
|
|
38
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ u("input", {
|
|
39
49
|
type: "radio",
|
|
40
50
|
className: "peer sr-only",
|
|
41
51
|
name: a.name,
|
|
42
52
|
value: t,
|
|
43
53
|
checked: o,
|
|
44
54
|
onChange: () => a.onValueChange(t)
|
|
45
|
-
}), /* @__PURE__ */
|
|
46
|
-
className: e(
|
|
55
|
+
}), /* @__PURE__ */ u("span", {
|
|
56
|
+
className: e(h(o, r), i),
|
|
47
57
|
children: n
|
|
48
58
|
})]
|
|
49
59
|
});
|
|
50
60
|
}
|
|
51
|
-
var
|
|
61
|
+
var v = Object.assign(g, { Item: _ });
|
|
52
62
|
//#endregion
|
|
53
|
-
export {
|
|
63
|
+
export { v as PillGroup, f as pillGroupEmphases };
|
|
@@ -10,4 +10,7 @@ export declare const pillGroupIdleClasses: string;
|
|
|
10
10
|
export declare const pillGroupMutedClasses: string;
|
|
11
11
|
/** Selected pill — brand navy fill. Owned by PillGroup, not a Badge variant. */
|
|
12
12
|
export declare const pillGroupSelectedClasses: string;
|
|
13
|
+
/** Question above the pills (Dropdowns C2, C9). */
|
|
14
|
+
export declare const pillGroupFieldClasses = "flex flex-col gap-2";
|
|
15
|
+
export declare const pillGroupLabelClasses: string;
|
|
13
16
|
//# sourceMappingURL=pillGroupStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pillGroupStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/PillGroup/pillGroupStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pillGroupStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/PillGroup/pillGroupStyles.ts"],"names":[],"mappings":"AAIA,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AAEvD,eAAO,MAAM,qBAAqB,QAIjC,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,oBAAoB,QAAuD,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAuD,CAAC;AAE1F,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,QAGpC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,eAAO,MAAM,qBAAqB,QAA8B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
|
+
import { badgeBaseClasses as n, badgeMutedClasses as r, badgeSolidClasses as i } from "../../atoms/Badge/badgeStyles.js";
|
|
4
5
|
//#region src/components/molecules/PillGroup/pillGroupStyles.ts
|
|
5
|
-
var
|
|
6
|
+
var a = "flex flex-wrap gap-2", o = e(n, "min-h-11 cursor-pointer rounded-[var(--radius-control)] px-4", "peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-body"), s = e(o, i.neutral), c = e(o, r.neutral), l = e(o, "border border-transparent bg-brand text-on-brand"), u = "flex flex-col gap-2", d = t("ui-label");
|
|
6
7
|
//#endregion
|
|
7
|
-
export {
|
|
8
|
+
export { a as pillGroupClasses, u as pillGroupFieldClasses, s as pillGroupIdleClasses, d as pillGroupLabelClasses, c as pillGroupMutedClasses, l as pillGroupSelectedClasses, o as pillGroupShapeClasses };
|
|
@@ -5,7 +5,7 @@ export type { SearchSize } from "./searchStyles";
|
|
|
5
5
|
export { searchSizes } from "./searchStyles";
|
|
6
6
|
/** Layout-only — width, margin, flex placement. */
|
|
7
7
|
export type SearchLayoutClassName = string;
|
|
8
|
-
export interface SearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
8
|
+
export interface SearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "width"> {
|
|
9
9
|
size?: SearchSize;
|
|
10
10
|
/**
|
|
11
11
|
* The field's name, read by screen readers (Labels and placeholders F7, F10). It may stay visually
|
|
@@ -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;
|
|
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,GAAG,OAAO,CAAC;IACrE,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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type SelectSize } from "./selectStyles";
|
|
3
|
+
import { type FieldWidth } from "../../atoms/Input/fieldWidth";
|
|
3
4
|
export type { SelectSize } from "./selectStyles";
|
|
4
5
|
export { selectSizes } from "./selectStyles";
|
|
5
6
|
/** Layout-only — width, margin in toolbars and Card headers. */
|
|
@@ -25,6 +26,23 @@ export interface SelectProps {
|
|
|
25
26
|
className?: SelectLayoutClassName;
|
|
26
27
|
id?: string;
|
|
27
28
|
"aria-label"?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Trigger width in characters for short fixed answers (a US state `2ch`); default `full` (Form layout L7).
|
|
31
|
+
*/
|
|
32
|
+
width?: FieldWidth;
|
|
33
|
+
/**
|
|
34
|
+
* The browser's own `<select>` in the WMDS shell (Dropdowns C8): the phone's picker, type-to-jump,
|
|
35
|
+
* autofill, and plain form submit. Default: on when `name` or `autoComplete` is set (a form field),
|
|
36
|
+
* off otherwise (toolbars, filters, menus with icons or counts keep the custom listbox). Native options
|
|
37
|
+
* show text only, so `start` / `end` are dropped.
|
|
38
|
+
*/
|
|
39
|
+
native?: boolean;
|
|
40
|
+
/** Form name (turns native mode on by default). */
|
|
41
|
+
name?: string;
|
|
42
|
+
/** e.g. `address-level1` for a State select (turns native mode on by default). */
|
|
43
|
+
autoComplete?: string;
|
|
44
|
+
/** Required in a form: sets `required` on the native select, `aria-required` on the listbox trigger. */
|
|
45
|
+
required?: boolean;
|
|
28
46
|
/** Extra ids that describe the trigger (Field passes its description here); joined with `description`. */
|
|
29
47
|
"aria-describedby"?: string;
|
|
30
48
|
}
|
|
@@ -32,5 +50,5 @@ export interface SelectProps {
|
|
|
32
50
|
* Pill select — Input-matched trigger + floating listbox panel.
|
|
33
51
|
* Compose in forms and Card headers (period filters).
|
|
34
52
|
*/
|
|
35
|
-
export declare function Select({ options, value: valueProp, defaultValue, onValueChange, placeholder, label, description, disabled, size, className, id: idProp, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: SelectProps): import("react").JSX.Element;
|
|
53
|
+
export declare function Select({ options, value: valueProp, defaultValue, onValueChange, placeholder, label, description, disabled, size, className, width, native: nativeProp, name, autoComplete, required, id: idProp, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: SelectProps): import("react").JSX.Element;
|
|
36
54
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMhE,OAAO,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMhE,OAAO,EAgBL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEhF,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wGAAwG;IACxG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0GAA0G;IAC1G,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA4BD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,KAAK,EAAE,SAAS,EAChB,YAAY,EACZ,aAAa,EACb,WAAuB,EACvB,KAAK,EACL,WAAW,EACX,QAAgB,EAChB,IAAW,EACX,SAAS,EACT,KAAc,EACd,MAAM,EAAE,UAAU,EAClB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,eAAe,GACpC,EAAE,WAAW,+BAiLb"}
|
|
@@ -1,84 +1,126 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { fieldWidthStyle as t } from "../../atoms/Input/fieldWidth.js";
|
|
4
|
+
import { Dropdown as n } from "../Dropdown/Dropdown.js";
|
|
5
|
+
import { useDropdownMenu as r } from "../Dropdown/useDropdownMenu.js";
|
|
6
|
+
import { measureSelectMenuStyle as ee } from "./selectMenuPosition.js";
|
|
7
|
+
import { selectDescriptionClasses as te, selectFieldStackClasses as i, selectLabelClasses as a, selectNativeCaretClasses as o, selectNativeClasses as ne, selectRootClasses as s, selectShellClasses as c, selectSizes as l, selectTriggerCaretRotateClasses as u, selectTriggerCaretSlotClasses as d, selectTriggerInnerClasses as f, selectTriggerLabelClasses as p } from "./selectStyles.js";
|
|
8
|
+
import { useId as m, useRef as h, useState as re } from "react";
|
|
9
|
+
import { ChevronDown as g } from "lucide-react";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/molecules/Select/Select.tsx
|
|
11
|
-
function
|
|
12
|
+
function y(e) {
|
|
12
13
|
e.label == null && e["aria-label"] == null && console.warn("[WMDS Select] Provide `label` or `aria-label`."), e.options.length === 0 && console.warn("[WMDS Select] `options` must not be empty.");
|
|
13
14
|
}
|
|
15
|
+
var b = {
|
|
16
|
+
sm: "2.75rem + 2px",
|
|
17
|
+
md: "3rem + 2px",
|
|
18
|
+
lg: "3.5rem + 2px"
|
|
19
|
+
};
|
|
14
20
|
function x(e, t) {
|
|
15
21
|
if (t != null) return e.find((e) => e.value === t)?.label;
|
|
16
22
|
}
|
|
17
|
-
function S({ options: l, value: S, defaultValue: C, onValueChange: w, placeholder: T = "Select…", label: E, description: D, disabled: O = !1, size: k = "md", className: A,
|
|
18
|
-
let
|
|
19
|
-
|
|
23
|
+
function S({ options: l, value: S, defaultValue: C, onValueChange: w, placeholder: T = "Select…", label: E, description: D, disabled: O = !1, size: k = "md", className: A, width: j = "full", native: ie, name: M, autoComplete: N, required: P, id: F, "aria-label": I, "aria-describedby": L }) {
|
|
24
|
+
let R = m(), z = F ?? R, B = D == null ? void 0 : `${z}-description`, V = [L, B].filter(Boolean).join(" ") || void 0, H = h(null), U = h(null), [W, G] = re(C), K = S !== void 0, q = K ? S : W;
|
|
25
|
+
y({
|
|
20
26
|
label: E,
|
|
21
|
-
"aria-label":
|
|
27
|
+
"aria-label": I,
|
|
22
28
|
options: l
|
|
23
29
|
});
|
|
24
|
-
let
|
|
25
|
-
function
|
|
26
|
-
|
|
30
|
+
let J = x(l, q);
|
|
31
|
+
function Y(e) {
|
|
32
|
+
K || G(e), w?.(e);
|
|
27
33
|
}
|
|
28
|
-
|
|
34
|
+
function X(e) {
|
|
35
|
+
Y(e), Z.close({ returnFocus: !0 });
|
|
36
|
+
}
|
|
37
|
+
let Z = r({
|
|
29
38
|
rows: l,
|
|
30
|
-
triggerRef:
|
|
39
|
+
triggerRef: U,
|
|
31
40
|
focus: "trigger",
|
|
32
|
-
initialIndex: l.findIndex((e) => e.value ===
|
|
33
|
-
measure: () =>
|
|
41
|
+
initialIndex: l.findIndex((e) => e.value === q),
|
|
42
|
+
measure: () => H.current == null ? null : ee(H.current, l),
|
|
34
43
|
onChoose: (e) => {
|
|
35
44
|
let t = l[e];
|
|
36
|
-
t != null &&
|
|
45
|
+
t != null && X(t.value);
|
|
37
46
|
}
|
|
38
|
-
}),
|
|
39
|
-
|
|
47
|
+
}), Q = ie ?? (M != null || N != null);
|
|
48
|
+
Q && l.some((e) => e.start != null || e.end != null) && console.warn("[WMDS Select] Native options show text only: `start` / `end` are dropped. Pass `native={false}` to keep them.");
|
|
49
|
+
let ae = /* @__PURE__ */ _("div", {
|
|
50
|
+
style: t(j, b[k]),
|
|
51
|
+
className: e(s, A),
|
|
52
|
+
children: /* @__PURE__ */ v("div", {
|
|
53
|
+
className: e(c[k], O && "pointer-events-none opacity-50"),
|
|
54
|
+
children: [/* @__PURE__ */ v("select", {
|
|
55
|
+
id: z,
|
|
56
|
+
name: M,
|
|
57
|
+
autoComplete: N,
|
|
58
|
+
required: P,
|
|
59
|
+
disabled: O,
|
|
60
|
+
"aria-label": E == null ? I : void 0,
|
|
61
|
+
"aria-describedby": V,
|
|
62
|
+
value: q ?? "",
|
|
63
|
+
onChange: (e) => Y(e.target.value),
|
|
64
|
+
className: e(ne[k], (q == null || q === "") && "text-muted"),
|
|
65
|
+
children: [/* @__PURE__ */ _("option", {
|
|
66
|
+
value: "",
|
|
67
|
+
children: T
|
|
68
|
+
}), l.map((e) => /* @__PURE__ */ _("option", {
|
|
69
|
+
value: e.value,
|
|
70
|
+
children: e.label
|
|
71
|
+
}, e.value))]
|
|
72
|
+
}), /* @__PURE__ */ _("span", {
|
|
73
|
+
className: e(d[k], o[k]),
|
|
74
|
+
"aria-hidden": !0,
|
|
75
|
+
children: /* @__PURE__ */ _(g, { strokeWidth: 2 })
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
}), $ = Q ? ae : /* @__PURE__ */ v("div", {
|
|
79
|
+
...Z.rootProps,
|
|
80
|
+
style: t(j, b[k]),
|
|
40
81
|
className: e(s, A),
|
|
41
|
-
children: [/* @__PURE__ */
|
|
42
|
-
ref:
|
|
82
|
+
children: [/* @__PURE__ */ _("div", {
|
|
83
|
+
ref: H,
|
|
43
84
|
className: e(c[k], O && "pointer-events-none opacity-50"),
|
|
44
|
-
"data-open":
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
ref:
|
|
85
|
+
"data-open": Z.open ? "true" : "false",
|
|
86
|
+
children: /* @__PURE__ */ v("button", {
|
|
87
|
+
ref: U,
|
|
47
88
|
type: "button",
|
|
48
|
-
id:
|
|
89
|
+
id: z,
|
|
49
90
|
role: "combobox",
|
|
50
91
|
disabled: O,
|
|
51
|
-
"aria-label": E == null ?
|
|
52
|
-
"aria-labelledby": E == null ? void 0 : `${
|
|
53
|
-
"aria-describedby":
|
|
92
|
+
"aria-label": E == null ? I : void 0,
|
|
93
|
+
"aria-labelledby": E == null ? void 0 : `${z}-label`,
|
|
94
|
+
"aria-describedby": V,
|
|
95
|
+
"aria-required": P || void 0,
|
|
54
96
|
"aria-haspopup": "listbox",
|
|
55
|
-
...
|
|
97
|
+
...Z.triggerProps,
|
|
56
98
|
onClick: () => {
|
|
57
|
-
O ||
|
|
99
|
+
O || Z.toggle();
|
|
58
100
|
},
|
|
59
101
|
className: f[k],
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
-
className: e(p,
|
|
62
|
-
children:
|
|
63
|
-
}), /* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ _("span", {
|
|
103
|
+
className: e(p, J == null && "text-muted"),
|
|
104
|
+
children: J ?? T
|
|
105
|
+
}), /* @__PURE__ */ _("span", {
|
|
64
106
|
className: d[k],
|
|
65
107
|
"aria-hidden": !0,
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
className: e(u,
|
|
68
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ _("span", {
|
|
109
|
+
className: e(u, Z.open && "rotate-180"),
|
|
110
|
+
children: /* @__PURE__ */ _(g, { strokeWidth: 2 })
|
|
69
111
|
})
|
|
70
112
|
})]
|
|
71
113
|
})
|
|
72
|
-
}),
|
|
73
|
-
...
|
|
114
|
+
}), Z.open && Z.menuStyle != null ? /* @__PURE__ */ _(n.Menu, {
|
|
115
|
+
...Z.menuProps,
|
|
74
116
|
role: "listbox",
|
|
75
|
-
"aria-labelledby":
|
|
76
|
-
children: l.map((e,
|
|
77
|
-
let r = e.value ===
|
|
78
|
-
return /* @__PURE__ */
|
|
117
|
+
"aria-labelledby": z,
|
|
118
|
+
children: l.map((e, t) => {
|
|
119
|
+
let r = e.value === q;
|
|
120
|
+
return /* @__PURE__ */ _("li", {
|
|
79
121
|
role: "presentation",
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
-
...
|
|
122
|
+
children: /* @__PURE__ */ _(n.Item, {
|
|
123
|
+
...Z.rowProps(t),
|
|
82
124
|
role: "option",
|
|
83
125
|
"aria-selected": r,
|
|
84
126
|
selected: r,
|
|
@@ -87,7 +129,7 @@ function S({ options: l, value: S, defaultValue: C, onValueChange: w, placeholde
|
|
|
87
129
|
end: e.end,
|
|
88
130
|
onMouseDown: (e) => e.preventDefault(),
|
|
89
131
|
onClick: () => {
|
|
90
|
-
|
|
132
|
+
X(e.value);
|
|
91
133
|
},
|
|
92
134
|
children: e.label
|
|
93
135
|
})
|
|
@@ -95,21 +137,21 @@ function S({ options: l, value: S, defaultValue: C, onValueChange: w, placeholde
|
|
|
95
137
|
})
|
|
96
138
|
}) : null]
|
|
97
139
|
});
|
|
98
|
-
return E == null && D == null ?
|
|
99
|
-
className:
|
|
140
|
+
return E == null && D == null ? $ : /* @__PURE__ */ v("div", {
|
|
141
|
+
className: i,
|
|
100
142
|
children: [
|
|
101
|
-
E == null ? null : /* @__PURE__ */
|
|
102
|
-
id: `${
|
|
103
|
-
htmlFor:
|
|
104
|
-
className: e(
|
|
143
|
+
E == null ? null : /* @__PURE__ */ _("label", {
|
|
144
|
+
id: `${z}-label`,
|
|
145
|
+
htmlFor: z,
|
|
146
|
+
className: e(a, O && "opacity-50"),
|
|
105
147
|
children: E
|
|
106
148
|
}),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
className: i,
|
|
149
|
+
D == null ? null : /* @__PURE__ */ _("p", {
|
|
150
|
+
id: B,
|
|
151
|
+
className: te,
|
|
111
152
|
children: D
|
|
112
|
-
})
|
|
153
|
+
}),
|
|
154
|
+
$
|
|
113
155
|
]
|
|
114
156
|
});
|
|
115
157
|
}
|
|
@@ -9,7 +9,8 @@ export declare const selectShellDisabledClasses = "pointer-events-none opacity-5
|
|
|
9
9
|
/** Inner trigger — transparent; shell owns chrome and focus ring. */
|
|
10
10
|
export declare const selectTriggerInnerClasses: Record<SelectSize, string>;
|
|
11
11
|
export declare const selectTriggerLabelClasses = "min-w-0 flex-1 truncate";
|
|
12
|
-
|
|
12
|
+
/** The empty choice ("Select…"): muted, but readable at 4.5:1. `text-disabled` failed contrast. */
|
|
13
|
+
export declare const selectTriggerPlaceholderClasses = "text-muted";
|
|
13
14
|
/** Trailing caret column — fixed square; chevron SVG fills the slot. */
|
|
14
15
|
export declare const selectTriggerCaretSlotClasses: Record<SelectSize, string>;
|
|
15
16
|
export declare const selectTriggerCaretRotateClasses: string;
|
|
@@ -18,4 +19,11 @@ export { dropdownMenuOffsetPx as selectMenuOffsetPx } from "../Dropdown/dropdown
|
|
|
18
19
|
export declare const selectDisabledLabelClasses = "opacity-50";
|
|
19
20
|
export declare const selectLabelClasses: string;
|
|
20
21
|
export declare const selectDescriptionClasses: string;
|
|
22
|
+
/**
|
|
23
|
+
* Native mode (Dropdowns C8): the browser's own `<select>` fills the same shell. The phone opens its
|
|
24
|
+
* picker, typing jumps to an option, and autofill works. 16px text on touch so iOS doesn't zoom.
|
|
25
|
+
*/
|
|
26
|
+
export declare const selectNativeClasses: Record<SelectSize, string>;
|
|
27
|
+
/** The chevron over the native select's right edge; clicks pass through to the select. */
|
|
28
|
+
export declare const selectNativeCaretClasses: Record<SelectSize, string>;
|
|
21
29
|
//# sourceMappingURL=selectStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Select/selectStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAE5C,eAAO,MAAM,WAAW,6BAAa,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC;AAEnC,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AAEtE,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAU3D,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAmBzD,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAgBhE,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AAEnE,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"selectStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Select/selectStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAE5C,eAAO,MAAM,WAAW,6BAAa,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC;AAEnC,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AAEtE,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAU3D,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAmBzD,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAgBhE,CAAC;AAEF,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AAEnE,mGAAmG;AACnG,eAAO,MAAM,+BAA+B,eAAe,CAAC;AAE5D,wEAAwE;AACxE,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAIpE,CAAC;AAEF,eAAO,MAAM,+BAA+B,QAI3C,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAe,CAAC;AAE1D,OAAO,EAAE,oBAAoB,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAExF,eAAO,MAAM,0BAA0B,eAAe,CAAC;AAEvD,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAE9D,eAAO,MAAM,wBAAwB,QAA6B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI1D,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI/D,CAAC"}
|
|
@@ -12,10 +12,18 @@ var s = a, c = "flex w-full flex-col gap-1.5", l = "relative w-full min-w-0", u
|
|
|
12
12
|
sm: e("flex h-full w-full min-w-0 cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-2.5 text-left text-xs leading-none font-sans font-normal tracking-normal text-fg", "pr-2.5 shadow-none outline-none focus:outline-none focus-visible:outline-none", i),
|
|
13
13
|
md: e("flex h-full w-full min-w-0 cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 text-left text-sm leading-none font-sans font-normal tracking-normal text-fg", "pr-3 shadow-none outline-none focus:outline-none focus-visible:outline-none", i),
|
|
14
14
|
lg: e("flex h-full w-full min-w-0 cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-4 text-left text-base leading-none font-sans font-normal tracking-normal text-fg", "pr-3.5 shadow-none outline-none focus:outline-none focus-visible:outline-none", i)
|
|
15
|
-
}, m = "min-w-0 flex-1 truncate", h = "text-
|
|
15
|
+
}, m = "min-w-0 flex-1 truncate", h = "text-muted", g = {
|
|
16
16
|
sm: "flex size-3.5 shrink-0 items-center justify-center text-muted",
|
|
17
17
|
md: "flex size-4 shrink-0 items-center justify-center text-muted",
|
|
18
18
|
lg: "flex size-4 shrink-0 items-center justify-center text-muted"
|
|
19
|
-
}, _ = e("inline-flex [&>svg]:size-full [&>svg]:shrink-0 [&>svg]:stroke-current", r("fast"), "transition-transform"), v = "rotate-180", y = "opacity-50", b = t("ui-label"), x = t("caption")
|
|
19
|
+
}, _ = e("inline-flex [&>svg]:size-full [&>svg]:shrink-0 [&>svg]:stroke-current", r("fast"), "transition-transform"), v = "rotate-180", y = "opacity-50", b = t("ui-label"), x = t("caption"), S = {
|
|
20
|
+
sm: "h-full w-full min-w-0 cursor-pointer appearance-none border-0 bg-transparent pl-2.5 pr-8 text-xs pointer-coarse:text-base leading-none font-sans text-fg outline-none focus:outline-none [&>option]:bg-surface [&>option]:text-fg",
|
|
21
|
+
md: "h-full w-full min-w-0 cursor-pointer appearance-none border-0 bg-transparent pl-3 pr-9 text-sm pointer-coarse:text-base leading-none font-sans text-fg outline-none focus:outline-none [&>option]:bg-surface [&>option]:text-fg",
|
|
22
|
+
lg: "h-full min-h-12 w-full min-w-0 cursor-pointer appearance-none border-0 bg-transparent pl-4 pr-10 text-base leading-none font-sans text-fg outline-none focus:outline-none [&>option]:bg-surface [&>option]:text-fg"
|
|
23
|
+
}, C = {
|
|
24
|
+
sm: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 [&>svg]:size-full [&>svg]:stroke-current",
|
|
25
|
+
md: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 [&>svg]:size-full [&>svg]:stroke-current",
|
|
26
|
+
lg: "pointer-events-none absolute right-3.5 top-1/2 -translate-y-1/2 [&>svg]:size-full [&>svg]:stroke-current"
|
|
27
|
+
};
|
|
20
28
|
//#endregion
|
|
21
|
-
export { x as selectDescriptionClasses, y as selectDisabledLabelClasses, c as selectFieldStackClasses, b as selectLabelClasses, l as selectRootClasses, d as selectShellClasses, f as selectShellDisabledClasses, s as selectSizes, v as selectTriggerCaretOpenClasses, _ as selectTriggerCaretRotateClasses, g as selectTriggerCaretSlotClasses, p as selectTriggerInnerClasses, m as selectTriggerLabelClasses, h as selectTriggerPlaceholderClasses };
|
|
29
|
+
export { x as selectDescriptionClasses, y as selectDisabledLabelClasses, c as selectFieldStackClasses, b as selectLabelClasses, C as selectNativeCaretClasses, S as selectNativeClasses, l as selectRootClasses, d as selectShellClasses, f as selectShellDisabledClasses, s as selectSizes, v as selectTriggerCaretOpenClasses, _ as selectTriggerCaretRotateClasses, g as selectTriggerCaretSlotClasses, p as selectTriggerInnerClasses, m as selectTriggerLabelClasses, h as selectTriggerPlaceholderClasses };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SelectOption } from "./Select";
|
|
2
|
+
/**
|
|
3
|
+
* Options for a State **Select**: `<Select label="State" options={usStateOptions} width="2ch"
|
|
4
|
+
* name="state" autoComplete="address-level1" />`. Value and label are both the abbreviation, which is
|
|
5
|
+
* what browsers autofill into `address-level1`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const usStateOptions: SelectOption[];
|
|
8
|
+
//# sourceMappingURL=usStateOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usStateOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Select/usStateOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAS7C;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,EAA+D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var e = (/* @__PURE__ */ "AL.AK.AZ.AR.CA.CO.CT.DE.DC.FL.GA.HI.ID.IL.IN.IA.KS.KY.LA.ME.MD.MA.MI.MN.MS.MO.MT.NE.NV.NH.NJ.NM.NY.NC.ND.OH.OK.OR.PA.RI.SC.SD.TN.TX.UT.VT.VA.WA.WV.WI.WY".split(".")).map((e) => ({
|
|
3
|
+
value: e,
|
|
4
|
+
label: e
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as usStateOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepProgress.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/StepProgress/StepProgress.tsx"],"names":[],"mappings":"AAUA,qCAAqC;AACrC,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,qFAAqF;AACrF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAS,EACT,KAAK,EACL,SAAS,GACV,EAAE,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"StepProgress.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/StepProgress/StepProgress.tsx"],"names":[],"mappings":"AAUA,qCAAqC;AACrC,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,2BAA2B,CAAC;CACzC;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,qFAAqF;AACrF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAS,EACT,KAAK,EACL,SAAS,GACV,EAAE,iBAAiB,+BAuCnB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
1
2
|
import { type IntakeConfirmationVariant } from "./intakeConfirmationStyles";
|
|
2
|
-
export { intakeConfirmationCopy, intakeConfirmationVariants, intakeConfettiColors, type IntakeConfirmationVariant, } from "./intakeConfirmationStyles";
|
|
3
|
+
export { intakeConfirmationCopy, intakeConfirmationReplyWithin, intakeConfirmationVariants, intakeConfettiColors, type IntakeConfirmationVariant, } from "./intakeConfirmationStyles";
|
|
3
4
|
/** Layout-only — width or margin. */
|
|
4
5
|
export type IntakeConfirmationLayoutClassName = string;
|
|
5
6
|
export interface IntakeConfirmationProps {
|
|
@@ -21,6 +22,17 @@ export interface IntakeConfirmationProps {
|
|
|
21
22
|
icsHref?: string;
|
|
22
23
|
/** Label for the `.ics` action. Default `Download .ics`. */
|
|
23
24
|
icsLabel?: string;
|
|
25
|
+
/** Where we'll reply (`emailed`): "We'll email you at {email} …". */
|
|
26
|
+
email?: string;
|
|
27
|
+
/**
|
|
28
|
+
* When we'll reply (Contact and booking forms T3), part of the one "what happens next" sentence. Default
|
|
29
|
+
* "within one business day". Never promise what you don't keep.
|
|
30
|
+
*/
|
|
31
|
+
replyWithin?: string;
|
|
32
|
+
/** What we got: a short recap of their request, shown as "You told us: “…”" (e.g. "A new site before spring"). */
|
|
33
|
+
summary?: ReactNode;
|
|
34
|
+
/** How to reach us meanwhile: phone, email, hours (T1, T3). */
|
|
35
|
+
contact?: ReactNode;
|
|
24
36
|
className?: IntakeConfirmationLayoutClassName;
|
|
25
37
|
}
|
|
26
38
|
/**
|
|
@@ -29,5 +41,5 @@ export interface IntakeConfirmationProps {
|
|
|
29
41
|
* Optional booking actions reuse **TextLink** and **Button** — no new confirmation style.
|
|
30
42
|
* Mount **ConfettiProvider** above this component.
|
|
31
43
|
*/
|
|
32
|
-
export declare function IntakeConfirmation({ variant, onDone, bookingTime, videoHref, videoLabel, googleCalendarHref, googleCalendarLabel, icsHref, icsLabel, className, }: IntakeConfirmationProps): import("react").JSX.Element;
|
|
44
|
+
export declare function IntakeConfirmation({ variant, onDone, bookingTime, videoHref, videoLabel, googleCalendarHref, googleCalendarLabel, icsHref, icsLabel, email, replyWithin, summary, contact, className, }: IntakeConfirmationProps): import("react").JSX.Element;
|
|
33
45
|
//# sourceMappingURL=IntakeConfirmation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntakeConfirmation.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/IntakeConfirmation/IntakeConfirmation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntakeConfirmation.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/IntakeConfirmation/IntakeConfirmation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EASL,KAAK,yBAAyB,EAC/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,4BAA4B,CAAC;AAEpC,qCAAqC;AACrC,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,OAAO,EAAE,yBAAyB,CAAC;IACnC,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4EAA4E;IAC5E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kHAAkH;IAClH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,iCAAiC,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,MAAM,EACN,WAAW,EACX,SAAS,EACT,UAA8B,EAC9B,kBAAkB,EAClB,mBAA8C,EAC9C,OAAO,EACP,QAA0B,EAC1B,KAAK,EACL,WAA2C,EAC3C,OAAO,EACP,OAAO,EACP,SAAS,GACV,EAAE,uBAAuB,+BAmEzB"}
|