@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
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { ButtonBadge as t } from "./ButtonBadge.js";
|
|
4
|
-
import { buttonAlignClasses as n, buttonAligns as r, buttonBaseClasses as i, buttonEmphases as a, buttonEndIconSquareClasses as o, buttonExternalIconClasses as s, buttonLayouts as c, buttonMonoLabelClasses as l, buttonNavLayoutClasses as u, buttonNavStateClasses as d, buttonOutlineQuietClasses as f, buttonPillClass as
|
|
5
|
-
import { ButtonIcon as
|
|
6
|
-
import { buttonStatusHoldMs as
|
|
7
|
-
import { ButtonStatusButton as
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import { SquareArrowOutUpRight as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useRender as
|
|
4
|
+
import { buttonAlignClasses as n, buttonAligns as r, buttonBaseClasses as i, buttonEmphases as a, buttonEndIconSquareClasses as o, buttonExternalIconClasses as s, buttonLayouts as c, buttonMonoLabelClasses as l, buttonNavLayoutClasses as u, buttonNavStateClasses as d, buttonOutlineQuietClasses as f, buttonPillClass as ee, buttonRoleClasses as p, buttonRoles as m, buttonRowBaseClasses as h, buttonRowLayoutClasses as g, buttonRowWidthClasses as _, buttonSizeClasses as v, buttonWidths as y } from "./buttonStyles.js";
|
|
5
|
+
import { ButtonIcon as b } from "./ButtonIcon.js";
|
|
6
|
+
import { buttonStatusHoldMs as x, defaultStatusLabels as S, getNextButtonStatus as C } from "./buttonStatusStyles.js";
|
|
7
|
+
import { ButtonStatusButton as w } from "./ButtonStatusButton.js";
|
|
8
|
+
import { forwardRef as T } from "react";
|
|
9
|
+
import { SquareArrowOutUpRight as E } from "lucide-react";
|
|
10
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
11
|
+
import { useRender as k } from "@base-ui/react/use-render";
|
|
12
12
|
//#region src/components/atoms/Button/Button.tsx
|
|
13
|
-
function
|
|
14
|
-
e.external && (e.render == null || e.layout !== "pill") && console.warn("[WMDS Button] `external` needs `render={<a href />}` on a pill button."), e.external && e.endIcon != null && console.warn("[WMDS Button] `external` is mutually exclusive with `endIcon`."), e.width != null && e.layout !== "row" && console.warn("[WMDS Button] `width` applies to `layout=\"row\"` only."), e.align != null && (e.layout === "row" || e.layout === "nav") && console.warn("[WMDS Button] `align` applies to pill buttons only."), e.emphasis != null && e.role !== "outline" && console.warn("[WMDS Button] `emphasis` applies to `role=\"outline\"` only."), (e.layout === "row" || e.layout === "nav") && (e.status != null || e.icon != null || e.count != null || e.endIcon != null || e.mono) && console.warn(`[WMDS Button] \`layout="${e.layout}"\` is mutually exclusive with \`status\`, \`icon\`, \`count\`, \`endIcon\`, and \`mono\`.`), e.status != null && (e.count != null || e.endIcon != null || e.mono) && console.warn("[WMDS Button] `status` is mutually exclusive with `count`, `endIcon`, and `mono`."), e.endIcon != null && e.count != null && console.warn("[WMDS Button] `endIcon` is mutually exclusive with `count`."), e.render != null && (e.layout
|
|
13
|
+
function A(e) {
|
|
14
|
+
e.external && (e.render == null || e.layout !== "pill") && console.warn("[WMDS Button] `external` needs `render={<a href />}` on a pill button."), e.external && e.endIcon != null && console.warn("[WMDS Button] `external` is mutually exclusive with `endIcon`."), e.width != null && e.layout !== "row" && console.warn("[WMDS Button] `width` applies to `layout=\"row\"` only."), e.align != null && (e.layout === "row" || e.layout === "nav") && console.warn("[WMDS Button] `align` applies to pill buttons only."), e.emphasis != null && e.role !== "outline" && console.warn("[WMDS Button] `emphasis` applies to `role=\"outline\"` only."), (e.layout === "row" || e.layout === "nav") && (e.status != null || e.icon != null || e.count != null || e.endIcon != null || e.mono) && console.warn(`[WMDS Button] \`layout="${e.layout}"\` is mutually exclusive with \`status\`, \`icon\`, \`count\`, \`endIcon\`, and \`mono\`.`), e.status != null && (e.count != null || e.endIcon != null || e.mono) && console.warn("[WMDS Button] `status` is mutually exclusive with `count`, `endIcon`, and `mono`."), e.endIcon != null && e.count != null && console.warn("[WMDS Button] `endIcon` is mutually exclusive with `count`."), e.render != null && (e.layout === "row" || e.status != null) && console.warn("[WMDS Button] `render` is supported on `layout=\"pill\"` and `layout=\"nav\"` without `status` only.");
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
return
|
|
16
|
+
var j = T(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
17
|
+
return k({
|
|
18
18
|
render: e,
|
|
19
19
|
ref: i,
|
|
20
20
|
defaultTagName: "button",
|
|
@@ -29,32 +29,48 @@ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
|
29
29
|
disabled: n
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
}), M = T(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
33
|
+
return k({
|
|
34
|
+
render: e,
|
|
35
|
+
ref: i,
|
|
36
|
+
defaultTagName: "button",
|
|
37
|
+
props: e ? {
|
|
38
|
+
...r,
|
|
39
|
+
"aria-disabled": n ? !0 : void 0,
|
|
40
|
+
"data-disabled": n ? "" : void 0,
|
|
41
|
+
tabIndex: n ? -1 : r.tabIndex
|
|
42
|
+
} : {
|
|
43
|
+
...r,
|
|
44
|
+
type: t,
|
|
45
|
+
disabled: n
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}), N = T(function({ children: r, role: a = "primary", layout: c = "pill", width: m, align: y, emphasis: x, size: S = "md", disabled: C, type: T = "button", status: k, statusLabels: N, disableOnError: P, icon: F, count: I, mono: L = !1, endIcon: R, selected: z = !1, render: B, external: V = !1, externalIcon: H = !0, className: U, onClick: W, "aria-label": G, "aria-pressed": K, "aria-keyshortcuts": q, id: J, name: Y, form: X, ...Z }, Q) {
|
|
49
|
+
if (A({
|
|
50
|
+
status: k,
|
|
35
51
|
icon: F,
|
|
36
52
|
count: I,
|
|
37
53
|
layout: c,
|
|
38
54
|
render: B,
|
|
39
55
|
endIcon: R,
|
|
40
56
|
mono: L,
|
|
41
|
-
width:
|
|
42
|
-
align:
|
|
43
|
-
emphasis:
|
|
57
|
+
width: m,
|
|
58
|
+
align: y,
|
|
59
|
+
emphasis: x,
|
|
44
60
|
role: a,
|
|
45
61
|
external: V
|
|
46
|
-
}),
|
|
62
|
+
}), k != null) return /* @__PURE__ */ D(w, {
|
|
47
63
|
...Z,
|
|
48
64
|
ref: Q,
|
|
49
|
-
status:
|
|
65
|
+
status: k,
|
|
50
66
|
role: a,
|
|
51
|
-
size:
|
|
67
|
+
size: S,
|
|
52
68
|
statusLabels: N,
|
|
53
69
|
icon: F,
|
|
54
70
|
disableOnError: P,
|
|
55
|
-
disabled:
|
|
71
|
+
disabled: C,
|
|
56
72
|
className: U,
|
|
57
|
-
type:
|
|
73
|
+
type: T,
|
|
58
74
|
onClick: W,
|
|
59
75
|
"aria-label": G,
|
|
60
76
|
"aria-pressed": K,
|
|
@@ -64,11 +80,11 @@ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
|
64
80
|
form: X,
|
|
65
81
|
children: r
|
|
66
82
|
});
|
|
67
|
-
if (c === "row") return /* @__PURE__ */
|
|
83
|
+
if (c === "row") return /* @__PURE__ */ D("button", {
|
|
68
84
|
...Z,
|
|
69
85
|
ref: Q,
|
|
70
|
-
type:
|
|
71
|
-
disabled:
|
|
86
|
+
type: T,
|
|
87
|
+
disabled: C,
|
|
72
88
|
onClick: W,
|
|
73
89
|
"aria-label": G,
|
|
74
90
|
"aria-pressed": K,
|
|
@@ -76,17 +92,18 @@ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
|
76
92
|
id: J,
|
|
77
93
|
name: Y,
|
|
78
94
|
form: X,
|
|
79
|
-
className: e(
|
|
95
|
+
className: e(h, p[a], g, _[m ?? "fill"], U),
|
|
80
96
|
"data-role": a,
|
|
81
97
|
"data-layout": "row",
|
|
82
|
-
"data-width":
|
|
98
|
+
"data-width": m ?? "fill",
|
|
83
99
|
children: r
|
|
84
100
|
});
|
|
85
|
-
if (c === "nav") return /* @__PURE__ */
|
|
101
|
+
if (c === "nav") return /* @__PURE__ */ D(j, {
|
|
86
102
|
...Z,
|
|
87
103
|
ref: Q,
|
|
88
|
-
|
|
89
|
-
|
|
104
|
+
render: B,
|
|
105
|
+
type: T,
|
|
106
|
+
disabled: C,
|
|
90
107
|
onClick: W,
|
|
91
108
|
"aria-label": G,
|
|
92
109
|
"aria-pressed": K,
|
|
@@ -95,13 +112,15 @@ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
|
95
112
|
id: J,
|
|
96
113
|
name: Y,
|
|
97
114
|
form: X,
|
|
98
|
-
className: e(
|
|
115
|
+
className: e(h, u, d(z), U),
|
|
116
|
+
"data-role": a,
|
|
117
|
+
"data-size": S,
|
|
99
118
|
"data-layout": "nav",
|
|
100
119
|
"data-selected": z ? "" : void 0,
|
|
101
120
|
children: r
|
|
102
121
|
});
|
|
103
122
|
let $ = V && B != null;
|
|
104
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ O(M, {
|
|
105
124
|
...Z,
|
|
106
125
|
...$ ? {
|
|
107
126
|
target: "_blank",
|
|
@@ -109,8 +128,8 @@ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
|
109
128
|
} : null,
|
|
110
129
|
ref: Q,
|
|
111
130
|
render: B,
|
|
112
|
-
type:
|
|
113
|
-
disabled:
|
|
131
|
+
type: T,
|
|
132
|
+
disabled: C,
|
|
114
133
|
onClick: W,
|
|
115
134
|
"aria-label": G,
|
|
116
135
|
"aria-pressed": K,
|
|
@@ -118,41 +137,41 @@ var M = E(function({ render: e, type: t, disabled: n, ...r }, i) {
|
|
|
118
137
|
id: J,
|
|
119
138
|
name: Y,
|
|
120
139
|
form: X,
|
|
121
|
-
className: e(i, n[
|
|
140
|
+
className: e(i, n[y ?? "center"], a === "outline" && x === "quiet" ? f : p[a], v[S], ee, "gap-2", U),
|
|
122
141
|
"data-role": a,
|
|
123
|
-
"data-size":
|
|
124
|
-
"data-align":
|
|
125
|
-
"data-emphasis": a === "outline" ?
|
|
142
|
+
"data-size": S,
|
|
143
|
+
"data-align": y,
|
|
144
|
+
"data-emphasis": a === "outline" ? x ?? "strong" : void 0,
|
|
126
145
|
"data-mono": L ? "" : void 0,
|
|
127
146
|
"data-end-icon": R ? "" : void 0,
|
|
128
147
|
"data-external": $ ? "" : void 0,
|
|
129
148
|
children: [
|
|
130
|
-
F ? /* @__PURE__ */
|
|
131
|
-
size:
|
|
149
|
+
F ? /* @__PURE__ */ D(b, {
|
|
150
|
+
size: S,
|
|
132
151
|
children: F
|
|
133
152
|
}) : null,
|
|
134
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ O("span", {
|
|
135
154
|
className: L ? l : void 0,
|
|
136
|
-
children: [r, $ ? /* @__PURE__ */
|
|
155
|
+
children: [r, $ ? /* @__PURE__ */ D("span", {
|
|
137
156
|
className: "sr-only",
|
|
138
157
|
children: " (opens in a new tab)"
|
|
139
158
|
}) : null]
|
|
140
159
|
}),
|
|
141
|
-
$ && H ? /* @__PURE__ */
|
|
160
|
+
$ && H ? /* @__PURE__ */ D(E, {
|
|
142
161
|
className: s,
|
|
143
162
|
strokeWidth: 2,
|
|
144
163
|
"aria-hidden": !0
|
|
145
164
|
}) : null,
|
|
146
|
-
R ? /* @__PURE__ */
|
|
165
|
+
R ? /* @__PURE__ */ D("span", {
|
|
147
166
|
className: o,
|
|
148
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ D(b, {
|
|
149
168
|
size: "xs",
|
|
150
169
|
children: R
|
|
151
170
|
})
|
|
152
171
|
}) : null,
|
|
153
|
-
I == null ? null : /* @__PURE__ */
|
|
172
|
+
I == null ? null : /* @__PURE__ */ D(t, { value: I })
|
|
154
173
|
]
|
|
155
174
|
});
|
|
156
175
|
});
|
|
157
176
|
//#endregion
|
|
158
|
-
export { N as Button, r as buttonAligns, a as buttonEmphases, c as buttonLayouts,
|
|
177
|
+
export { N as Button, r as buttonAligns, a as buttonEmphases, c as buttonLayouts, m as buttonRoles, x as buttonStatusHoldMs, y as buttonWidths, S as defaultStatusLabels, C as getNextButtonStatus };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonStatusButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAC3C;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,kEAAkE;IAClE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ButtonStatusButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/ButtonStatusButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAC3C;IACD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,kEAAkE;IAClE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,uHA6E7B,CAAC"}
|
|
@@ -9,13 +9,14 @@ import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
|
9
9
|
import { motion as m } from "motion/react";
|
|
10
10
|
//#region src/components/atoms/Button/ButtonStatusButton.tsx
|
|
11
11
|
var h = d(function({ status: d, role: h = "primary", size: g = "md", statusLabels: _, icon: v, disableOnError: y = !1, disabled: b, className: x, children: S, type: C = "button", onClick: w, "aria-label": T, "aria-pressed": E, "aria-keyshortcuts": D, id: O, name: k, form: A, ...j }, M) {
|
|
12
|
-
let N = u(S, _)[d], P = b
|
|
12
|
+
let N = u(S, _)[d], P = !b && (d === "loading" || d === "error" && y), F = b || P, I = r(d, h);
|
|
13
13
|
return /* @__PURE__ */ p(m.button, {
|
|
14
14
|
...j,
|
|
15
15
|
ref: M,
|
|
16
16
|
type: C,
|
|
17
17
|
layout: !0,
|
|
18
|
-
disabled:
|
|
18
|
+
disabled: b,
|
|
19
|
+
"aria-disabled": P || void 0,
|
|
19
20
|
"aria-busy": d === "loading" || void 0,
|
|
20
21
|
"aria-live": "polite",
|
|
21
22
|
"aria-label": T,
|
|
@@ -24,12 +25,18 @@ var h = d(function({ status: d, role: h = "primary", size: g = "md", statusLabel
|
|
|
24
25
|
"data-role": h,
|
|
25
26
|
"data-size": g,
|
|
26
27
|
"data-status": d,
|
|
27
|
-
animate:
|
|
28
|
+
animate: I,
|
|
28
29
|
initial: !1,
|
|
29
30
|
className: e(t, "justify-center", l[g], (d !== "idle" || v != null) && c[g], n, i(d, h), "overflow-hidden", x),
|
|
30
|
-
whileTap:
|
|
31
|
+
whileTap: F ? void 0 : { scale: .98 },
|
|
31
32
|
transition: a,
|
|
32
|
-
onClick:
|
|
33
|
+
onClick: (e) => {
|
|
34
|
+
if (P) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
w?.(e);
|
|
39
|
+
},
|
|
33
40
|
id: O,
|
|
34
41
|
name: k,
|
|
35
42
|
form: A,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonStatusMotion.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStatusMotion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,oFAAoF;AACpF,MAAM,MAAM,WAAW,GAAG;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"buttonStatusMotion.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStatusMotion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,oFAAoF;AACpF,MAAM,MAAM,WAAW,GAAG;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgDF,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAQ3D,CAAC;AAEF,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAElF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAElF;AAED,qFAAqF;AACrF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;CAK5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;CAK7B,CAAC"}
|
|
@@ -24,6 +24,10 @@ var e = {
|
|
|
24
24
|
outline: {
|
|
25
25
|
backgroundColor: "transparent",
|
|
26
26
|
color: "var(--color-fg)"
|
|
27
|
+
},
|
|
28
|
+
"inverse-outline": {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
color: "var(--color-on-brand)"
|
|
27
31
|
}
|
|
28
32
|
}, t = {
|
|
29
33
|
loading: {
|
|
@@ -49,7 +53,8 @@ var e = {
|
|
|
49
53
|
ghost: "",
|
|
50
54
|
destructive: "",
|
|
51
55
|
inverse: "shadow-raised",
|
|
52
|
-
outline: ""
|
|
56
|
+
outline: "",
|
|
57
|
+
"inverse-outline": ""
|
|
53
58
|
};
|
|
54
59
|
function i(n, r) {
|
|
55
60
|
return n === "idle" ? e[r] : t[n];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** Prescribed action roles — not a semantic color picker. ADR-0004. */
|
|
2
|
-
export declare const buttonRoles: readonly ["primary", "secondary", "ghost", "destructive", "inverse", "outline"];
|
|
2
|
+
export declare const buttonRoles: readonly ["primary", "secondary", "ghost", "destructive", "inverse", "outline", "inverse-outline"];
|
|
3
3
|
export type ButtonRole = (typeof buttonRoles)[number];
|
|
4
4
|
export type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
5
5
|
export type IconButtonSize = ButtonSize;
|
|
6
6
|
/** All action buttons are pills by default — `layout="row"` for flat full-width detail lines. */
|
|
7
|
-
export declare const buttonPillClass = "rounded-
|
|
7
|
+
export declare const buttonPillClass = "rounded-[var(--radius-control)]";
|
|
8
8
|
export declare const buttonLayouts: readonly ["pill", "row", "nav"];
|
|
9
9
|
export type ButtonLayout = (typeof buttonLayouts)[number];
|
|
10
10
|
/** `layout="row"` width: `fill` (default) spans the container; `hug` sizes to its content. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStyles.ts"],"names":[],"mappings":"AAMA,uEAAuE;AACvE,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"buttonStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Button/buttonStyles.ts"],"names":[],"mappings":"AAMA,uEAAuE;AACvE,eAAO,MAAM,WAAW,oGAQd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,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,UAAU,EAAE,MAAM,CAKxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAK5D,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKhE,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,oBAAoB,QAK+C,CAAC;AAEjF,eAAO,MAAM,sBAAsB,QAEqB,CAAC;AAEzD,mHAAmH;AACnH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAG7D,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,QAGqB,CAAC;AAEzD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAI/D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { clusterHeightClasses as e, clusterSquareClasses as t } from "../../../lib/clusterScale.js";
|
|
3
|
+
import { motionTransition as n, pressScaleClass as r } from "../../../lib/motion.js";
|
|
4
4
|
//#region src/components/atoms/Button/buttonStyles.ts
|
|
5
5
|
var i = [
|
|
6
6
|
"primary",
|
|
@@ -8,18 +8,20 @@ var i = [
|
|
|
8
8
|
"ghost",
|
|
9
9
|
"destructive",
|
|
10
10
|
"inverse",
|
|
11
|
-
"outline"
|
|
12
|
-
|
|
11
|
+
"outline",
|
|
12
|
+
"inverse-outline"
|
|
13
|
+
], a = "rounded-[var(--radius-control)]", o = [
|
|
13
14
|
"pill",
|
|
14
15
|
"row",
|
|
15
16
|
"nav"
|
|
16
|
-
], s = ["fill", "hug"], c = ["center", "start"], l = ["strong", "quiet"], u = "inline-flex cursor-pointer items-center font-sans font-medium normal-case tracking-normal transition-[color,transform,box-shadow,border-color,outline-color,background-color] " +
|
|
17
|
+
], s = ["fill", "hug"], c = ["center", "start"], l = ["strong", "quiet"], u = "inline-flex cursor-pointer items-center font-sans font-medium normal-case tracking-normal transition-[color,transform,box-shadow,border-color,outline-color,background-color] " + n("fast") + " " + r + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-body disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:opacity-50 no-underline", d = {
|
|
17
18
|
primary: "bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-active",
|
|
18
19
|
secondary: "bg-secondary text-secondary-foreground shadow-raised hover:bg-secondary-hover active:bg-secondary-active",
|
|
19
20
|
ghost: "bg-transparent text-ghost-foreground hover:bg-ghost-hover active:bg-ghost-active",
|
|
20
21
|
destructive: "bg-error text-on-error hover:bg-error-hover active:bg-error-active",
|
|
21
22
|
inverse: "bg-on-brand text-brand shadow-raised hover:bg-on-brand-hover active:bg-on-brand-hover",
|
|
22
|
-
outline: "border border-fg bg-transparent text-fg hover:bg-ghost-hover active:bg-ghost-active"
|
|
23
|
+
outline: "border border-fg bg-transparent text-fg hover:bg-ghost-hover active:bg-ghost-active",
|
|
24
|
+
"inverse-outline": "border border-on-brand bg-transparent text-on-brand hover:bg-on-brand-hover hover:text-brand active:bg-on-brand-hover active:text-brand"
|
|
23
25
|
}, f = "border border-border bg-transparent text-fg hover:bg-ghost-hover active:bg-ghost-active", p = {
|
|
24
26
|
center: "justify-center",
|
|
25
27
|
start: "justify-start text-left"
|
|
@@ -29,9 +31,9 @@ var i = [
|
|
|
29
31
|
md: "px-5",
|
|
30
32
|
lg: "px-7"
|
|
31
33
|
}, v = {
|
|
32
|
-
xs: `${
|
|
33
|
-
sm: `${
|
|
34
|
-
md: `${
|
|
34
|
+
xs: `${e.sm} ${_.xs} py-1 text-sm leading-none`,
|
|
35
|
+
sm: `${e.md} ${_.sm} py-1.5 text-sm leading-none`,
|
|
36
|
+
md: `${e.lg} ${_.md} py-2.5 text-sm leading-none`,
|
|
35
37
|
lg: `min-h-12 ${_.lg} py-3 text-base leading-none`
|
|
36
38
|
}, y = {
|
|
37
39
|
xs: "size-3.5",
|
|
@@ -39,14 +41,14 @@ var i = [
|
|
|
39
41
|
md: "size-4",
|
|
40
42
|
lg: "size-[1.125rem]"
|
|
41
43
|
}, b = {
|
|
42
|
-
xs:
|
|
43
|
-
sm:
|
|
44
|
-
md:
|
|
44
|
+
xs: t.sm,
|
|
45
|
+
sm: t.md,
|
|
46
|
+
md: t.lg,
|
|
45
47
|
lg: "size-12 shrink-0"
|
|
46
|
-
}, x = "flex cursor-pointer items-center font-sans tracking-normal transition-[color,background-color,outline-color] " +
|
|
48
|
+
}, x = "flex cursor-pointer items-center font-sans tracking-normal transition-[color,background-color,outline-color] " + n("fast") + " focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50", S = "h-auto min-h-0 rounded-md px-1.5 py-1 text-left font-normal focus-visible:ring-inset focus-visible:ring-offset-0", C = {
|
|
47
49
|
fill: "w-full justify-between gap-3",
|
|
48
50
|
hug: "w-auto justify-start gap-1.5"
|
|
49
|
-
}, w = "h-auto min-h-0 w-full justify-start gap-2.5 rounded-
|
|
51
|
+
}, w = "h-auto min-h-0 w-full justify-start gap-2.5 rounded-[var(--radius-control-box)] px-2.5 py-2 text-left text-sm font-normal leading-[var(--line-height-sm)] focus-visible:ring-inset focus-visible:ring-offset-0";
|
|
50
52
|
function T(e) {
|
|
51
53
|
return e ? "bg-secondary text-secondary-foreground" : "bg-transparent text-muted hover:bg-ghost-hover hover:text-fg";
|
|
52
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAIf,OAAO,EAoBL,KAAK,YAAY,EAClB,MAA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aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE5E,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAcD;;;GAGG;AACH,eAAO,MAAM,QAAQ,4GAgNnB,CAAC"}
|
|
@@ -2,117 +2,118 @@
|
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import "../Input/inputShellStyles.js";
|
|
4
4
|
import { InputStatusBanner as t } from "../inputShared/InputStatusBanner.js";
|
|
5
|
-
import { checkboxBoxClassesFor as ee, checkboxCheckIconSizeClasses as n, checkboxCountClasses as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { Check as
|
|
8
|
-
import { Fragment as
|
|
5
|
+
import { checkboxBoxClassesFor as ee, checkboxCheckIconSizeClasses as n, checkboxCountClasses as te, checkboxCountTitleLineClasses as r, checkboxDescriptionClasses as i, checkboxDescriptionRowClasses as ne, checkboxHiddenInputClasses as re, checkboxHitTargetDescriptionAlignClasses as ie, checkboxHitTargetSizeClasses as ae, checkboxIndeterminateBarSizeClasses as oe, checkboxLabelClassesFor as a, checkboxMarkClasses as o, checkboxRowBaseClasses as s, checkboxRowSizeClasses as c, checkboxSizes as l, checkboxStatusBannerClassesFor as u, checkboxTextColumnClasses as d } from "./checkboxStyles.js";
|
|
6
|
+
import { forwardRef as f, useCallback as p, useId as m, useState as se } from "react";
|
|
7
|
+
import { Check as ce, Loader2 as le } from "lucide-react";
|
|
8
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/atoms/Checkbox/Checkbox.tsx
|
|
10
|
-
var
|
|
10
|
+
var v = {
|
|
11
11
|
sm: "sm",
|
|
12
12
|
md: "md"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function y(e) {
|
|
15
15
|
e.message != null && e.status == null && console.warn("[WMDS Checkbox] `message` requires `status`.");
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
|
|
17
|
+
var b = f(function({ size: l = "md", label: f, labelHidden: b = !1, description: x, count: S, countLabel: C, indeterminate: w = !1, status: T, message: E, loading: D = !1, className: ue, disabled: O, readOnly: k, checked: A, defaultChecked: j, id: M, onChange: N, ...P }, F) {
|
|
18
|
+
let I = m(), L = M ?? I;
|
|
19
|
+
y({
|
|
20
20
|
status: T,
|
|
21
21
|
message: E
|
|
22
22
|
});
|
|
23
|
-
let
|
|
24
|
-
|
|
23
|
+
let R = A !== void 0, [z, B] = se(j ?? !1), V = R ? !!A : z, H = O || D, U = D && !O, W = E != null && E.length > 0 && T != null, G = W ? `${L}-message` : void 0, K = x != null && !b ? `${L}-description` : void 0, de = [
|
|
24
|
+
P["aria-describedby"],
|
|
25
25
|
K,
|
|
26
26
|
G
|
|
27
|
-
].filter(Boolean).join(" ") || void 0,
|
|
28
|
-
e && (e.indeterminate = w), typeof
|
|
29
|
-
}, [w,
|
|
30
|
-
if (
|
|
27
|
+
].filter(Boolean).join(" ") || void 0, fe = p((e) => {
|
|
28
|
+
e && (e.indeterminate = w), typeof F == "function" ? F(e) : F != null && (F.current = e);
|
|
29
|
+
}, [w, F]), pe = (e) => {
|
|
30
|
+
if (k || U) {
|
|
31
31
|
e.preventDefault();
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
},
|
|
34
|
+
R || B(e.target.checked), N?.(e);
|
|
35
|
+
}, me = ee(l, V, w, H, W ? void 0 : T), q = x != null && !b, J = S != null, Y = S?.toLocaleString("en-US"), X = J ? /* @__PURE__ */ g("span", {
|
|
36
36
|
className: "sr-only",
|
|
37
|
-
children: ` (${
|
|
38
|
-
}) : null, Z = J ? /* @__PURE__ */
|
|
39
|
-
className:
|
|
37
|
+
children: ` (${C ?? Y})`
|
|
38
|
+
}) : null, Z = J ? /* @__PURE__ */ g("span", {
|
|
39
|
+
className: te,
|
|
40
40
|
"aria-hidden": !0,
|
|
41
41
|
children: Y
|
|
42
|
-
}) : null, Q = (t) => /* @__PURE__ */
|
|
43
|
-
className: e("relative flex shrink-0 items-center justify-center",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
...
|
|
46
|
-
ref:
|
|
47
|
-
id:
|
|
42
|
+
}) : null, Q = (t) => /* @__PURE__ */ _("span", {
|
|
43
|
+
className: e("relative flex shrink-0 items-center justify-center", ae[l], t),
|
|
44
|
+
children: [/* @__PURE__ */ g("input", {
|
|
45
|
+
...P,
|
|
46
|
+
ref: fe,
|
|
47
|
+
id: L,
|
|
48
48
|
type: "checkbox",
|
|
49
|
-
checked:
|
|
50
|
-
defaultChecked:
|
|
51
|
-
disabled:
|
|
52
|
-
|
|
49
|
+
checked: R ? A : void 0,
|
|
50
|
+
defaultChecked: R ? void 0 : j,
|
|
51
|
+
disabled: O,
|
|
52
|
+
"aria-disabled": U || void 0,
|
|
53
|
+
readOnly: k,
|
|
53
54
|
"aria-invalid": T === "error" || void 0,
|
|
54
|
-
"aria-describedby":
|
|
55
|
+
"aria-describedby": de,
|
|
55
56
|
"aria-checked": w ? "mixed" : void 0,
|
|
56
57
|
"aria-busy": D || void 0,
|
|
57
|
-
onChange:
|
|
58
|
-
className:
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
-
className:
|
|
58
|
+
onChange: pe,
|
|
59
|
+
className: re
|
|
60
|
+
}), /* @__PURE__ */ g("span", {
|
|
61
|
+
className: me,
|
|
61
62
|
"aria-hidden": !0,
|
|
62
|
-
children: D ? /* @__PURE__ */
|
|
63
|
-
className: e(n[
|
|
63
|
+
children: D ? /* @__PURE__ */ g(le, {
|
|
64
|
+
className: e(n[l], o, "animate-spin"),
|
|
64
65
|
strokeWidth: 2
|
|
65
|
-
}) : w ? /* @__PURE__ */
|
|
66
|
-
className: e(n[
|
|
66
|
+
}) : w ? /* @__PURE__ */ g("span", { className: e(oe[l], o, "rounded-full bg-current") }) : V ? /* @__PURE__ */ g(ce, {
|
|
67
|
+
className: e(n[l], o),
|
|
67
68
|
strokeWidth: 3,
|
|
68
69
|
"aria-hidden": !0
|
|
69
70
|
}) : null
|
|
70
71
|
})]
|
|
71
|
-
}), $ = /* @__PURE__ */
|
|
72
|
-
htmlFor:
|
|
73
|
-
className: e(
|
|
74
|
-
children:
|
|
72
|
+
}), $ = /* @__PURE__ */ g("label", {
|
|
73
|
+
htmlFor: L,
|
|
74
|
+
className: e(s, !q && "items-center", !q && c[l], H && "cursor-not-allowed", ue),
|
|
75
|
+
children: b ? /* @__PURE__ */ _(h, { children: [Q(), /* @__PURE__ */ _("span", {
|
|
75
76
|
className: "sr-only",
|
|
76
|
-
children: [
|
|
77
|
-
})] }) : q ? /* @__PURE__ */
|
|
78
|
-
className: e(
|
|
79
|
-
children: [Q(
|
|
80
|
-
className: e(
|
|
81
|
-
children: [J ? /* @__PURE__ */
|
|
82
|
-
className:
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
-
className:
|
|
85
|
-
children: [
|
|
77
|
+
children: [f, X]
|
|
78
|
+
})] }) : q ? /* @__PURE__ */ _("span", {
|
|
79
|
+
className: e(ne[l], J && "flex-1"),
|
|
80
|
+
children: [Q(ie[l]), /* @__PURE__ */ _("span", {
|
|
81
|
+
className: e(d, J && "flex-1"),
|
|
82
|
+
children: [J ? /* @__PURE__ */ _("span", {
|
|
83
|
+
className: r,
|
|
84
|
+
children: [/* @__PURE__ */ _("span", {
|
|
85
|
+
className: a(H, !0),
|
|
86
|
+
children: [f, X]
|
|
86
87
|
}), Z]
|
|
87
|
-
}) : /* @__PURE__ */
|
|
88
|
-
className:
|
|
89
|
-
children:
|
|
90
|
-
}), /* @__PURE__ */
|
|
88
|
+
}) : /* @__PURE__ */ g("span", {
|
|
89
|
+
className: a(H, !0),
|
|
90
|
+
children: f
|
|
91
|
+
}), /* @__PURE__ */ g("span", {
|
|
91
92
|
id: K,
|
|
92
|
-
className:
|
|
93
|
-
children:
|
|
93
|
+
className: i,
|
|
94
|
+
children: x
|
|
94
95
|
})]
|
|
95
96
|
})]
|
|
96
|
-
}) : /* @__PURE__ */
|
|
97
|
+
}) : /* @__PURE__ */ _(h, { children: [
|
|
97
98
|
Q(),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
className:
|
|
100
|
-
children: [
|
|
99
|
+
/* @__PURE__ */ _("span", {
|
|
100
|
+
className: a(H),
|
|
101
|
+
children: [f, X]
|
|
101
102
|
}),
|
|
102
103
|
Z
|
|
103
104
|
] })
|
|
104
105
|
});
|
|
105
|
-
return !W || T == null || G == null ? $ : /* @__PURE__ */
|
|
106
|
+
return !W || T == null || G == null ? $ : /* @__PURE__ */ _("div", {
|
|
106
107
|
className: "flex w-full flex-col gap-1.5",
|
|
107
|
-
children: [$, /* @__PURE__ */
|
|
108
|
+
children: [$, /* @__PURE__ */ g(t, {
|
|
108
109
|
status: T,
|
|
109
110
|
message: E,
|
|
110
111
|
messageId: G,
|
|
111
|
-
size:
|
|
112
|
+
size: v[l],
|
|
112
113
|
messagePosition: "bottom",
|
|
113
|
-
bannerClassName:
|
|
114
|
+
bannerClassName: u(T)
|
|
114
115
|
})]
|
|
115
116
|
});
|
|
116
117
|
});
|
|
117
118
|
//#endregion
|
|
118
|
-
export {
|
|
119
|
+
export { b as Checkbox, l as checkboxSizes };
|
|
@@ -34,7 +34,7 @@ export declare const checkboxRowBaseClasses = "group/checkbox relative flex w-fu
|
|
|
34
34
|
export declare const checkboxRowLabelOnlyClasses = "items-center";
|
|
35
35
|
export declare const checkboxRowClasses: string;
|
|
36
36
|
export declare const checkboxRowDisabledClasses = "cursor-not-allowed";
|
|
37
|
-
export declare const checkboxHiddenInputClasses = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed";
|
|
37
|
+
export declare const checkboxHiddenInputClasses = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed aria-disabled:cursor-not-allowed";
|
|
38
38
|
export declare const checkboxFocusRingClasses = "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";
|
|
39
39
|
export declare function checkboxBoxClassesFor(size: CheckboxSize, checked: boolean, indeterminate: boolean, disabled?: boolean, status?: InputStatus): string;
|
|
40
40
|
export declare function checkboxLabelClassesFor(disabled?: boolean, withDescription?: boolean): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkboxStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Checkbox/checkboxStyles.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,aAAa,uBAAwB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,oEAAoE;AACpE,eAAO,MAAM,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;AAC3D,eAAO,MAAM,6BAA6B,sCAAsC,CAAC;AAEjF,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,iCAAiC,CAAC;AAExE,eAAO,MAAM,mCAAmC,QAA4C,CAAC;AAE7F,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAGtE,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,wCAAwC,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAGjF,CAAC;AAEF,eAAO,MAAM,sBAAsB,uDACmB,CAAC;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,eAAO,MAAM,kBAAkB,QAA0D,CAAC;AAE1F,eAAO,MAAM,0BAA0B,uBAAuB,CAAC;AAE/D,eAAO,MAAM,0BAA0B,+HACuF,CAAC;AAE/H,eAAO,MAAM,wBAAwB,sKACgI,CAAC;AAEtK,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,OAAO,EACtB,QAAQ,CAAC,EAAE,OAAO,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAWR;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAK7F;AAED,iEAAiE;AACjE,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAK1E"}
|
|
@@ -27,7 +27,7 @@ var a = ["sm", "md"], o = {
|
|
|
27
27
|
md: "mt-0.5"
|
|
28
28
|
}, T = "group/checkbox relative flex w-full cursor-pointer", E = "items-center";
|
|
29
29
|
e(T, E);
|
|
30
|
-
var D = "cursor-not-allowed", O = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed", k = "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";
|
|
30
|
+
var D = "cursor-not-allowed", O = "peer absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed aria-disabled:cursor-not-allowed", k = "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";
|
|
31
31
|
function A(t, n, r, a, o) {
|
|
32
32
|
let s = n || r;
|
|
33
33
|
return e(d, c[t], k, s ? p : f, o != null && i[o], a && "opacity-50");
|