@orbitcommerce/constellation-docs 1.0.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs.css +14764 -2237
- package/dist/index.js +2 -2
- package/dist/pages/{Playground-CNbBbErC.js → Playground-Mk1yIWXb.js} +2 -2
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/{_figures-data-BDmScEny.js → _figures-data-DaDvB7Nm.js} +5 -5
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/{_overlays-specimens-Dpn6oiyH.js → _overlays-specimens-bawR331Z.js} +33 -23
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BvxQWBTy.js +403 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/{alert-BD4e6QTh.js → alert-D3i7xZTU.js} +195 -50
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/{app-shell-KbA-nRqZ.js → app-shell-D4hdlHps.js} +133 -54
- package/dist/pages/{area-chart-B91dLcGo.js → area-chart-BEWFwiB2.js} +183 -27
- package/dist/pages/{avatar-DPPHXJAu.js → avatar-BFEqQViw.js} +194 -12
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/{badge-C9JR0thI.js → badge-0-PyMrih.js} +441 -135
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/{button-D3V912P4.js → button-DAyfssDY.js} +276 -79
- package/dist/pages/{calendar-DSDZ9nRH.js → calendar-Ds7KsgSI.js} +69 -17
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CXZ3V1d4.js +1612 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/{colour-BwuO8xAv.js → colour-q2ntvI0w.js} +496 -20
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/{command-palette-xAD7fOg6.js → command-palette-CJ7uBA04.js} +201 -58
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/{date-picker-BYSa816m.js → date-picker-GdBciR99.js} +186 -38
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/{delta-CtAo0eIM.js → delta-CNAGv8JY.js} +266 -61
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/{docs-BNOb7AqR.js → docs-lM2UBSir.js} +20 -15
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-hg7txTc3.js +1381 -0
- package/dist/pages/{figure-tabs-CoPFzzKz.js → figure-tabs-QOeQMY6N.js} +153 -35
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/{home-dashboard-CFQwDtC9.js → home-dashboard-CxPmvduE.js} +21 -18
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/{icon-button-C9eSVPPW.js → icon-button-Bu4Gj5sy.js} +370 -31
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/{icons-sxkTs5Ob.js → icons-CJ9Aar3d.js} +315 -52
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/{installation-DpsX8G_n.js → installation-DRUWNVHP.js} +112 -29
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/{kbd-cNfDoikz.js → kbd-UNj4zqxn.js} +15 -14
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/{live-globe-ClvLn9Lb.js → live-globe-95ROMhGQ.js} +191 -47
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/{logo-BfGF1Pq9.js → logo-D3a3QGKJ.js} +13 -13
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/{menu-by2sgQ09.js → menu-NrLYKqKp.js} +623 -109
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/{motion-BvTGc2Dk.js → motion-CrXtiBvA.js} +20 -10
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/{orbit-spinner-Dil1Z3Oy.js → orbit-spinner-Dxv5qAhr.js} +30 -14
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/{overview-BPEbZQ6g.js → overview-BSfEqHY8.js} +4 -4
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/{pagination-BBUnGvv5.js → pagination-C1EgVtW4.js} +74 -29
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-BCPvtP8J.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/{popover-Db1gLDpb.js → popover-C3Oar9D5.js} +76 -14
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/{principles-CeAIOIdt.js → principles-pnDyfHpK.js} +9 -9
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/{radio-group-CkdBWWfG.js → radio-group-CbiibLwn.js} +581 -18
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-CNR7zpf7.js +594 -0
- package/dist/pages/{release-Dvo684UJ.js → release-DYBCY7jm.js} +4 -1
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/{rolling-number-qmvH84Mq.js → rolling-number-GR3Cyfpz.js} +12 -12
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/{search-field-BN7MWGQ4.js → search-field-D1uG7R6A.js} +15 -15
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/{segmented-control-CTbIpRBW.js → segmented-control-D-FB1K1T.js} +450 -37
- package/dist/pages/{select-DguELoRR.js → select-DZ43NpOm.js} +22 -17
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/{separator-CPZub9pv.js → separator-CFwqRvfO.js} +99 -22
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/{shape-DKvA0YKr.js → shape-DzniHAVT.js} +10 -10
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/{sparkline-DMMYGbHn.js → sparkline-D3aavCly.js} +301 -22
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/{switch-B-Qe4kcT.js → switch-C93K6j9h.js} +151 -51
- package/dist/pages/table-mq_pNXza.js +3232 -0
- package/dist/pages/{tabs-B4M-usCV.js → tabs-Cf4MZ8Fq.js} +257 -21
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/{textarea-fTuUZRQb.js → textarea-CCM-SnGN.js} +271 -15
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/{toast-CKP03zjy.js → toast-zXLRiMRT.js} +240 -25
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/{tooltip-CBYil3kt.js → tooltip-LHtCUkF-.js} +162 -33
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/{typography-PCbg8Bhg.js → typography-BSijtiRl.js} +153 -12
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +10989 -1108
- package/package.json +3 -3
- package/dist/pages/card-DUggbis3.js +0 -659
- package/dist/pages/checkbox-DwimQaK3.js +0 -365
- package/dist/pages/dialog-BRAf4LMh.js +0 -1451
- package/dist/pages/empty-state-C-mLrXW2.js +0 -417
- package/dist/pages/input-KF9Gkawf.js +0 -1093
- package/dist/pages/registry-CroHzK9I.js +0 -244
- package/dist/pages/skeleton-DLuBhP46.js +0 -561
- package/dist/pages/table-AMoODng4.js +0 -607
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as DocLink } from "./host-B6znjEgQ.js";
|
|
3
|
-
import { a as DocTable, d as Section, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-
|
|
4
|
-
import { t as Playground } from "./Playground-
|
|
5
|
-
import { c as SpecimenFrame, s as PopoverSheet } from "./_overlays-specimens-
|
|
3
|
+
import { a as DocTable, d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
4
|
+
import { t as Playground } from "./Playground-Mk1yIWXb.js";
|
|
5
|
+
import { c as SpecimenFrame, s as PopoverSheet } from "./_overlays-specimens-bawR331Z.js";
|
|
6
6
|
import { useMemo, useRef, useState } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { Button, Calendar, DatePicker, DateRangePicker, Field, Input, dateRangePresets, fromISODate, toISODate } from "@orbitcommerce/constellation";
|
|
8
|
+
import { Button, Calendar, DatePicker, DateRangePicker, Field, Input, dateFormatter, dateRangePresets, fromISODate, toISODate } from "@orbitcommerce/constellation";
|
|
9
9
|
import { CheckCircleIcon } from "@orbitcommerce/constellation/icons";
|
|
10
10
|
//#region src/pages/components/date-picker.tsx
|
|
11
11
|
function startOfToday() {
|
|
@@ -26,12 +26,12 @@ var WITH_WEEKDAY = {
|
|
|
26
26
|
month: "short",
|
|
27
27
|
year: "numeric"
|
|
28
28
|
};
|
|
29
|
-
var shortDate =
|
|
29
|
+
var shortDate = dateFormatter("en-GB", {
|
|
30
30
|
day: "numeric",
|
|
31
31
|
month: "short",
|
|
32
32
|
year: "numeric"
|
|
33
33
|
});
|
|
34
|
-
var weekdayDate =
|
|
34
|
+
var weekdayDate = dateFormatter("en-GB", WITH_WEEKDAY);
|
|
35
35
|
function FieldStill({ text, size = "md", width }) {
|
|
36
36
|
return /* @__PURE__ */ jsx("div", {
|
|
37
37
|
className: "o-input o-date-field",
|
|
@@ -266,7 +266,8 @@ function HoldUntil() {
|
|
|
266
266
|
return /* @__PURE__ */ jsx("div", {
|
|
267
267
|
className: "date-picker-stack",
|
|
268
268
|
children: /* @__PURE__ */ jsx(Field, {
|
|
269
|
-
label: "Hold until
|
|
269
|
+
label: "Hold until",
|
|
270
|
+
optional: true,
|
|
270
271
|
hint: date ? `Order #1042 is released on ${weekdayDate.format(date)}.` : "Held until you release it.",
|
|
271
272
|
children: /* @__PURE__ */ jsx(DatePicker, {
|
|
272
273
|
clearable: true,
|
|
@@ -321,7 +322,8 @@ function DiscountDates() {
|
|
|
321
322
|
minValue: today
|
|
322
323
|
})
|
|
323
324
|
}), /* @__PURE__ */ jsx(Field, {
|
|
324
|
-
label: "Ends
|
|
325
|
+
label: "Ends",
|
|
326
|
+
optional: true,
|
|
325
327
|
hint: "Leave it empty to run until you end it.",
|
|
326
328
|
error: starts && ends && ends <= starts ? "End it after it starts, or leave it empty" : void 0,
|
|
327
329
|
children: /* @__PURE__ */ jsx(DatePicker, {
|
|
@@ -440,12 +442,49 @@ var ANALYTICS_PRESETS = [
|
|
|
440
442
|
})
|
|
441
443
|
}
|
|
442
444
|
];
|
|
445
|
+
/** A report's toolbar with the range as a pill: the presets first, Custom range for the calendars. */
|
|
446
|
+
function ReportMenu({ align = "start" }) {
|
|
447
|
+
const today = useMemo(() => startOfToday(), []);
|
|
448
|
+
const [range, setRange] = useState(() => ANALYTICS_PRESETS[3].range(today));
|
|
449
|
+
const [preset, setPreset] = useState("last-30-days");
|
|
450
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
451
|
+
className: "date-picker-report",
|
|
452
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
453
|
+
className: "date-picker-report__bar",
|
|
454
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
455
|
+
className: "date-picker-report__title",
|
|
456
|
+
children: "Analytics"
|
|
457
|
+
}), /* @__PURE__ */ jsx(DateRangePicker, {
|
|
458
|
+
trigger: "button",
|
|
459
|
+
size: "sm",
|
|
460
|
+
"aria-label": "Report dates",
|
|
461
|
+
presets: ANALYTICS_PRESETS,
|
|
462
|
+
maxValue: today,
|
|
463
|
+
align,
|
|
464
|
+
value: range,
|
|
465
|
+
onChange: (next, id) => {
|
|
466
|
+
setRange(next);
|
|
467
|
+
setPreset(id);
|
|
468
|
+
}
|
|
469
|
+
})]
|
|
470
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
471
|
+
className: "date-picker-report__meta",
|
|
472
|
+
"aria-live": "polite",
|
|
473
|
+
children: [
|
|
474
|
+
range ? `${shortDate.format(range.from)} to ${shortDate.format(range.to)}` : "No dates",
|
|
475
|
+
" · ",
|
|
476
|
+
preset ? /* @__PURE__ */ jsxs(Fragment$1, { children: ["preset ", /* @__PURE__ */ jsx("code", { children: preset })] }) : "a custom range"
|
|
477
|
+
]
|
|
478
|
+
})]
|
|
479
|
+
});
|
|
480
|
+
}
|
|
443
481
|
function NativeSwap() {
|
|
444
482
|
const [holdUntil, setHoldUntil] = useState("");
|
|
445
483
|
return /* @__PURE__ */ jsxs("div", {
|
|
446
484
|
className: "date-picker-stack",
|
|
447
485
|
children: [/* @__PURE__ */ jsx(Field, {
|
|
448
|
-
label: "Hold until
|
|
486
|
+
label: "Hold until",
|
|
487
|
+
optional: true,
|
|
449
488
|
children: /* @__PURE__ */ jsx(DatePicker, {
|
|
450
489
|
clearable: true,
|
|
451
490
|
value: fromISODate(holdUntil),
|
|
@@ -476,7 +515,7 @@ function Page() {
|
|
|
476
515
|
],
|
|
477
516
|
lead: "A field that opens a calendar: one day (and a time, if it matters) with DatePicker, or a first and last day with DateRangePicker. It looks and sizes exactly like Input, so dates sit in forms beside everything else.",
|
|
478
517
|
children: [
|
|
479
|
-
/* @__PURE__ */ jsx(Section, {
|
|
518
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
480
519
|
id: "playground",
|
|
481
520
|
title: "Playground",
|
|
482
521
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -501,7 +540,7 @@ function Page() {
|
|
|
501
540
|
}) })
|
|
502
541
|
})
|
|
503
542
|
}),
|
|
504
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
543
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
505
544
|
id: "picking-a-day",
|
|
506
545
|
title: "Picking a day",
|
|
507
546
|
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -556,7 +595,7 @@ const [date, setDate] = useState<Date | null>(null)
|
|
|
556
595
|
]
|
|
557
596
|
})]
|
|
558
597
|
}),
|
|
559
|
-
/* @__PURE__ */ jsx(Section, {
|
|
598
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
560
599
|
id: "sizes",
|
|
561
600
|
title: "Sizes",
|
|
562
601
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -604,7 +643,7 @@ const [date, setDate] = useState<Date | null>(null)
|
|
|
604
643
|
})
|
|
605
644
|
})
|
|
606
645
|
}),
|
|
607
|
-
/* @__PURE__ */ jsx(Section, {
|
|
646
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
608
647
|
id: "states",
|
|
609
648
|
title: "States",
|
|
610
649
|
description: /* @__PURE__ */ jsx("p", { children: "Hover firms the edge; focus turns it teal with a soft halo (Tab into a field to see it). An error swaps the teal for red. Read-only shows the date in the well and will not open; disabled dims it and Tab skips it." }),
|
|
@@ -664,7 +703,7 @@ const [date, setDate] = useState<Date | null>(null)
|
|
|
664
703
|
})
|
|
665
704
|
})
|
|
666
705
|
}),
|
|
667
|
-
/* @__PURE__ */ jsx(Section, {
|
|
706
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
668
707
|
id: "clearing",
|
|
669
708
|
title: "Clearing",
|
|
670
709
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -675,13 +714,13 @@ const [date, setDate] = useState<Date | null>(null)
|
|
|
675
714
|
children: /* @__PURE__ */ jsx(Example, {
|
|
676
715
|
clientOnly: true,
|
|
677
716
|
code: `
|
|
678
|
-
<Field label="Hold until
|
|
717
|
+
<Field label="Hold until" optional hint="Order #1042 is released on that day.">
|
|
679
718
|
<DatePicker clearable value={date} onChange={setDate} minValue={tomorrow} />
|
|
680
719
|
</Field>`,
|
|
681
720
|
children: /* @__PURE__ */ jsx(HoldUntil, {})
|
|
682
721
|
})
|
|
683
722
|
}),
|
|
684
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
723
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
685
724
|
id: "time",
|
|
686
725
|
title: "Date and time",
|
|
687
726
|
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "granularity=\"minute\"" }), " adds a time row under the calendar: hours and minutes on a 24-hour clock, as UK shops expect. Picking a day keeps the calendar open so the time can follow. Click into the hours and type \"9\": it can only mean 09, so focus moves on to the minutes. The arrow keys step either part, and Enter closes."] }), /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -714,7 +753,7 @@ const [date, setDate] = useState<Date | null>(null)
|
|
|
714
753
|
})
|
|
715
754
|
})]
|
|
716
755
|
}),
|
|
717
|
-
/* @__PURE__ */ jsx(Section, {
|
|
756
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
718
757
|
id: "start-and-end",
|
|
719
758
|
title: "A start and an end",
|
|
720
759
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -729,13 +768,13 @@ const [date, setDate] = useState<Date | null>(null)
|
|
|
729
768
|
<Field label="Starts">
|
|
730
769
|
<DatePicker granularity="minute" value={starts} onChange={setStarts} minValue={today} />
|
|
731
770
|
</Field>
|
|
732
|
-
<Field label="Ends
|
|
771
|
+
<Field label="Ends" optional hint="Leave it empty to run until you end it." error={error}>
|
|
733
772
|
<DatePicker granularity="minute" clearable value={ends} onChange={setEnds} minValue={starts ?? today} />
|
|
734
773
|
</Field>`,
|
|
735
774
|
children: /* @__PURE__ */ jsx(DiscountDates, {})
|
|
736
775
|
})
|
|
737
776
|
}),
|
|
738
|
-
/* @__PURE__ */ jsx(Section, {
|
|
777
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
739
778
|
id: "ranges",
|
|
740
779
|
title: "Date ranges",
|
|
741
780
|
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "DateRangePicker" }), " picks a run of whole days: the first click starts the range, the second ends it and closes the calendar. While the end is being picked, a fainter wash follows the pointer (or focus) to a teal ring. Picking an earlier day second simply swaps the ends. Two months sit side by side on screens 768px and wider, one below."] }), /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -757,14 +796,14 @@ const [range, setRange] = useState<DateRange | null>({ from: nextWeek, to: inThr
|
|
|
757
796
|
children: /* @__PURE__ */ jsx(BannerDates, {})
|
|
758
797
|
})
|
|
759
798
|
}),
|
|
760
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
799
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
761
800
|
id: "presets",
|
|
762
801
|
title: "Presets",
|
|
763
802
|
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "presets" }), " adds a column of ready-made ranges on the left, as reports need: Today, Last 7 days, Last 30 days, This month and Last month. Picking one applies it at once. When the range matches a preset, the field names it (\"Last 30 days\") and the preset carries a teal check; any other range shows its dates."] }), /* @__PURE__ */ jsxs("p", { children: [
|
|
764
803
|
/* @__PURE__ */ jsx("code", { children: "onChange" }),
|
|
765
804
|
" gets the preset's ",
|
|
766
805
|
/* @__PURE__ */ jsx("code", { children: "id" }),
|
|
767
|
-
" as a second argument, so a report can keep \"Last 30 days\" rolling forward day by day rather than freezing the dates. On phones the presets become
|
|
806
|
+
" as a second argument, so a report can keep \"Last 30 days\" rolling forward day by day rather than freezing the dates. On phones the presets become one row of chips above one month, which scrolls sideways, so the month keeps the room it needs."
|
|
768
807
|
] })] }),
|
|
769
808
|
children: [/* @__PURE__ */ jsx(Example, {
|
|
770
809
|
clientOnly: true,
|
|
@@ -812,7 +851,42 @@ const presets: DateRangePreset[] = [
|
|
|
812
851
|
})
|
|
813
852
|
})]
|
|
814
853
|
}),
|
|
815
|
-
/* @__PURE__ */ jsx(Section, {
|
|
854
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
855
|
+
id: "range-menu",
|
|
856
|
+
title: "A range as a menu",
|
|
857
|
+
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
858
|
+
/* @__PURE__ */ jsx("code", { children: "trigger=\"button\"" }),
|
|
859
|
+
" makes the range a pill for a report's or a list's toolbar: a calendar glyph, the preset or the range, and a chevron. It opens a menu of ranges, presets first (the kit's, unless",
|
|
860
|
+
" ",
|
|
861
|
+
/* @__PURE__ */ jsx("code", { children: "presets" }),
|
|
862
|
+
" gives your own) with the current one ticked, and Custom range last. Only Custom range reveals the calendars, beside the ranges (under them on a phone), as a draft: what is picked so far is said under the months, Cancel puts it back and hands focus to Custom range, and Apply takes it."
|
|
863
|
+
] }), /* @__PURE__ */ jsxs("p", { children: [
|
|
864
|
+
"The arrows, Home and End move through the ranges; focus starts on the ticked one. Near the window's edge the menu flips above the pill, or scrolls within the window's height. ",
|
|
865
|
+
/* @__PURE__ */ jsx("code", { children: "size" }),
|
|
866
|
+
" is the Button's."
|
|
867
|
+
] })] }),
|
|
868
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
869
|
+
clientOnly: true,
|
|
870
|
+
align: "fill",
|
|
871
|
+
minHeight: 420,
|
|
872
|
+
code: `
|
|
873
|
+
<DateRangePicker
|
|
874
|
+
trigger="button"
|
|
875
|
+
size="sm"
|
|
876
|
+
align="end"
|
|
877
|
+
aria-label="Report dates"
|
|
878
|
+
presets={analyticsPresets}
|
|
879
|
+
maxValue={today}
|
|
880
|
+
value={range}
|
|
881
|
+
onChange={(next, preset) => {
|
|
882
|
+
setRange(next)
|
|
883
|
+
setPreset(preset) // undefined for a custom range
|
|
884
|
+
}}
|
|
885
|
+
/>`,
|
|
886
|
+
children: /* @__PURE__ */ jsx(ReportMenu, { align: "end" })
|
|
887
|
+
})
|
|
888
|
+
}),
|
|
889
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
816
890
|
id: "limits",
|
|
817
891
|
title: "Limits and unavailable days",
|
|
818
892
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -862,7 +936,7 @@ const presets: DateRangePreset[] = [
|
|
|
862
936
|
]
|
|
863
937
|
})
|
|
864
938
|
}),
|
|
865
|
-
/* @__PURE__ */ jsx(Section, {
|
|
939
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
866
940
|
id: "keyboard",
|
|
867
941
|
title: "Keyboard",
|
|
868
942
|
description: /* @__PURE__ */ jsx("p", { children: "Everything works from the keyboard: open, move, pick and close, and focus always lands somewhere useful." }),
|
|
@@ -884,9 +958,16 @@ const presets: DateRangePreset[] = [
|
|
|
884
958
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
885
959
|
"Clears the date, when the picker is ",
|
|
886
960
|
/* @__PURE__ */ jsx("code", { children: "clearable" }),
|
|
887
|
-
"."
|
|
961
|
+
". (A ",
|
|
962
|
+
/* @__PURE__ */ jsx("code", { children: "typed" }),
|
|
963
|
+
" field is edited as text.)"
|
|
888
964
|
] })
|
|
889
965
|
],
|
|
966
|
+
[
|
|
967
|
+
"Typed field",
|
|
968
|
+
"Digits, Enter, Down arrow",
|
|
969
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: "Type the date; Enter reads it (and still submits a form); Down opens the calendar. Tab goes on to the calendar button." })
|
|
970
|
+
],
|
|
890
971
|
[
|
|
891
972
|
"Calendar",
|
|
892
973
|
"Arrow keys",
|
|
@@ -897,6 +978,11 @@ const presets: DateRangePreset[] = [
|
|
|
897
978
|
"Page Up, Page Down",
|
|
898
979
|
"Move a month. With Shift, a year."
|
|
899
980
|
],
|
|
981
|
+
[
|
|
982
|
+
"Calendar caption",
|
|
983
|
+
"Tab, arrow keys",
|
|
984
|
+
/* @__PURE__ */ jsx(Fragment$1, { children: "With a month and a year to choose from, Tab reaches the two selects (named Month and Year), and the arrow keys or the list change them." })
|
|
985
|
+
],
|
|
900
986
|
[
|
|
901
987
|
"Calendar",
|
|
902
988
|
"Home, End",
|
|
@@ -930,7 +1016,7 @@ const presets: DateRangePreset[] = [
|
|
|
930
1016
|
]
|
|
931
1017
|
})
|
|
932
1018
|
}),
|
|
933
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1019
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
934
1020
|
id: "native",
|
|
935
1021
|
title: "Replacing a native date field",
|
|
936
1022
|
description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
@@ -945,6 +1031,21 @@ const presets: DateRangePreset[] = [
|
|
|
945
1031
|
" reads that as midnight UTC, which is still the day before anywhere west of Greenwich. Convert at the edge with the helpers, which read and write the local day and never shift it."
|
|
946
1032
|
] }), /* @__PURE__ */ jsx("p", { children: "Pick a day, then clear it, and watch the stored string." })] }),
|
|
947
1033
|
children: [
|
|
1034
|
+
/* @__PURE__ */ jsxs(Note, {
|
|
1035
|
+
title: "Keeping the string?",
|
|
1036
|
+
children: [
|
|
1037
|
+
"If the page keeps the string, use ",
|
|
1038
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
1039
|
+
to: "/components/date-input",
|
|
1040
|
+
children: "DateInput"
|
|
1041
|
+
}),
|
|
1042
|
+
". It is this conversion in one component, with the same ",
|
|
1043
|
+
/* @__PURE__ */ jsx("code", { children: "value" }),
|
|
1044
|
+
" and ",
|
|
1045
|
+
/* @__PURE__ */ jsx("code", { children: "onChange" }),
|
|
1046
|
+
" as the native input, so nothing else in the page changes."
|
|
1047
|
+
]
|
|
1048
|
+
}),
|
|
948
1049
|
/* @__PURE__ */ jsx(Example, {
|
|
949
1050
|
clientOnly: true,
|
|
950
1051
|
code: `
|
|
@@ -1044,7 +1145,7 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1044
1145
|
/* @__PURE__ */ jsx(Fragment$1, {})
|
|
1045
1146
|
]
|
|
1046
1147
|
}),
|
|
1047
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1148
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1048
1149
|
id: "both-themes",
|
|
1049
1150
|
title: "In both themes",
|
|
1050
1151
|
description: /* @__PURE__ */ jsx("p", { children: "Held open for review, light beside dark: the field keeps its teal edge while the calendar is open, and the sheet is white in light and graphite in dark. The pickers on the rest of this page are live." }),
|
|
@@ -1062,7 +1163,7 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1062
1163
|
})
|
|
1063
1164
|
})]
|
|
1064
1165
|
}),
|
|
1065
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1166
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1066
1167
|
id: "guidelines",
|
|
1067
1168
|
title: "Guidelines",
|
|
1068
1169
|
children: [
|
|
@@ -1124,7 +1225,9 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1124
1225
|
}),
|
|
1125
1226
|
/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
1126
1227
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1127
|
-
"Label the field with what the date is for (\"Delivery date\", \"Publish on\"), never just \"Date\".
|
|
1228
|
+
"Label the field with what the date is for (\"Delivery date\", \"Publish on\"), never just \"Date\". Mark an optional one with ",
|
|
1229
|
+
/* @__PURE__ */ jsx("code", { children: "optional" }),
|
|
1230
|
+
" on its Field and make it ",
|
|
1128
1231
|
/* @__PURE__ */ jsx("code", { children: "clearable" }),
|
|
1129
1232
|
"."
|
|
1130
1233
|
] }),
|
|
@@ -1143,7 +1246,7 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1143
1246
|
] })
|
|
1144
1247
|
]
|
|
1145
1248
|
}),
|
|
1146
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1249
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1147
1250
|
id: "accessibility",
|
|
1148
1251
|
title: "Accessibility",
|
|
1149
1252
|
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
@@ -1176,23 +1279,50 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1176
1279
|
"Unavailable days are disabled buttons: they cannot be focused or picked, and are skipped by the arrow keys.",
|
|
1177
1280
|
"The time parts are spin buttons named Hours and Minutes, with their value and range.",
|
|
1178
1281
|
"With reduced motion, the sheet fades in without growing, the chosen-day disc appears without settling, and months swap without sliding."
|
|
1179
|
-
] }), /* @__PURE__ */
|
|
1282
|
+
] }), /* @__PURE__ */ jsxs(Note, {
|
|
1180
1283
|
title: "Typing a date",
|
|
1181
|
-
children:
|
|
1284
|
+
children: [
|
|
1285
|
+
"A picker is a button that opens the calendar. Add ",
|
|
1286
|
+
/* @__PURE__ */ jsx("code", { children: "typed" }),
|
|
1287
|
+
" and the field is a text input with a calendar button after it, taking the locale's numeric short date (",
|
|
1288
|
+
/* @__PURE__ */ jsx("code", { children: "25/12/2026" }),
|
|
1289
|
+
") and ",
|
|
1290
|
+
/* @__PURE__ */ jsx("code", { children: "2026-12-25" }),
|
|
1291
|
+
", and saying what is wrong with text that is not a date or not one that can be picked. It is for a date alone: with a time the field stays a button. The hint while it is empty is the shape in the locale's order,",
|
|
1292
|
+
" ",
|
|
1293
|
+
/* @__PURE__ */ jsx("code", { children: "dd/mm/yyyy" }),
|
|
1294
|
+
", from the words ",
|
|
1295
|
+
/* @__PURE__ */ jsx("code", { children: "labels.dayHint" }),
|
|
1296
|
+
", ",
|
|
1297
|
+
/* @__PURE__ */ jsx("code", { children: "monthHint" }),
|
|
1298
|
+
" and",
|
|
1299
|
+
" ",
|
|
1300
|
+
/* @__PURE__ */ jsx("code", { children: "yearHint" }),
|
|
1301
|
+
". ",
|
|
1302
|
+
/* @__PURE__ */ jsx(DocLink, {
|
|
1303
|
+
to: "/components/date-input#typing",
|
|
1304
|
+
children: "DateInput"
|
|
1305
|
+
}),
|
|
1306
|
+
" is typed by default, and its page has the rules in full."
|
|
1307
|
+
]
|
|
1182
1308
|
})]
|
|
1183
1309
|
}),
|
|
1184
|
-
/* @__PURE__ */ jsxs(Section, {
|
|
1310
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
1185
1311
|
id: "props",
|
|
1186
1312
|
title: "Props",
|
|
1187
1313
|
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
1188
1314
|
"Both pickers forward every other button attribute, and the ",
|
|
1189
1315
|
/* @__PURE__ */ jsx("code", { children: "ref" }),
|
|
1190
|
-
", to the field's button
|
|
1316
|
+
", to the field's button (to the text input of a ",
|
|
1317
|
+
/* @__PURE__ */ jsx("code", { children: "typed" }),
|
|
1318
|
+
" DatePicker).",
|
|
1191
1319
|
" ",
|
|
1192
1320
|
/* @__PURE__ */ jsx("code", { children: "className" }),
|
|
1193
1321
|
" and ",
|
|
1194
1322
|
/* @__PURE__ */ jsx("code", { children: "style" }),
|
|
1195
|
-
" go to the well around it
|
|
1323
|
+
" go to the well around it (to the element round the well and the sentence under it, for a ",
|
|
1324
|
+
/* @__PURE__ */ jsx("code", { children: "typed" }),
|
|
1325
|
+
" one, so it is one item in a flex row or a grid)."
|
|
1196
1326
|
] }),
|
|
1197
1327
|
children: [
|
|
1198
1328
|
/* @__PURE__ */ jsx(PropsTable, {
|
|
@@ -1295,6 +1425,18 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1295
1425
|
default: "true",
|
|
1296
1426
|
description: "Close when a day is picked. False by default with a time."
|
|
1297
1427
|
},
|
|
1428
|
+
{
|
|
1429
|
+
name: "typed",
|
|
1430
|
+
type: "boolean",
|
|
1431
|
+
default: "false",
|
|
1432
|
+
description: "A text input you can type the locale's numeric short date into (or YYYY-MM-DD), with a calendar button beside it. Text that is not a date, or not one that can be picked, makes it invalid and says why under it; the value is then null. A day only: a field with a time stays a button. format does not apply."
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
name: "captionLayout",
|
|
1436
|
+
type: "'auto' | 'label' | 'dropdown' | 'dropdown-months' | 'dropdown-years'",
|
|
1437
|
+
default: "'label'",
|
|
1438
|
+
description: "The calendar's caption: the month's name between the arrows (label, as it has always been), or a month and a year to choose from (dropdown). Auto decides from the days that can be picked: the selects when they span more than a year (no limits is more than a year), the label when they do not. DateInput defaults to auto."
|
|
1439
|
+
},
|
|
1298
1440
|
{
|
|
1299
1441
|
name: "name",
|
|
1300
1442
|
type: "string",
|
|
@@ -1321,7 +1463,7 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1321
1463
|
name: "container",
|
|
1322
1464
|
type: "HTMLElement | null",
|
|
1323
1465
|
default: "document.body",
|
|
1324
|
-
description: "Where the calendar is portalled."
|
|
1466
|
+
description: "Where the calendar is portalled. Inside a dialog it opens in the dialog's layer; null keeps it on the page."
|
|
1325
1467
|
},
|
|
1326
1468
|
{
|
|
1327
1469
|
name: "today",
|
|
@@ -1331,7 +1473,7 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1331
1473
|
{
|
|
1332
1474
|
name: "labels",
|
|
1333
1475
|
type: "Partial<DatePickerLabels>",
|
|
1334
|
-
description: "Translations: clear, time, hours, minutes, dayPeriod, previousMonth, nextMonth, today,
|
|
1476
|
+
description: "Translations: clear, time, hours, minutes, dayPeriod, previousMonth, nextMonth, today and selected, which a label object has always held; and, all optional with an English default, monthDropdown and yearDropdown, and for a typed field chooseDate (the calendar button), invalidDate(example), dateTooEarly(limit), dateTooLate(limit), dateUnavailable, and dayHint, monthHint and yearHint (the letters of its hint: dd, mm, yyyy)."
|
|
1335
1477
|
}
|
|
1336
1478
|
]
|
|
1337
1479
|
}),
|
|
@@ -1356,9 +1498,15 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1356
1498
|
{
|
|
1357
1499
|
name: "presets",
|
|
1358
1500
|
type: "boolean | DateRangePreset[]",
|
|
1359
|
-
default: "false",
|
|
1501
|
+
default: "false (the kit's with trigger=\"button\")",
|
|
1360
1502
|
description: "True for dateRangePresets (Today, Last 7 days, Last 30 days, This month, Last month), or your own list."
|
|
1361
1503
|
},
|
|
1504
|
+
{
|
|
1505
|
+
name: "trigger",
|
|
1506
|
+
type: "'field' | 'button'",
|
|
1507
|
+
default: "'field'",
|
|
1508
|
+
description: "The Input's well, or a pill that opens a menu of ranges, Custom range revealing the calendars with Cancel and Apply."
|
|
1509
|
+
},
|
|
1362
1510
|
{
|
|
1363
1511
|
name: "numberOfMonths",
|
|
1364
1512
|
type: "number",
|
|
@@ -1373,7 +1521,7 @@ import { DatePicker, toISODate, fromISODate } from '@orbitcommerce/constellation
|
|
|
1373
1521
|
{
|
|
1374
1522
|
name: "labels",
|
|
1375
1523
|
type: "Partial<DateRangePickerLabels>",
|
|
1376
|
-
description: "Translations: clear, to (between the dates), presets, and the
|
|
1524
|
+
description: "Translations: clear, to (between the dates), presets, the calendar labels, and the menu's custom, apply, cancel, chooseStart and chooseEnd."
|
|
1377
1525
|
}
|
|
1378
1526
|
]
|
|
1379
1527
|
}),
|