@sanity/ui 4.2.0 → 5.0.0-alpha.10
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 +194 -28
- package/bin/sanity-ui.js +14 -0
- package/dist/_chunks-es/LazyRefractor.js +20 -0
- package/dist/_chunks-es/LazyRefractor.js.map +1 -0
- package/dist/cli/checks.js +148 -0
- package/dist/cli/config.js +23 -0
- package/dist/cli/detect.js +181 -0
- package/dist/cli/doctor.js +49 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/init.js +189 -0
- package/dist/cli/install.js +79 -0
- package/dist/cli/log.js +66 -0
- package/dist/cli/selfPackage.js +11 -0
- package/dist/cli/styles.js +185 -0
- package/dist/cli/test-utils.js +8 -0
- package/dist/cli/tsconfig.js +236 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/versions.js +45 -0
- package/dist/index.d.ts +1203 -1469
- package/dist/index.js +2123 -1989
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -547
- package/package.json +57 -58
- package/src/cli/checks.test.ts +38 -0
- package/src/cli/checks.ts +200 -0
- package/src/cli/config.ts +44 -0
- package/src/cli/detect.test.ts +191 -0
- package/src/cli/detect.ts +205 -0
- package/src/cli/doctor.test.ts +52 -0
- package/src/cli/doctor.ts +65 -0
- package/src/cli/index.ts +77 -0
- package/src/cli/init.ts +225 -0
- package/src/cli/install.test.ts +52 -0
- package/src/cli/install.ts +108 -0
- package/src/cli/log.ts +79 -0
- package/src/cli/selfPackage.ts +14 -0
- package/src/cli/styles.test.ts +130 -0
- package/src/cli/styles.ts +205 -0
- package/src/cli/test-utils.ts +10 -0
- package/src/cli/tsconfig.test.ts +174 -0
- package/src/cli/tsconfig.ts +282 -0
- package/src/cli/types.ts +77 -0
- package/src/cli/versions.test.ts +35 -0
- package/src/cli/versions.ts +41 -0
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/Box.tsx +30 -0
- package/src/components/box/box.css +4 -0
- package/src/components/box/box.props.ts +29 -0
- package/src/components/button/Button.tsx +78 -0
- package/src/components/button/button.css +72 -0
- package/src/components/button/button.props.ts +122 -0
- package/src/components/card/Card.tsx +31 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.props.ts +58 -0
- package/src/components/checkbox/Checkbox.tsx +64 -0
- package/src/components/checkbox/checkbox.css +100 -0
- package/src/components/checkbox/checkbox.props.ts +33 -0
- package/src/components/code/Code.tsx +38 -0
- package/src/components/code/LazyRefractor.tsx +9 -0
- package/src/components/code/code.css +40 -0
- package/src/components/code/code.props.ts +44 -0
- package/src/components/container/Container.tsx +30 -0
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +28 -0
- package/src/components/dialog/Dialog.tsx +139 -0
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +45 -0
- package/src/components/divider/Divider.tsx +23 -0
- package/src/components/divider/divider.props.ts +9 -0
- package/src/components/eyebrow/Eyebrow.tsx +54 -0
- package/src/components/eyebrow/eyebrow.css +11 -0
- package/src/components/eyebrow/eyebrow.props.ts +28 -0
- package/src/components/flex/Flex.tsx +30 -0
- package/src/components/flex/flex.css +4 -0
- package/src/components/flex/flex.props.ts +33 -0
- package/src/components/grid/Grid.tsx +30 -0
- package/src/components/grid/grid.css +4 -0
- package/src/components/grid/grid.props.ts +33 -0
- package/src/components/h-stack/HStack.tsx +34 -0
- package/src/components/h-stack/hStack.props.ts +17 -0
- package/src/components/heading/Heading.tsx +54 -0
- package/src/components/heading/heading.css +9 -0
- package/src/components/heading/heading.props.ts +31 -0
- package/src/components/icon/Icon.tsx +24 -0
- package/src/components/icon/icon.css +17 -0
- package/src/components/icon/icon.props.ts +35 -0
- package/src/components/icon-button/IconButton.tsx +32 -0
- package/src/components/icon-button/iconButton.props.ts +31 -0
- package/src/components/index.css +28 -0
- package/src/components/indicator/Indicator.tsx +42 -0
- package/src/components/indicator/indicator.css +4 -0
- package/src/components/indicator/indicator.props.ts +24 -0
- package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
- package/src/components/indicator-stack/indicator-stack.css +7 -0
- package/src/components/indicator-stack/indicatorStack.props.ts +15 -0
- package/src/components/inline/Inline.tsx +38 -0
- package/src/components/inline/inline.css +4 -0
- package/src/components/inline/inline.props.ts +100 -0
- package/src/components/label/Label.tsx +34 -0
- package/src/components/label/label.css +3 -0
- package/src/components/label/label.props.ts +25 -0
- package/src/components/link/Link.tsx +29 -0
- package/src/components/link/link.css +12 -0
- package/src/components/link/link.props.ts +23 -0
- package/src/components/list/List.tsx +167 -0
- package/src/components/list/list.css +25 -0
- package/src/components/list/list.props.ts +130 -0
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +38 -0
- package/src/components/press-area/PressArea.tsx +29 -0
- package/src/components/press-area/press-area.css +22 -0
- package/src/components/press-area/pressArea.props.ts +16 -0
- package/src/components/radio/Radio.tsx +48 -0
- package/src/components/radio/radio.css +97 -0
- package/src/components/radio/radio.props.ts +25 -0
- package/src/components/skip-to-content/SkipToContent.tsx +35 -0
- package/src/components/skip-to-content/skip-to-content.css +9 -0
- package/src/components/skip-to-content/skipToContent.props.ts +25 -0
- package/src/components/spinner/Spinner.tsx +28 -0
- package/src/components/spinner/spinner.css +10 -0
- package/src/components/spinner/spinner.props.ts +19 -0
- package/src/components/switch/Switch.tsx +48 -0
- package/src/components/switch/switch.css +119 -0
- package/src/components/switch/switch.props.ts +25 -0
- package/src/components/text/Text.tsx +53 -0
- package/src/components/text/text.css +9 -0
- package/src/components/text/text.props.ts +28 -0
- package/src/components/tooltip/Tooltip.tsx +97 -0
- package/src/components/tooltip/tooltip.css +31 -0
- package/src/components/tooltip/tooltip.props.ts +36 -0
- package/src/components/tooltip-group/TooltipGroup.tsx +64 -0
- package/src/components/tooltip-group/tooltipGroup.props.ts +15 -0
- package/src/components/v-stack/VStack.tsx +32 -0
- package/src/components/v-stack/vStack.props.ts +17 -0
- package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
- package/src/components/visually-hidden/visually-hidden.css +9 -0
- package/src/components/visually-hidden/visuallyHidden.props.ts +23 -0
- package/src/css/classes/dynamic/flex-child.css +5 -0
- package/src/css/classes/dynamic/grid-child.css +8 -0
- package/src/css/classes/dynamic/grid-parent.css +6 -0
- package/src/css/classes/dynamic/height.css +5 -0
- package/src/css/classes/dynamic/index.css +7 -0
- package/src/css/classes/dynamic/line-clamp.css +5 -0
- package/src/css/classes/dynamic/readme.md +3 -0
- package/src/css/classes/dynamic/width.css +7 -0
- package/src/css/classes/dynamic/z-index.css +3 -0
- package/src/css/classes/generic/display.css +10 -0
- package/src/css/classes/generic/flex.css +24 -0
- package/src/css/classes/generic/grid.css +7 -0
- package/src/css/classes/generic/index.css +7 -0
- package/src/css/classes/generic/overflow.css +19 -0
- package/src/css/classes/generic/placement.css +202 -0
- package/src/css/classes/generic/position.css +7 -0
- package/src/css/classes/generic/readme.md +3 -0
- package/src/css/classes/generic/text-align.css +5 -0
- package/src/css/classes/index.css +4 -0
- package/src/css/classes/local/animation.css +4 -0
- package/src/css/classes/local/border.css +20 -0
- package/src/css/classes/local/index.css +6 -0
- package/src/css/classes/local/readme.md +3 -0
- package/src/css/classes/local/text-overflow.css +5 -0
- package/src/css/classes/local/text-trim.css +45 -0
- package/src/css/classes/local/tone.css +75 -0
- package/src/css/classes/local/top-anchor.css +4 -0
- package/src/css/classes/system/color.css +223 -0
- package/src/css/classes/system/container.css +8 -0
- package/src/css/classes/system/font-family.css +2 -0
- package/src/css/classes/system/font-weight.css +4 -0
- package/src/css/classes/system/gap.css +37 -0
- package/src/css/classes/system/index.css +10 -0
- package/src/css/classes/system/inset.css +56 -0
- package/src/css/classes/system/margin.css +148 -0
- package/src/css/classes/system/padding.css +78 -0
- package/src/css/classes/system/radius.css +10 -0
- package/src/css/classes/system/readme.md +3 -0
- package/src/css/classes/system/shadow.css +6 -0
- package/src/css/classes/system/typography.css +31 -0
- package/src/css/global/font-face.css +20 -0
- package/src/css/global/index.css +2 -0
- package/src/css/global/reset.css +76 -0
- package/src/css/tokens/index.css +3 -0
- package/src/css/tokens/opacity.css +6 -0
- package/src/css/tokens/semantic.css +25 -0
- package/src/css/tokens/surface.css +27 -0
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.css +18 -0
- package/src/index.ts +65 -0
- package/src/polyfills.ts +15 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +47 -0
- package/src/props/gap.ts +31 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +45 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +44 -0
- package/src/props/margin.ts +59 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +59 -0
- package/src/props/placement.ts +16 -0
- package/src/props/position.ts +52 -0
- package/src/props/shadow.ts +15 -0
- package/src/props/tone.ts +15 -0
- package/src/props/typography.ts +62 -0
- package/src/props/width.ts +29 -0
- package/src/props/zIndex.ts +15 -0
- package/src/styles.css.d.ts +1 -0
- package/src/styles.css.node.js +2 -0
- package/src/styles.css.test.ts +24 -0
- package/src/types/Button.ts +8 -0
- package/src/types/Code.ts +6 -0
- package/src/types/Container.ts +3 -0
- package/src/types/Density.ts +3 -0
- package/src/types/Display.ts +11 -0
- package/src/types/Eyebrow.ts +3 -0
- package/src/types/Flex.ts +22 -0
- package/src/types/FontWeight.ts +3 -0
- package/src/types/Grid.ts +3 -0
- package/src/types/Heading.ts +6 -0
- package/src/types/Icon.ts +3 -0
- package/src/types/Interactive.ts +8 -0
- package/src/types/List.ts +2 -0
- package/src/types/Overflow.ts +3 -0
- package/src/types/Placement.ts +16 -0
- package/src/types/Position.ts +3 -0
- package/src/types/PropDef.ts +73 -0
- package/src/types/Radius.ts +3 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Shadow.ts +3 -0
- package/src/types/Space.ts +15 -0
- package/src/types/Text.ts +3 -0
- package/src/types/TextAlign.ts +3 -0
- package/src/types/Tone.ts +3 -0
- package/src/utils/getProps.test.ts +156 -0
- package/src/utils/getProps.ts +156 -0
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/utils/suffixClassName.ts +5 -0
- package/src/version.ts +3 -0
- package/LICENSE +0 -21
- package/dist/_system-CTe2lb5l.d.ts +0 -40
- package/dist/_system-CTe2lb5l.d.ts.map +0 -1
- package/dist/arrow-BmX6qbAS.js +0 -170
- package/dist/arrow-BmX6qbAS.js.map +0 -1
- package/dist/autocomplete.d.ts +0 -140
- package/dist/autocomplete.d.ts.map +0 -1
- package/dist/autocomplete.js +0 -470
- package/dist/autocomplete.js.map +0 -1
- package/dist/breadcrumbs.d.ts +0 -18
- package/dist/breadcrumbs.d.ts.map +0 -1
- package/dist/breadcrumbs.js +0 -119
- package/dist/breadcrumbs.js.map +0 -1
- package/dist/button-BNyKSDyA.js +0 -180
- package/dist/button-BNyKSDyA.js.map +0 -1
- package/dist/button-dnqMFkWg.d.ts +0 -76
- package/dist/button-dnqMFkWg.d.ts.map +0 -1
- package/dist/card-C0a0wQTc.d.ts +0 -7
- package/dist/card-C0a0wQTc.d.ts.map +0 -1
- package/dist/code.d.ts +0 -20
- package/dist/code.d.ts.map +0 -1
- package/dist/code.js +0 -90
- package/dist/code.js.map +0 -1
- package/dist/codeFontStyle-84SMhFtI.js +0 -11
- package/dist/codeFontStyle-84SMhFtI.js.map +0 -1
- package/dist/component-DVlwaWB-.d.ts +0 -25
- package/dist/component-DVlwaWB-.d.ts.map +0 -1
- package/dist/element-BYgCE_iK.js +0 -51
- package/dist/element-BYgCE_iK.js.map +0 -1
- package/dist/factory-BzXTX8_Q.js +0 -3056
- package/dist/factory-BzXTX8_Q.js.map +0 -1
- package/dist/flex-DmbDG2ks.js +0 -76
- package/dist/flex-DmbDG2ks.js.map +0 -1
- package/dist/font-EtfxKPUz.d.ts +0 -49
- package/dist/font-EtfxKPUz.d.ts.map +0 -1
- package/dist/getElementRef-Jw7gY0eV.js +0 -102
- package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
- package/dist/getScopedTheme-C-sZsyAz.js +0 -267
- package/dist/getScopedTheme-C-sZsyAz.js.map +0 -1
- package/dist/getTheme_v2-y09KqtEb.js +0 -487
- package/dist/getTheme_v2-y09KqtEb.js.map +0 -1
- package/dist/grid-6JSgMj1O.js +0 -115
- package/dist/grid-6JSgMj1O.js.map +0 -1
- package/dist/helpers-C8xxXAQC.js +0 -63
- package/dist/helpers-C8xxXAQC.js.map +0 -1
- package/dist/hotkeys-CaHsQlsO.js +0 -168
- package/dist/hotkeys-CaHsQlsO.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/layer-Bl5R3uNR.js +0 -61
- package/dist/layer-Bl5R3uNR.js.map +0 -1
- package/dist/layer-ChlP9Ik6.d.ts +0 -242
- package/dist/layer-ChlP9Ik6.d.ts.map +0 -1
- package/dist/menu.d.ts +0 -146
- package/dist/menu.d.ts.map +0 -1
- package/dist/menu.js +0 -626
- package/dist/menu.js.map +0 -1
- package/dist/popover-B7-28L8y.js +0 -408
- package/dist/popover-B7-28L8y.js.map +0 -1
- package/dist/popover-CMlQeKn0.d.ts +0 -96
- package/dist/popover-CMlQeKn0.d.ts.map +0 -1
- package/dist/popover.d.ts +0 -2
- package/dist/popover.js +0 -3
- package/dist/refractor-CC48DwHi.js +0 -20
- package/dist/refractor-CC48DwHi.js.map +0 -1
- package/dist/responsiveFont-CilwaORG.js +0 -55
- package/dist/responsiveFont-CilwaORG.js.map +0 -1
- package/dist/rgba-BSYaEUW6.d.ts +0 -846
- package/dist/rgba-BSYaEUW6.d.ts.map +0 -1
- package/dist/selectable-B0GUIL74.d.ts +0 -7
- package/dist/selectable-B0GUIL74.d.ts.map +0 -1
- package/dist/stack-rsNFPq2-.js +0 -112
- package/dist/stack-rsNFPq2-.js.map +0 -1
- package/dist/styles-css.d.ts +0 -2
- package/dist/styles-css.js +0 -4
- package/dist/textInput-pSfQjkmx.js +0 -313
- package/dist/textInput-pSfQjkmx.js.map +0 -1
- package/dist/theme.d.ts +0 -280
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -55
- package/dist/theme.js.map +0 -1
- package/dist/toast.d.ts +0 -73
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -302
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.d.ts +0 -88
- package/dist/tooltip.d.ts.map +0 -1
- package/dist/tooltip.js +0 -435
- package/dist/tooltip.js.map +0 -1
- package/dist/useClickOutsideEvent-wGLGWBZN.js +0 -36
- package/dist/useClickOutsideEvent-wGLGWBZN.js.map +0 -1
- package/dist/useElementSize-BJvbGHq8.js +0 -51
- package/dist/useElementSize-BJvbGHq8.js.map +0 -1
- package/dist/useLayer-D1usxIE0.js +0 -712
- package/dist/useLayer-D1usxIE0.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgba-BSYaEUW6.d.ts","names":[],"sources":["../src/theme/build/lib/color-fns/types.ts","../src/theme/system/color/syntax.ts","../src/theme/system/layer.ts","../src/theme/system/shadow.ts","../src/theme/system/css.ts","../src/theme/system/styles.ts","../src/theme/system/focusRing.ts","../src/theme/system/avatar.ts","../src/theme/system/color/avatar.ts","../src/theme/system/color/badge.ts","../src/theme/system/color/kbd.ts","../src/theme/system/color/state.ts","../src/theme/system/color/button.ts","../src/theme/system/color/input.ts","../src/theme/system/color/selectable.ts","../src/theme/system/color/shadow.ts","../src/theme/system/color/color.ts","../src/theme/system/input.ts","../src/theme/system/v0/avatar.ts","../src/theme/system/v0/color/_generic.ts","../src/theme/system/v0/color/_system.ts","../src/theme/system/v0/color/base.ts","../src/theme/system/v0/color/button.ts","../src/theme/system/v0/color/card.ts","../src/theme/system/v0/color/input.ts","../src/theme/system/v0/color/muted.ts","../src/theme/system/v0/color/selectable.ts","../src/theme/system/v0/color/solid.ts","../src/theme/system/v0/color/spot.ts","../src/theme/system/v0/color/color.ts","../src/theme/system/v0/input.ts","../src/theme/system/theme.ts","../src/theme/build/_deprecated/color/factory.ts","../src/theme/build/lib/color-fns/blend/multiply.ts","../src/theme/build/lib/color-fns/blend/screen.ts","../src/theme/build/lib/color-fns/convert.ts","../src/theme/build/lib/color-fns/parse.ts","../src/theme/build/lib/color-fns/rgba.ts"],"mappings":";;;;;;UAGiB;EACf;EACA;EACA;EACA;;;;;UAMe;EACf;EACA;EACA;EACA;;;;;UAMe;EACf;EACA;EACA;;;;;UCvBe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;UCpCe;EACf;IAAS;;EACT;IAAU;;EACV;IAAU;;;;;;KCHA;;;;UAWK;EACf,OAAO;EACP,UAAU;EACV,SAAS;;;;;;;;;;;UCNM,kBAAkB,IAAI;GACpC,cAAc;;;;;UCPA;EACf;IACE,OAAO;;EAET;IACE,OAAO;;;;;;UCPM;EACf;EACA;;;;;UCAe;EACf;;IAEE;;IAEA;;EAEF,WAAW;;;;;UCPI;EACf,SAAS;EACT;EACA;;;;;KAMU,sBAAsB,OAAO,0BAA0B;;;;UCTlD;EACf;EACA;EACA;EACA;;;;;KAMU,qBAAqB,OAAO,wBAAwB;;;;UCZ/C;EACf;EACA;EACA;;;;;UCEe;;EAEf,SAAS;EACT;IACE;;;;;EAKF,QAAQ;;;;EAIR,OAAO;EACP;EACA;EACA;IACE;IACA;;EAEF;EACA;EACA,KAAK;EACL;IACE;;EAEF;IACE;IACA;;EAEF;IACE;IACA;;;;;;KClCQ,0BAA0B,OAAO,oBAAoB;;;;KAKrD,0BAA0B,OAAO,wBA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,iBAAiB"}
|
package/dist/stack-rsNFPq2-.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-C8xxXAQC.js";
|
|
2
|
-
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
3
|
-
import { y as Box } from "./useLayer-D1usxIE0.js";
|
|
4
|
-
import { t as responsiveFont } from "./responsiveFont-CilwaORG.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
|
-
import { css, styled } from "styled-components";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
/**
|
|
9
|
-
* Get responsive text align styles.
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
function responsiveTextAlignStyle(props) {
|
|
13
|
-
let { media } = getTheme_v2(props.theme);
|
|
14
|
-
return _responsive(media, props.$align, (textAlign) => ({ textAlign }));
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Get responsive CSS for the `text` font style.
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
function responsiveTextFont(props) {
|
|
21
|
-
return responsiveFont("text", props);
|
|
22
|
-
}
|
|
23
|
-
var spanWithTextOverflow = "elmvdc0";
|
|
24
|
-
/** @internal */
|
|
25
|
-
function SpanWithTextOverflow(props) {
|
|
26
|
-
let $ = c(2), t0;
|
|
27
|
-
return $[0] === props.children ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx("span", {
|
|
28
|
-
className: spanWithTextOverflow,
|
|
29
|
-
children: props.children
|
|
30
|
-
}), $[0] = props.children, $[1] = t0), t0;
|
|
31
|
-
}
|
|
32
|
-
function textBaseStyle(props) {
|
|
33
|
-
let { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
|
|
34
|
-
return css`color:var(--card-fg-color);${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;background-color:var(--card-code-bg-color);color:var(--card-code-fg-color);}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.text.weights.bold};}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;color:var(--card-icon-color);& path{vector-effect:non-scaling-stroke !important;}}`;
|
|
35
|
-
}
|
|
36
|
-
const StyledText = /* @__PURE__ */ styled.div.withConfig({
|
|
37
|
-
displayName: "StyledText",
|
|
38
|
-
componentId: "sc-300p63-0"
|
|
39
|
-
})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
40
|
-
function TextComponent(props) {
|
|
41
|
-
let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;
|
|
42
|
-
$[0] === props ? (align = $[1], childrenProp = $[2], ref = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7], textOverflow = $[8], weight = $[9]) : ({accent: t0, align, children: childrenProp, muted: t1, ref, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = textOverflow, $[9] = weight);
|
|
43
|
-
let accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;
|
|
44
|
-
if (textOverflow === "ellipsis") {
|
|
45
|
-
let t3;
|
|
46
|
-
$[10] === children ? t3 = $[11] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[10] = children, $[11] = t3), children = t3;
|
|
47
|
-
}
|
|
48
|
-
let t3;
|
|
49
|
-
$[12] === align ? t3 = $[13] : (t3 = _getArrayProp(align), $[12] = align, $[13] = t3);
|
|
50
|
-
let t4;
|
|
51
|
-
$[14] === size ? t4 = $[15] : (t4 = _getArrayProp(size), $[14] = size, $[15] = t4);
|
|
52
|
-
let t5;
|
|
53
|
-
$[16] === children ? t5 = $[17] : (t5 = /* @__PURE__ */ jsx("span", { children }), $[16] = children, $[17] = t5);
|
|
54
|
-
let t6;
|
|
55
|
-
return $[18] !== accent || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledText, {
|
|
56
|
-
"data-ui": "Text",
|
|
57
|
-
...restProps,
|
|
58
|
-
$accent: accent,
|
|
59
|
-
$align: t3,
|
|
60
|
-
$muted: muted,
|
|
61
|
-
ref,
|
|
62
|
-
$size: t4,
|
|
63
|
-
$weight: weight,
|
|
64
|
-
children: t5
|
|
65
|
-
}), $[18] = accent, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = weight, $[26] = t6) : t6 = $[26], t6;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* The `Text` component is an agile, themed typographic element.
|
|
69
|
-
*
|
|
70
|
-
* @public
|
|
71
|
-
*/
|
|
72
|
-
const Text = TextComponent, BASE_STYLE = {
|
|
73
|
-
"&&:not([hidden])": { display: "grid" },
|
|
74
|
-
"&[data-as=\"ul\"],&[data-as=\"ol\"]": { listStyle: "none" },
|
|
75
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
76
|
-
gridAutoRows: "min-content"
|
|
77
|
-
};
|
|
78
|
-
function stackBaseStyle() {
|
|
79
|
-
return BASE_STYLE;
|
|
80
|
-
}
|
|
81
|
-
function responsiveStackSpaceStyle(props) {
|
|
82
|
-
let { media, space } = getTheme_v2(props.theme);
|
|
83
|
-
return _responsive(media, props.$space, (spaceIndex) => ({ gridGap: rem(space[spaceIndex]) }));
|
|
84
|
-
}
|
|
85
|
-
const StyledStack = /* @__PURE__ */ styled(Box).withConfig({
|
|
86
|
-
displayName: "StyledStack",
|
|
87
|
-
componentId: "sc-z8vnhh-0"
|
|
88
|
-
})(stackBaseStyle, responsiveStackSpaceStyle);
|
|
89
|
-
function StackComponent(props) {
|
|
90
|
-
let $ = c(13), as, gap, ref, restProps;
|
|
91
|
-
$[0] === props ? (as = $[1], gap = $[2], ref = $[3], restProps = $[4]) : ({as, gap, ref, ...restProps} = props, $[0] = props, $[1] = as, $[2] = gap, $[3] = ref, $[4] = restProps);
|
|
92
|
-
let t0 = typeof as == "string" ? as : void 0, t1;
|
|
93
|
-
$[5] === gap ? t1 = $[6] : (t1 = _getArrayProp(gap), $[5] = gap, $[6] = t1);
|
|
94
|
-
let t2;
|
|
95
|
-
return $[7] !== as || $[8] !== ref || $[9] !== restProps || $[10] !== t0 || $[11] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledStack, {
|
|
96
|
-
"data-as": t0,
|
|
97
|
-
"data-ui": "Stack",
|
|
98
|
-
...restProps,
|
|
99
|
-
$space: t1,
|
|
100
|
-
forwardedAs: as,
|
|
101
|
-
ref
|
|
102
|
-
}), $[7] = as, $[8] = ref, $[9] = restProps, $[10] = t0, $[11] = t1, $[12] = t2) : t2 = $[12], t2;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The `Stack` component is used to place elements on top of each other.
|
|
106
|
-
*
|
|
107
|
-
* @public
|
|
108
|
-
*/
|
|
109
|
-
const Stack = StackComponent;
|
|
110
|
-
export { responsiveTextAlignStyle as a, responsiveTextFont as i, Text as n, SpanWithTextOverflow as r, Stack as t };
|
|
111
|
-
|
|
112
|
-
//# sourceMappingURL=stack-rsNFPq2-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stack-rsNFPq2-.js","names":["<span className={spanWithTextOverflow}>{props.children}</span>","children","accent = false","muted = false","size = 2","<SpanWithTextOverflow>{children}</SpanWithTextOverflow>","_getArrayProp(align)","_getArrayProp(size)","<span>{children}</span>","<StyledText\n data-ui=\"Text\"\n {...restProps}\n $accent={accent}\n $align={_getArrayProp(align)}\n $muted={muted}\n ref={ref}\n $size={_getArrayProp(size)}\n $weight={weight}\n >\n <span>{children}</span>\n </StyledText>","_getArrayProp(gap)","<StyledStack\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Stack\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n />","typeof as === 'string' ? as : undefined"],"sources":["../src/core/styles/font/textAlignStyle.ts","../src/core/styles/font/textFontStyle.ts","../src/core/utils/spanWithTextOverflow.css.ts","../src/core/utils/spanWithTextOverflow.tsx","../src/core/primitives/text/styles.ts","../src/core/primitives/text/text.tsx","../src/core/primitives/stack/styles.ts","../src/core/primitives/stack/stack.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveTextAlignStyleProps} from './types'\n\n/**\n * Get responsive text align styles.\n * @internal\n */\nexport function responsiveTextAlignStyle(\n props: ResponsiveTextAlignStyleProps & ThemeProps,\n): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$align, (textAlign) => {\n return {textAlign}\n })\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {ThemeProps} from '../types'\nimport {responsiveFont} from './responsiveFont'\nimport {ResponsiveFontStyleProps} from './types'\n\n/**\n * Get responsive CSS for the `text` font style.\n * @internal\n */\nexport function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[] {\n return responsiveFont('text', props)\n}\n","import {style} from '@vanilla-extract/css'\n\nexport const spanWithTextOverflow = style({\n display: 'block',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: ['hidden', 'clip'],\n})\n","import {spanWithTextOverflow} from './spanWithTextOverflow.css'\n\n/** @internal */\nexport function SpanWithTextOverflow(props: {children?: React.ReactNode}): React.JSX.Element {\n return <span className={spanWithTextOverflow}>{props.children}</span>\n}\n","import {css} from 'styled-components'\n\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {ThemeProps} from '../../styles/types'\n\nexport function textBaseStyle(\n props: {$accent?: boolean; $muted?: boolean} & ThemeProps,\n): ReturnType<typeof css> {\n const {$accent, $muted} = props\n const {font} = getTheme_v2(props.theme)\n\n return css`\n color: var(--card-fg-color);\n\n ${\n $accent &&\n css`\n color: var(--card-accent-fg-color);\n `\n }\n\n ${\n $muted &&\n css`\n color: var(--card-muted-fg-color);\n `\n }\n\n & code {\n font-family: ${font.code.family};\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ${font.text.weights.bold};\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n /* ...and aren't squeezed by resets that set max-width: 100% */\n max-width: unset;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n `\n}\n","import {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {responsiveTextAlignStyle} from '../../styles/font/textAlignStyle'\nimport {responsiveTextFont} from '../../styles/font/textFontStyle'\nimport {ResponsiveFontStyleProps} from '../../styles/font/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {TextAlign} from '../../types/text'\nimport {SpanWithTextOverflow} from '../../utils/spanWithTextOverflow'\nimport {textBaseStyle} from './styles'\n\n/**\n * @public\n */\nexport interface TextOwnProps {\n accent?: boolean\n align?: TextAlign | TextAlign[]\n /** When `true` the text color will be muted. */\n muted?: boolean\n size?: number | number[]\n /**\n * Controls how overflowing text is treated.\n * Use `textOverflow=\"ellipsis\"` to render text as a single line which is concatenated with a `…` symbol.\n * @beta\n */\n textOverflow?: 'ellipsis'\n weight?: ThemeFontWeightKey\n}\n\n/**\n * @public\n */\nexport type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>\n\nconst StyledText = styled.div<ResponsiveFontStyleProps>(\n responsiveTextFont,\n responsiveTextAlignStyle,\n textBaseStyle,\n)\n\nfunction TextComponent(\n props: TextOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size'>,\n) {\n const {\n accent = false,\n align,\n children: childrenProp,\n muted = false,\n ref,\n size = 2,\n textOverflow,\n weight,\n ...restProps\n } = props\n\n let children = childrenProp\n\n if (textOverflow === 'ellipsis') {\n children = <SpanWithTextOverflow>{children}</SpanWithTextOverflow>\n }\n\n return (\n <StyledText\n data-ui=\"Text\"\n {...restProps}\n $accent={accent}\n $align={_getArrayProp(align)}\n $muted={muted}\n ref={ref}\n $size={_getArrayProp(size)}\n $weight={weight}\n >\n <span>{children}</span>\n </StyledText>\n )\n}\n\n/**\n * The `Text` component is an agile, themed typographic element.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Text = TextComponent as unknown as <E extends ElementType = 'div'>(\n props: TextProps<E>,\n) => React.JSX.Element\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../../styles/helpers'\nimport {ThemeProps} from '../../styles/types'\n\nexport interface ResponsiveStackSpaceStyleProps {\n $space: number[]\n}\n\nconst BASE_STYLE: CSSObject = {\n '&&:not([hidden])': {\n display: 'grid',\n },\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n 'gridTemplateColumns': 'minmax(0, 1fr)',\n 'gridAutoRows': 'min-content',\n}\n\nexport function stackBaseStyle(): CSSObject {\n return BASE_STYLE\n}\n\nexport function responsiveStackSpaceStyle(\n props: ResponsiveStackSpaceStyleProps & ThemeProps,\n): CSSObject[] {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$space, (spaceIndex) => ({\n // oxlint-disable-next-line no-deprecated\n gridGap: rem(space[spaceIndex]),\n }))\n}\n","import {styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {responsiveStackSpaceStyle, ResponsiveStackSpaceStyleProps, stackBaseStyle} from './styles'\n\n/**\n * @public\n */\nexport interface StackOwnProps extends BoxOwnProps {\n gap?: number | number[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n}\n\n/**\n * @public\n */\nexport type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>\n\nconst StyledStack = styled(Box)<ResponsiveStackSpaceStyleProps>(\n stackBaseStyle,\n responsiveStackSpaceStyle,\n)\n\nfunction StackComponent(\n props: StackOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as'>,\n) {\n const {as, gap, ref, ...restProps} = props\n\n return (\n <StyledStack\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Stack\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n />\n )\n}\n\n/**\n * The `Stack` component is used to place elements on top of each other.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Stack = StackComponent as unknown as <E extends ElementType = 'div'>(\n props: StackProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,yBACd,OACa;CACb,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,SAAS,eAChC,EAAC,UAAS,EAClB;AACH;;;;;ACTA,SAAgB,mBAAmB,OAA2D;CAC5F,OAAO,eAAe,QAAQ,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AAA,QAFKC,MAAAA,EAAAA,QAGDF,MAJV,KAAA,oBAAC,aAAD;EACE,WAASE;EACT,WAAQ;EACR,GAAI;EACJ,QAAQF;EACR,aAAa;EACR;CACN,CAAA,GAFc,EAAA,KAAA,IACR,EAAA,KAAA,KAHD,EAAA,KAAA,WAFKE,EAAAA,MAAAA,IAGDF,EAAAA,MAAAA,8BAJVC;AASJ;;;;;;AAQA,MAAa,QAAQ"}
|
package/dist/styles-css.d.ts
DELETED
package/dist/styles-css.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// No-op shim for `styles.css`, resolved by the `node`/`default` conditions of the
|
|
2
|
-
// conditional CSS export so the self-referential import is harmless in runtimes that cannot
|
|
3
|
-
// load `.css` files. Intentionally has no JS syntax: it parses as both CommonJS and an ES
|
|
4
|
-
// module, regardless of the package `type`.
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { a as rem, i as _responsive, n as _getArrayProp, s as EMPTY_RECORD } from "./helpers-C8xxXAQC.js";
|
|
2
|
-
import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement } from "./element-BYgCE_iK.js";
|
|
3
|
-
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
4
|
-
import { l as useRootTheme, m as focusRingStyle, p as focusRingBorderStyle, s as Card, v as responsiveRadiusStyle, y as Box } from "./useLayer-D1usxIE0.js";
|
|
5
|
-
import { n as Text } from "./stack-rsNFPq2-.js";
|
|
6
|
-
import { t as Button } from "./button-BNyKSDyA.js";
|
|
7
|
-
import { c } from "react/compiler-runtime";
|
|
8
|
-
import { clsx } from "clsx/lite";
|
|
9
|
-
import { isValidElement, useEffect, useImperativeHandle, useRef } from "react";
|
|
10
|
-
import { css, styled } from "styled-components";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { isValidElementType } from "react-is";
|
|
13
|
-
import { CloseIcon } from "@sanity/icons/Close";
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
function _raf(fn) {
|
|
18
|
-
let frameId = requestAnimationFrame(fn);
|
|
19
|
-
return () => {
|
|
20
|
-
cancelAnimationFrame(frameId);
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
function _raf2(fn) {
|
|
27
|
-
let innerDispose = null, outerDispose = _raf(() => {
|
|
28
|
-
innerDispose = _raf(fn);
|
|
29
|
-
});
|
|
30
|
-
return () => {
|
|
31
|
-
innerDispose && innerDispose(), outerDispose();
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
function _hasFocus(element) {
|
|
38
|
-
return !!document.activeElement && element.contains(document.activeElement);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
43
|
-
function isFocusable(element) {
|
|
44
|
-
return element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null ? !0 : isHTMLAnchorElement(element) ? !!element.href && element.rel !== "ignore" : isHTMLInputElement(element) ? element.type !== "hidden" && element.type !== "file" && !element.disabled : isHTMLButtonElement(element) || isHTMLSelectElement(element) || isHTMLTextAreaElement(element) ? !element.disabled : !1;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @internal
|
|
48
|
-
*/
|
|
49
|
-
function attemptFocus(element) {
|
|
50
|
-
if (!isFocusable(element)) return !1;
|
|
51
|
-
try {
|
|
52
|
-
element.focus();
|
|
53
|
-
} catch {}
|
|
54
|
-
return document.activeElement === element;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* @internal
|
|
58
|
-
*/
|
|
59
|
-
function focusFirstDescendant(element) {
|
|
60
|
-
for (let i = 0; i < element.childNodes.length; i++) {
|
|
61
|
-
let child = element.childNodes[i];
|
|
62
|
-
if (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child))) return !0;
|
|
63
|
-
}
|
|
64
|
-
return !1;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
function focusLastDescendant(element) {
|
|
70
|
-
for (let i = element.childNodes.length - 1; i >= 0; i--) {
|
|
71
|
-
let child = element.childNodes[i];
|
|
72
|
-
if (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child))) return !0;
|
|
73
|
-
}
|
|
74
|
-
return !1;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @beta
|
|
78
|
-
*/
|
|
79
|
-
function useCustomValidity(ref, customValidity) {
|
|
80
|
-
let $ = c(4), t0, t1;
|
|
81
|
-
$[0] !== customValidity || $[1] !== ref ? (t0 = () => {
|
|
82
|
-
ref.current?.setCustomValidity(customValidity || "");
|
|
83
|
-
}, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1);
|
|
84
|
-
}
|
|
85
|
-
function responsiveInputPaddingStyle(props) {
|
|
86
|
-
let { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = getTheme_v2(props.theme), len = Math.max($padding.length, $space.length, $fontSize.length), _padding = [], _space = [], _fontSize = [];
|
|
87
|
-
for (let i = 0; i < len; i += 1) _fontSize[i] = $fontSize[i] === void 0 ? _fontSize[i - 1] : $fontSize[i], _padding[i] = $padding[i] === void 0 ? _padding[i - 1] : $padding[i], _space[i] = $space[i] === void 0 ? _space[i - 1] : $space[i];
|
|
88
|
-
return _responsive(media, _padding, (_, i) => {
|
|
89
|
-
let size = font.text.sizes[_fontSize[i]] || font.text.sizes[2], emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight, p = space[_padding[i]], s = space[_space[i]], styles = {
|
|
90
|
-
paddingTop: rem(p - size.ascenderHeight),
|
|
91
|
-
paddingRight: rem(p),
|
|
92
|
-
paddingBottom: rem(p - size.descenderHeight),
|
|
93
|
-
paddingLeft: rem(p)
|
|
94
|
-
};
|
|
95
|
-
return $iconRight && (styles.paddingRight = rem(p + emSize + s)), $iconLeft && (styles.paddingLeft = rem(p + emSize + s)), styles;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function responsiveInputPaddingIconRightStyle(props) {
|
|
99
|
-
return responsiveInputPaddingStyle({
|
|
100
|
-
...props,
|
|
101
|
-
$iconRight: !0
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function textInputBaseStyle(props) {
|
|
105
|
-
let { $scheme, $tone, $weight } = props, { color, font } = getTheme_v2(props.theme);
|
|
106
|
-
return css`appearance:none;background:none;border:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${font.text.family};font-weight:${$weight && font.text.weights[$weight] || font.text.weights.regular};margin:0;position:relative;z-index:1;display:block;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}&[data-as='textarea']{resize:none;}color:var(--input-fg-color);&::placeholder{color:var(--input-placeholder-color);}&[data-scheme='${$scheme}'][data-tone='${$tone}']{--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};&:not(:invalid):not(:disabled):not(:read-only){--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};}&:not(:invalid):disabled{--input-fg-color:${color.input.default.disabled.fg};--input-placeholder-color:${color.input.default.disabled.placeholder};}&:invalid{--input-fg-color:${color.input.invalid.enabled.fg};--input-placeholder-color:${color.input.invalid.enabled.placeholder};}&:read-only{--input-fg-color:${color.input.default.readOnly.fg};--input-placeholder-color:${color.input.default.readOnly.placeholder};}}`;
|
|
107
|
-
}
|
|
108
|
-
function textInputFontSizeStyle(props) {
|
|
109
|
-
let { font, media } = getTheme_v2(props.theme);
|
|
110
|
-
return _responsive(media, props.$fontSize, (sizeIndex) => {
|
|
111
|
-
let size = font.text.sizes[sizeIndex] || font.text.sizes[2];
|
|
112
|
-
return {
|
|
113
|
-
fontSize: rem(size.fontSize),
|
|
114
|
-
lineHeight: `${size.lineHeight / size.fontSize}`
|
|
115
|
-
};
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function textInputRepresentationStyle(props) {
|
|
119
|
-
let { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = getTheme_v2(props.theme);
|
|
120
|
-
return css`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${$hasPrefix ? 0 : void 0};border-bottom-left-radius:${$hasPrefix ? 0 : void 0};border-top-right-radius:${$hasSuffix ? 0 : void 0};border-bottom-right-radius:${$hasSuffix ? 0 : void 0};&[data-scheme='${$scheme}'][data-tone='${$tone}']{--card-bg-color:${color.input.default.enabled.bg};--card-fg-color:${color.input.default.enabled.fg};*:not(:disabled) + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
121
|
-
color: color.input.default.enabled.border,
|
|
122
|
-
width: input.border.width
|
|
123
|
-
})};}*:not(:disabled):invalid + &{--card-bg-color:${color.input.invalid.enabled.bg};--card-fg-color:${color.input.invalid.enabled.fg};&[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
124
|
-
color: color.input.invalid.enabled.border,
|
|
125
|
-
width: input.border.width
|
|
126
|
-
})};}}*:not(:disabled):focus + &{&[data-border]{--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({
|
|
127
|
-
border: {
|
|
128
|
-
color: color.input.default.enabled.border,
|
|
129
|
-
width: input.border.width
|
|
130
|
-
},
|
|
131
|
-
focusRing: input.text.focusRing
|
|
132
|
-
})};}&:not([data-border]){--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({ focusRing: input.text.focusRing })};}}*:not(:invalid):disabled + &{--card-bg-color:${color.input.default.disabled.bg} !important;--card-fg-color:${color.input.default.disabled.fg} !important;--card-icon-color:${color.input.default.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
133
|
-
color: color.input.default.disabled.border,
|
|
134
|
-
width: input.border.width
|
|
135
|
-
})};}}*:invalid:disabled + &{--card-bg-color:${color.input.invalid.disabled.bg} !important;--card-fg-color:${color.input.invalid.disabled.fg} !important;--card-icon-color:${color.input.invalid.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
136
|
-
color: color.input.invalid.disabled.border,
|
|
137
|
-
width: input.border.width
|
|
138
|
-
})};}}*:not(:invalid):read-only + &{--card-bg-color:${color.input.default.readOnly.bg} !important;--card-fg-color:${color.input.default.readOnly.fg} !important;}*:invalid:read-only + &{--card-bg-color:${color.input.invalid.readOnly.bg} !important;--card-fg-color:${color.input.invalid.readOnly.fg} !important;}@media (hover:hover){*:not(:disabled):not(:read-only):not(:invalid):hover + &{--card-bg-color:${color.input.default.hovered.bg};--card-fg-color:${color.input.default.hovered.fg};}*:invalid:not(:disabled):not(:read-only):hover + &{--card-bg-color:${color.input.invalid.hovered.bg};--card-fg-color:${color.input.invalid.hovered.fg};}*:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
139
|
-
color: color.input.default.hovered.border,
|
|
140
|
-
width: input.border.width
|
|
141
|
-
})};}*:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
142
|
-
color: color.input.invalid.hovered.border,
|
|
143
|
-
width: input.border.width
|
|
144
|
-
})};}}}`;
|
|
145
|
-
}
|
|
146
|
-
var inputRoot = "_1lyk8y2", textAreaRoot = "_1lyk8y1 _1lyk8y0", textInputRoot = "_1lyk8y0";
|
|
147
|
-
const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Prefix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
148
|
-
displayName: "Prefix",
|
|
149
|
-
componentId: "sc-k29dck-0"
|
|
150
|
-
})`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
151
|
-
displayName: "Suffix",
|
|
152
|
-
componentId: "sc-k29dck-1"
|
|
153
|
-
})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, Input = /* @__PURE__ */ styled.input.withConfig({
|
|
154
|
-
displayName: "Input",
|
|
155
|
-
componentId: "sc-k29dck-2"
|
|
156
|
-
})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.span.withConfig({
|
|
157
|
-
displayName: "Presentation",
|
|
158
|
-
componentId: "sc-k29dck-3"
|
|
159
|
-
})(responsiveRadiusStyle, textInputRepresentationStyle), RightCard = styled(Card).withConfig({
|
|
160
|
-
displayName: "RightCard",
|
|
161
|
-
componentId: "sc-k29dck-4"
|
|
162
|
-
})`background-color:transparent;position:absolute;top:0;right:0;`;
|
|
163
|
-
/**
|
|
164
|
-
* Single line text input.
|
|
165
|
-
*
|
|
166
|
-
* @public
|
|
167
|
-
*/
|
|
168
|
-
function TextInput(props) {
|
|
169
|
-
let $ = c(93), IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, forwardedRef, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
170
|
-
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], forwardedRef = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]) : ({__unstable_disableFocusRing, border: t0, clearButton, disabled: t1, fontSize: t2, gap: t3, icon: IconComponent, iconRight: IconRightComponent, onClear, padding: t4, prefix, radius: t5, readOnly, ref: forwardedRef, suffix, customValidity, type: t6, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = forwardedRef, $[7] = onClear, $[8] = prefix, $[9] = readOnly, $[10] = restProps, $[11] = suffix, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = weight);
|
|
171
|
-
let border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSizeProp = t2 === void 0 ? 2 : t2, gap = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, radiusProp = t5 === void 0 ? 2 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme(), t7;
|
|
172
|
-
$[20] === fontSizeProp ? t7 = $[21] : (t7 = _getArrayProp(fontSizeProp), $[20] = fontSizeProp, $[21] = t7);
|
|
173
|
-
let fontSize = t7, t8;
|
|
174
|
-
$[22] === paddingProp ? t8 = $[23] : (t8 = _getArrayProp(paddingProp), $[22] = paddingProp, $[23] = t8);
|
|
175
|
-
let padding = t8, t9;
|
|
176
|
-
$[24] === radiusProp ? t9 = $[25] : (t9 = _getArrayProp(radiusProp), $[24] = radiusProp, $[25] = t9);
|
|
177
|
-
let radius = t9, t10;
|
|
178
|
-
$[26] === gap ? t10 = $[27] : (t10 = _getArrayProp(gap), $[26] = gap, $[27] = t10);
|
|
179
|
-
let space = t10, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix, t11;
|
|
180
|
-
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t11 = () => ref.current, $[28] = t11) : t11 = $[28], useImperativeHandle(forwardedRef, t11), useCustomValidity(ref, customValidity);
|
|
181
|
-
let handleClearMouseDown = _temp, t12;
|
|
182
|
-
$[29] === onClear ? t12 = $[30] : (t12 = (event_0) => {
|
|
183
|
-
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
184
|
-
}, $[29] = onClear, $[30] = t12);
|
|
185
|
-
let handleClearClick = t12, t13;
|
|
186
|
-
$[31] !== prefix || $[32] !== radius ? (t13 = prefix && /* @__PURE__ */ jsx(Prefix, {
|
|
187
|
-
borderTop: !0,
|
|
188
|
-
borderLeft: !0,
|
|
189
|
-
borderBottom: !0,
|
|
190
|
-
radius,
|
|
191
|
-
sizing: "border",
|
|
192
|
-
tone: "inherit",
|
|
193
|
-
children: /* @__PURE__ */ jsx("span", { children: prefix })
|
|
194
|
-
}), $[31] = prefix, $[32] = radius, $[33] = t13) : t13 = $[33];
|
|
195
|
-
let prefixNode = t13, t14 = border ? "" : void 0, t15;
|
|
196
|
-
$[34] !== IconComponent || $[35] !== fontSize || $[36] !== padding ? (t15 = IconComponent && /* @__PURE__ */ jsx(Box, {
|
|
197
|
-
className: "_8fnjkq0",
|
|
198
|
-
padding,
|
|
199
|
-
children: /* @__PURE__ */ jsxs(Text, {
|
|
200
|
-
size: fontSize,
|
|
201
|
-
children: [isValidElement(IconComponent) && IconComponent, isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})]
|
|
202
|
-
})
|
|
203
|
-
}), $[34] = IconComponent, $[35] = fontSize, $[36] = padding, $[37] = t15) : t15 = $[37];
|
|
204
|
-
let t16;
|
|
205
|
-
$[38] !== $hasClearButton || $[39] !== IconRightComponent || $[40] !== fontSize || $[41] !== padding ? (t16 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(Box, {
|
|
206
|
-
className: "_8fnjkq1",
|
|
207
|
-
padding,
|
|
208
|
-
children: /* @__PURE__ */ jsxs(Text, {
|
|
209
|
-
size: fontSize,
|
|
210
|
-
children: [isValidElement(IconRightComponent) && IconRightComponent, isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})]
|
|
211
|
-
})
|
|
212
|
-
}), $[38] = $hasClearButton, $[39] = IconRightComponent, $[40] = fontSize, $[41] = padding, $[42] = t16) : t16 = $[42];
|
|
213
|
-
let t17;
|
|
214
|
-
$[43] !== $hasPrefix || $[44] !== $hasSuffix || $[45] !== __unstable_disableFocusRing || $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone || $[49] !== t14 || $[50] !== t15 || $[51] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Presentation, {
|
|
215
|
-
$hasPrefix,
|
|
216
|
-
$unstableDisableFocusRing: __unstable_disableFocusRing,
|
|
217
|
-
$hasSuffix,
|
|
218
|
-
$radius: radius,
|
|
219
|
-
$scheme: rootTheme.scheme,
|
|
220
|
-
$tone: rootTheme.tone,
|
|
221
|
-
"data-border": t14,
|
|
222
|
-
"data-scheme": rootTheme.scheme,
|
|
223
|
-
"data-tone": rootTheme.tone,
|
|
224
|
-
children: [t15, t16]
|
|
225
|
-
}), $[43] = $hasPrefix, $[44] = $hasSuffix, $[45] = __unstable_disableFocusRing, $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t14, $[50] = t15, $[51] = t16, $[52] = t17) : t17 = $[52];
|
|
226
|
-
let presentationNode = t17, t18;
|
|
227
|
-
$[53] === padding ? t18 = $[54] : (t18 = padding.map(_temp2), $[53] = padding, $[54] = t18);
|
|
228
|
-
let clearButtonBoxPadding = t18, t19;
|
|
229
|
-
$[55] === padding ? t19 = $[56] : (t19 = padding.map(_temp3), $[55] = padding, $[56] = t19);
|
|
230
|
-
let clearButtonPadding = t19, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD, t20;
|
|
231
|
-
$[57] !== clearButton || $[58] !== clearButtonBoxPadding || $[59] !== clearButtonPadding || $[60] !== clearButtonProps || $[61] !== customValidity || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t20 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, {
|
|
232
|
-
forwardedAs: "span",
|
|
233
|
-
padding: clearButtonBoxPadding,
|
|
234
|
-
style: CLEAR_BUTTON_BOX_STYLE,
|
|
235
|
-
tone: customValidity ? "critical" : "inherit",
|
|
236
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
237
|
-
"aria-label": "Clear",
|
|
238
|
-
"data-qa": "clear-button",
|
|
239
|
-
fontSize,
|
|
240
|
-
icon: CloseIcon,
|
|
241
|
-
mode: "bleed",
|
|
242
|
-
padding: clearButtonPadding,
|
|
243
|
-
radius,
|
|
244
|
-
...clearButtonProps,
|
|
245
|
-
className: clsx("_8fnjkq2", clearButtonProps.className),
|
|
246
|
-
onClick: handleClearClick,
|
|
247
|
-
onMouseDown: handleClearMouseDown
|
|
248
|
-
})
|
|
249
|
-
}), $[57] = clearButton, $[58] = clearButtonBoxPadding, $[59] = clearButtonPadding, $[60] = clearButtonProps, $[61] = customValidity, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t20) : t20 = $[67];
|
|
250
|
-
let clearButtonNode = t20, t21;
|
|
251
|
-
$[68] !== radius || $[69] !== suffix ? (t21 = suffix && /* @__PURE__ */ jsx(Suffix, {
|
|
252
|
-
borderTop: !0,
|
|
253
|
-
borderRight: !0,
|
|
254
|
-
borderBottom: !0,
|
|
255
|
-
radius,
|
|
256
|
-
sizing: "border",
|
|
257
|
-
tone: "inherit",
|
|
258
|
-
children: /* @__PURE__ */ jsx("span", { children: suffix })
|
|
259
|
-
}), $[68] = radius, $[69] = suffix, $[70] = t21) : t21 = $[70];
|
|
260
|
-
let suffixNode = t21, t22 = $hasIconRight || $hasClearButton, t23;
|
|
261
|
-
$[71] !== $hasIcon || $[72] !== disabled || $[73] !== fontSize || $[74] !== padding || $[75] !== readOnly || $[76] !== restProps || $[77] !== rootTheme.scheme || $[78] !== rootTheme.tone || $[79] !== space || $[80] !== t22 || $[81] !== type || $[82] !== weight ? (t23 = /* @__PURE__ */ jsx(Input, {
|
|
262
|
-
"data-as": "input",
|
|
263
|
-
"data-scheme": rootTheme.scheme,
|
|
264
|
-
"data-tone": rootTheme.tone,
|
|
265
|
-
...restProps,
|
|
266
|
-
$fontSize: fontSize,
|
|
267
|
-
$iconLeft: $hasIcon,
|
|
268
|
-
$iconRight: t22,
|
|
269
|
-
$padding: padding,
|
|
270
|
-
$scheme: rootTheme.scheme,
|
|
271
|
-
$space: space,
|
|
272
|
-
$tone: rootTheme.tone,
|
|
273
|
-
$weight: weight,
|
|
274
|
-
disabled,
|
|
275
|
-
readOnly,
|
|
276
|
-
ref,
|
|
277
|
-
type
|
|
278
|
-
}), $[71] = $hasIcon, $[72] = disabled, $[73] = fontSize, $[74] = padding, $[75] = readOnly, $[76] = restProps, $[77] = rootTheme.scheme, $[78] = rootTheme.tone, $[79] = space, $[80] = t22, $[81] = type, $[82] = weight, $[83] = t23) : t23 = $[83];
|
|
279
|
-
let t24;
|
|
280
|
-
$[84] !== clearButtonNode || $[85] !== presentationNode || $[86] !== t23 ? (t24 = /* @__PURE__ */ jsxs("span", {
|
|
281
|
-
className: inputRoot,
|
|
282
|
-
children: [
|
|
283
|
-
t23,
|
|
284
|
-
presentationNode,
|
|
285
|
-
clearButtonNode
|
|
286
|
-
]
|
|
287
|
-
}), $[84] = clearButtonNode, $[85] = presentationNode, $[86] = t23, $[87] = t24) : t24 = $[87];
|
|
288
|
-
let t25;
|
|
289
|
-
return $[88] !== prefixNode || $[89] !== rootTheme.tone || $[90] !== suffixNode || $[91] !== t24 ? (t25 = /* @__PURE__ */ jsxs(Card, {
|
|
290
|
-
as: "span",
|
|
291
|
-
className: textInputRoot,
|
|
292
|
-
"data-ui": "TextInput",
|
|
293
|
-
display: "flex",
|
|
294
|
-
tone: rootTheme.tone,
|
|
295
|
-
children: [
|
|
296
|
-
prefixNode,
|
|
297
|
-
t24,
|
|
298
|
-
suffixNode
|
|
299
|
-
]
|
|
300
|
-
}), $[88] = prefixNode, $[89] = rootTheme.tone, $[90] = suffixNode, $[91] = t24, $[92] = t25) : t25 = $[92], t25;
|
|
301
|
-
}
|
|
302
|
-
function _temp3(v_0) {
|
|
303
|
-
return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
|
|
304
|
-
}
|
|
305
|
-
function _temp2(v) {
|
|
306
|
-
return v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;
|
|
307
|
-
}
|
|
308
|
-
function _temp(event) {
|
|
309
|
-
event.preventDefault(), event.stopPropagation();
|
|
310
|
-
}
|
|
311
|
-
export { textInputFontSizeStyle as a, responsiveInputPaddingStyle as c, attemptFocus as d, focusFirstDescendant as f, _raf2 as g, _raf as h, textInputBaseStyle as i, useCustomValidity as l, isFocusable as m, inputRoot as n, textInputRepresentationStyle as o, focusLastDescendant as p, textAreaRoot as r, responsiveInputPaddingIconRightStyle as s, TextInput as t, _hasFocus as u };
|
|
312
|
-
|
|
313
|
-
//# sourceMappingURL=textInput-pSfQjkmx.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textInput-pSfQjkmx.js","names":["() => {\n ref.current?.setCustomValidity(customValidity || '')\n }","[customValidity, ref]","ref.current?.setCustomValidity","border = true","disabled = false","fontSizeProp = 2","gap = 3","paddingProp = 3","radiusProp = 2","type = 'text'","_getArrayProp(fontSizeProp)","_getArrayProp(paddingProp)","_getArrayProp(radiusProp)","_getArrayProp(gap)","() => ref.current","useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n }, [])","(event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n }","useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n },\n [onClear, ref],\n )","prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n )","useMemo(\n () =>\n prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n ),\n [prefix, radius],\n )","IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )","!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )","<Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n >\n {IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )}\n </Presentation>","scheme","tone","border ? '' : undefined","useMemo(\n () => (\n <Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n >\n {IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )}\n </Presentation>\n ),\n [\n __unstable_disableFocusRing,\n border,\n fontSize,\n IconComponent,\n IconRightComponent,\n padding,\n radius,\n rootTheme,\n $hasClearButton,\n $hasPrefix,\n $hasSuffix,\n ],\n )","padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n })","(v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }","useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }),\n [padding],\n )","padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n })","(v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }","useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }),\n [padding],\n )","!disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <Button\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n className={clsx(textInputClearButton, clearButtonProps.className)}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n )","clearButtonProps.className","useMemo(\n () =>\n !disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <Button\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n className={clsx(textInputClearButton, clearButtonProps.className)}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n ),\n [\n clearButton,\n clearButtonBoxPadding,\n clearButtonPadding,\n clearButtonProps,\n customValidity,\n disabled,\n fontSize,\n handleClearClick,\n handleClearMouseDown,\n radius,\n readOnly,\n ],\n )","suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n )","useMemo(\n () =>\n suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n ),\n [radius, suffix],\n )","<Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />","$hasIconRight || $hasClearButton","<span className={inputRoot}>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </span>","<Card\n as=\"span\"\n className={textInputRoot}\n data-ui=\"TextInput\"\n display=\"flex\"\n tone={rootTheme.tone}\n >\n {prefixNode}\n\n <span className={inputRoot}>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </span>\n\n {suffixNode}\n </Card>","v"],"sources":["../src/core/helpers/animation.ts","../src/core/helpers/focus.ts","../src/core/hooks/useCustomValidity.ts","../src/core/styles/input/responsiveInputPaddingStyle.ts","../src/core/styles/input/textInputStyle.ts","../src/core/styles/input/textInput.css.ts","../src/core/primitives/textInput/textInput.css.ts","../src/core/primitives/textInput/textInput.tsx"],"sourcesContent":["/**\n * @internal\n */\nexport function _raf(fn: () => void): () => void {\n const frameId = requestAnimationFrame(fn)\n\n return () => {\n cancelAnimationFrame(frameId)\n }\n}\n\n/**\n * @internal\n */\nexport function _raf2(fn: () => void): () => void {\n let innerDispose: (() => void) | null = null\n\n const outerDispose = _raf(() => {\n innerDispose = _raf(fn)\n })\n\n return () => {\n if (innerDispose) innerDispose()\n\n outerDispose()\n }\n}\n","import {\n isHTMLAnchorElement,\n isHTMLButtonElement,\n isHTMLElement,\n isHTMLInputElement,\n isHTMLSelectElement,\n isHTMLTextAreaElement,\n} from './element'\n\n// export const globalFocusState = {\n// IgnoreUtilFocusChanges: false,\n// }\n\n/**\n * @internal\n */\nexport function _hasFocus(element: HTMLElement): boolean {\n return Boolean(document.activeElement) && element.contains(document.activeElement)\n}\n\n/**\n * @internal\n */\nexport function isFocusable(element: HTMLElement): boolean {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n\n if (isHTMLAnchorElement(element)) {\n return Boolean(element.href) && element.rel !== 'ignore'\n }\n\n if (isHTMLInputElement(element)) {\n return element.type !== 'hidden' && element.type !== 'file' && !element.disabled\n }\n\n if (\n isHTMLButtonElement(element) ||\n isHTMLSelectElement(element) ||\n isHTMLTextAreaElement(element)\n ) {\n return !element.disabled\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function attemptFocus(element: HTMLElement): boolean {\n if (!isFocusable(element)) {\n return false\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = true\n\n try {\n element.focus()\n } catch {\n // ignore\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = false\n\n return document.activeElement === element\n}\n\n/**\n * @internal\n */\nexport function focusFirstDescendant(element: HTMLElement): boolean {\n for (let i = 0; i < element.childNodes.length; i++) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function focusLastDescendant(element: HTMLElement): boolean {\n for (let i = element.childNodes.length - 1; i >= 0; i--) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n","import {useEffect} from 'react'\n\n/**\n * @beta\n */\nexport function useCustomValidity(\n ref: {current: null | {setCustomValidity: (validity: string) => void}},\n customValidity: string | undefined,\n): void {\n useEffect(() => {\n ref.current?.setCustomValidity(customValidity || '')\n }, [customValidity, ref])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\nexport interface TextInputResponsivePaddingStyleProps {\n $fontSize: number[]\n $iconLeft?: boolean\n $iconRight?: boolean\n $padding: number[]\n $space: number[]\n}\n\nexport function responsiveInputPaddingStyle(\n props: TextInputResponsivePaddingStyleProps & ThemeProps,\n): CSSObject[] {\n const {$fontSize, $iconLeft, $iconRight, $padding, $space} = props\n const {font, media, space} = getTheme_v2(props.theme)\n const len = Math.max($padding.length, $space.length, $fontSize.length)\n const _padding: number[] = []\n const _space: number[] = []\n const _fontSize: number[] = []\n\n for (let i = 0; i < len; i += 1) {\n _fontSize[i] = $fontSize[i] === undefined ? _fontSize[i - 1] : $fontSize[i]\n _padding[i] = $padding[i] === undefined ? _padding[i - 1] : $padding[i]\n _space[i] = $space[i] === undefined ? _space[i - 1] : $space[i]\n }\n\n return _responsive(media, _padding, (_, i) => {\n const size = font.text.sizes[_fontSize[i]] || font.text.sizes[2]\n const emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight\n const p = space[_padding[i]]\n const s = space[_space[i]]\n\n const styles = {\n paddingTop: rem(p - size.ascenderHeight),\n paddingRight: rem(p),\n paddingBottom: rem(p - size.descenderHeight),\n paddingLeft: rem(p),\n }\n\n if ($iconRight) styles.paddingRight = rem(p + emSize + s)\n if ($iconLeft) styles.paddingLeft = rem(p + emSize + s)\n\n return styles\n })\n}\n\nexport function responsiveInputPaddingIconRightStyle(\n props: {\n $fontSize: number[]\n $padding: number[]\n $space: number[]\n } & ThemeProps,\n): CSSObject[] {\n return responsiveInputPaddingStyle({...props, $iconRight: true})\n}\n","import {css} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {CSSObject} from '../../../theme/system/css'\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {CardTone} from '../../types/card'\nimport {focusRingBorderStyle, focusRingStyle} from '../focusRing'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\n/**\n * @internal\n */\nexport interface TextInputInputStyleProps {\n $fontSize: number[]\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $weight?: ThemeFontWeightKey\n}\n\n/**\n * @internal\n */\nexport interface TextInputRepresentationStyleProps {\n $hasPrefix?: boolean\n $hasSuffix?: boolean\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $unstableDisableFocusRing?: boolean\n}\n\nexport function textInputBaseStyle(\n props: TextInputInputStyleProps & ThemeProps,\n): ReturnType<typeof css> {\n const {$scheme, $tone, $weight} = props\n const {color, font} = getTheme_v2(props.theme)\n\n return css`\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ${font.text.family};\n font-weight: ${($weight && font.text.weights[$weight]) || font.text.weights.regular};\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome’s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ${color.input.default.disabled.fg};\n --input-placeholder-color: ${color.input.default.disabled.placeholder};\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ${color.input.invalid.enabled.fg};\n --input-placeholder-color: ${color.input.invalid.enabled.placeholder};\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ${color.input.default.readOnly.fg};\n --input-placeholder-color: ${color.input.default.readOnly.placeholder};\n }\n }\n `\n}\n\nexport function textInputFontSizeStyle(props: TextInputInputStyleProps & ThemeProps): CSSObject[] {\n const {font, media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$fontSize, (sizeIndex) => {\n const size = font.text.sizes[sizeIndex] || font.text.sizes[2]\n\n return {\n fontSize: rem(size.fontSize),\n lineHeight: `${size.lineHeight / size.fontSize}`,\n }\n })\n}\n\nexport function textInputRepresentationStyle(\n props: TextInputRepresentationStyleProps & ThemeProps,\n): ReturnType<typeof css> {\n const {$hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing} = props\n const {color, input} = getTheme_v2(props.theme)\n\n return css`\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ${$hasPrefix ? 0 : undefined};\n border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};\n border-top-right-radius: ${$hasSuffix ? 0 : undefined};\n border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};\n\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --card-bg-color: ${color.input.default.enabled.bg};\n --card-fg-color: ${color.input.default.enabled.fg};\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.enabled.border,\n width: input.border.width,\n })};\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ${color.input.invalid.enabled.bg};\n --card-fg-color: ${color.input.invalid.enabled.fg};\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.enabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({\n border: {color: color.input.default.enabled.border, width: input.border.width},\n focusRing: input.text.focusRing,\n })\n };\n }\n\n &:not([data-border]) {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({focusRing: input.text.focusRing})\n };\n }\n }\n\n /* disabled */\n *:not(:invalid):disabled + & {\n --card-bg-color: ${color.input.default.disabled.bg} !important;\n --card-fg-color: ${color.input.default.disabled.fg} !important;\n --card-icon-color: ${color.input.default.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n *:invalid:disabled + & {\n --card-bg-color: ${color.input.invalid.disabled.bg} !important;\n --card-fg-color: ${color.input.invalid.disabled.fg} !important;\n --card-icon-color: ${color.input.invalid.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* readOnly */\n *:not(:invalid):read-only + & {\n --card-bg-color: ${color.input.default.readOnly.bg} !important;\n --card-fg-color: ${color.input.default.readOnly.fg} !important;\n }\n\n *:invalid:read-only + & {\n --card-bg-color: ${color.input.invalid.readOnly.bg} !important;\n --card-fg-color: ${color.input.invalid.readOnly.fg} !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ${color.input.default.hovered.bg};\n --card-fg-color: ${color.input.default.hovered.fg};\n }\n\n *:invalid:not(:disabled):not(:read-only):hover + & {\n --card-bg-color: ${color.input.invalid.hovered.bg};\n --card-fg-color: ${color.input.invalid.hovered.fg};\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.hovered.border,\n width: input.border.width,\n })};\n }\n\n *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.hovered.border,\n width: input.border.width,\n })};\n }\n }\n }\n `\n}\n","import {style} from '@vanilla-extract/css'\n\n// TextInput renders its root as a Card, whose Box styles own `display`, so the\n// flex layout comes from the `display` prop there and only the alignment lives\n// here. TextArea's root is a plain span, so it reuses that class and adds display.\nexport const textInputRoot = style({\n alignItems: 'center',\n})\n\nexport const textAreaRoot = style([\n textInputRoot,\n {\n selectors: {\n '&:not([hidden])': {\n display: 'flex',\n },\n },\n },\n])\n\nexport const inputRoot = style({\n flex: 1,\n minWidth: 0,\n display: 'block',\n position: 'relative',\n})\n","import {style} from '@vanilla-extract/css'\n\nexport const textInputLeftBox = style({\n position: 'absolute',\n top: 0,\n left: 0,\n})\n\nexport const textInputRightBox = style({\n position: 'absolute',\n top: 0,\n right: 0,\n})\n\nexport const textInputClearButton = style({\n selectors: {\n '&:not([hidden])': {\n display: 'block',\n },\n },\n})\n","import {CloseIcon} from '@sanity/icons/Close'\nimport {clsx} from 'clsx/lite'\nimport {isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {EMPTY_RECORD} from '../../constants'\nimport {useCustomValidity} from '../../hooks/useCustomValidity'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {\n responsiveInputPaddingStyle,\n TextInputResponsivePaddingStyleProps,\n} from '../../styles/input/responsiveInputPaddingStyle'\nimport {\n textInputBaseStyle,\n textInputFontSizeStyle,\n TextInputInputStyleProps,\n textInputRepresentationStyle,\n TextInputRepresentationStyleProps,\n} from '../../styles/input/textInputStyle'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useRootTheme} from '../../theme/useRootTheme'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Button, ButtonOwnProps} from '../button/button'\nimport {Card} from '../card/card'\nimport {Text} from '../text/text'\n\nimport {inputRoot, textInputRoot} from '../../styles/input/textInput.css'\nimport {textInputClearButton, textInputLeftBox, textInputRightBox} from './textInput.css'\n\n/**\n * @public\n */\nexport type TextInputClearButtonProps = ButtonOwnProps &\n Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>\n\n/**\n * @public\n */\nexport type TextInputType =\n | 'search'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'url'\n | 'month'\n | 'number'\n | 'password'\n | 'tel'\n | 'time'\n | 'text'\n | 'week'\n | 'color'\n\n/**\n * @public\n */\nexport interface TextInputProps {\n /**\n * @beta\n */\n __unstable_disableFocusRing?: boolean\n border?: boolean\n /**\n * @beta\n */\n clearButton?: boolean | TextInputClearButtonProps\n customValidity?: string\n fontSize?: number | number[]\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n /**\n * @beta\n */\n onClear?: () => void\n padding?: number | number[]\n prefix?: React.ReactNode\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n suffix?: React.ReactNode\n type?: TextInputType\n weight?: ThemeFontWeightKey\n}\n\nconst CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {zIndex: 2}\n\n// Prefix and Suffix stay on styled-components: their corner radius longhands\n// must beat Card's runtime `border-radius` shorthand at equal specificity,\n// which needs both rules in the runtime stylesheet.\nconst Prefix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Suffix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Input = styled.input<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(\n responsiveInputPaddingStyle,\n textInputBaseStyle,\n textInputFontSizeStyle,\n)\n\nconst Presentation = styled.span<ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps>(\n responsiveRadiusStyle,\n textInputRepresentationStyle,\n)\n\n// Stays on styled-components: `background-color: transparent` must beat Card's\n// runtime `background-color: var(--card-bg-color)` at equal specificity, which\n// needs both rules in the runtime stylesheet.\nconst RightCard = styled(Card)`\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n`\n\n/**\n * Single line text input.\n *\n * @public\n */\nexport function TextInput(\n props: TextInputProps & Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'prefix' | 'type'>,\n) {\n const {\n __unstable_disableFocusRing,\n border = true,\n clearButton,\n disabled = false,\n fontSize: fontSizeProp = 2,\n gap = 3,\n icon: IconComponent,\n iconRight: IconRightComponent,\n onClear,\n padding: paddingProp = 3,\n prefix,\n radius: radiusProp = 2,\n readOnly,\n ref: forwardedRef,\n suffix,\n customValidity,\n type = 'text',\n weight,\n ...restProps\n } = props\n const ref = useRef<HTMLInputElement | null>(null)\n\n const rootTheme = useRootTheme()\n\n const fontSize = _getArrayProp(fontSizeProp)\n const padding = _getArrayProp(paddingProp)\n const radius = _getArrayProp(radiusProp)\n const space = _getArrayProp(gap)\n\n // Transient properties\n const $hasClearButton = Boolean(clearButton)\n const $hasIcon = Boolean(IconComponent)\n const $hasIconRight = Boolean(IconRightComponent)\n const $hasSuffix = Boolean(suffix)\n const $hasPrefix = Boolean(prefix)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => ref.current,\n )\n\n useCustomValidity(ref, customValidity)\n\n // Prevent the clear button from taking the focus away from the input\n const handleClearMouseDown = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n }, [])\n\n const handleClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n },\n [onClear, ref],\n )\n\n // Render prefix (memoized)\n const prefixNode = useMemo(\n () =>\n prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n ),\n [prefix, radius],\n )\n\n // Render presentation (memoized)\n const presentationNode = useMemo(\n () => (\n <Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n >\n {IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )}\n </Presentation>\n ),\n [\n __unstable_disableFocusRing,\n border,\n fontSize,\n IconComponent,\n IconRightComponent,\n padding,\n radius,\n rootTheme,\n $hasClearButton,\n $hasPrefix,\n $hasSuffix,\n ],\n )\n\n // Render clear button (memoized)\n const clearButtonBoxPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }),\n [padding],\n )\n const clearButtonPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }),\n [padding],\n )\n const clearButtonProps: TextInputClearButtonProps = useMemo(\n () => (typeof clearButton === 'object' ? clearButton : EMPTY_RECORD),\n [clearButton],\n )\n const clearButtonNode = useMemo(\n () =>\n !disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <Button\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n className={clsx(textInputClearButton, clearButtonProps.className)}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n ),\n [\n clearButton,\n clearButtonBoxPadding,\n clearButtonPadding,\n clearButtonProps,\n customValidity,\n disabled,\n fontSize,\n handleClearClick,\n handleClearMouseDown,\n radius,\n readOnly,\n ],\n )\n\n // Render suffix (memoized)\n const suffixNode = useMemo(\n () =>\n suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n ),\n [radius, suffix],\n )\n\n return (\n <Card\n as=\"span\"\n className={textInputRoot}\n data-ui=\"TextInput\"\n display=\"flex\"\n tone={rootTheme.tone}\n >\n {prefixNode}\n\n <span className={inputRoot}>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </span>\n\n {suffixNode}\n </Card>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,SAAgB,KAAK,IAA4B;CAC/C,IAAM,UAAU,sBAAsB,EAAE;CAExC,aAAa;EACX,qBAAqB,OAAO;CAC9B;AACF;;;;AAKA,SAAgB,MAAM,IAA4B;CAChD,IAAI,eAAoC,MAElC,eAAe,WAAW;EAC9B,eAAe,KAAK,EAAE;CAC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