@thewhatmatters/wmds 0.4.9 → 0.4.28
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 +303 -0
- package/CONSUMING.md +62 -1
- package/README.md +1 -1
- package/bin/wmds-check.mjs +47 -0
- package/dist/colors.css +92 -0
- package/dist/components/atoms/Badge/Badge.d.ts +13 -5
- package/dist/components/atoms/Badge/Badge.d.ts.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +56 -48
- package/dist/components/atoms/Badge/badgeStyles.d.ts +15 -0
- package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -1
- package/dist/components/atoms/Badge/badgeStyles.js +42 -20
- package/dist/components/atoms/Band/Band.d.ts +27 -0
- package/dist/components/atoms/Band/Band.d.ts.map +1 -0
- package/dist/components/atoms/Band/Band.js +22 -0
- package/dist/components/atoms/Band/bandStyles.d.ts +20 -0
- package/dist/components/atoms/Band/bandStyles.d.ts.map +1 -0
- package/dist/components/atoms/Band/bandStyles.js +23 -0
- package/dist/components/atoms/Button/Button.d.ts +1 -1
- package/dist/components/atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/atoms/Button/Button.js +67 -48
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -1
- package/dist/components/atoms/Button/ButtonStatusButton.js +12 -5
- package/dist/components/atoms/Button/buttonStatusMotion.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStatusMotion.js +6 -1
- package/dist/components/atoms/Button/buttonStyles.d.ts +2 -2
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
- package/dist/components/atoms/Button/buttonStyles.js +16 -14
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +69 -68
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/checkboxStyles.js +1 -1
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/IconButton.js +13 -12
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +2 -2
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -1
- package/dist/components/atoms/IconButton/iconButtonStyles.js +1 -1
- package/dist/components/atoms/InlinePill/InlinePill.d.ts +42 -0
- package/dist/components/atoms/InlinePill/InlinePill.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/InlinePill.js +48 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts +27 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.d.ts.map +1 -0
- package/dist/components/atoms/InlinePill/inlinePillStyles.js +19 -0
- package/dist/components/atoms/Input/Input.d.ts +9 -4
- package/dist/components/atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/atoms/Input/Input.js +59 -59
- package/dist/components/atoms/Input/inputShellStyles.d.ts +10 -4
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/Input/inputShellStyles.js +40 -40
- package/dist/components/atoms/RiveHand/RiveHand.d.ts.map +1 -1
- package/dist/components/atoms/RiveHand/RiveHand.js +83 -81
- package/dist/components/atoms/Skeleton/skeletonStyles.js +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +45 -44
- package/dist/components/atoms/Switch/switchStyles.d.ts +1 -1
- package/dist/components/atoms/Switch/switchStyles.d.ts.map +1 -1
- package/dist/components/atoms/Switch/switchStyles.js +1 -1
- package/dist/components/atoms/Table/Table.d.ts +54 -0
- package/dist/components/atoms/Table/Table.d.ts.map +1 -0
- package/dist/components/atoms/Table/Table.js +66 -0
- package/dist/components/atoms/Table/tableStyles.d.ts +18 -0
- package/dist/components/atoms/Table/tableStyles.d.ts.map +1 -0
- package/dist/components/atoms/Table/tableStyles.js +14 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts +6 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +86 -78
- package/dist/components/atoms/TextArea/textareaShellStyles.d.ts +2 -2
- package/dist/components/atoms/TextArea/textareaShellStyles.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/textareaShellStyles.js +5 -5
- package/dist/components/molecules/Accordion/accordionStyles.d.ts +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -1
- package/dist/components/molecules/Accordion/accordionStyles.js +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +80 -122
- package/dist/components/molecules/Card/Card.d.ts +28 -6
- package/dist/components/molecules/Card/Card.d.ts.map +1 -1
- package/dist/components/molecules/Card/Card.js +83 -42
- package/dist/components/molecules/Card/cardStyles.d.ts +16 -1
- package/dist/components/molecules/Card/cardStyles.d.ts.map +1 -1
- package/dist/components/molecules/Card/cardStyles.js +19 -5
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts.map +1 -1
- package/dist/components/molecules/ChatQa/chatQaStyles.js +1 -1
- package/dist/components/molecules/Chip/chipStyles.js +9 -9
- package/dist/components/molecules/CopyField/CopyField.d.ts +41 -0
- package/dist/components/molecules/CopyField/CopyField.d.ts.map +1 -0
- package/dist/components/molecules/CopyField/CopyField.js +120 -0
- package/dist/components/molecules/CopyField/copyFieldStyles.d.ts +28 -0
- package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -0
- package/dist/components/molecules/CopyField/copyFieldStyles.js +7 -0
- package/dist/components/molecules/DisplayControls/DisplayControls.d.ts +16 -7
- package/dist/components/molecules/DisplayControls/DisplayControls.d.ts.map +1 -1
- package/dist/components/molecules/DisplayControls/DisplayControls.js +41 -39
- package/dist/components/molecules/DisplayControls/displayControlsState.d.ts +21 -0
- package/dist/components/molecules/DisplayControls/displayControlsState.d.ts.map +1 -1
- package/dist/components/molecules/DisplayControls/displayControlsState.js +46 -4
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js +30 -27
- package/dist/components/molecules/Dropdown/dropdownStyles.js +1 -1
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts +14 -0
- package/dist/components/molecules/Dropdown/resolveOverflow.d.ts.map +1 -0
- package/dist/components/{organisms/Tab/tabOverflow.js → molecules/Dropdown/resolveOverflow.js} +2 -2
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts +70 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useDropdownMenu.js +155 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts +71 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/useOverflowMenu.js +61 -0
- package/dist/components/molecules/Field/Field.d.ts.map +1 -1
- package/dist/components/molecules/Field/Field.js +11 -10
- package/dist/components/molecules/LogView/LogView.d.ts +31 -0
- package/dist/components/molecules/LogView/LogView.d.ts.map +1 -0
- package/dist/components/molecules/LogView/LogView.js +109 -0
- package/dist/components/molecules/LogView/logViewStyles.d.ts +11 -0
- package/dist/components/molecules/LogView/logViewStyles.d.ts.map +1 -0
- package/dist/components/molecules/LogView/logViewStyles.js +6 -0
- package/dist/components/molecules/NavList/NavList.d.ts +23 -4
- package/dist/components/molecules/NavList/NavList.d.ts.map +1 -1
- package/dist/components/molecules/NavList/NavList.js +65 -52
- package/dist/components/molecules/NavList/navListStyles.d.ts +2 -0
- package/dist/components/molecules/NavList/navListStyles.d.ts.map +1 -1
- package/dist/components/molecules/NavList/navListStyles.js +3 -3
- package/dist/components/molecules/PageHeader/PageHeader.js +3 -3
- package/dist/components/molecules/PillGroup/pillGroupStyles.js +1 -1
- package/dist/components/molecules/Search/searchStyles.js +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +8 -8
- package/dist/components/molecules/Select/Select.d.ts +3 -1
- package/dist/components/molecules/Select/Select.d.ts.map +1 -1
- package/dist/components/molecules/Select/Select.js +75 -119
- package/dist/components/molecules/Select/selectStyles.js +3 -3
- package/dist/components/molecules/Stat/Stat.d.ts +31 -5
- package/dist/components/molecules/Stat/Stat.d.ts.map +1 -1
- package/dist/components/molecules/Stat/Stat.js +83 -49
- package/dist/components/molecules/Stat/statStyles.d.ts +24 -4
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
- package/dist/components/molecules/Stat/statStyles.js +30 -13
- package/dist/components/molecules/TaskRows/TaskRows.d.ts +13 -3
- package/dist/components/molecules/TaskRows/TaskRows.d.ts.map +1 -1
- package/dist/components/molecules/TaskRows/TaskRows.js +81 -57
- package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts +54 -0
- package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts.map +1 -0
- package/dist/components/molecules/TaskRows/TaskRowsTable.js +200 -0
- package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts +19 -1
- package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts.map +1 -1
- package/dist/components/molecules/TaskRows/taskRowsStyles.js +7 -3
- package/dist/components/molecules/TextSequence/TextSequence.d.ts.map +1 -1
- package/dist/components/molecules/TextSequence/TextSequence.js +35 -35
- package/dist/components/organisms/AppShell/AppShell.d.ts +84 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/organisms/AppShell/AppShell.js +231 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +20 -0
- package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -0
- package/dist/components/organisms/AppShell/appShellStyles.js +8 -0
- package/dist/components/organisms/Carousel/Carousel.d.ts +9 -1
- package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/Carousel.js +220 -182
- package/dist/components/organisms/Carousel/carouselMath.d.ts +5 -0
- package/dist/components/organisms/Carousel/carouselMath.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/carouselMath.js +9 -1
- package/dist/components/organisms/Carousel/carouselStyles.d.ts +2 -0
- package/dist/components/organisms/Carousel/carouselStyles.d.ts.map +1 -1
- package/dist/components/organisms/Carousel/carouselStyles.js +8 -7
- package/dist/components/organisms/Chart/Chart.d.ts +5 -1
- package/dist/components/organisms/Chart/Chart.d.ts.map +1 -1
- package/dist/components/organisms/Chart/Chart.js +126 -62
- package/dist/components/organisms/Chart/ChartLegend.d.ts +8 -1
- package/dist/components/organisms/Chart/ChartLegend.d.ts.map +1 -1
- package/dist/components/organisms/Chart/ChartLegend.js +43 -13
- package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts +52 -0
- package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartSegmentedRing.js +95 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts +32 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts.map +1 -1
- package/dist/components/organisms/Chart/chartStyles.js +15 -3
- package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/ChatDock.js +29 -25
- package/dist/components/organisms/Dialog/AlertDialog.d.ts +7 -1
- package/dist/components/organisms/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/AlertDialog.js +54 -50
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +52 -71
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/OverlayPanelHeader.js +1 -0
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +14 -1
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -1
- package/dist/components/organisms/Dialog/dialogStyles.js +3 -3
- package/dist/components/organisms/FilterPanel/FilterPanel.d.ts.map +1 -1
- package/dist/components/organisms/FilterPanel/FilterPanel.js +52 -42
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +6 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -1
- package/dist/components/organisms/IntakeModal/IntakeModal.js +54 -66
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/components/organisms/MoreMenu/MoreMenu.js +45 -101
- package/dist/components/organisms/Panel/Panel.d.ts.map +1 -1
- package/dist/components/organisms/Panel/Panel.js +44 -53
- package/dist/components/organisms/Sheet/Sheet.d.ts +3 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/Sheet.js +66 -81
- package/dist/components/organisms/Sheet/sheetStyles.d.ts +8 -2
- package/dist/components/organisms/Sheet/sheetStyles.d.ts.map +1 -1
- package/dist/components/organisms/Sheet/sheetStyles.js +16 -11
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +0 -9
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/components/organisms/SiteNav/SiteNav.js +236 -286
- package/dist/components/organisms/SiteNav/siteNavStyles.js +1 -1
- package/dist/components/organisms/Tab/Tab.d.ts.map +1 -1
- package/dist/components/organisms/Tab/Tab.js +77 -127
- package/dist/components/organisms/Tab/tabStyles.d.ts +2 -1
- package/dist/components/organisms/Tab/tabStyles.d.ts.map +1 -1
- package/dist/components/organisms/Tab/tabStyles.js +7 -7
- package/dist/fonts.css +10 -0
- package/dist/grid.css +38 -0
- package/dist/index.d.ts +16 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +152 -139
- package/dist/lib/chartTheme.d.ts +11 -0
- package/dist/lib/chartTheme.d.ts.map +1 -1
- package/dist/lib/compositionAudit.d.ts.map +1 -1
- package/dist/lib/contrast.d.ts +11 -0
- package/dist/lib/contrast.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.d.ts +34 -1
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +100 -23
- package/dist/lib/sheetParam/index.d.ts +3 -0
- package/dist/lib/sheetParam/index.d.ts.map +1 -0
- package/dist/lib/sheetParam/sheetParam.d.ts +15 -0
- package/dist/lib/sheetParam/sheetParam.d.ts.map +1 -0
- package/dist/lib/sheetParam/sheetParam.js +26 -0
- package/dist/lib/sheetParam/useSheetParam.d.ts +25 -0
- package/dist/lib/sheetParam/useSheetParam.d.ts.map +1 -0
- package/dist/lib/sheetParam/useSheetParam.js +29 -0
- package/dist/lib/typography.d.ts +1 -1
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/shape.css +24 -3
- package/dist/styles.css +1 -1
- package/dist/typography.css +55 -8
- package/docs/README.md +1 -1
- package/docs/component-contracts.md +101 -0
- package/docs/components.md +19 -12
- package/docs/exports.json +142 -15
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +176 -0
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +31 -0
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +39 -0
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +48 -0
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +68 -0
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +144 -0
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +9 -0
- package/docs/patterns/components-copyfield--copied.tsx +9 -0
- package/docs/patterns/components-copyfield--copy-key.tsx +9 -0
- package/docs/patterns/components-copyfield--on-navy.tsx +29 -0
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +54 -0
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +35 -0
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +80 -0
- package/docs/patterns/components-logview--log-viewer.tsx +20 -0
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +118 -0
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +50 -0
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +51 -0
- package/docs/patterns/components-sheet--side-sheet.tsx +38 -0
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +54 -0
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +81 -0
- package/docs/patterns/components-table--approvals.tsx +223 -0
- package/docs/patterns/components-table--basic.tsx +60 -0
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +62 -0
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +32 -0
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +193 -1
- package/package.json +1 -1
- package/dist/components/organisms/Tab/tabOverflow.d.ts +0 -14
- package/dist/components/organisms/Tab/tabOverflow.d.ts.map +0 -1
|
@@ -3,38 +3,38 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { motionTransitionProp as t } from "../../../lib/motion.js";
|
|
4
4
|
import "../Input/inputShellStyles.js";
|
|
5
5
|
import { InputStatusBanner as ee } from "../inputShared/InputStatusBanner.js";
|
|
6
|
-
import { switchDescriptionClasses as n, switchDescriptionRowClasses as te, switchHiddenInputClasses as
|
|
7
|
-
import { forwardRef as h, useId as oe, useState as
|
|
8
|
-
import { Loader2 as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { motion as
|
|
6
|
+
import { switchDescriptionClasses as n, switchDescriptionRowClasses as te, switchHiddenInputClasses as r, switchHitTargetDescriptionAlignClasses as i, switchHitTargetSizeClasses as a, switchLabelClassesFor as o, switchLayouts as s, switchRowBaseClasses as ne, switchRowLabelOnlyClasses as re, switchRowSizeClasses as ie, switchSettingsRowClasses as c, switchSizes as l, switchStatusBannerClassesFor as u, switchTextColumnClasses as d, switchThumbClasses as f, switchThumbOffsetPx as p, switchThumbSizeClasses as m, switchTrackClassesFor as ae } from "./switchStyles.js";
|
|
7
|
+
import { forwardRef as h, useId as oe, useState as se } from "react";
|
|
8
|
+
import { Loader2 as g } from "lucide-react";
|
|
9
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
|
+
import { motion as b } from "motion/react";
|
|
11
11
|
//#region src/components/atoms/Switch/Switch.tsx
|
|
12
|
-
var
|
|
12
|
+
var x = {
|
|
13
13
|
sm: "sm",
|
|
14
14
|
md: "md"
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function S(e) {
|
|
17
17
|
e.message != null && e.status == null && console.warn("[WMDS Switch] `message` requires `status`.");
|
|
18
18
|
}
|
|
19
|
-
var C = h(function({ size:
|
|
19
|
+
var C = h(function({ size: s = "md", layout: l = "inline", label: h, labelHidden: C = !1, description: w, status: T, message: E, loading: D = !1, className: O, disabled: k, readOnly: A, checked: j, defaultChecked: M, id: N, onChange: P, ...F }, I) {
|
|
20
20
|
let L = oe(), R = N ?? L;
|
|
21
|
-
|
|
21
|
+
S({
|
|
22
22
|
status: T,
|
|
23
23
|
message: E
|
|
24
24
|
});
|
|
25
|
-
let z = j !== void 0, [B, V] =
|
|
25
|
+
let z = j !== void 0, [B, V] = se(M ?? !1), H = z ? !!j : B, U = k || D, W = D && !k, G = E != null && E.length > 0 && T != null, K = G ? `${R}-message` : void 0, q = w != null && !C ? `${R}-description` : void 0, ce = [
|
|
26
26
|
F["aria-describedby"],
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
q,
|
|
28
|
+
K
|
|
29
29
|
].filter(Boolean).join(" ") || void 0, le = (e) => {
|
|
30
|
-
if (A) {
|
|
30
|
+
if (A || W) {
|
|
31
31
|
e.preventDefault();
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
z || V(e.target.checked), P?.(e);
|
|
35
|
-
},
|
|
36
|
-
className: e("relative flex shrink-0 items-center justify-center",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
35
|
+
}, ue = ae(s, H, U, G ? void 0 : T), J = w != null && !C, Y = t("fast"), X = p[s], Z = (t) => /* @__PURE__ */ y("span", {
|
|
36
|
+
className: e("relative flex shrink-0 items-center justify-center", a[s], t),
|
|
37
|
+
children: [/* @__PURE__ */ v("input", {
|
|
38
38
|
...F,
|
|
39
39
|
ref: I,
|
|
40
40
|
id: R,
|
|
@@ -42,68 +42,69 @@ var C = h(function({ size: o = "md", layout: l = "inline", label: h, labelHidden
|
|
|
42
42
|
role: "switch",
|
|
43
43
|
checked: z ? j : void 0,
|
|
44
44
|
defaultChecked: z ? void 0 : M,
|
|
45
|
-
disabled:
|
|
45
|
+
disabled: k,
|
|
46
|
+
"aria-disabled": W || void 0,
|
|
46
47
|
readOnly: A,
|
|
47
48
|
"aria-invalid": T === "error" || void 0,
|
|
48
49
|
"aria-describedby": ce,
|
|
49
50
|
"aria-busy": D || void 0,
|
|
50
51
|
onChange: le,
|
|
51
|
-
className:
|
|
52
|
-
}), /* @__PURE__ */
|
|
53
|
-
className:
|
|
52
|
+
className: r
|
|
53
|
+
}), /* @__PURE__ */ v("span", {
|
|
54
|
+
className: ue,
|
|
54
55
|
"aria-hidden": !0,
|
|
55
|
-
children: D ? /* @__PURE__ */
|
|
56
|
-
className: e(m[
|
|
56
|
+
children: D ? /* @__PURE__ */ v(b.span, {
|
|
57
|
+
className: e(m[s], "flex items-center justify-center"),
|
|
57
58
|
animate: { x: H ? X : 0 },
|
|
58
59
|
transition: Y,
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ v(g, {
|
|
60
61
|
className: "size-full animate-spin text-fg",
|
|
61
62
|
strokeWidth: 2
|
|
62
63
|
})
|
|
63
|
-
}) : /* @__PURE__ */
|
|
64
|
-
className: e(f, m[
|
|
64
|
+
}) : /* @__PURE__ */ v(b.span, {
|
|
65
|
+
className: e(f, m[s]),
|
|
65
66
|
animate: { x: H ? X : 0 },
|
|
66
67
|
transition: Y
|
|
67
68
|
})
|
|
68
69
|
})]
|
|
69
|
-
}), Q = C ? /* @__PURE__ */
|
|
70
|
+
}), Q = C ? /* @__PURE__ */ v("span", {
|
|
70
71
|
className: "sr-only",
|
|
71
72
|
children: h
|
|
72
|
-
}) : /* @__PURE__ */
|
|
73
|
+
}) : /* @__PURE__ */ y("span", {
|
|
73
74
|
className: d,
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
-
className:
|
|
75
|
+
children: [/* @__PURE__ */ v("span", {
|
|
76
|
+
className: o(U, J),
|
|
76
77
|
children: h
|
|
77
|
-
}), J ? /* @__PURE__ */
|
|
78
|
-
id:
|
|
78
|
+
}), J ? /* @__PURE__ */ v("span", {
|
|
79
|
+
id: q,
|
|
79
80
|
className: n,
|
|
80
81
|
children: w
|
|
81
82
|
}) : null]
|
|
82
|
-
}), $ = /* @__PURE__ */
|
|
83
|
+
}), $ = /* @__PURE__ */ v("label", {
|
|
83
84
|
htmlFor: R,
|
|
84
|
-
className: e(
|
|
85
|
-
children: C ? /* @__PURE__ */
|
|
85
|
+
className: e(ne, l === "settings" ? c : re, l === "inline" && !J && ie[s], l === "inline" && J && void 0, U && "cursor-not-allowed", O),
|
|
86
|
+
children: C ? /* @__PURE__ */ y(_, { children: [Z(), /* @__PURE__ */ v("span", {
|
|
86
87
|
className: "sr-only",
|
|
87
88
|
children: h
|
|
88
|
-
})] }) : l === "settings" ? /* @__PURE__ */
|
|
89
|
-
className: te[
|
|
90
|
-
children: [Z(
|
|
91
|
-
}) : /* @__PURE__ */
|
|
92
|
-
className:
|
|
89
|
+
})] }) : l === "settings" ? /* @__PURE__ */ y(_, { children: [Q, Z()] }) : J ? /* @__PURE__ */ y("span", {
|
|
90
|
+
className: te[s],
|
|
91
|
+
children: [Z(i[s]), Q]
|
|
92
|
+
}) : /* @__PURE__ */ y(_, { children: [Z(), C ? null : /* @__PURE__ */ v("span", {
|
|
93
|
+
className: o(U),
|
|
93
94
|
children: h
|
|
94
95
|
})] })
|
|
95
96
|
});
|
|
96
|
-
return !
|
|
97
|
+
return !G || T == null || K == null ? $ : /* @__PURE__ */ y("div", {
|
|
97
98
|
className: "flex w-full flex-col gap-1.5",
|
|
98
|
-
children: [$, /* @__PURE__ */
|
|
99
|
+
children: [$, /* @__PURE__ */ v(ee, {
|
|
99
100
|
status: T,
|
|
100
101
|
message: E,
|
|
101
|
-
messageId:
|
|
102
|
-
size:
|
|
102
|
+
messageId: K,
|
|
103
|
+
size: x[s],
|
|
103
104
|
messagePosition: "bottom",
|
|
104
105
|
bannerClassName: u(T)
|
|
105
106
|
})]
|
|
106
107
|
});
|
|
107
108
|
});
|
|
108
109
|
//#endregion
|
|
109
|
-
export { C as Switch,
|
|
110
|
+
export { C as Switch, s as switchLayouts, l as switchSizes };
|
|
@@ -28,7 +28,7 @@ export declare const switchRowBaseClasses = "group/switch relative flex w-full c
|
|
|
28
28
|
export declare const switchRowLabelOnlyClasses = "items-center";
|
|
29
29
|
export declare const switchSettingsRowClasses = "items-center justify-between gap-4";
|
|
30
30
|
export declare const switchRowDisabledClasses = "cursor-not-allowed";
|
|
31
|
-
export declare const switchHiddenInputClasses = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed";
|
|
31
|
+
export declare const switchHiddenInputClasses = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed aria-disabled:cursor-not-allowed";
|
|
32
32
|
export declare const switchFocusRingClasses = "peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-body";
|
|
33
33
|
export declare function switchTrackClassesFor(size: SwitchSize, checked: boolean, disabled?: boolean, status?: InputStatus): string;
|
|
34
34
|
export declare function switchLabelClassesFor(disabled?: boolean, withDescription?: boolean): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Switch/switchStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,WAAW,uBAAwB,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,eAAO,MAAM,aAAa,iCAAkC,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAG3D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAGjE,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAG7D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAG7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAG1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAIlC,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AAErE,uFAAuF;AACvF,eAAO,MAAM,yBAAyB,0CAA0C,CAAC;AAEjF,8GAA8G;AAC9G,eAAO,MAAM,kBAAkB,gDAAgD,CAAC;AAEhF,eAAO,MAAM,0B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
|
|
@@ -25,7 +25,7 @@ var a = ["sm", "md"], o = ["inline", "settings"], s = {
|
|
|
25
25
|
}, S = {
|
|
26
26
|
sm: "mt-px",
|
|
27
27
|
md: "mt-0.5"
|
|
28
|
-
}, C = "group/switch relative flex w-full cursor-pointer", w = "items-center", T = "items-center justify-between gap-4", E = "cursor-not-allowed", D = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed", O = "peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-body";
|
|
28
|
+
}, C = "group/switch relative flex w-full cursor-pointer", w = "items-center", T = "items-center justify-between gap-4", E = "cursor-not-allowed", D = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed aria-disabled:cursor-not-allowed", O = "peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-body";
|
|
29
29
|
function k(t, n, r, a) {
|
|
30
30
|
return e(f, l[t], O, n ? m : p, a != null && i[a], r && "opacity-50");
|
|
31
31
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from "react";
|
|
2
|
+
import { type TableAlign } from "./tableStyles";
|
|
3
|
+
export { tableAligns, type TableAlign } from "./tableStyles";
|
|
4
|
+
/** Layout-only — width, margin, or grid placement. */
|
|
5
|
+
export type TableLayoutClassName = string;
|
|
6
|
+
export interface TableProps {
|
|
7
|
+
/** `TableCaption`, `TableHeader`, `TableBody`, and `TableFooter`. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Names the scrolling region and the table. One of `aria-label` or `aria-labelledby` is required. */
|
|
10
|
+
"aria-label"?: string;
|
|
11
|
+
"aria-labelledby"?: string;
|
|
12
|
+
/** Layout-only — applies to the scroll box. */
|
|
13
|
+
className?: TableLayoutClassName;
|
|
14
|
+
}
|
|
15
|
+
export interface TableSectionProps {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
className?: TableLayoutClassName;
|
|
18
|
+
}
|
|
19
|
+
export interface TableRowProps extends Omit<HTMLAttributes<HTMLTableRowElement>, "className"> {
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
className?: TableLayoutClassName;
|
|
22
|
+
}
|
|
23
|
+
export interface TableHeadProps extends Omit<ThHTMLAttributes<HTMLTableCellElement>, "className" | "align"> {
|
|
24
|
+
/** Text alignment of the column. Default `start`. */
|
|
25
|
+
align?: TableAlign;
|
|
26
|
+
/** Pin the column to the start edge while the table scrolls sideways. Set it on every cell of the column. */
|
|
27
|
+
sticky?: boolean;
|
|
28
|
+
className?: TableLayoutClassName;
|
|
29
|
+
}
|
|
30
|
+
export interface TableCellProps extends Omit<TdHTMLAttributes<HTMLTableCellElement>, "className" | "align"> {
|
|
31
|
+
/** Text alignment of the column. Default `start`. `end` sets tabular figures. */
|
|
32
|
+
align?: TableAlign;
|
|
33
|
+
/** Pin the column to the start edge while the table scrolls sideways. Set it on every cell of the column. */
|
|
34
|
+
sticky?: boolean;
|
|
35
|
+
className?: TableLayoutClassName;
|
|
36
|
+
}
|
|
37
|
+
export interface TableCaptionProps {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
className?: TableLayoutClassName;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Semantic table in a horizontal-scroll box. The box is a focusable `region` named by the table's
|
|
43
|
+
* label, so a keyboard can scroll it; the table never squeezes its columns below their content.
|
|
44
|
+
*/
|
|
45
|
+
declare function Table({ children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className }: TableProps): import("react").JSX.Element;
|
|
46
|
+
declare function TableHeader({ children, className }: TableSectionProps): import("react").JSX.Element;
|
|
47
|
+
declare function TableBody({ children, className }: TableSectionProps): import("react").JSX.Element;
|
|
48
|
+
declare function TableFooter({ children, className }: TableSectionProps): import("react").JSX.Element;
|
|
49
|
+
declare function TableRow({ children, className, ...rest }: TableRowProps): import("react").JSX.Element;
|
|
50
|
+
declare function TableHead({ align, sticky, scope, className, children, ...rest }: TableHeadProps): import("react").JSX.Element;
|
|
51
|
+
declare function TableCell({ align, sticky, className, children, ...rest }: TableCellProps): import("react").JSX.Element;
|
|
52
|
+
declare function TableCaption({ children, className }: TableCaptionProps): import("react").JSX.Element;
|
|
53
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
54
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE3F,OAAO,EAYL,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE7D,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,QAAQ,EAAE,SAAS,CAAC;IACpB,sGAAsG;IACtG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,oBAAoB,CAA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E,KAAe,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,+BAM3F;AAED,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,+BAE/D;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
+
import { tableAlignClasses as t, tableAligns as n, tableBodyClasses as r, tableCaptionClasses as i, tableCellClasses as a, tableClasses as o, tableFooterClasses as s, tableHeadClasses as c, tableHeaderClasses as l, tableRowClasses as u, tableScrollClasses as d } from "./tableStyles.js";
|
|
4
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/atoms/Table/Table.tsx
|
|
6
|
+
function p({ children: t, "aria-label": n, "aria-labelledby": r, className: i }) {
|
|
7
|
+
return /* @__PURE__ */ f("div", {
|
|
8
|
+
role: "region",
|
|
9
|
+
tabIndex: 0,
|
|
10
|
+
"aria-label": n,
|
|
11
|
+
"aria-labelledby": r,
|
|
12
|
+
className: e(d, i),
|
|
13
|
+
children: /* @__PURE__ */ f("table", {
|
|
14
|
+
className: o,
|
|
15
|
+
children: t
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function m({ children: t, className: n }) {
|
|
20
|
+
return /* @__PURE__ */ f("thead", {
|
|
21
|
+
className: e(l, n),
|
|
22
|
+
children: t
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function h({ children: t, className: n }) {
|
|
26
|
+
return /* @__PURE__ */ f("tbody", {
|
|
27
|
+
className: e(r, n),
|
|
28
|
+
children: t
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function g({ children: t, className: n }) {
|
|
32
|
+
return /* @__PURE__ */ f("tfoot", {
|
|
33
|
+
className: e(s, n),
|
|
34
|
+
children: t
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function _({ children: t, className: n, ...r }) {
|
|
38
|
+
return /* @__PURE__ */ f("tr", {
|
|
39
|
+
...r,
|
|
40
|
+
className: e(u, n),
|
|
41
|
+
children: t
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function v({ align: n = "start", sticky: r, scope: i = "col", className: a, children: o, ...s }) {
|
|
45
|
+
return /* @__PURE__ */ f("th", {
|
|
46
|
+
...s,
|
|
47
|
+
scope: i,
|
|
48
|
+
className: e(c, t[n], r && "sticky start-0 z-10 bg-body", a),
|
|
49
|
+
children: o
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function y({ align: n = "start", sticky: r, className: i, children: o, ...s }) {
|
|
53
|
+
return /* @__PURE__ */ f("td", {
|
|
54
|
+
...s,
|
|
55
|
+
className: e(a, t[n], r && "sticky start-0 z-10 bg-body", i),
|
|
56
|
+
children: o
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function b({ children: t, className: n }) {
|
|
60
|
+
return /* @__PURE__ */ f("caption", {
|
|
61
|
+
className: e(i, n),
|
|
62
|
+
children: t
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { p as Table, h as TableBody, b as TableCaption, y as TableCell, g as TableFooter, v as TableHead, m as TableHeader, _ as TableRow, n as tableAligns };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const tableAligns: readonly ["start", "center", "end"];
|
|
2
|
+
/** Horizontal alignment of a column's text — `end` for figures. */
|
|
3
|
+
export type TableAlign = (typeof tableAligns)[number];
|
|
4
|
+
/** The scroll box. Focusable so a keyboard can scroll a wide table. */
|
|
5
|
+
export declare const tableScrollClasses = "w-full max-w-full overflow-x-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring";
|
|
6
|
+
/** A table with a `colgroup` lays its columns out from the `col` widths, so a filled and an empty table match. */
|
|
7
|
+
export declare const tableClasses: string;
|
|
8
|
+
export declare const tableHeaderClasses = "[&_tr]:border-b [&_tr]:border-border";
|
|
9
|
+
export declare const tableBodyClasses = "[&_tr:last-child]:border-b-0";
|
|
10
|
+
export declare const tableFooterClasses = "border-t border-border-emphasized [&>tr]:border-b-0";
|
|
11
|
+
export declare const tableRowClasses = "border-b border-border transition-colors hover:bg-ghost-hover";
|
|
12
|
+
export declare const tableHeadClasses: string;
|
|
13
|
+
export declare const tableCellClasses = "px-3 py-3 align-middle";
|
|
14
|
+
export declare const tableCaptionClasses: string;
|
|
15
|
+
/** A column pinned to the start edge while the rest scrolls — opaque so cells slide under it. */
|
|
16
|
+
export declare const tableStickyClasses = "sticky start-0 z-10 bg-body";
|
|
17
|
+
export declare const tableAlignClasses: Record<TableAlign, string>;
|
|
18
|
+
//# sourceMappingURL=tableStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Table/tableStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,qCAAsC,CAAC;AAE/D,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,6IAC6G,CAAC;AAE7I,kHAAkH;AAClH,eAAO,MAAM,YAAY,QAAkH,CAAC;AAE5I,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AAEzE,eAAO,MAAM,gBAAgB,iCAAiC,CAAC;AAE/D,eAAO,MAAM,kBAAkB,wDAAwD,CAAC;AAExF,eAAO,MAAM,eAAe,kEAAkE,CAAC;AAE/F,eAAO,MAAM,gBAAgB,QAAmG,CAAC;AAEjI,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AAEzD,eAAO,MAAM,mBAAmB,QAA0D,CAAC;AAE3F,iGAAiG;AACjG,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAEhE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAIxD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { typographyClass as e } from "../../../lib/typography.js";
|
|
3
|
+
//#region src/components/atoms/Table/tableStyles.ts
|
|
4
|
+
var t = [
|
|
5
|
+
"start",
|
|
6
|
+
"center",
|
|
7
|
+
"end"
|
|
8
|
+
], n = "w-full max-w-full overflow-x-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring", r = `w-full min-w-max caption-bottom border-collapse has-[colgroup]:table-fixed text-fg ${e("body")}`, i = "[&_tr]:border-b [&_tr]:border-border", a = "[&_tr:last-child]:border-b-0", o = "border-t border-border-emphasized [&>tr]:border-b-0", s = "border-b border-border transition-colors hover:bg-ghost-hover", c = `h-11 px-3 text-start align-middle font-normal whitespace-nowrap ${e("ui-label")}`, l = "px-3 py-3 align-middle", u = `mt-3 text-start ${e("body")} text-muted`, d = "sticky start-0 z-10 bg-body", f = {
|
|
9
|
+
start: "text-start",
|
|
10
|
+
center: "text-center",
|
|
11
|
+
end: "text-end tabular-nums"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { f as tableAlignClasses, t as tableAligns, a as tableBodyClasses, u as tableCaptionClasses, l as tableCellClasses, r as tableClasses, o as tableFooterClasses, c as tableHeadClasses, i as tableHeaderClasses, s as tableRowClasses, n as tableScrollClasses, d as tableStickyClasses };
|
|
@@ -16,6 +16,12 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
16
16
|
message?: string;
|
|
17
17
|
/** Status band placement when `message` is set — default `bottom`. */
|
|
18
18
|
messagePosition?: InputMessagePosition;
|
|
19
|
+
/**
|
|
20
|
+
* Progress text under the field, announced politely as it changes — "Saving…", "Saved".
|
|
21
|
+
* The live region stays mounted while the prop is a string (pass `""` when idle), so a change is
|
|
22
|
+
* heard. Not validation — use `status` + `message` for that. Omitted with `inline`.
|
|
23
|
+
*/
|
|
24
|
+
liveStatus?: string;
|
|
19
25
|
/** Trailing spinner — async validation. */
|
|
20
26
|
loading?: boolean;
|
|
21
27
|
/** Visible row count — default **4**. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAKvE,OAAO,EAqBL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE1G,sEAAsE;AACtE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACjE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,IAAI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AAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAqBD;;;GAGG;AACH,eAAO,MAAM,QAAQ,+GA6JnB,CAAC"}
|
|
@@ -3,113 +3,121 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
4
|
import { inputAttachedFieldClasses as n, inputCompoundShellClassesFor as r, inputControlStackClasses as i, inputDisabledClasses as a, inputFieldStackClasses as o, inputStatusGapClasses as s } from "../Input/inputShellStyles.js";
|
|
5
5
|
import { InputStatusBanner as c } from "../inputShared/InputStatusBanner.js";
|
|
6
|
-
import { InputTrailingAffordance as
|
|
7
|
-
import { textareaBaseClasses as
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import { Fragment as
|
|
6
|
+
import { InputTrailingAffordance as ee } from "../inputShared/InputTrailingAffordance.js";
|
|
7
|
+
import { textareaBaseClasses as l, textareaCompoundFieldPaddingClasses as u, textareaCompoundInnerFieldClassesFor as d, textareaFixedPaddingClasses as f, textareaInlineClasses as p, textareaMinHeightClasses as m, textareaResizeClasses as te, textareaResizes as h, textareaShellFieldClasses as g, textareaSoloShellClassesFor as _, textareaStatusBannerClassesFor as v, textareaTrailingInsetClasses as y, textareaTrailingInsetPositionClasses as b } from "./textareaShellStyles.js";
|
|
8
|
+
import { forwardRef as x, useId as S } from "react";
|
|
9
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/atoms/TextArea/TextArea.tsx
|
|
11
|
-
function
|
|
11
|
+
function E(e) {
|
|
12
12
|
e.label == null && e["aria-label"] == null && e["aria-labelledby"] == null && console.warn("[WMDS TextArea] Provide `label`, `aria-label`, or `aria-labelledby`.");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
e.message != null && e.status == null && console.warn("[WMDS TextArea] `message` requires `status`."), e.inline && (e.label != null || e.description != null || e.status != null || e.message != null) && console.warn("[WMDS TextArea] `inline` is for PromptBar only — omit label, description, and validation.");
|
|
14
|
+
function D(e) {
|
|
15
|
+
e.message != null && e.status == null && console.warn("[WMDS TextArea] `message` requires `status`."), e.inline && (e.label != null || e.description != null || e.liveStatus != null || e.status != null || e.message != null) && console.warn("[WMDS TextArea] `inline` is for PromptBar only — omit label, description, and validation.");
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
label:
|
|
21
|
-
"aria-label":
|
|
22
|
-
"aria-labelledby":
|
|
23
|
-
}),
|
|
24
|
-
status:
|
|
25
|
-
message:
|
|
26
|
-
inline:
|
|
27
|
-
label:
|
|
28
|
-
description:
|
|
17
|
+
var O = x(function({ size: c = "md", label: h, description: v, status: x, message: O, liveStatus: A, messagePosition: j = "bottom", loading: M = !1, rows: N = 4, resize: P = "vertical", inline: F = !1, className: I, disabled: L, id: R, "aria-describedby": z, ...B }, V) {
|
|
18
|
+
let H = S(), U = R ?? H;
|
|
19
|
+
E({
|
|
20
|
+
label: h,
|
|
21
|
+
"aria-label": B["aria-label"],
|
|
22
|
+
"aria-labelledby": B["aria-labelledby"]
|
|
23
|
+
}), D({
|
|
24
|
+
status: x,
|
|
25
|
+
message: O,
|
|
26
|
+
inline: F,
|
|
27
|
+
label: h,
|
|
28
|
+
description: v,
|
|
29
|
+
liveStatus: A
|
|
29
30
|
});
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
let W = O != null && O.length > 0 && x != null, G = !W && (M || x != null), K = v != null && !W ? `${U}-description` : void 0, q = W ? `${U}-message` : void 0, J = [
|
|
32
|
+
z,
|
|
33
|
+
K,
|
|
34
|
+
q
|
|
34
35
|
].filter(Boolean).join(" ") || void 0;
|
|
35
|
-
if (
|
|
36
|
-
...
|
|
37
|
-
ref:
|
|
38
|
-
id:
|
|
39
|
-
rows:
|
|
40
|
-
disabled:
|
|
41
|
-
"aria-invalid":
|
|
42
|
-
"aria-describedby":
|
|
43
|
-
className: e(a, p,
|
|
36
|
+
if (F) return /* @__PURE__ */ w("textarea", {
|
|
37
|
+
...B,
|
|
38
|
+
ref: V,
|
|
39
|
+
id: U,
|
|
40
|
+
rows: N,
|
|
41
|
+
disabled: L,
|
|
42
|
+
"aria-invalid": x === "error" || void 0,
|
|
43
|
+
"aria-describedby": J,
|
|
44
|
+
className: e(a, p, I)
|
|
44
45
|
});
|
|
45
|
-
let
|
|
46
|
-
...
|
|
47
|
-
ref:
|
|
48
|
-
id:
|
|
49
|
-
rows:
|
|
50
|
-
disabled:
|
|
51
|
-
"aria-invalid":
|
|
52
|
-
"aria-describedby":
|
|
53
|
-
className: e(a,
|
|
54
|
-
}),
|
|
55
|
-
className: e(
|
|
56
|
-
children: /* @__PURE__ */
|
|
46
|
+
let Y = /* @__PURE__ */ w("textarea", {
|
|
47
|
+
...B,
|
|
48
|
+
ref: V,
|
|
49
|
+
id: U,
|
|
50
|
+
rows: N,
|
|
51
|
+
disabled: L,
|
|
52
|
+
"aria-invalid": x === "error" || void 0,
|
|
53
|
+
"aria-describedby": J,
|
|
54
|
+
className: e(a, te[P], l, f[c], m[c], g, G && s[c], W && e(n, "rounded-none border-0 shadow-none focus-visible:!outline-none focus-visible:!ring-0", "rounded-none"))
|
|
55
|
+
}), X = G ? /* @__PURE__ */ w("span", {
|
|
56
|
+
className: e(y, b[c]),
|
|
57
|
+
children: /* @__PURE__ */ w(ee, {
|
|
57
58
|
size: c,
|
|
58
|
-
status:
|
|
59
|
-
loading:
|
|
59
|
+
status: M ? void 0 : x,
|
|
60
|
+
loading: M
|
|
60
61
|
})
|
|
61
|
-
}) : null,
|
|
62
|
-
className: e(
|
|
63
|
-
children:
|
|
64
|
-
}),
|
|
65
|
-
className: e("relative w-full",
|
|
66
|
-
children:
|
|
67
|
-
}), Q =
|
|
68
|
-
status:
|
|
69
|
-
message:
|
|
70
|
-
messageId:
|
|
62
|
+
}) : null, Z = /* @__PURE__ */ T(C, { children: [Y, X] }), ne = /* @__PURE__ */ w("div", {
|
|
63
|
+
className: e(_(c, x, P), I),
|
|
64
|
+
children: Z
|
|
65
|
+
}), re = /* @__PURE__ */ w("div", {
|
|
66
|
+
className: e("relative w-full", u(P, c)),
|
|
67
|
+
children: Z
|
|
68
|
+
}), Q = W && x != null && q != null ? /* @__PURE__ */ w(k, {
|
|
69
|
+
status: x,
|
|
70
|
+
message: O,
|
|
71
|
+
messageId: q,
|
|
71
72
|
size: c,
|
|
72
|
-
messagePosition:
|
|
73
|
-
}) : null, $ =
|
|
74
|
-
className: r(c,
|
|
73
|
+
messagePosition: j
|
|
74
|
+
}) : null, $ = W && x != null ? /* @__PURE__ */ T("div", {
|
|
75
|
+
className: r(c, x),
|
|
75
76
|
children: [
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
className: d(c,
|
|
79
|
-
children:
|
|
77
|
+
j === "top" ? Q : null,
|
|
78
|
+
/* @__PURE__ */ w("div", {
|
|
79
|
+
className: d(c, x, j),
|
|
80
|
+
children: re
|
|
80
81
|
}),
|
|
81
|
-
|
|
82
|
+
j === "bottom" ? Q : null
|
|
82
83
|
]
|
|
83
|
-
}) : /* @__PURE__ */
|
|
84
|
+
}) : /* @__PURE__ */ w("div", {
|
|
84
85
|
className: i,
|
|
85
|
-
children:
|
|
86
|
+
children: ne
|
|
86
87
|
});
|
|
87
|
-
return
|
|
88
|
+
return h == null && v == null && A == null ? $ : /* @__PURE__ */ T("div", {
|
|
88
89
|
className: o,
|
|
89
90
|
children: [
|
|
90
|
-
|
|
91
|
-
htmlFor:
|
|
92
|
-
className: e(t("ui-label"),
|
|
93
|
-
children:
|
|
91
|
+
h == null ? null : /* @__PURE__ */ w("label", {
|
|
92
|
+
htmlFor: U,
|
|
93
|
+
className: e(t("ui-label"), L && "opacity-50"),
|
|
94
|
+
children: h
|
|
94
95
|
}),
|
|
95
96
|
$,
|
|
96
|
-
|
|
97
|
-
id:
|
|
97
|
+
K == null ? null : /* @__PURE__ */ w("p", {
|
|
98
|
+
id: K,
|
|
99
|
+
className: t("caption"),
|
|
100
|
+
children: v
|
|
101
|
+
}),
|
|
102
|
+
A == null ? null : /* @__PURE__ */ w("p", {
|
|
103
|
+
role: "status",
|
|
104
|
+
"aria-live": "polite",
|
|
105
|
+
id: `${U}-live-status`,
|
|
98
106
|
className: t("caption"),
|
|
99
|
-
children:
|
|
107
|
+
children: A
|
|
100
108
|
})
|
|
101
109
|
]
|
|
102
110
|
});
|
|
103
111
|
});
|
|
104
|
-
function
|
|
105
|
-
return /* @__PURE__ */
|
|
112
|
+
function k({ status: e, message: t, messageId: n, size: r, messagePosition: i }) {
|
|
113
|
+
return /* @__PURE__ */ w(c, {
|
|
106
114
|
status: e,
|
|
107
115
|
message: t,
|
|
108
116
|
messageId: n,
|
|
109
117
|
size: r,
|
|
110
118
|
messagePosition: i,
|
|
111
|
-
bannerClassName:
|
|
119
|
+
bannerClassName: v(e, r, i)
|
|
112
120
|
});
|
|
113
121
|
}
|
|
114
122
|
//#endregion
|
|
115
|
-
export {
|
|
123
|
+
export { O as TextArea, h as textareaResizes };
|
|
@@ -14,7 +14,7 @@ export declare const textareaFixedPaddingClasses: Record<InputSize, string>;
|
|
|
14
14
|
* clears the rounded corner (content padding alone does not move the grip).
|
|
15
15
|
*/
|
|
16
16
|
export declare const textareaShellResizePaddingClasses: Record<InputSize, string>;
|
|
17
|
-
export declare const textareaShellFocusRingBaseClasses = "focus-within:outline-none focus-within:ring-2
|
|
17
|
+
export declare const textareaShellFocusRingBaseClasses = "focus-within:outline-none focus-within:ring-2";
|
|
18
18
|
export declare const textareaShellFocusRingColorClasses: {
|
|
19
19
|
readonly default: "focus-within:ring-focus-ring";
|
|
20
20
|
readonly error: "focus-within:ring-error-focus-ring";
|
|
@@ -36,7 +36,7 @@ export declare const textareaBaseClasses: string;
|
|
|
36
36
|
* Field inside the bordered shell — the shell owns border, fill, and the
|
|
37
37
|
* `focus-within` ring, so the field drops its own outline and ring.
|
|
38
38
|
*/
|
|
39
|
-
export declare const textareaShellFieldClasses = "w-full border-0 bg-transparent shadow-none focus-visible
|
|
39
|
+
export declare const textareaShellFieldClasses = "w-full border-0 bg-transparent shadow-none focus-visible:!outline-none focus-visible:!ring-0";
|
|
40
40
|
/**
|
|
41
41
|
* Inside **PromptBar** — the parent pill owns border, radius, and focus ring.
|
|
42
42
|
* No element shell, no min-height, no resize grip.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textareaShellStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/textareaShellStyles.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EAEzB,4BAA4B,EAE5B,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EAItB,6BAA6B,EAC7B,8BAA8B,EAE9B,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE7F,eAAO,MAAM,eAAe,uCAAwC,CAAC;AAErE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,qFAAqF;AACrF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAI/D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAIhE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAI9D,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIvE,CAAC;AAEF,eAAO,MAAM,iCAAiC,
|
|
1
|
+
{"version":3,"file":"textareaShellStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/textareaShellStyles.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EAEzB,4BAA4B,EAE5B,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,EAItB,6BAA6B,EAC7B,8BAA8B,EAE9B,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE7F,eAAO,MAAM,eAAe,uCAAwC,CAAC;AAErE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,qFAAqF;AACrF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAI/D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAIhE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAI9D,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAIjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,SAAS,EAAE,MAA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