pixelize-design-library 2.4.2-beta.62 → 2.4.2-beta.64
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 +122 -2
- package/COMPONENT-GOTCHAS.md +51 -9
- package/DESIGN-GUIDE.md +13 -5
- package/dist/Components/Button/Button.styles.js +58 -23
- package/dist/Components/Card/CardProps.d.ts +2 -2
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/Components/DatePicker/RangeDatePicker.js +2 -1
- package/dist/Components/DatePicker/SingleDatePicker.js +2 -1
- package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -1
- package/dist/Components/DatePicker/dayStates.js +2 -1
- package/dist/Components/Drawer/Drawer.js +2 -1
- package/dist/Components/Dropdown/DropDown.js +4 -10
- package/dist/Components/FilePreview/FilePreview.js +2 -1
- package/dist/Components/FileUpload/FileUpload.js +9 -2
- package/dist/Components/FileUploader/FileUploader.js +4 -0
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +1 -1
- package/dist/Components/FilterSidebar/FilterSidebar.js +7 -4
- package/dist/Components/Input/TextInput.styles.js +10 -6
- package/dist/Components/KanbanBoard/AccountCard.js +4 -2
- package/dist/Components/KanbanBoard/KanbanBoard.js +6 -5
- package/dist/Components/NavigationBar/NavigationBar.js +5 -3
- package/dist/Components/Notification/Notification.js +4 -3
- package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -4
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +12 -7
- package/dist/Components/ScrollToTop/ScrollToTop.js +4 -3
- package/dist/Components/SearchSelect/SearchSelect.js +44 -35
- package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
- package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
- package/dist/Components/Select/SelectPopup.js +3 -4
- package/dist/Components/Select/optionRowInk.d.ts +12 -0
- package/dist/Components/Select/optionRowInk.js +10 -1
- package/dist/Components/SelectSearch/SelectSearch.js +3 -11
- package/dist/Components/SettingRow/SettingRow.js +2 -1
- package/dist/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/Components/SideBar/SecondaryBar.js +4 -3
- package/dist/Components/SideBar/SideBar.js +16 -13
- package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
- package/dist/Components/SideBar/components/MenuItemBox.js +7 -4
- package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/Components/SideBar/components/PinnedSection.js +7 -4
- package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
- package/dist/Components/SideBar/sidebarMotion.js +6 -0
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/Components/StageProgress/StageItem.js +5 -2
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/StatCard/StatCard.js +2 -1
- package/dist/Components/Table/Table.js +9 -4
- package/dist/Components/Table/TableProps.d.ts +1 -1
- package/dist/Components/Table/components/TableActions.js +3 -2
- package/dist/Components/Table/components/TableBody.js +9 -1
- package/dist/Components/Table/components/TableHeader.js +7 -2
- package/dist/Components/Table/components/TableLoading.d.ts +4 -1
- package/dist/Components/Table/components/TableLoading.js +6 -5
- package/dist/Components/Table/filters/CompactSelect.js +3 -11
- package/dist/Components/Table/settings/TableSettings.js +7 -2
- package/dist/Components/Table/variants/TableVariantContext.d.ts +1 -1
- package/dist/Components/Table/variants/TableVariantContext.js +3 -3
- package/dist/Components/Table/variants/classic.js +3 -2
- package/dist/Components/Timeline/Timeline.js +11 -4
- package/dist/Components/Toaster/Toaster.js +19 -8
- package/dist/Components/Toggle/TableToggle.js +5 -2
- package/dist/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/Components/UserDetails/UserDetails.js +3 -1
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +4 -0
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts +2 -2
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +25 -18
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +38 -2
- package/dist/Theme/chakra/Card.styles.d.ts +7 -1
- package/dist/Theme/chakra/Card.styles.js +4 -1
- package/dist/Theme/chakra/Menu.styles.d.ts +11 -5
- package/dist/Theme/chakra/Menu.styles.js +10 -0
- package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
- package/dist/Theme/chakra/Popover.styles.js +2 -0
- package/dist/Theme/chakra/common.web.d.ts +4 -0
- package/dist/Theme/chakra/componentStyles.d.ts +19 -3
- package/dist/Theme/chakra/componentStyles.js +12 -8
- package/dist/Theme/chakra/motion.d.ts +1 -0
- package/dist/Theme/chakra/motion.js +2 -1
- package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
- package/dist/Theme/chakra/overlay.styles.js +4 -1
- package/dist/Theme/themeProps.d.ts +4 -0
- package/dist/Theme/tokens/brands/index.d.ts +1 -0
- package/dist/Theme/tokens/brands/index.js +17 -1
- package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +3 -35
- package/dist/Theme/tokens/builders/accentText.d.ts +2 -0
- package/dist/Theme/tokens/builders/accentText.js +7 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
- package/dist/Theme/tokens/builders/filledSurface.d.ts +5 -1
- package/dist/Theme/tokens/builders/filledSurface.js +17 -4
- package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
- package/dist/Theme/tokens/builders/mutedText.js +13 -3
- package/dist/Theme/tokens/builders/planeStep.d.ts +5 -0
- package/dist/Theme/tokens/builders/planeStep.js +21 -0
- package/dist/Theme/tokens/builders/planes.d.ts +4 -0
- package/dist/Theme/tokens/builders/planes.js +33 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
- package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
- package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
- package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/Theme/tokens/primitives/index.d.ts +2 -2
- package/dist/Theme/tokens/primitives/index.js +4 -1
- package/dist/Theme/tokens/primitives/motion.d.ts +1 -0
- package/dist/Theme/tokens/primitives/motion.js +2 -1
- package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
- package/dist/Theme/tokens/primitives/shadows.js +56 -6
- package/dist/Theme/tokens/primitives/typography.js +1 -1
- package/dist/Utils/table.js +2 -2
- package/dist/esm/Components/Button/Button.styles.js +62 -27
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -1
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -1
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -1
- package/dist/esm/Components/DatePicker/dayStates.js +2 -1
- package/dist/esm/Components/Drawer/Drawer.js +2 -1
- package/dist/esm/Components/Dropdown/DropDown.js +4 -10
- package/dist/esm/Components/FilePreview/FilePreview.js +3 -2
- package/dist/esm/Components/FileUpload/FileUpload.js +10 -3
- package/dist/esm/Components/FileUploader/FileUploader.js +4 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +7 -4
- package/dist/esm/Components/Input/TextInput.styles.js +10 -6
- package/dist/esm/Components/KanbanBoard/AccountCard.js +4 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +6 -5
- package/dist/esm/Components/NavigationBar/NavigationBar.js +5 -3
- package/dist/esm/Components/Notification/Notification.js +4 -3
- package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -4
- package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +13 -8
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +5 -4
- package/dist/esm/Components/SearchSelect/SearchSelect.js +46 -37
- package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
- package/dist/esm/Components/Select/SelectPopup.js +4 -5
- package/dist/esm/Components/Select/optionRowInk.js +7 -0
- package/dist/esm/Components/SelectSearch/SelectSearch.js +4 -12
- package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
- package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +4 -3
- package/dist/esm/Components/SideBar/SideBar.js +17 -14
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +7 -4
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/esm/Components/SideBar/components/PinnedSection.js +7 -4
- package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/esm/Components/StageProgress/StageItem.js +5 -2
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/StatCard/StatCard.js +2 -1
- package/dist/esm/Components/Table/Table.js +12 -7
- package/dist/esm/Components/Table/components/TableActions.js +3 -2
- package/dist/esm/Components/Table/components/TableBody.js +10 -2
- package/dist/esm/Components/Table/components/TableHeader.js +9 -4
- package/dist/esm/Components/Table/components/TableLoading.js +5 -4
- package/dist/esm/Components/Table/filters/CompactSelect.js +4 -12
- package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
- package/dist/esm/Components/Table/variants/TableVariantContext.js +3 -3
- package/dist/esm/Components/Table/variants/classic.js +3 -2
- package/dist/esm/Components/Timeline/Timeline.js +11 -4
- package/dist/esm/Components/Toaster/Toaster.js +20 -9
- package/dist/esm/Components/Toggle/TableToggle.js +5 -2
- package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +3 -1
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +4 -0
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +26 -19
- package/dist/esm/Theme/chakra/Card.styles.js +4 -1
- package/dist/esm/Theme/chakra/Menu.styles.js +10 -0
- package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
- package/dist/esm/Theme/chakra/componentStyles.js +12 -8
- package/dist/esm/Theme/chakra/motion.js +1 -0
- package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
- package/dist/esm/Theme/tokens/brands/index.js +16 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -35
- package/dist/esm/Theme/tokens/builders/accentText.js +5 -0
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
- package/dist/esm/Theme/tokens/builders/filledSurface.js +18 -5
- package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
- package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
- package/dist/esm/Theme/tokens/builders/planes.js +28 -0
- package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
- package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/esm/Theme/tokens/primitives/index.js +1 -1
- package/dist/esm/Theme/tokens/primitives/motion.js +1 -0
- package/dist/esm/Theme/tokens/primitives/shadows.js +54 -5
- package/dist/esm/Theme/tokens/primitives/typography.js +1 -1
- package/dist/esm/Utils/table.js +2 -2
- package/dist/esm/index.js +4 -3
- package/dist/index.d.ts +5 -4
- package/dist/index.js +15 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -18,6 +18,24 @@ next major.
|
|
|
18
18
|
|
|
19
19
|
### Added
|
|
20
20
|
|
|
21
|
+
- **`WorkspaceTray` is usable over an open modal.** It is portalled above the modal layer, labelled as a live region
|
|
22
|
+
(so Chakra's modal aria-hidden skips it) and outside the focus trap, so a window minimised over a wizard can be
|
|
23
|
+
restored without closing the wizard. New props: `placement` (`"bottom-end"` | `"bottom-start"`), `offset`,
|
|
24
|
+
`closeLabel(item)`, `dirtyLabel`, `label`; `WorkspaceTrayItem` gains `isDirty` (unsaved dot) and `subtitle`.
|
|
25
|
+
`WorkspaceWindow` gains `labels` ({minimize, close, openFullPage}) and `finalFocusRef`.
|
|
26
|
+
The tray now renders in a portal, so a test that queries inside its render container must query `document.body`.
|
|
27
|
+
- **`optionRowFill(rows, isActive)`** and **`optionRowCursorSx(rows)`** are exported from the package root: the one
|
|
28
|
+
fill an option row paints (the cursor's), and its `:hover`/`:focus` form for roving-focus lists.
|
|
29
|
+
- **`accentTextOnPlanes(scale, planes)`** is exported from the package root: the first accent rung clearing AA on every
|
|
30
|
+
plane in the list, for chrome that can land on the canvas, a card or an overlay.
|
|
31
|
+
- **`ruleOn(colors, plane)`** and **`MOTION_PRESS_SCALE`** are exported from the package root. `ruleOn` draws a divider at the
|
|
32
|
+
in-card weight on any plane (`cardRule` is `ruleOn` on `background[50]`); the press scale was only reachable by deep import.
|
|
33
|
+
- **`Card variant="elevated"`**: borderless, `background[50]` lifted by `shadows.card`; declares a 0 border width so it
|
|
34
|
+
never inherits an outline parent's rule.
|
|
35
|
+
- **`bandOn`, `recessOn`, `cardRule`**: plane-step helpers that return the input unchanged in light and a visible step
|
|
36
|
+
off the dark plane a fill or rule sits on (`raisedRule` now matches `cardRule`'s weight).
|
|
37
|
+
- **`buildDarkPalette`** takes an optional `{ planes: "lifted" | "flat" }` and `buildSurfaceRaised` an optional list of
|
|
38
|
+
filled marks to keep at 3:1.
|
|
21
39
|
- **`formatDate` / `formatDateTime` / `formatDateRange`**: Intl-based date text, en-IN by default ("09 Oct 2026"),
|
|
22
40
|
with `locale`, `timeZone`, `year: "never"`, `time: "12h" | "24h"` and a `fallback` (default "—") for null or
|
|
23
41
|
invalid input instead of "Invalid Date". A bare `YYYY-MM-DD` is that calendar day in every zone; ranges write a
|
|
@@ -316,8 +334,8 @@ next major.
|
|
|
316
334
|
- **`Card` `padding` is no longer Chakra's style prop** — it is omitted from the type and now takes
|
|
317
335
|
the `CardPadding` steps. A consumer passing `padding={4}` gets a compile error; use `p` or `sx`.
|
|
318
336
|
Staged for the next major (see Breaking); consumer blast radius not measured.
|
|
319
|
-
- **`SideBar`
|
|
320
|
-
`speed
|
|
337
|
+
- **`SideBar` `collapseTransition` defaults to `{ speed: "base" }`** (200ms width and shadow, was 260ms).
|
|
338
|
+
Pass `{ speed: "slow" }` for the old pace.
|
|
321
339
|
- **`StageProgress variant="stepper"` renders an `ol` of `li`** (`StepperStageProps.asListItem`).
|
|
322
340
|
Visual layout is unchanged; selectors that expected a `div` list no longer match.
|
|
323
341
|
- **`PdfViewer` `pdfUrl` is optional** — pass exactly one of `pdfUrl` / `getBlob`. In `getBlob` mode
|
|
@@ -373,8 +391,110 @@ next major.
|
|
|
373
391
|
`aria-readonly`, and `m`/`mt`/`mb`/`ml`/`mr`/`mx`/`my` on the wrapper. `InputSwitch` is now a
|
|
374
392
|
genuine thin wrapper — no prop it previously accepted is silently dropped.
|
|
375
393
|
|
|
394
|
+
### Changed (visual)
|
|
395
|
+
|
|
396
|
+
- **`Table` loading state.** With `isLoading` and no rows, each row now draws one skeleton per column (a checkbox
|
|
397
|
+
placeholder in the checkbox column, blank spacer cells) with the variant's row rule, instead of one bar spanning the
|
|
398
|
+
table. If `columns` is still empty while loading, the header shows four placeholder cells and a disabled select-all
|
|
399
|
+
instead of a lone checkbox stretched across the row. The select-all checkbox is disabled while `isLoading`.
|
|
400
|
+
- **`Table` defaults to `variant="studio"`.** Every `Table` rendered without `variant` (or with `variant={undefined}`)
|
|
401
|
+
now draws studio: flat small-caps header, one row rule, the select slot resting on the row number, status as a pill.
|
|
402
|
+
Keep the old look with `variant="classic"`. Measured 2026-10-14: crm-frontend has 38 `<Table>` call sites, none
|
|
403
|
+
passing `variant` (all 38 change); account-frontend 8 of 18 change (the other 10 already pass `"studio"`); hrms,
|
|
404
|
+
tickets and lfour render `Table` only through an `AppTable` wrapper that already defaults to studio (0 change).
|
|
405
|
+
- **Option rows fill only under the cursor; selection is the trailing check and weight 500.** `Select`, `SearchSelect`,
|
|
406
|
+
`SelectSearch`, `CompactSelect` and `OrgSwitcher` no longer fill the selected row: the selected fill sat 1.00-1.02:1
|
|
407
|
+
from the hover fill on all 18 brand x mode palettes, so the two read as one state. `SelectSearch`/`CompactSelect` no
|
|
408
|
+
longer fill row 0 on open beside the hovered row. `Dropdown` items keep `text[700]` under the cursor instead of turning
|
|
409
|
+
`accentText`. `SearchSelect` rows sit inset (`mx`, rounded) with the check at the trailing edge and no hairline
|
|
410
|
+
between rows. Text on every row state measures 7.69:1 or more (selected 12.43-19.90:1).
|
|
411
|
+
- **Chakra `Menu` items use option-row ink:** `text[700]` instead of `text[900]`; a checked `MenuItemOption` is weight
|
|
412
|
+
500 with an `accentText` check, matching `Select`.
|
|
413
|
+
- **Dark `Button` `outline`/`ghost`/`link` ink is chosen against the canvas, the card and the overlay.** It cleared AA
|
|
414
|
+
on the canvas only, so in a dialog or popover it fell to 4.06-4.50:1 in 24 scheme x brand combos (lavender outline
|
|
415
|
+
4.46:1, rosewood 4.10:1); now AA on all three planes (lavender 6.28:1, rosewood 5.57:1). Light mode is unchanged
|
|
416
|
+
(0 light combos move); 62 dark combos step lighter (emerald primary `#0f9d8a` -> `#14e3c7`).
|
|
417
|
+
- **Dark rules and pressed solids (owner review before release).** In dark only: the `NavigationBar` header rule and
|
|
418
|
+
leading divider, the `KanbanBoard` column edge, header rule and count pill, the filled `TextInput` (a visible band off
|
|
419
|
+
the card) and the Kanban drag-over column's dashed border (`focusRing.ring`, 3.1:1 or more instead of 1.7-2.7:1)
|
|
420
|
+
now read at the in-card rule weight instead of 1.03-1.16:1. Solid `hover`/`active` fills never fall below 1.5:1 against
|
|
421
|
+
the canvas (a pressed warning solid reached 1.00:1) and never flip the label colour, so zinc dark's pressed primary stays
|
|
422
|
+
light with dark ink instead of dropping to `#52525b`. `ScrollToTop`, `FilePreview`, `ProfilePhotoViewer`, the Table
|
|
423
|
+
clear-filters badge, Chakra `Badge`/`Radio` and the Table status pills now pass the canvas to `solidFillRung`: zinc dark
|
|
424
|
+
primary and every brand's dark gray solid move from `#52525b`/`#525252` (2.4:1) to `#e4e4e7`/`#a3a3a3` with dark ink.
|
|
425
|
+
Light mode and every other dark colour keep their fill; error/warning/info pressed fills in dark are lighter than before
|
|
426
|
+
and hover and press now share one rung.
|
|
427
|
+
- **Elevation follows Pebble, per mode.** `shadows.sm`/`base`/`md`/`lg` are the Pebble card-press/
|
|
428
|
+
card/float/dialog stacks, with new `card`, `float`, `dialog` and `sheet` role keys. Light shadows are
|
|
429
|
+
softer and wider; dark mode gets its own heavier black ramp, so overlays cast a visible shadow on a
|
|
430
|
+
dark canvas. `xs`, `xl`, `2xl`, `inner`, `none`, `darkLg` and the focus `outline` are unchanged.
|
|
431
|
+
- **`Menu` and `Popover` join the owned popup family:** radius `md` → `xl` (`RADIUS_ROLE.float`)
|
|
432
|
+
and shadow `sm` → `md` (float), like every other anchored popup. Their border stays.
|
|
433
|
+
- **`fonts.mono` is a real monospace stack** (`ui-monospace, SFMono-Regular, Menlo, Consolas,
|
|
434
|
+
monospace`). It was Inter, so code and keyboard shortcuts never aligned.
|
|
435
|
+
- **`Button` gray `ghost`/`outline` hover is visible.** Gray has no opacity ramp, so hover/active
|
|
436
|
+
take the list-row `active`/`selectedActive` steps (at least 1.15:1 on a card, all 9 brands x 2 modes)
|
|
437
|
+
instead of `gray.50` (1.04-1.08:1). `solid` and `gradient` hover no longer add a box-shadow; the
|
|
438
|
+
colour step carries hover.
|
|
439
|
+
- **`Toaster` status-icon pulse** animates a pseudo-element's transform and opacity (scale 1 to 1.5,
|
|
440
|
+
faded out by 70%, the same 900 ms one-shot) instead of `box-shadow`, so it no longer repaints every
|
|
441
|
+
frame. The icon chip background is the same tint composited opaque over the toast surface.
|
|
442
|
+
- **`Table` filter sidebar** opens on the 200 ms motion token (was 500 ms), does not animate on
|
|
443
|
+
mount, and is instant under reduced motion.
|
|
444
|
+
- **`FileUpload` image thumbnails are a keyboard-operable "Preview <file name>" button**: a new tab
|
|
445
|
+
stop with the library focus ring; Enter or Space opens the preview. Each image row now has two
|
|
446
|
+
buttons (Preview and remove), so a test that queries an unnamed `getByRole("button")` inside a row
|
|
447
|
+
must name the one it means.
|
|
448
|
+
- **`Menu` item highlight sits inside the menu.** A themed `MenuItem`/`MenuItemOption` is
|
|
449
|
+
`calc(100% - 2 * mx)` wide, so its hover/focus fill keeps the same 6px inset on both sides instead of
|
|
450
|
+
overhanging the menu's right edge by 6px. Menu size and row height are unchanged; a `MenuItem` given
|
|
451
|
+
its own `w`/`width` keeps that width.
|
|
452
|
+
- **`Skeleton` shimmer is one depth on every brand and mode**: 1.35:1 between its two colours (the
|
|
453
|
+
mobile library's `SKELETON_SHIMMER_CONTRAST`), was 1.34-1.58:1 in light and 1.93-1.99:1 in dark. The
|
|
454
|
+
end colour is `gray[300]`'s tint settled against `gray[100]`; dark skeletons pulse much more gently.
|
|
455
|
+
An explicit `startColor`/`endColor` still wins.
|
|
456
|
+
|
|
457
|
+
- **Motion comes from the tokens.** `SideBar`, `Notification`, `Toaster`, the Table settings sheet,
|
|
458
|
+
`ProfilePhotoViewer`, `TableToggle` and `StageProgress` take every duration and curve from the motion tokens
|
|
459
|
+
(colour fades 150ms, movement 200ms, enters on `MOTION_EASE_OUT`, exits on `MOTION_EASE_IN`). Most timings
|
|
460
|
+
move by under 60ms; the Table settings sheet goes from 400ms to 200ms. `Notification` cards no longer lift
|
|
461
|
+
2px on hover; the shadow still deepens.
|
|
462
|
+
- **`Button` (solid, outline, ghost) and `IconButton` scale to 0.98 while pressed** (`MOTION_PRESS_SCALE`).
|
|
463
|
+
Never when disabled or loading, nor under `prefers-reduced-motion`.
|
|
464
|
+
- **Dark planes carry the brand hue and separate by lift.** The dark canvas takes a faint brand tint and cards
|
|
465
|
+
(`background[50]`) sit one step (1.16:1) above it, with overlays (`surfaceRaised`) one step (1.15:1) above
|
|
466
|
+
the card; every filled mark keeps 3:1 on all three. Light mode is unchanged. A brand opts out with
|
|
467
|
+
`buildDarkPalette(light, { planes: "flat" })`. `meadow` and `rosewood` dark `accentText` move one rung
|
|
468
|
+
lighter so they clear AA on selected list rows.
|
|
469
|
+
- **`zinc`:** muted text in light mode is `#515157` (was `#27272a`, 14.9:1), settled under a new 8:1 muted
|
|
470
|
+
ceiling; zinc's dark card is no longer darker than its canvas.
|
|
471
|
+
- **A brand's primary never reads as danger.** `radiant`'s danger colour (`red` and `semantic.error`) is
|
|
472
|
+
crimson and `rosewood`'s primary rotates toward raspberry; a delta-E >= 10 gate in `brandIdentity.test.ts`
|
|
473
|
+
covers all 9 brands in both modes.
|
|
474
|
+
- **`Button` solid primary paints `resolveFilledSurface`.** Only `zinc` dark moves: the primary fill goes from `#52525b` with
|
|
475
|
+
white ink (2.5:1 on the canvas) to `#e4e4e7` with black ink, matching `resolveFilledSurface`, the fill every other filled surface already paints.
|
|
476
|
+
- **Dark mode: header strips, calendar off-days and in-card rules step visibly off the lifted planes.** Table header
|
|
477
|
+
strips (`CustomModulesTable`, `SignInActivityTable`), `DatePicker` weekly-off cells, and the rules inside cards and
|
|
478
|
+
dialogs (`Table`, `SettingRow`, `SettingsSection`, `StatCard`, `Drawer`, `Modal`, `ConfirmDialog` and the account
|
|
479
|
+
modals) now clear 1.15:1 (bands) and 1.31:1 (rules) off their plane. Light mode is unchanged.
|
|
480
|
+
- **`Card` defaults to `variant="elevated"`** (borderless, `background[50]` lifted by `shadows.card`). Pass
|
|
481
|
+
`variant="outline"` for a Card that frames a table or a list of rows. Measured blast radius: 22 library `<Card>`
|
|
482
|
+
sites with no variant flip (hrms 18, account 1, tickets 3); 305 with an explicit variant are unchanged. The
|
|
483
|
+
`SettingsSection` danger zone keeps its red frame by taking `variant="outline"`.
|
|
484
|
+
- **Light page canvas (`backgroundColor.base`) sits 1.09:1 below the card on all 9 brands**, so a borderless card keeps
|
|
485
|
+
its top edge (zinc and slate `#fafafa` to `#f5f5f5`, lavender `#fbfafd` to `#f5f4f8`). `main` and every other token
|
|
486
|
+
are unchanged.
|
|
487
|
+
|
|
376
488
|
### Fixed
|
|
377
489
|
|
|
490
|
+
- **`WorkspaceTrayPreview`** reports `onOpenChange(false)` only after the card actually opened (it used to fire when
|
|
491
|
+
the pointer left before the open delay).
|
|
492
|
+
- **`FileUploader`** revokes the blob URL of an image the moment it is removed, and of images it rejects (over the total
|
|
493
|
+
size or past `maxFiles`); those URLs were created and never freed. Surviving URLs stay yours to revoke.
|
|
494
|
+
- **`Table` settings sheet** fades in place instead of dropping in when the user prefers reduced motion.
|
|
495
|
+
- **`SearchSelect`**: the Select All and Add New rows are reachable from the keyboard. Arrow keys, Home and End walk
|
|
496
|
+
Select All, then the options, then Add New, and Enter runs them. Both are now `role="option"` rows, so a test that
|
|
497
|
+
counts `getAllByRole("option")` with either row shown sees one or two more.
|
|
378
498
|
- **Field helper text no longer leaves a dangling `<id>-helptext` in `aria-describedby`** when a field with an
|
|
379
499
|
explicit `id` sits inside a consumer `FormControl` (`TextInput` and every field rendering
|
|
380
500
|
`FieldMessage`/`HelperText`).
|
package/COMPONENT-GOTCHAS.md
CHANGED
|
@@ -215,7 +215,7 @@ and wires `aria-controls` to them. Pick by that, never by the picture. A screen
|
|
|
215
215
|
|
|
216
216
|
| Need | Component | Why not the others |
|
|
217
217
|
| --- | --- | --- |
|
|
218
|
-
| Generic
|
|
218
|
+
| Generic padded container (borderless by default; `variant="outline"` for a ruled one), no commerce semantics | `Card` | Layout wrapper with `header`/`footer` slots and a padded body — see gotcha below |
|
|
219
219
|
| Product tile for a grid, list or rail (photo, price, rating, swatches, quick add) | `ProductCard` | Takes the same `axes` / `variants` as `ProductDetails`; for a whole page use `ProductDetails` |
|
|
220
220
|
| A KPI figure with delta and sparkline | `StatCard` | Not a product or a container |
|
|
221
221
|
| Subscription/pricing-tier card (plans, billing cycle, feature list) | `PaymentCard` | Takes a `Plan` object, unrelated to `options`/`productImage` |
|
|
@@ -342,7 +342,6 @@ rows per page does not reset `page` either. Reset it yourself, in `onPageSizeCha
|
|
|
342
342
|
|
|
343
343
|
### Four components with a behaviour their props do not hint at
|
|
344
344
|
|
|
345
|
-
- `WorkspaceTrayPreview` `onOpenChange(false)` also fires when the pointer leaves before the card ever opened; track your own open state from `true`.
|
|
346
345
|
- `Notification`'s countdown is computed when its dates change and never ticks; remount or change a date to refresh it. Overdue labels read "overdue by N hours ago".
|
|
347
346
|
- `NoteTextArea` checks `maxNoteWordCount` against the title only until the note is next edited, so a long title can be saved; `handleCancel` always receives `false`.
|
|
348
347
|
- `VerifyEmailOtp` fields set `autocomplete="off"`, so browser or OS one-time-code autofill never offers the code.
|
|
@@ -401,7 +400,7 @@ The wrapper is deliberately not a button; make the custom component a button, or
|
|
|
401
400
|
| `InputTextArea` / `FileUpload` / `TextInput` | Width 500px → 100% / `maxSizeKB` 5 → 5120 / no default "Placeholder" text | `width="500px"` / — (5 KB was a bug) / — |
|
|
402
401
|
| `DatePicker` (no `pickerType`) | Inference is case-sensitive: `MM` is month, `mm` minutes. `dd/MM/yyyy` was misread as date+time and showed time selects; it is now date-only | `pickerType="datetime"` |
|
|
403
402
|
| `EmptyState` | Title is an `h3`; image is decorative (`alt=""`, was the title) | `titleAs`, `imageAlt` |
|
|
404
|
-
| Theme `Badge` / `Card` / field labels | Badge: pill, no uppercase, default `sm`. Card: default variant `
|
|
403
|
+
| Theme `Badge` / `Card` / field labels | Badge: pill, no uppercase, default `sm`. Card: default variant `elevated` (borderless, `shadows.card`). Label colour `text[700]`; helper/error row 12px | `size`/`variant` props |
|
|
405
404
|
| `Header` | `position: sticky; top: 0`, z-index `sticky` (1100, was 1000); `rightSlot` mounts once, not per layout | — |
|
|
406
405
|
| `Table` | Radius `xl`; row height 32/40/52 by density; filter button is named "Filter {label}" (tests querying "Search" break); client pagination resets to page 1 when `data.length` changes | — |
|
|
407
406
|
| `KanbanBoard` | `height`/`maxH` props replace the clipping wrapper; `height="100%"` needs a parent with a definite height | — |
|
|
@@ -534,10 +533,32 @@ A popup opened inside another popup takes `zIndex="popoverNested"` (1510), never
|
|
|
534
533
|
|
|
535
534
|
### Your own overlay painted `background[50]` sinks into the dark canvas
|
|
536
535
|
|
|
537
|
-
In dark mode `background[50]`
|
|
538
|
-
|
|
539
|
-
step
|
|
540
|
-
`surfaceRaised` too, and a divider inside it `raisedRule(colors)`.
|
|
536
|
+
In dark mode `background[50]` is the card plane, one step above the canvas; an overlay painted with it
|
|
537
|
+
merges into the cards under it. Library dialogs, drawers, popovers and menus paint `colors.surfaceRaised`,
|
|
538
|
+
one step above the card in dark and identical `#ffffff` in light. A custom panel, popover or
|
|
539
|
+
`ModalContent bg=` should read `surfaceRaised` too, and a divider inside it `raisedRule(colors)`.
|
|
540
|
+
|
|
541
|
+
### Named fills nearly vanish on a dark card
|
|
542
|
+
|
|
543
|
+
In dark mode `backgroundColor.light`, `tertiary`, `medium` and `tableHeader` sit only 1.01-1.05:1 off
|
|
544
|
+
`background[50]`, `muted` 1.00-1.06:1 off `surfaceRaised`, and `boxborder[200]` 1.10-1.16:1 off a card and
|
|
545
|
+
1.00-1.06:1 off `surfaceRaised`. Never paint a named canvas fill or raw `boxborder[200]` on a card or overlay:
|
|
546
|
+
use `bandOn(fill, surface)` for a header strip, hover or selection tint, `recessOn(fill, surface)` for a shaded
|
|
547
|
+
or off cell, `cardRule(colors)` for a rule inside a card and `raisedRule(colors)` for a rule inside an overlay.
|
|
548
|
+
All four return the old value unchanged in light mode.
|
|
549
|
+
|
|
550
|
+
### A Chakra `ModalHeader` inside a coloured box keeps its own ink
|
|
551
|
+
|
|
552
|
+
The theme gives `ModalHeader` `color: colors.header[900]` and a bottom rule. Wrapping it in a
|
|
553
|
+
`Box bgGradient=… color={ink}` does not recolour it: the header paints `header[900]` itself, so the
|
|
554
|
+
title is dark navy on a blue/purple gradient (3.11–4.11:1 in light across the 9 brands, against
|
|
555
|
+
4.62:1 for the gradient's own ink). Icons and badges inside it that read `currentColor` follow the
|
|
556
|
+
header, not the box.
|
|
557
|
+
|
|
558
|
+
**Apply:** put the ink on the header itself — `<ModalHeader color={resolved.ink} borderBottomWidth={0}>`
|
|
559
|
+
with `resolved = resolveGradient(stops, colors.white, colors.black)` — or use `LimitReachedModal`.
|
|
560
|
+
For an accent icon on the gradient, use `resolved.ink` unless the accent clears 3:1 on both
|
|
561
|
+
`resolved.from` and `resolved.to`; a theme `yellow[300]` drops to 2.61:1 in dark.
|
|
541
562
|
|
|
542
563
|
### `Drawer` / `Modal` / `ProfileCard` drop any child that isn't a named slot — use `portalChildren`
|
|
543
564
|
|
|
@@ -691,13 +712,13 @@ whose defaults arrive asynchronously doesn't open already red.
|
|
|
691
712
|
### A wrapper presetting a prop must destructure with a default, not rely on JSX prop order
|
|
692
713
|
|
|
693
714
|
Wrapping a library component to preset a prop (e.g. `Table`'s `variant`) as
|
|
694
|
-
`<Table variant="
|
|
715
|
+
`<Table variant="classic" {...props} />` silently reverts to the library's own default the moment a
|
|
695
716
|
caller passes `variant={undefined}` — a later spread always wins in JSX, even with `undefined`,
|
|
696
717
|
and the library component resolves that `undefined` via its own default parameter.
|
|
697
718
|
|
|
698
719
|
**Apply:**
|
|
699
720
|
```tsx
|
|
700
|
-
const AppTable = ({ variant = '
|
|
721
|
+
const AppTable = ({ variant = 'classic', ...props }: TableProps) => <Table variant={variant} {...props} />;
|
|
701
722
|
```
|
|
702
723
|
Applies to any library prop with a default value, not just `Table`'s `variant`.
|
|
703
724
|
|
|
@@ -1834,6 +1855,17 @@ from `optionRowDescriptionInk(theme.colors)` (exported from the package root) ra
|
|
|
1834
1855
|
`theme.colors.textMuted`. It is a no-op in light mode. The row's main label is
|
|
1835
1856
|
`optionRowInk(theme.colors, isSelected)` with `optionRowWeight(isSelected)` — never brand ink.
|
|
1836
1857
|
|
|
1858
|
+
### A custom option list must not fill the selected row
|
|
1859
|
+
|
|
1860
|
+
`listRowBackgrounds(colors).selected` and `.active` sit within 1.02:1 of each other on every brand
|
|
1861
|
+
and mode, so a list that fills both the selected row and the hovered row shows two identical fills
|
|
1862
|
+
and the user cannot tell which one is chosen. Library option lists paint one fill — the cursor's —
|
|
1863
|
+
and mark selection with `optionRowWeight` plus a trailing `Check` in `colors.accentText`.
|
|
1864
|
+
|
|
1865
|
+
**Apply:** `bg={optionRowFill(listRowBackgrounds(colors), isActive)}` for an index-driven list, or
|
|
1866
|
+
`{...optionRowCursorSx(listRowBackgrounds(colors))}` for rows that take DOM focus; both are exported
|
|
1867
|
+
from the package root. Text is `optionRowInk(colors, isSelected)`, unchanged on hover.
|
|
1868
|
+
|
|
1837
1869
|
### `Table`'s node column `label` needs `labelText` unless its text is plain children
|
|
1838
1870
|
|
|
1839
1871
|
`columns[].label` accepts a node (an icon, a tooltip trigger) as well as a string or number. Every
|
|
@@ -1873,6 +1905,16 @@ can outgrow the column.
|
|
|
1873
1905
|
to `null`, so put a Clear action beside it if one is needed.
|
|
1874
1906
|
- For free-text chips that are not email addresses use `TagInput`: same look as `MultiSelect`, any text, with
|
|
1875
1907
|
your own `validate`.
|
|
1908
|
+
- **Button press scale matches a real `:active` only.** A `MenuButton as={Button}` held open by Chakra's
|
|
1909
|
+
`data-active` keeps the darker pressed fill but does not stay at 0.98. A consumer `_active={{ transform }}`
|
|
1910
|
+
loses to the press rule while the pointer is down; use `variant="unstyled"` or an `sx` `&:active` with
|
|
1911
|
+
`!important`.
|
|
1912
|
+
|
|
1913
|
+
### `Card` is borderless by default (`elevated`)
|
|
1914
|
+
|
|
1915
|
+
A Card that frames a table or a list of rows needs `variant="outline"`. `borderColor` alone shows nothing, because
|
|
1916
|
+
the default border width is 0, and the outline rule is Chakra `gray[200]`, not `boxborder[200]`. Paint the page with
|
|
1917
|
+
`backgroundColor.base`: on `backgroundColor.main` a borderless card can be white on white.
|
|
1876
1918
|
|
|
1877
1919
|
### `Select` / `SearchSelect` multi rows have no checkbox role
|
|
1878
1920
|
|
package/DESIGN-GUIDE.md
CHANGED
|
@@ -12,15 +12,21 @@ tickets `layoutDensity.ts`), use it — it encodes these same rules. Otherwise t
|
|
|
12
12
|
|
|
13
13
|
Calm, dense, professional SaaS admin — Linear/Stripe-dashboard, not a landing page.
|
|
14
14
|
|
|
15
|
-
- **Hierarchy comes from type and whitespace, not boxes.** One
|
|
16
|
-
|
|
15
|
+
- **Hierarchy comes from type and whitespace, not boxes.** One surface per level. Never nest a
|
|
16
|
+
card inside a card; inside a card, separate with spacing or a `Divider`.
|
|
17
17
|
- **One primary action per view.** One `variant="solid"` button in the page header; everything
|
|
18
18
|
else `outline` or `ghost`. The only exception is a composer's Send button.
|
|
19
19
|
- **Left-aligned, scannable.** Titles and forms left-aligned; numbers right-aligned in tables.
|
|
20
20
|
- **Color means something.** Neutral by default; brand color for the primary action and selection;
|
|
21
21
|
semantic color only for status. No decorative gradients, no colored section backgrounds.
|
|
22
|
-
- **
|
|
23
|
-
|
|
22
|
+
- **Content cards float, data surfaces are ruled.** `Card` is borderless by default
|
|
23
|
+
(`variant="elevated"`: `background[50]` lifted by the soft `shadows.card`). Tables, filter bars,
|
|
24
|
+
list panes and fields keep their 1px `boxborder[200]` rule; a `Card` that frames a table or a
|
|
25
|
+
list of rows takes `variant="outline"`. Heavier shadows only on floating things (menus,
|
|
26
|
+
popovers, modals) and on hover of a card that is itself clickable.
|
|
27
|
+
- **Paint the page with `backgroundColor.base`.** In light mode it sits one step (1.09:1) below
|
|
28
|
+
the card, which is what gives a borderless card its top edge; `backgroundColor.main` is a
|
|
29
|
+
component surface and can be as white as the card.
|
|
24
30
|
|
|
25
31
|
## 2. Spacing (Chakra units, 1 = 4px)
|
|
26
32
|
|
|
@@ -71,6 +77,7 @@ stay light in dark mode.
|
|
|
71
77
|
| Status text/icon | `colors.semanticText.success \| error \| warning \| info` |
|
|
72
78
|
| Status chip | `<Tag label="Won" colorScheme="green" />` (subtle, `sm` by default) — never a painted `Box`. Tone → `colorScheme`: success `green`, warning `orange`, error `red`, info `blue`, neutral `gray`. Quiet rows: `<Tag tone="success" display="dot" label=… />`; map an app's status vocabulary once with `<StatusTag status map label display />` |
|
|
73
79
|
| Selectable list row (inbox, picker) | `listRowBackgrounds(colors)` for hover/selected + `sx={focusVisibleStyles(colors)}`; pad the list `p={2}` so the ring isn't clipped |
|
|
80
|
+
| Option row in a dropdown/menu/select | `optionRowFill` / `optionRowCursorSx` (fill = cursor only) + `optionRowInk` + a trailing `Check` for the selected row — never a selected fill |
|
|
74
81
|
| Any filled surface you paint | `resolveFilledSurface(colors.<scale>, colors)` → `{ fill, color }` |
|
|
75
82
|
| Icon tint chip, avatar tint | `bg={colors.primary.opacity[8]}` + `color={colors.accentText}` (`opacity` exists on `primary`/`secondary`/`tertiary` only) |
|
|
76
83
|
|
|
@@ -228,7 +235,8 @@ hides its primary; when only one section is empty on a populated page, that sect
|
|
|
228
235
|
- Reaching for `SelectV2`, `SearchSelect`, `SelectSearch` in new work — all `@deprecated`.
|
|
229
236
|
One picker now: `Select` (`native={false}` for the themed, searchable, multi popup).
|
|
230
237
|
`Dropdown` is the exception — it is an action menu, not a picker, and is not replaced.
|
|
231
|
-
- A
|
|
238
|
+
- A card inside a card; a border on a content `Card` (it is borderless by default), or any resting
|
|
239
|
+
shadow heavier than `shadows.card`.
|
|
232
240
|
- Painting a whole table cell with a status color — use a `Tag` in the cell.
|
|
233
241
|
- Centered page titles, hero-sized headings, `size="lg"` buttons, or `size` props restating the default.
|
|
234
242
|
- More than one solid button in a view; a destructive action without `AlertDialog`.
|
|
@@ -5,21 +5,43 @@ const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
|
5
5
|
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
6
6
|
const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
|
|
7
7
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
8
|
+
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
8
9
|
const motion_1 = require("../../Theme/chakra/motion");
|
|
9
10
|
const primitives_1 = require("../../Theme/tokens/primitives");
|
|
11
|
+
const BUTTON_TRANSITION = [
|
|
12
|
+
(0, primitives_1.transitionFor)(["background-color", "border-color", "color", "box-shadow", "filter"]),
|
|
13
|
+
(0, primitives_1.transitionFor)(["transform"], "fast", "out"),
|
|
14
|
+
].join(", ");
|
|
15
|
+
const PRESS = {
|
|
16
|
+
[motion_1.MOTION_OK_QUERY]: {
|
|
17
|
+
"&:active:not(:disabled):not([data-loading]):not([aria-disabled=true])": {
|
|
18
|
+
transform: `scale(${primitives_1.MOTION_PRESS_SCALE})`,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
10
22
|
const controlSize = (size) => {
|
|
11
23
|
const { height, fontSize, paddingX } = primitives_1.BUTTON_SIZES[size];
|
|
12
24
|
return { h: height, minW: height, fontSize, px: paddingX };
|
|
13
25
|
};
|
|
14
26
|
// NOTE: [500] alone measures ~4.2 on a dark canvas — resolved per-mode so outline/ghost/link text stays readable.
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
// NOTE: a bare button sits on the canvas, a card or an overlay; dark overlays are the hardest plane.
|
|
28
|
+
const onCanvasText = (theme, colorScheme) => (0, accentText_1.accentTextOnPlanes)(theme.colors[colorScheme], [
|
|
29
|
+
theme.colors.backgroundColor.main,
|
|
30
|
+
theme.colors.background[50],
|
|
31
|
+
theme.colors.surfaceRaised,
|
|
32
|
+
]);
|
|
33
|
+
// NOTE: [50] alone measured ~1.04 (invisible) in both modes — gray borrows the row-state steps.
|
|
17
34
|
const onCanvasHoverBg = (theme, colorScheme, step) => {
|
|
18
35
|
const scale = theme.colors[colorScheme];
|
|
19
|
-
|
|
36
|
+
if ("opacity" in scale)
|
|
37
|
+
return scale.opacity[step];
|
|
38
|
+
if (colorScheme !== "gray")
|
|
39
|
+
return scale[50];
|
|
40
|
+
const rows = (0, rowStates_1.listRowBackgrounds)(theme.colors);
|
|
41
|
+
return step === 16 ? rows.active : rows.selectedActive;
|
|
20
42
|
};
|
|
21
43
|
const swatch = (theme, colorScheme) => theme.colors[colorScheme];
|
|
22
|
-
const buttonSolidRung = (theme, colorScheme) => (0, filledSurface_1.solidFillRung)(swatch(theme, colorScheme), theme.colors.white);
|
|
44
|
+
const buttonSolidRung = (theme, colorScheme) => (0, filledSurface_1.solidFillRung)(swatch(theme, colorScheme), theme.colors.white, theme.colors.backgroundColor.main);
|
|
23
45
|
const darkerFill = (theme, colorScheme, step) => {
|
|
24
46
|
const scale = swatch(theme, colorScheme);
|
|
25
47
|
const rung = (0, filledSurface_1.darkerFillRung)(scale, theme.colors.backgroundColor.main, theme.colors.white, step);
|
|
@@ -27,6 +49,21 @@ const darkerFill = (theme, colorScheme, step) => {
|
|
|
27
49
|
};
|
|
28
50
|
/** Label for the solid variant's filled bg — derived from THAT fill, since hover/active swap it. */
|
|
29
51
|
const labelFor = (theme, fill) => (0, filledSurface_1.labelOnFill)(fill, theme.colors.white, theme.colors.black);
|
|
52
|
+
const solidSurface = (theme, colorScheme) => {
|
|
53
|
+
if (colorScheme === "primary")
|
|
54
|
+
return (0, filledSurface_1.resolveFilledSurface)(theme.colors.primary, theme.colors);
|
|
55
|
+
const fill = theme.colors[colorScheme][buttonSolidRung(theme, colorScheme)];
|
|
56
|
+
const hoverFill = darkerFill(theme, colorScheme, 0);
|
|
57
|
+
const activeFill = darkerFill(theme, colorScheme, 1);
|
|
58
|
+
return {
|
|
59
|
+
fill,
|
|
60
|
+
color: labelFor(theme, fill),
|
|
61
|
+
hoverFill,
|
|
62
|
+
hoverColor: labelFor(theme, hoverFill),
|
|
63
|
+
activeFill,
|
|
64
|
+
activeColor: labelFor(theme, activeFill),
|
|
65
|
+
};
|
|
66
|
+
};
|
|
30
67
|
// NOTE: replaces Chakra's stock ring, which failed WCAG 1.4.11 on every brand — gated by focusRing.test.ts.
|
|
31
68
|
const focusRing = (theme) => (0, focusRing_styles_1.focusVisibleStyles)(theme.colors);
|
|
32
69
|
exports.Button = {
|
|
@@ -35,7 +72,7 @@ exports.Button = {
|
|
|
35
72
|
baseStyle: ({ theme }) => ({
|
|
36
73
|
borderRadius: "lg",
|
|
37
74
|
fontWeight: 500,
|
|
38
|
-
transition:
|
|
75
|
+
transition: BUTTON_TRANSITION,
|
|
39
76
|
...(0, motion_1.reducedMotionSx)(),
|
|
40
77
|
_disabled: {
|
|
41
78
|
opacity: 0.6,
|
|
@@ -45,35 +82,32 @@ exports.Button = {
|
|
|
45
82
|
}),
|
|
46
83
|
variants: {
|
|
47
84
|
solid: ({ theme, colorScheme = "primary" }) => {
|
|
48
|
-
const
|
|
49
|
-
const hoverFill = darkerFill(theme, colorScheme, 0);
|
|
50
|
-
const activeFill = darkerFill(theme, colorScheme, 1);
|
|
51
|
-
const hoverLabel = labelFor(theme, hoverFill);
|
|
85
|
+
const s = solidSurface(theme, colorScheme);
|
|
52
86
|
return {
|
|
53
|
-
bg: fill,
|
|
54
|
-
color:
|
|
87
|
+
bg: s.fill,
|
|
88
|
+
color: s.color,
|
|
55
89
|
_hover: {
|
|
56
|
-
bg: hoverFill,
|
|
57
|
-
color:
|
|
58
|
-
boxShadow: "sm",
|
|
90
|
+
bg: s.hoverFill,
|
|
91
|
+
color: s.hoverColor,
|
|
59
92
|
_disabled: {
|
|
60
|
-
bg: hoverFill, // keep hover color on loading
|
|
61
|
-
color:
|
|
93
|
+
bg: s.hoverFill, // keep hover color on loading
|
|
94
|
+
color: s.hoverColor,
|
|
62
95
|
},
|
|
63
96
|
},
|
|
64
97
|
_active: {
|
|
65
|
-
bg: activeFill,
|
|
66
|
-
color:
|
|
98
|
+
bg: s.activeFill,
|
|
99
|
+
color: s.activeColor,
|
|
67
100
|
boxShadow: "none",
|
|
68
101
|
},
|
|
69
102
|
_loading: {
|
|
70
|
-
bg: hoverFill, // keep hover color while loading
|
|
71
|
-
color:
|
|
103
|
+
bg: s.hoverFill, // keep hover color while loading
|
|
104
|
+
color: s.hoverColor,
|
|
72
105
|
_hover: {
|
|
73
|
-
bg: hoverFill,
|
|
74
|
-
color:
|
|
106
|
+
bg: s.hoverFill,
|
|
107
|
+
color: s.hoverColor,
|
|
75
108
|
},
|
|
76
109
|
},
|
|
110
|
+
...PRESS,
|
|
77
111
|
...focusRing(theme),
|
|
78
112
|
};
|
|
79
113
|
},
|
|
@@ -94,6 +128,7 @@ exports.Button = {
|
|
|
94
128
|
_loading: {
|
|
95
129
|
color: ink,
|
|
96
130
|
},
|
|
131
|
+
...PRESS,
|
|
97
132
|
...focusRing(theme),
|
|
98
133
|
};
|
|
99
134
|
},
|
|
@@ -107,6 +142,7 @@ exports.Button = {
|
|
|
107
142
|
_active: {
|
|
108
143
|
bg: onCanvasHoverBg(theme, colorScheme, 24),
|
|
109
144
|
},
|
|
145
|
+
...PRESS,
|
|
110
146
|
...focusRing(theme),
|
|
111
147
|
}),
|
|
112
148
|
link: ({ theme, colorScheme = "primary" }) => ({
|
|
@@ -143,7 +179,6 @@ exports.Button = {
|
|
|
143
179
|
_hover: {
|
|
144
180
|
bgImage: bg,
|
|
145
181
|
filter: "brightness(0.92)",
|
|
146
|
-
boxShadow: "md",
|
|
147
182
|
_disabled: { bgImage: bg, filter: "none" },
|
|
148
183
|
},
|
|
149
184
|
_active: {
|
|
@@ -8,14 +8,14 @@ type DeadDividerProps = {
|
|
|
8
8
|
};
|
|
9
9
|
/** Padding steps: "none" flush, "2xs" 0.375rem, "xs" 0.75rem all round, "sm" / "md" / "lg" match `size`. */
|
|
10
10
|
export type CardPadding = "none" | "2xs" | "xs" | "sm" | "md" | "lg";
|
|
11
|
-
/** Themed
|
|
11
|
+
/** Themed card surface (outline rule or borderless elevated) with optional header/footer slots; direction/align/justify apply to the body. */
|
|
12
12
|
export type CardProps = Omit<ChakraCardProps, "children" | "variant" | "size" | "color" | "colorScheme" | "direction" | "align" | "justify" | "padding"> & DeadDividerProps & {
|
|
13
13
|
/** Rendered in CardHeader (semibold header ink) only when truthy. */
|
|
14
14
|
header?: React.ReactNode;
|
|
15
15
|
/** Rendered in CardFooter only when truthy. */
|
|
16
16
|
footer?: React.ReactNode;
|
|
17
17
|
children: React.ReactNode;
|
|
18
|
-
/**
|
|
18
|
+
/** "elevated" (default): borderless, lifted by `shadows.card`. "outline": 1px rule, no shadow, for tables and row lists. */
|
|
19
19
|
variant?: "elevated" | "outline" | "filled" | "unstyled";
|
|
20
20
|
/** Padding scale for header/body/footer; defaults to "md". */
|
|
21
21
|
size?: "sm" | "md" | "lg";
|
|
@@ -8,6 +8,7 @@ const react_1 = require("react");
|
|
|
8
8
|
const react_2 = require("@chakra-ui/react");
|
|
9
9
|
const lucide_react_1 = require("lucide-react");
|
|
10
10
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
11
|
+
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
11
12
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
12
13
|
const TextInput_1 = __importDefault(require("../Input/TextInput"));
|
|
13
14
|
const ConfirmDialog = ({ isOpen, onClose, onConfirm, title, children, icon, iconBg, iconColor, tone = "destructive", cancelLabel = "Cancel", confirmLabel = "Confirm", confirmIcon, isConfirmLoading = false, disableCancelWhilePending = true, confirmationText, confirmationLabel, bodyLayout = "flush", bodySpacing = 4, actionsPt = 0, focusCancelOnOpen = true, isCentered = true, closeOnEsc, closeOnOverlayClick, }) => {
|
|
@@ -18,6 +19,6 @@ const ConfirmDialog = ({ isOpen, onClose, onConfirm, title, children, icon, icon
|
|
|
18
19
|
const isConfirmDisabled = isConfirmLoading || (requiresTypedConfirmation && typedText !== confirmationText);
|
|
19
20
|
const actions = ((0, jsx_runtime_1.jsxs)(react_2.HStack, { justifyContent: "flex-end", spacing: 3, pt: actionsPt, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { ref: cancelRef, label: cancelLabel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm", isDisabled: disableCancelWhilePending && isConfirmLoading }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: confirmLabel, onClick: onConfirm, colorScheme: tone === "destructive" ? "red" : "primary", size: "sm", isLoading: isConfirmLoading, isDisabled: isConfirmDisabled, leftIcon: confirmIcon })] }));
|
|
20
21
|
const body = requiresTypedConfirmation ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, (0, jsx_runtime_1.jsx)(TextInput_1.default, { label: confirmationLabel, value: typedText, onChange: (event) => setTypedText(event.target.value) })] })) : (children);
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: isCentered, closeOnEsc: closeOnEsc, closeOnOverlayClick: closeOnOverlayClick, initialFocusRef: focusCancelOnOpen ? cancelRef : undefined, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: colors
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: isCentered, closeOnEsc: closeOnEsc, closeOnOverlayClick: closeOnOverlayClick, initialFocusRef: focusCancelOnOpen ? cancelRef : undefined, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), display: "flex", alignItems: "center", gap: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: iconBg, color: iconColor, children: icon !== null && icon !== void 0 ? icon : (0, jsx_runtime_1.jsx)(lucide_react_1.AlertTriangle, { size: 18 }) }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "1.05rem", fontWeight: 600, children: title })] }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { py: 6, children: bodyLayout === "stack" ? ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: bodySpacing, align: "stretch", children: [body, actions] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [body, actions] })) })] })] }));
|
|
22
23
|
};
|
|
23
24
|
exports.default = ConfirmDialog;
|
|
@@ -8,6 +8,7 @@ const react_1 = require("react");
|
|
|
8
8
|
const react_2 = require("@chakra-ui/react");
|
|
9
9
|
const lucide_react_1 = require("lucide-react");
|
|
10
10
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
11
|
+
const planeStep_1 = require("../../Theme/tokens/builders/planeStep");
|
|
11
12
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
12
13
|
const EmptyState_1 = __importDefault(require("../EmptyState/EmptyState"));
|
|
13
14
|
const EditModuleModal_1 = __importDefault(require("./EditModuleModal"));
|
|
@@ -34,20 +35,21 @@ const CustomModulesTable = ({ modules, isLoading = false, isUpdating = false, is
|
|
|
34
35
|
const labels = (0, react_1.useMemo)(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
|
|
35
36
|
const [editTarget, setEditTarget] = (0, react_1.useState)(null);
|
|
36
37
|
const [deleteTarget, setDeleteTarget] = (0, react_1.useState)(null);
|
|
37
|
-
const
|
|
38
|
+
const edge = colors.boxborder[200];
|
|
38
39
|
const surface = colors.background[50];
|
|
40
|
+
const rule = (0, planeStep_1.cardRule)(colors);
|
|
39
41
|
const muted = colors.textMuted;
|
|
40
42
|
const heading = colors.text[800];
|
|
41
|
-
const headBg = colors.backgroundColor.tableHeader;
|
|
43
|
+
const headBg = (0, planeStep_1.bandOn)(colors.backgroundColor.tableHeader, surface);
|
|
42
44
|
const thStyle = {
|
|
43
45
|
fontSize: "0.7rem",
|
|
44
46
|
textTransform: "uppercase",
|
|
45
47
|
letterSpacing: "0.04em",
|
|
46
48
|
color: muted,
|
|
47
|
-
borderColor:
|
|
49
|
+
borderColor: rule,
|
|
48
50
|
py: 3,
|
|
49
51
|
};
|
|
50
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: surface, borderRadius: "xl", border: "1px solid", borderColor:
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: surface, borderRadius: "xl", border: "1px solid", borderColor: edge, boxShadow: "sm", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: rule, alignItems: "center", children: (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.title }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { overflowX: "auto", children: isLoading ? ((0, jsx_runtime_1.jsx)(react_2.VStack, { spacing: 3, p: 4, align: "stretch", children: Array.from({ length: 4 }).map((_, idx) => ((0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "18px", borderRadius: "md", startColor: colors.gray[100], endColor: colors.gray[400] }, idx))) })) : modules.length === 0 ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Boxes, title: labels.noModules, size: "sm", minH: "180px" })) : ((0, jsx_runtime_1.jsxs)(react_2.Table, { variant: "simple", size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.Thead, { bg: headBg, children: (0, jsx_runtime_1.jsxs)(react_2.Tr, { children: [(0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, children: labels.moduleName }), (0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, children: labels.moduleOwner }), (0, jsx_runtime_1.jsx)(react_2.Th, { ...thStyle, textAlign: "right", children: labels.action })] }) }), (0, jsx_runtime_1.jsx)(react_2.Tbody, { children: modules.map((item) => ((0, jsx_runtime_1.jsxs)(react_2.Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [(0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: rule, fontSize: "sm", fontWeight: 500, color: heading, maxW: "220px", children: (0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: item.moduleName, hasArrow: true, openDelay: 400, children: (0, jsx_runtime_1.jsx)(react_2.Text, { noOfLines: 1, children: item.moduleName }) }) }), (0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: rule, fontSize: "sm", color: muted, children: item.ownerLabel || "—" }), (0, jsx_runtime_1.jsx)(react_2.Td, { borderColor: rule, children: (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, justifyContent: "flex-end", children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "primary", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 13 }), label: labels.edit, onClick: () => setEditTarget(item) }), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "red", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash2, { size: 13 }), label: labels.delete, onClick: () => setDeleteTarget(item) })] }) })] }, item.module_id))) })] })) }), (0, jsx_runtime_1.jsx)(EditModuleModal_1.default, { isOpen: editTarget !== null, onClose: () => setEditTarget(null), initialName: (_a = editTarget === null || editTarget === void 0 ? void 0 : editTarget.moduleName) !== null && _a !== void 0 ? _a : "", isLoading: isUpdating, onSubmit: async (name) => {
|
|
51
53
|
if (editTarget) {
|
|
52
54
|
await (onUpdateModule === null || onUpdateModule === void 0 ? void 0 : onUpdateModule({
|
|
53
55
|
moduleId: editTarget.module_id,
|
|
@@ -7,6 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_2 = require("@chakra-ui/react");
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
|
+
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
10
11
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
11
12
|
const EditModuleModal = ({ isOpen, onClose, initialName, isLoading, onSubmit, labels, }) => {
|
|
12
13
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -15,7 +16,7 @@ const EditModuleModal = ({ isOpen, onClose, initialName, isLoading, onSubmit, la
|
|
|
15
16
|
if (isOpen)
|
|
16
17
|
setName(initialName);
|
|
17
18
|
}, [isOpen, initialName]);
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { borderRadius: "xl", overflow: "hidden", bg: colors.surfaceRaised, children: [(0, jsx_runtime_1.jsx)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: colors
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { borderRadius: "xl", overflow: "hidden", bg: colors.surfaceRaised, children: [(0, jsx_runtime_1.jsx)(react_2.ModalHeader, { borderBottom: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(colors), fontSize: "1.05rem", fontWeight: 600, children: labels.editModuleTitle }), (0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, {}), (0, jsx_runtime_1.jsxs)(react_2.ModalBody, { py: 6, children: [(0, jsx_runtime_1.jsx)(react_2.Input, { value: name, onChange: (e) => setName(e.target.value), placeholder: labels.moduleNamePlaceholder, "aria-label": labels.moduleNamePlaceholder,
|
|
19
20
|
// NOTE: [200] is the decorative divider rung — a real control's outline needs 1.4.11's 3:1, from [800].
|
|
20
21
|
borderColor: colors.boxborder[500], mb: 5 }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { justifyContent: "flex-end", spacing: 3, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "gray", size: "sm" }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.update, onClick: () => onSubmit(name.trim()), colorScheme: "primary", size: "sm", isLoading: isLoading, isDisabled: !name.trim() })] })] })] })] }));
|
|
21
22
|
};
|
|
@@ -49,6 +49,7 @@ const useFieldIds_1 = require("../Common/useFieldIds");
|
|
|
49
49
|
const pickerField_1 = require("./pickerField");
|
|
50
50
|
const CalendarPanel_1 = __importDefault(require("./CalendarPanel"));
|
|
51
51
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
52
|
+
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
52
53
|
const controlSizes_1 = require("../../Theme/tokens/primitives/controlSizes");
|
|
53
54
|
const textInputIconSize_1 = require("../Input/textInputIconSize");
|
|
54
55
|
const TimePicker_1 = __importDefault(require("./TimePicker"));
|
|
@@ -264,7 +265,7 @@ exports.RangeDatePicker = (0, react_1.forwardRef)(function RangeDatePicker(props
|
|
|
264
265
|
return;
|
|
265
266
|
}
|
|
266
267
|
setTempRangeEnd(setTimeFrom(endTimeBaseDate, t));
|
|
267
|
-
}, dateFormat: timePickerFormat, isDisabled: disabled || !tempRangeEnd, size: sizeKey }))] })] })), (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mt: 3, pt: 3, borderTop: "1px solid", borderColor: theme.colors
|
|
268
|
+
}, dateFormat: timePickerFormat, isDisabled: disabled || !tempRangeEnd, size: sizeKey }))] })] })), (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mt: 3, pt: 3, borderTop: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleClear, children: "Clear" }), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "gradient", onClick: requestClose, children: "Apply" })] })] }) }) })] }), (0, jsx_runtime_1.jsx)(FieldMessage_1.default, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
|
|
268
269
|
});
|
|
269
270
|
exports.RangeDatePicker.displayName = "RangeDatePicker";
|
|
270
271
|
exports.default = exports.RangeDatePicker;
|
|
@@ -44,6 +44,7 @@ const date_fns_1 = require("date-fns");
|
|
|
44
44
|
const lucide_react_1 = require("lucide-react");
|
|
45
45
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
46
46
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
47
|
+
const surfaceRaised_1 = require("../../Theme/tokens/builders/surfaceRaised");
|
|
47
48
|
const controlSizes_1 = require("../../Theme/tokens/primitives/controlSizes");
|
|
48
49
|
const textInputIconSize_1 = require("../Input/textInputIconSize");
|
|
49
50
|
const DatePickerProps_1 = require("./DatePickerProps");
|
|
@@ -1026,7 +1027,7 @@ function SingleDatePickerInner(props, ref) {
|
|
|
1026
1027
|
setTempDate(updatedDate);
|
|
1027
1028
|
setInputValue((0, date_fns_1.format)(updatedDate, resolvedDateFormat));
|
|
1028
1029
|
setIsTyping(false);
|
|
1029
|
-
}, isDisabled: disabled })) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mt: 3, pt: 3, borderTop: "1px solid", borderColor: theme.colors
|
|
1030
|
+
}, isDisabled: disabled })) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mt: 3, pt: 3, borderTop: "1px solid", borderColor: (0, surfaceRaised_1.raisedRule)(theme.colors), children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: () => {
|
|
1030
1031
|
setTempDate(null);
|
|
1031
1032
|
requestClose(null);
|
|
1032
1033
|
}, children: "Clear" }), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "gradient", onClick: () => requestClose(), children: "Apply" })] })] }) }) })] }), (0, jsx_runtime_1.jsx)(FieldMessage_1.default, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
|