@soroush.tech/design-system 1.0.0 → 1.2.0
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/README.md +5 -5
- package/dist/AppBar.cjs +1 -1
- package/dist/AppBar.d.cts +3 -3
- package/dist/AppBar.d.mts +3 -3
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.d.cts +3 -3
- package/dist/Avatar.d.mts +3 -3
- package/dist/Avatar.mjs +1 -1
- package/dist/Backdrop.cjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Button.cjs +2 -8
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +1 -7
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +2 -2
- package/dist/Checkbox.cjs +1 -1
- package/dist/Checkbox.d.cts +2 -2
- package/dist/Checkbox.d.mts +2 -2
- package/dist/CircularProgress.cjs +1 -1
- package/dist/CircularProgress.d.cts +3 -3
- package/dist/CircularProgress.d.mts +3 -3
- package/dist/Drawer.cjs +4 -3
- package/dist/Drawer.d.cts +2 -2
- package/dist/Drawer.d.mts +2 -2
- package/dist/Drawer.mjs +3 -2
- package/dist/Flex.cjs +3 -7
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +2 -6
- package/dist/FocusTrap.cjs +1 -1
- package/dist/Form.cjs +1 -1
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/FormControl.cjs +2 -2
- package/dist/FormControl.d.cts +2 -2
- package/dist/FormControl.d.mts +2 -2
- package/dist/FormControl.mjs +1 -1
- package/dist/FormHelperText.cjs +1 -1
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormLabel.cjs +1 -1
- package/dist/FormLabel.d.cts +1 -1
- package/dist/FormLabel.d.mts +1 -1
- package/dist/Grid.cjs +3 -26
- package/dist/Grid.d.cts +4 -11
- package/dist/Grid.d.mts +4 -11
- package/dist/Grid.mjs +4 -24
- package/dist/{Icon-zsHe7hWR.cjs → Icon-ByDvM-t1.cjs} +39 -7
- package/dist/{Icon-bv8Z38l-.mjs → Icon-GgwNXKEY.mjs} +38 -6
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.cjs +10 -9
- package/dist/Image.d.cts +2 -2
- package/dist/Image.d.mts +2 -2
- package/dist/Image.mjs +9 -8
- package/dist/LinearProgress.cjs +1 -1
- package/dist/LinearProgress.d.cts +3 -3
- package/dist/LinearProgress.d.mts +3 -3
- package/dist/Link.cjs +3 -7
- package/dist/Link.d.cts +1 -2
- package/dist/Link.d.mts +1 -2
- package/dist/Link.mjs +3 -7
- package/dist/MenuItem.cjs +3 -3
- package/dist/MenuItem.d.cts +2 -2
- package/dist/MenuItem.d.mts +2 -2
- package/dist/MenuItem.mjs +2 -2
- package/dist/{Modal-dy5l7gfH.mjs → Modal-COLrJoNW.mjs} +2 -1
- package/dist/{Modal-DZH-DzMZ.cjs → Modal-S2nb35q-.cjs} +3 -2
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NativeSelect.cjs +9 -8
- package/dist/NativeSelect.d.cts +3 -3
- package/dist/NativeSelect.d.mts +3 -3
- package/dist/NativeSelect.mjs +8 -7
- package/dist/Pagination/PaginationItem.cjs +2 -2
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +1 -1
- package/dist/Pagination.cjs +1 -1
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Paper.cjs +2 -4
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +1 -3
- package/dist/{Popover-Chgtjn-N.mjs → Popover-BjGubpna.mjs} +2 -2
- package/dist/{Popover-pEVboMZO.cjs → Popover-BxN7ts_I.cjs} +3 -3
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +4 -4
- package/dist/Popover.d.mts +4 -4
- package/dist/Popover.mjs +1 -1
- package/dist/Pressable.cjs +123 -0
- package/dist/Pressable.d.cts +2 -0
- package/dist/Pressable.d.mts +2 -0
- package/dist/Pressable.mjs +121 -0
- package/dist/Quote.cjs +1 -1
- package/dist/Quote.d.cts +4 -4
- package/dist/Quote.d.mts +4 -4
- package/dist/Radio.cjs +1 -1
- package/dist/Radio.d.cts +2 -2
- package/dist/Radio.d.mts +2 -2
- package/dist/Select.cjs +42 -41
- package/dist/Select.d.cts +3 -3
- package/dist/Select.d.mts +3 -3
- package/dist/Select.mjs +41 -40
- package/dist/Sidebar/Sidebar.cjs +94 -0
- package/dist/Sidebar/Sidebar.d.cts +59 -0
- package/dist/Sidebar/Sidebar.d.mts +59 -0
- package/dist/Sidebar/Sidebar.mjs +93 -0
- package/dist/Sidebar/SidebarItem.cjs +125 -0
- package/dist/Sidebar/SidebarItem.d.cts +39 -0
- package/dist/Sidebar/SidebarItem.d.mts +39 -0
- package/dist/Sidebar/SidebarItem.mjs +124 -0
- package/dist/Sidebar.cjs +7 -0
- package/dist/Sidebar.d.cts +4 -0
- package/dist/Sidebar.d.mts +4 -0
- package/dist/Sidebar.mjs +4 -0
- package/dist/SidebarContext-DgSLwjur.mjs +10 -0
- package/dist/SidebarContext-ao6lRfTX.d.cts +37 -0
- package/dist/SidebarContext-ao6lRfTX.d.mts +37 -0
- package/dist/SidebarContext-jG6OioC-.cjs +14 -0
- package/dist/Skeleton.cjs +1 -1
- package/dist/Skeleton.d.cts +2 -2
- package/dist/Skeleton.d.mts +2 -2
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.d.cts +2 -2
- package/dist/Switch.d.mts +2 -2
- package/dist/Switch.mjs +1 -1
- package/dist/Table/Table.cjs +1 -1
- package/dist/Table/Table.d.cts +3 -3
- package/dist/Table/Table.d.mts +3 -3
- package/dist/Table/TableBody.cjs +18 -16
- package/dist/Table/TableBody.d.cts +2 -2
- package/dist/Table/TableBody.d.mts +2 -2
- package/dist/Table/TableBody.mjs +17 -15
- package/dist/Table/TableCell.cjs +1 -1
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableContainer.cjs +1 -1
- package/dist/Table/TableContainer.d.cts +4 -4
- package/dist/Table/TableContainer.d.mts +4 -4
- package/dist/Table/TableControl.cjs +3 -2
- package/dist/Table/TableControl.d.cts +1 -1
- package/dist/Table/TableControl.d.mts +1 -1
- package/dist/Table/TableControl.mjs +3 -2
- package/dist/Table/TableFooter.cjs +18 -16
- package/dist/Table/TableFooter.d.cts +2 -2
- package/dist/Table/TableFooter.d.mts +2 -2
- package/dist/Table/TableFooter.mjs +17 -15
- package/dist/Table/TableHead.cjs +18 -16
- package/dist/Table/TableHead.d.cts +2 -2
- package/dist/Table/TableHead.d.mts +2 -2
- package/dist/Table/TableHead.mjs +17 -15
- package/dist/Table/TablePagination.cjs +1 -1
- package/dist/Table/TablePagination.d.cts +2 -2
- package/dist/Table/TablePagination.d.mts +2 -2
- package/dist/Table/TablePaginationActions.cjs +2 -2
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +1 -1
- package/dist/Table/TableRow.cjs +1 -1
- package/dist/Table/TableRow.d.cts +2 -2
- package/dist/Table/TableRow.d.mts +2 -2
- package/dist/Table/TableSortLabel.cjs +8 -7
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +7 -6
- package/dist/Table/hooks.cjs +2 -1
- package/dist/Table/hooks.d.cts +1 -1
- package/dist/Table/hooks.d.mts +1 -1
- package/dist/Table/hooks.mjs +2 -1
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-DOhYeOFx.d.cts → TableContext-BoOxdk8p.d.cts} +1 -1
- package/dist/{TableContext-adilRIJZ.d.mts → TableContext-DV31j6HO.d.mts} +1 -1
- package/dist/TextInput.cjs +11 -10
- package/dist/TextInput.d.cts +2 -2
- package/dist/TextInput.d.mts +2 -2
- package/dist/TextInput.mjs +10 -9
- package/dist/ToggleButton/ToggleButton.cjs +2 -2
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.cjs +2 -2
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
- package/dist/Typography.cjs +2 -2
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +1 -1
- package/dist/View.cjs +1 -3
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +0 -2
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/{index-DwjxjLcD.d.mts → index--mvTGo8F.d.cts} +3 -3
- package/dist/{index-CY0Czi9Z.d.cts → index-ATXjtAOY.d.mts} +2 -2
- package/dist/{index-BLnOsdgc.d.cts → index-B2hrssyF.d.mts} +2 -2
- package/dist/{index-C-UBdWKI.d.cts → index-B3FrhO2r.d.cts} +3 -3
- package/dist/{index-DCwLdUQH.d.mts → index-B7aaTHOe.d.cts} +2 -2
- package/dist/{index-BGzs2cKy.d.mts → index-BItZoGZ1.d.mts} +3 -3
- package/dist/{index-CLCtvcKA.d.mts → index-BJ8OC_Zh.d.cts} +2 -2
- package/dist/{index-D0x1ZMVG.d.mts → index-BL3jwIQU.d.mts} +5 -2
- package/dist/{index-D2H_6WLf.d.cts → index-BNP_iejT.d.cts} +3 -3
- package/dist/{index-DdFxl06Q.d.cts → index-BfpjEqqt.d.cts} +2 -2
- package/dist/{index-0J6U39Rl.d.mts → index-BoOs5h_b.d.mts} +1 -1
- package/dist/{index-ypEBcdCx.d.mts → index-BwUnDd9W.d.mts} +2 -2
- package/dist/{index-DGqakgRN.d.mts → index-C7j38wne.d.mts} +3 -3
- package/dist/{index-DN7IvJeV.d.cts → index-CA_X-mXg.d.cts} +5 -2
- package/dist/index-CO3Qq0I0.d.mts +49 -0
- package/dist/{index-DLiHZtDi.d.mts → index-CYTaYcm3.d.cts} +3 -5
- package/dist/{index-DitJ7ss0.d.mts → index-Ca0Pj5m2.d.mts} +3 -3
- package/dist/{index-BF2KXGBM.d.mts → index-CvaEVk-f.d.cts} +2 -2
- package/dist/{index-BnCp6k4s.d.cts → index-D8U2tk1L.d.mts} +2 -2
- package/dist/{index-B66h9kbP.d.mts → index-D8b5OCLe.d.mts} +1 -1
- package/dist/{index-DhcmRr8Q.d.cts → index-DEv2QslH.d.mts} +4 -7
- package/dist/{index-C1vVYigQ.d.cts → index-DF3Hweir.d.mts} +3 -3
- package/dist/{index-BVX_Jq2G.d.cts → index-DLJ-li1B.d.cts} +1 -1
- package/dist/{index-CYNgNatZ.d.mts → index-DjtGkwRM.d.cts} +2 -4
- package/dist/{index-BpLv6Y8m.d.mts → index-Ds__py2h.d.mts} +2 -2
- package/dist/{index-HnvGdPCp.d.cts → index-KZUd8B5E.d.mts} +3 -5
- package/dist/{index-CJQXZ4hq.d.cts → index-MsUtFRul.d.cts} +1 -1
- package/dist/index-dtLxevvf.d.cts +49 -0
- package/dist/{index-B8FOqBiS.d.cts → index-q6EgsH9R.d.mts} +2 -4
- package/dist/{index-BahGB82c.d.cts → index-v99yMdts.d.cts} +3 -3
- package/dist/{index-BGWm4HKR.d.cts → index-yr4HkKOj.d.cts} +2 -2
- package/dist/{index-BJcHQUga.d.mts → index-zFYi0f1t.d.cts} +4 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/{rolldown-runtime-DDXJien1.cjs → rolldown-runtime-BloeesfJ.cjs} +1 -1
- package/dist/{src-C8PIppTy.cjs → src-BJrcLd7P.cjs} +1 -1
- package/dist/style.cjs +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.mts +2 -2
- package/dist/style.mjs +1 -1
- package/dist/{theme-Du6xgPsg.cjs → theme-CleLAV6A.cjs} +2 -1
- package/dist/{theme-V6lYzd3j.mjs → theme-Cudynq5K.mjs} +2 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +1 -1
- package/dist/{themes-BTGww2YK.d.cts → themes-CUV79qWU.d.cts} +16 -1
- package/dist/{themes-BTGww2YK.d.mts → themes-CUV79qWU.d.mts} +16 -1
- package/dist/{useTablePagination-D6T-fQFc.d.mts → useTablePagination-7jiSvKCh.d.cts} +1 -1
- package/dist/{useTablePagination-_94Wrvj9.d.cts → useTablePagination-HaIcJPv-.d.mts} +1 -1
- package/package.json +37 -17
package/dist/Quote.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { s as ViewProps } from "./index-
|
|
1
|
+
import { h as Theme } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import "./index-D8b5OCLe.mjs";
|
|
3
|
+
import { s as ViewProps } from "./index-q6EgsH9R.mjs";
|
|
4
4
|
//#region src/Quote/Quote.d.ts
|
|
5
5
|
type QuoteProps = ViewProps;
|
|
6
6
|
/** A View with a 2px primary left-border — used for terminal readouts and markdown blockquotes. */
|
|
7
7
|
declare const Quote: import("@emotion/styled").StyledComponent<Pick<{
|
|
8
8
|
theme?: Theme;
|
|
9
9
|
as?: React.ElementType;
|
|
10
|
-
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, "p" | "slot" | "style" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "aspectRatio" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "cursor" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "height" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textAlignLast" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textDecorationThickness" | "textTransform" | "top" | "verticalAlign" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "margin" | "overflow" | "padding" | "textDecoration" | "borderX" | "borderY" | "theme" | "as" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "size"> & {
|
|
10
|
+
} & ViewProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, "p" | "slot" | "style" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "aspectRatio" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "columnGap" | "cursor" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "height" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textAlignLast" | "textDecorationColor" | "textDecorationLine" | "textDecorationStyle" | "textDecorationThickness" | "textOverflow" | "textTransform" | "top" | "verticalAlign" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "gap" | "margin" | "overflow" | "padding" | "textDecoration" | "borderX" | "borderY" | "theme" | "as" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "size"> & {
|
|
11
11
|
theme?: Theme;
|
|
12
12
|
}, {}, {}>;
|
|
13
13
|
//#endregion
|
package/dist/Radio.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-BJrcLd7P.cjs");
|
|
3
3
|
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
4
|
const require_FormControl = require("./FormControl.cjs");
|
|
5
5
|
require("react");
|
package/dist/Radio.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as index_d_exports } from "./index-
|
|
2
|
-
import { d as PaletteColor,
|
|
1
|
+
import { r as index_d_exports } from "./index-DLJ-li1B.cjs";
|
|
2
|
+
import { d as PaletteColor, h as Theme } from "./themes-CUV79qWU.cjs";
|
|
3
3
|
import { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
4
4
|
//#region src/Radio/Radio.d.ts
|
|
5
5
|
type RadioColor = PaletteColor;
|
package/dist/Radio.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as PaletteColor,
|
|
2
|
-
import { r as index_d_exports } from "./index-
|
|
1
|
+
import { d as PaletteColor, h as Theme } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import { r as index_d_exports } from "./index-D8b5OCLe.mjs";
|
|
3
3
|
import { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
4
4
|
//#region src/Radio/Radio.d.ts
|
|
5
5
|
type RadioColor = PaletteColor;
|
package/dist/Select.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-BJrcLd7P.cjs");
|
|
3
3
|
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
4
|
-
const require_theme = require("./theme-
|
|
5
|
-
const require_Icon = require("./Icon-
|
|
4
|
+
const require_theme = require("./theme-CleLAV6A.cjs");
|
|
5
|
+
const require_Icon = require("./Icon-ByDvM-t1.cjs");
|
|
6
6
|
const require_FormControl = require("./FormControl.cjs");
|
|
7
7
|
const require_inputVariantStyles = require("./inputVariantStyles-BBkkYQtE.cjs");
|
|
8
8
|
const require_NativeSelect = require("./NativeSelect.cjs");
|
|
9
|
-
const require_Popover = require("./Popover-
|
|
9
|
+
const require_Popover = require("./Popover-BxN7ts_I.cjs");
|
|
10
10
|
let react = require("react");
|
|
11
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
12
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
@@ -174,15 +174,16 @@ const layoutStyles = ({ fullWidth, disabled }) => ({
|
|
|
174
174
|
cursor: "not-allowed"
|
|
175
175
|
} : {}
|
|
176
176
|
});
|
|
177
|
+
const widthStyles = (0, require_src.src_exports.system)({
|
|
178
|
+
width: true,
|
|
179
|
+
minWidth: true,
|
|
180
|
+
maxWidth: true
|
|
181
|
+
});
|
|
177
182
|
const Trigger = require_src.styled("div", {
|
|
178
183
|
name: "Select",
|
|
179
184
|
label: "Select",
|
|
180
185
|
shouldForwardProp,
|
|
181
|
-
systemProps: [require_src.src_exports.space,
|
|
182
|
-
width: true,
|
|
183
|
-
minWidth: true,
|
|
184
|
-
maxWidth: true
|
|
185
|
-
})]
|
|
186
|
+
systemProps: [require_src.src_exports.space, widthStyles]
|
|
186
187
|
})(baseStyle, require_inputVariantStyles.inputVariantStyles, borderRadiusStyle, colorBorder, activeBorder, backgroundStyle, sizeVariants, layoutStyles);
|
|
187
188
|
const ValueArea = require_src.styled("span", {
|
|
188
189
|
name: "Select",
|
|
@@ -251,33 +252,36 @@ function Select({ children, native = false, multiple = false, autoWidth = false,
|
|
|
251
252
|
const [internalValue, setInternalValue] = (0, react.useState)(defaultValue ?? (multiple ? [] : ""));
|
|
252
253
|
const rawValue = isControlledValue ? valueProp : internalValue;
|
|
253
254
|
const value = multiple ? Array.isArray(rawValue) ? rawValue : [] : Array.isArray(rawValue) ? "" : rawValue;
|
|
254
|
-
if (native)
|
|
255
|
-
|
|
255
|
+
if (native) {
|
|
256
|
+
const nativeOptions = options.map((option) => ({
|
|
256
257
|
value: option.value,
|
|
257
258
|
label: typeof option.label === "string" ? option.label : String(option.label)
|
|
258
|
-
}))
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
259
|
+
}));
|
|
260
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_NativeSelect.NativeSelect, {
|
|
261
|
+
options: nativeOptions,
|
|
262
|
+
value: Array.isArray(valueProp) ? void 0 : valueProp,
|
|
263
|
+
defaultValue: Array.isArray(defaultValue) ? void 0 : defaultValue,
|
|
264
|
+
onChange,
|
|
265
|
+
placeholder,
|
|
266
|
+
borderRadius,
|
|
267
|
+
color: colorProp,
|
|
268
|
+
textColor: textColorProp,
|
|
269
|
+
bg,
|
|
270
|
+
disabled: disabledProp,
|
|
271
|
+
error: errorProp,
|
|
272
|
+
fullWidth: fullWidthProp,
|
|
273
|
+
required: requiredProp,
|
|
274
|
+
size: sizeProp,
|
|
275
|
+
variant,
|
|
276
|
+
iconName,
|
|
277
|
+
iconProps,
|
|
278
|
+
id: idProp,
|
|
279
|
+
name,
|
|
280
|
+
className,
|
|
281
|
+
"data-testid": dataTestid,
|
|
282
|
+
...spaceProps
|
|
283
|
+
});
|
|
284
|
+
}
|
|
281
285
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NonNativeSelect, {
|
|
282
286
|
options,
|
|
283
287
|
value,
|
|
@@ -379,13 +383,10 @@ function NonNativeSelect({ children, options, value, autoWidth, onChangeValue, m
|
|
|
379
383
|
if (open) selectHighlighted();
|
|
380
384
|
else openWithHighlight();
|
|
381
385
|
break;
|
|
382
|
-
case "Escape":
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
387
|
-
break;
|
|
388
|
-
default: break;
|
|
386
|
+
case "Escape": if (open) {
|
|
387
|
+
event.preventDefault();
|
|
388
|
+
closeMenu();
|
|
389
|
+
}
|
|
389
390
|
}
|
|
390
391
|
};
|
|
391
392
|
const handleTriggerClick = () => {
|
package/dist/Select.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as index_d_exports } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { r as index_d_exports } from "./index-DLJ-li1B.cjs";
|
|
2
|
+
import { h as Theme } from "./themes-CUV79qWU.cjs";
|
|
3
|
+
import { n as IconProps, r as IconName } from "./index-CA_X-mXg.cjs";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
//#region src/Select/utils/isOptionSelected.d.ts
|
|
6
6
|
/** The union of value shapes `Select` holds: a single value, or an array in multiple mode. */
|
package/dist/Select.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as index_d_exports } from "./index-
|
|
3
|
-
import { n as IconProps, r as IconName } from "./index-
|
|
1
|
+
import { h as Theme } from "./themes-CUV79qWU.mjs";
|
|
2
|
+
import { r as index_d_exports } from "./index-D8b5OCLe.mjs";
|
|
3
|
+
import { n as IconProps, r as IconName } from "./index-BL3jwIQU.mjs";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
//#region src/Select/utils/isOptionSelected.d.ts
|
|
6
6
|
/** The union of value shapes `Select` holds: a single value, or an array in multiple mode. */
|
package/dist/Select.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
|
|
2
2
|
import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
|
|
3
|
-
import { r as useTheme } from "./theme-
|
|
4
|
-
import { t as Icon } from "./Icon-
|
|
3
|
+
import { r as useTheme } from "./theme-Cudynq5K.mjs";
|
|
4
|
+
import { t as Icon } from "./Icon-GgwNXKEY.mjs";
|
|
5
5
|
import { useFormControl } from "./FormControl.mjs";
|
|
6
6
|
import { t as inputVariantStyles } from "./inputVariantStyles-CcqpGfuP.mjs";
|
|
7
7
|
import { NativeSelect } from "./NativeSelect.mjs";
|
|
8
|
-
import { t as Popover } from "./Popover-
|
|
8
|
+
import { t as Popover } from "./Popover-BjGubpna.mjs";
|
|
9
9
|
import { Children, cloneElement, isValidElement, useCallback, useId, useState } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/Select/hooks/useSelectPopover.ts
|
|
@@ -172,15 +172,16 @@ const layoutStyles = ({ fullWidth, disabled }) => ({
|
|
|
172
172
|
cursor: "not-allowed"
|
|
173
173
|
} : {}
|
|
174
174
|
});
|
|
175
|
+
const widthStyles = (0, src_exports.system)({
|
|
176
|
+
width: true,
|
|
177
|
+
minWidth: true,
|
|
178
|
+
maxWidth: true
|
|
179
|
+
});
|
|
175
180
|
const Trigger = styled("div", {
|
|
176
181
|
name: "Select",
|
|
177
182
|
label: "Select",
|
|
178
183
|
shouldForwardProp,
|
|
179
|
-
systemProps: [src_exports.space,
|
|
180
|
-
width: true,
|
|
181
|
-
minWidth: true,
|
|
182
|
-
maxWidth: true
|
|
183
|
-
})]
|
|
184
|
+
systemProps: [src_exports.space, widthStyles]
|
|
184
185
|
})(baseStyle, inputVariantStyles, borderRadiusStyle, colorBorder, activeBorder, backgroundStyle, sizeVariants, layoutStyles);
|
|
185
186
|
const ValueArea = styled("span", {
|
|
186
187
|
name: "Select",
|
|
@@ -249,33 +250,36 @@ function Select({ children, native = false, multiple = false, autoWidth = false,
|
|
|
249
250
|
const [internalValue, setInternalValue] = useState(defaultValue ?? (multiple ? [] : ""));
|
|
250
251
|
const rawValue = isControlledValue ? valueProp : internalValue;
|
|
251
252
|
const value = multiple ? Array.isArray(rawValue) ? rawValue : [] : Array.isArray(rawValue) ? "" : rawValue;
|
|
252
|
-
if (native)
|
|
253
|
-
|
|
253
|
+
if (native) {
|
|
254
|
+
const nativeOptions = options.map((option) => ({
|
|
254
255
|
value: option.value,
|
|
255
256
|
label: typeof option.label === "string" ? option.label : String(option.label)
|
|
256
|
-
}))
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
257
|
+
}));
|
|
258
|
+
return /* @__PURE__ */ jsx(NativeSelect, {
|
|
259
|
+
options: nativeOptions,
|
|
260
|
+
value: Array.isArray(valueProp) ? void 0 : valueProp,
|
|
261
|
+
defaultValue: Array.isArray(defaultValue) ? void 0 : defaultValue,
|
|
262
|
+
onChange,
|
|
263
|
+
placeholder,
|
|
264
|
+
borderRadius,
|
|
265
|
+
color: colorProp,
|
|
266
|
+
textColor: textColorProp,
|
|
267
|
+
bg,
|
|
268
|
+
disabled: disabledProp,
|
|
269
|
+
error: errorProp,
|
|
270
|
+
fullWidth: fullWidthProp,
|
|
271
|
+
required: requiredProp,
|
|
272
|
+
size: sizeProp,
|
|
273
|
+
variant,
|
|
274
|
+
iconName,
|
|
275
|
+
iconProps,
|
|
276
|
+
id: idProp,
|
|
277
|
+
name,
|
|
278
|
+
className,
|
|
279
|
+
"data-testid": dataTestid,
|
|
280
|
+
...spaceProps
|
|
281
|
+
});
|
|
282
|
+
}
|
|
279
283
|
return /* @__PURE__ */ jsx(NonNativeSelect, {
|
|
280
284
|
options,
|
|
281
285
|
value,
|
|
@@ -377,13 +381,10 @@ function NonNativeSelect({ children, options, value, autoWidth, onChangeValue, m
|
|
|
377
381
|
if (open) selectHighlighted();
|
|
378
382
|
else openWithHighlight();
|
|
379
383
|
break;
|
|
380
|
-
case "Escape":
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
break;
|
|
386
|
-
default: break;
|
|
384
|
+
case "Escape": if (open) {
|
|
385
|
+
event.preventDefault();
|
|
386
|
+
closeMenu();
|
|
387
|
+
}
|
|
387
388
|
}
|
|
388
389
|
};
|
|
389
390
|
const handleTriggerClick = () => {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_src = require("../src-BJrcLd7P.cjs");
|
|
3
|
+
const require_Flex = require("../Flex.cjs");
|
|
4
|
+
const require_SidebarContext = require("../SidebarContext-jG6OioC-.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
//#region src/Sidebar/Sidebar/Sidebar.tsx
|
|
8
|
+
const SidebarRoot = require_src.styled(require_Flex.Flex, {
|
|
9
|
+
name: "Sidebar",
|
|
10
|
+
label: "Sidebar"
|
|
11
|
+
})({ minHeight: 0 });
|
|
12
|
+
const SidebarRail = require_src.styled(require_Flex.Flex, {
|
|
13
|
+
name: "Sidebar",
|
|
14
|
+
slot: "rail",
|
|
15
|
+
label: "SidebarRail",
|
|
16
|
+
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "expandedWidth" && prop !== "collapsedWidth"
|
|
17
|
+
})(({ isOpen, expandedWidth, collapsedWidth }) => ({
|
|
18
|
+
width: isOpen ? expandedWidth : collapsedWidth,
|
|
19
|
+
transition: "width 200ms ease",
|
|
20
|
+
overflowX: "hidden",
|
|
21
|
+
"@media (prefers-reduced-motion: reduce)": { transition: "none" }
|
|
22
|
+
}));
|
|
23
|
+
const SidebarPanelRoot = require_src.styled(require_Flex.Flex, {
|
|
24
|
+
name: "Sidebar",
|
|
25
|
+
slot: "panel",
|
|
26
|
+
label: "SidebarPanel"
|
|
27
|
+
})({
|
|
28
|
+
flexDirection: "column",
|
|
29
|
+
minHeight: 0,
|
|
30
|
+
overflow: "auto",
|
|
31
|
+
"&:empty": { display: "none" }
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
35
|
+
* it also shows each item's label, rendered away from the anchored edge.
|
|
36
|
+
* Purely controlled via `isOpen` — pair it with a menu button wherever your
|
|
37
|
+
* layout keeps one (usually the app bar). Children consume the state through
|
|
38
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, …) applies to the rail.
|
|
39
|
+
*
|
|
40
|
+
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
41
|
+
* `children` render there instead of inside its row — an icon rail beside a
|
|
42
|
+
* detail panel. The panel appears only when the selected item has children, and
|
|
43
|
+
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
44
|
+
* open panel.
|
|
45
|
+
*/
|
|
46
|
+
function Sidebar({ children, isOpen, anchor = "left", variant = "text", expandedWidth = "14rem", collapsedWidth = "3.5rem", hasPanel = false, panelWidth = "18rem", panelProps, "aria-label": ariaLabel, ...rest }) {
|
|
47
|
+
const panelId = (0, react.useId)();
|
|
48
|
+
const [panelNode, setPanelNode] = (0, react.useState)(null);
|
|
49
|
+
const [panelLabel, setPanelLabel] = (0, react.useState)(null);
|
|
50
|
+
const context = (0, react.useMemo)(() => ({
|
|
51
|
+
isOpen,
|
|
52
|
+
anchor,
|
|
53
|
+
variant,
|
|
54
|
+
hasPanel,
|
|
55
|
+
panelId,
|
|
56
|
+
panelNode,
|
|
57
|
+
setPanelLabel
|
|
58
|
+
}), [
|
|
59
|
+
isOpen,
|
|
60
|
+
anchor,
|
|
61
|
+
variant,
|
|
62
|
+
hasPanel,
|
|
63
|
+
panelId,
|
|
64
|
+
panelNode
|
|
65
|
+
]);
|
|
66
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SidebarRoot, {
|
|
67
|
+
as: "nav",
|
|
68
|
+
"aria-label": ariaLabel,
|
|
69
|
+
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
70
|
+
flexShrink: 0,
|
|
71
|
+
...rest,
|
|
72
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarRail, {
|
|
73
|
+
flexDirection: "column",
|
|
74
|
+
gap: 1,
|
|
75
|
+
flexShrink: 0,
|
|
76
|
+
isOpen,
|
|
77
|
+
expandedWidth,
|
|
78
|
+
collapsedWidth,
|
|
79
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SidebarContext.SidebarContext.Provider, {
|
|
80
|
+
value: context,
|
|
81
|
+
children
|
|
82
|
+
})
|
|
83
|
+
}), hasPanel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarPanelRoot, {
|
|
84
|
+
as: "section",
|
|
85
|
+
width: panelWidth,
|
|
86
|
+
"aria-label": panelLabel ?? void 0,
|
|
87
|
+
...panelProps,
|
|
88
|
+
ref: setPanelNode,
|
|
89
|
+
id: panelId
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
exports.Sidebar = Sidebar;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { n as FlexProps } from "../index-zFYi0f1t.cjs";
|
|
2
|
+
import { i as SidebarItemVariant, t as SidebarAnchor } from "../SidebarContext-ao6lRfTX.cjs";
|
|
3
|
+
import { ElementType, ReactNode } from "react";
|
|
4
|
+
//#region src/Sidebar/Sidebar/Sidebar.d.ts
|
|
5
|
+
interface SidebarProps extends FlexProps {
|
|
6
|
+
/**
|
|
7
|
+
* Rail contents — `SidebarItem`s, but any node composes (a sponsor logo,
|
|
8
|
+
* a footer, dividers, …). Items read the open state from `SidebarContext`.
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether item labels are shown. Controlled — the toggle lives with the
|
|
13
|
+
* consumer (typically a menu button in the app bar).
|
|
14
|
+
*/
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
/** Screen edge the rail hugs — labels render away from it. Default: `'left'`. */
|
|
17
|
+
anchor?: SidebarAnchor;
|
|
18
|
+
/** Default variant for every item — an item's own `variant` wins. Default: `'text'`. */
|
|
19
|
+
variant?: SidebarItemVariant;
|
|
20
|
+
/** Rail width while open. Default: `'14rem'`. */
|
|
21
|
+
expandedWidth?: string;
|
|
22
|
+
/** Rail width while collapsed (icons only). Default: `'3.5rem'`. */
|
|
23
|
+
collapsedWidth?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Render a second column beside the rail holding the selected item's
|
|
26
|
+
* `children`. Off by default, where children render inline in the item row
|
|
27
|
+
* instead. Default: `false`.
|
|
28
|
+
*/
|
|
29
|
+
hasPanel?: boolean;
|
|
30
|
+
/** Width of the panel column. Only meaningful with `hasPanel`. Default: `'18rem'`. */
|
|
31
|
+
panelWidth?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Props for the panel column — any `Flex` prop, plus `as` to change its
|
|
34
|
+
* element. Overrides `panelWidth` and the derived `aria-label`; its `id` and
|
|
35
|
+
* ref stay owned by the rail, which needs them as the port target and the
|
|
36
|
+
* `aria-controls` anchor.
|
|
37
|
+
*/
|
|
38
|
+
panelProps?: Omit<FlexProps, 'children' | 'id'> & {
|
|
39
|
+
as?: ElementType;
|
|
40
|
+
};
|
|
41
|
+
/** Accessible name of the navigation landmark — required so multiple navs stay distinguishable. */
|
|
42
|
+
'aria-label': string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
46
|
+
* it also shows each item's label, rendered away from the anchored edge.
|
|
47
|
+
* Purely controlled via `isOpen` — pair it with a menu button wherever your
|
|
48
|
+
* layout keeps one (usually the app bar). Children consume the state through
|
|
49
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, …) applies to the rail.
|
|
50
|
+
*
|
|
51
|
+
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
52
|
+
* `children` render there instead of inside its row — an icon rail beside a
|
|
53
|
+
* detail panel. The panel appears only when the selected item has children, and
|
|
54
|
+
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
55
|
+
* open panel.
|
|
56
|
+
*/
|
|
57
|
+
declare function Sidebar({ children, isOpen, anchor, variant, expandedWidth, collapsedWidth, hasPanel, panelWidth, panelProps, 'aria-label': ariaLabel, ...rest }: Readonly<SidebarProps>): import("react").JSX.Element;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Sidebar, SidebarProps };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { n as FlexProps } from "../index-DEv2QslH.mjs";
|
|
2
|
+
import { i as SidebarItemVariant, t as SidebarAnchor } from "../SidebarContext-ao6lRfTX.mjs";
|
|
3
|
+
import { ElementType, ReactNode } from "react";
|
|
4
|
+
//#region src/Sidebar/Sidebar/Sidebar.d.ts
|
|
5
|
+
interface SidebarProps extends FlexProps {
|
|
6
|
+
/**
|
|
7
|
+
* Rail contents — `SidebarItem`s, but any node composes (a sponsor logo,
|
|
8
|
+
* a footer, dividers, …). Items read the open state from `SidebarContext`.
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether item labels are shown. Controlled — the toggle lives with the
|
|
13
|
+
* consumer (typically a menu button in the app bar).
|
|
14
|
+
*/
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
/** Screen edge the rail hugs — labels render away from it. Default: `'left'`. */
|
|
17
|
+
anchor?: SidebarAnchor;
|
|
18
|
+
/** Default variant for every item — an item's own `variant` wins. Default: `'text'`. */
|
|
19
|
+
variant?: SidebarItemVariant;
|
|
20
|
+
/** Rail width while open. Default: `'14rem'`. */
|
|
21
|
+
expandedWidth?: string;
|
|
22
|
+
/** Rail width while collapsed (icons only). Default: `'3.5rem'`. */
|
|
23
|
+
collapsedWidth?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Render a second column beside the rail holding the selected item's
|
|
26
|
+
* `children`. Off by default, where children render inline in the item row
|
|
27
|
+
* instead. Default: `false`.
|
|
28
|
+
*/
|
|
29
|
+
hasPanel?: boolean;
|
|
30
|
+
/** Width of the panel column. Only meaningful with `hasPanel`. Default: `'18rem'`. */
|
|
31
|
+
panelWidth?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Props for the panel column — any `Flex` prop, plus `as` to change its
|
|
34
|
+
* element. Overrides `panelWidth` and the derived `aria-label`; its `id` and
|
|
35
|
+
* ref stay owned by the rail, which needs them as the port target and the
|
|
36
|
+
* `aria-controls` anchor.
|
|
37
|
+
*/
|
|
38
|
+
panelProps?: Omit<FlexProps, 'children' | 'id'> & {
|
|
39
|
+
as?: ElementType;
|
|
40
|
+
};
|
|
41
|
+
/** Accessible name of the navigation landmark — required so multiple navs stay distinguishable. */
|
|
42
|
+
'aria-label': string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
46
|
+
* it also shows each item's label, rendered away from the anchored edge.
|
|
47
|
+
* Purely controlled via `isOpen` — pair it with a menu button wherever your
|
|
48
|
+
* layout keeps one (usually the app bar). Children consume the state through
|
|
49
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, …) applies to the rail.
|
|
50
|
+
*
|
|
51
|
+
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
52
|
+
* `children` render there instead of inside its row — an icon rail beside a
|
|
53
|
+
* detail panel. The panel appears only when the selected item has children, and
|
|
54
|
+
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
55
|
+
* open panel.
|
|
56
|
+
*/
|
|
57
|
+
declare function Sidebar({ children, isOpen, anchor, variant, expandedWidth, collapsedWidth, hasPanel, panelWidth, panelProps, 'aria-label': ariaLabel, ...rest }: Readonly<SidebarProps>): import("react").JSX.Element;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Sidebar, SidebarProps };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { o as styled } from "../src-BJy4dM4f.mjs";
|
|
2
|
+
import { Flex } from "../Flex.mjs";
|
|
3
|
+
import { t as SidebarContext } from "../SidebarContext-DgSLwjur.mjs";
|
|
4
|
+
import { useId, useMemo, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/Sidebar/Sidebar/Sidebar.tsx
|
|
7
|
+
const SidebarRoot = styled(Flex, {
|
|
8
|
+
name: "Sidebar",
|
|
9
|
+
label: "Sidebar"
|
|
10
|
+
})({ minHeight: 0 });
|
|
11
|
+
const SidebarRail = styled(Flex, {
|
|
12
|
+
name: "Sidebar",
|
|
13
|
+
slot: "rail",
|
|
14
|
+
label: "SidebarRail",
|
|
15
|
+
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "expandedWidth" && prop !== "collapsedWidth"
|
|
16
|
+
})(({ isOpen, expandedWidth, collapsedWidth }) => ({
|
|
17
|
+
width: isOpen ? expandedWidth : collapsedWidth,
|
|
18
|
+
transition: "width 200ms ease",
|
|
19
|
+
overflowX: "hidden",
|
|
20
|
+
"@media (prefers-reduced-motion: reduce)": { transition: "none" }
|
|
21
|
+
}));
|
|
22
|
+
const SidebarPanelRoot = styled(Flex, {
|
|
23
|
+
name: "Sidebar",
|
|
24
|
+
slot: "panel",
|
|
25
|
+
label: "SidebarPanel"
|
|
26
|
+
})({
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
minHeight: 0,
|
|
29
|
+
overflow: "auto",
|
|
30
|
+
"&:empty": { display: "none" }
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* A collapsible vertical icon rail: collapsed it shows icon-only items; open
|
|
34
|
+
* it also shows each item's label, rendered away from the anchored edge.
|
|
35
|
+
* Purely controlled via `isOpen` — pair it with a menu button wherever your
|
|
36
|
+
* layout keeps one (usually the app bar). Children consume the state through
|
|
37
|
+
* `SidebarContext`, and any `Flex` prop (`bg`, spacing, …) applies to the rail.
|
|
38
|
+
*
|
|
39
|
+
* With `hasPanel`, the rail gains a second column and the selected item's
|
|
40
|
+
* `children` render there instead of inside its row — an icon rail beside a
|
|
41
|
+
* detail panel. The panel appears only when the selected item has children, and
|
|
42
|
+
* is independent of `isOpen`, so a collapsed icons-only rail can sit beside an
|
|
43
|
+
* open panel.
|
|
44
|
+
*/
|
|
45
|
+
function Sidebar({ children, isOpen, anchor = "left", variant = "text", expandedWidth = "14rem", collapsedWidth = "3.5rem", hasPanel = false, panelWidth = "18rem", panelProps, "aria-label": ariaLabel, ...rest }) {
|
|
46
|
+
const panelId = useId();
|
|
47
|
+
const [panelNode, setPanelNode] = useState(null);
|
|
48
|
+
const [panelLabel, setPanelLabel] = useState(null);
|
|
49
|
+
const context = useMemo(() => ({
|
|
50
|
+
isOpen,
|
|
51
|
+
anchor,
|
|
52
|
+
variant,
|
|
53
|
+
hasPanel,
|
|
54
|
+
panelId,
|
|
55
|
+
panelNode,
|
|
56
|
+
setPanelLabel
|
|
57
|
+
}), [
|
|
58
|
+
isOpen,
|
|
59
|
+
anchor,
|
|
60
|
+
variant,
|
|
61
|
+
hasPanel,
|
|
62
|
+
panelId,
|
|
63
|
+
panelNode
|
|
64
|
+
]);
|
|
65
|
+
return /* @__PURE__ */ jsxs(SidebarRoot, {
|
|
66
|
+
as: "nav",
|
|
67
|
+
"aria-label": ariaLabel,
|
|
68
|
+
flexDirection: anchor === "right" ? "row-reverse" : "row",
|
|
69
|
+
flexShrink: 0,
|
|
70
|
+
...rest,
|
|
71
|
+
children: [/* @__PURE__ */ jsx(SidebarRail, {
|
|
72
|
+
flexDirection: "column",
|
|
73
|
+
gap: 1,
|
|
74
|
+
flexShrink: 0,
|
|
75
|
+
isOpen,
|
|
76
|
+
expandedWidth,
|
|
77
|
+
collapsedWidth,
|
|
78
|
+
children: /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
79
|
+
value: context,
|
|
80
|
+
children
|
|
81
|
+
})
|
|
82
|
+
}), hasPanel && /* @__PURE__ */ jsx(SidebarPanelRoot, {
|
|
83
|
+
as: "section",
|
|
84
|
+
width: panelWidth,
|
|
85
|
+
"aria-label": panelLabel ?? void 0,
|
|
86
|
+
...panelProps,
|
|
87
|
+
ref: setPanelNode,
|
|
88
|
+
id: panelId
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Sidebar };
|