@doist/reactist 12.1.0 → 14.0.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/dist/reactist.cjs.development.js +95 -644
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/components/color-picker/color-picker.js +4 -4
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/{dropdown → deprecated-dropdown}/dropdown.js +0 -0
- package/es/components/deprecated-dropdown/dropdown.js.map +1 -0
- package/es/components/{dropdown → deprecated-dropdown}/index.js +0 -0
- package/es/components/{checkbox → deprecated-dropdown}/index.js.map +0 -0
- package/es/components/{input → deprecated-input}/index.js +0 -0
- package/es/components/{dropdown → deprecated-input}/index.js.map +0 -0
- package/es/components/{input → deprecated-input}/input.js +0 -0
- package/es/components/deprecated-input/input.js.map +1 -0
- package/es/components/{select → deprecated-select}/index.js +0 -0
- package/es/components/{input → deprecated-select}/index.js.map +0 -0
- package/es/components/{select → deprecated-select}/select.js +0 -0
- package/es/components/deprecated-select/select.js.map +1 -0
- package/es/components/tooltip/tooltip.js +12 -6
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/index.js +3 -7
- package/es/index.js.map +1 -1
- package/es/new-components/base-button/base-button.js +12 -9
- package/es/new-components/base-button/base-button.js.map +1 -1
- package/es/new-components/base-button/base-button.module.css.js +1 -1
- package/es/new-components/tabs/tabs.js +25 -15
- package/es/new-components/tabs/tabs.js.map +1 -1
- package/es/new-components/tabs/tabs.module.css.js +1 -1
- package/es/new-components/text-field/text-field.module.css.js +1 -1
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/{dropdown → deprecated-dropdown}/dropdown.d.ts +0 -0
- package/lib/components/{dropdown → deprecated-dropdown}/dropdown.js +0 -0
- package/lib/components/deprecated-dropdown/dropdown.js.map +1 -0
- package/lib/components/{dropdown → deprecated-dropdown}/dropdown.test.d.ts +0 -0
- package/lib/components/{dropdown → deprecated-dropdown}/index.d.ts +0 -0
- package/lib/components/{dropdown → deprecated-dropdown}/index.js +0 -0
- package/lib/components/{checkbox → deprecated-dropdown}/index.js.map +0 -0
- package/lib/components/{input → deprecated-input}/index.d.ts +0 -0
- package/lib/components/{input → deprecated-input}/index.js +0 -0
- package/lib/components/{dropdown → deprecated-input}/index.js.map +0 -0
- package/lib/components/{input → deprecated-input}/input.d.ts +0 -0
- package/lib/components/{input → deprecated-input}/input.js +0 -0
- package/lib/components/deprecated-input/input.js.map +1 -0
- package/lib/components/{input → deprecated-input}/input.test.d.ts +0 -0
- package/lib/components/{select → deprecated-select}/index.d.ts +0 -0
- package/lib/components/{select → deprecated-select}/index.js +0 -0
- package/lib/components/{input → deprecated-select}/index.js.map +0 -0
- package/lib/components/{select → deprecated-select}/select.d.ts +0 -0
- package/lib/components/{select → deprecated-select}/select.js +0 -0
- package/lib/components/deprecated-select/select.js.map +1 -0
- package/lib/components/{select → deprecated-select}/select.test.d.ts +0 -0
- package/lib/components/tooltip/tooltip.d.ts +1 -1
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/index.d.ts +3 -7
- package/lib/index.js +1 -1
- package/lib/new-components/base-button/base-button.d.ts +7 -4
- package/lib/new-components/base-button/base-button.js +1 -1
- package/lib/new-components/base-button/base-button.js.map +1 -1
- package/lib/new-components/base-button/base-button.module.css.js +1 -1
- package/lib/new-components/tabs/tabs.d.ts +5 -10
- package/lib/new-components/tabs/tabs.js +1 -1
- package/lib/new-components/tabs/tabs.js.map +1 -1
- package/lib/new-components/tabs/tabs.module.css.js +1 -1
- package/lib/new-components/text-field/text-field.module.css.js +1 -1
- package/package.json +1 -1
- package/styles/alert.css +1 -1
- package/styles/base-button.css +1 -1
- package/styles/base-button.module.css.css +1 -1
- package/styles/modal.css +1 -1
- package/styles/password-field.css +1 -1
- package/styles/reactist.css +6 -10
- package/styles/tabs.css +3 -3
- package/styles/tabs.module.css.css +1 -1
- package/styles/text-field.css +1 -1
- package/styles/text-field.module.css.css +1 -1
- package/es/components/checkbox/checkbox.js +0 -24
- package/es/components/checkbox/checkbox.js.map +0 -1
- package/es/components/checkbox/index.js +0 -6
- package/es/components/deprecated-loading/deprecated-loading.js +0 -39
- package/es/components/deprecated-loading/deprecated-loading.js.map +0 -1
- package/es/components/deprecated-modal/deprecated-modal.js +0 -207
- package/es/components/deprecated-modal/deprecated-modal.js.map +0 -1
- package/es/components/deprecated-modal/index.js +0 -11
- package/es/components/deprecated-modal/index.js.map +0 -1
- package/es/components/dropdown/dropdown.js.map +0 -1
- package/es/components/input/input.js.map +0 -1
- package/es/components/popover/index.js +0 -6
- package/es/components/popover/index.js.map +0 -1
- package/es/components/popover/popover.js +0 -206
- package/es/components/popover/popover.js.map +0 -1
- package/es/components/popover/positioning-utils.js +0 -104
- package/es/components/popover/positioning-utils.js.map +0 -1
- package/es/components/select/index.js.map +0 -1
- package/es/components/select/select.js.map +0 -1
- package/lib/components/checkbox/checkbox.d.ts +0 -13
- package/lib/components/checkbox/checkbox.js +0 -2
- package/lib/components/checkbox/checkbox.js.map +0 -1
- package/lib/components/checkbox/checkbox.test.d.ts +0 -1
- package/lib/components/checkbox/index.d.ts +0 -2
- package/lib/components/checkbox/index.js +0 -2
- package/lib/components/deprecated-loading/deprecated-loading.d.ts +0 -19
- package/lib/components/deprecated-loading/deprecated-loading.js +0 -2
- package/lib/components/deprecated-loading/deprecated-loading.js.map +0 -1
- package/lib/components/deprecated-loading/deprecated-loading.test.d.ts +0 -1
- package/lib/components/deprecated-loading/index.d.ts +0 -1
- package/lib/components/deprecated-modal/deprecated-modal.d.ts +0 -88
- package/lib/components/deprecated-modal/deprecated-modal.js +0 -2
- package/lib/components/deprecated-modal/deprecated-modal.js.map +0 -1
- package/lib/components/deprecated-modal/deprecated-modal.test.d.ts +0 -1
- package/lib/components/deprecated-modal/index.d.ts +0 -10
- package/lib/components/deprecated-modal/index.js +0 -2
- package/lib/components/deprecated-modal/index.js.map +0 -1
- package/lib/components/dropdown/dropdown.js.map +0 -1
- package/lib/components/input/input.js.map +0 -1
- package/lib/components/popover/index.d.ts +0 -2
- package/lib/components/popover/index.js +0 -2
- package/lib/components/popover/index.js.map +0 -1
- package/lib/components/popover/popover.d.ts +0 -54
- package/lib/components/popover/popover.js +0 -2
- package/lib/components/popover/popover.js.map +0 -1
- package/lib/components/popover/popover.test.d.ts +0 -1
- package/lib/components/popover/positioning-utils.d.ts +0 -19
- package/lib/components/popover/positioning-utils.js +0 -2
- package/lib/components/popover/positioning-utils.js.map +0 -1
- package/lib/components/popover/positioning-utils.test.d.ts +0 -1
- package/lib/components/select/index.js.map +0 -1
- package/lib/components/select/select.js.map +0 -1
- package/styles/checkbox.css +0 -1
- package/styles/deprecated-loading.css +0 -1
- package/styles/deprecated-modal.css +0 -1
- package/styles/popover.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.js","sources":["../../../src/components/color-picker/color-picker.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\n\nimport
|
|
1
|
+
{"version":3,"file":"color-picker.js","sources":["../../../src/components/color-picker/color-picker.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\n\nimport DeprecatedDropdown from '../deprecated-dropdown'\nimport { Tooltip } from '../tooltip'\n\nimport './color-picker.less'\n\ntype NamedColor = { name: string; color: string }\n\nconst COLORS = [\n '#606060',\n '#4A90E2',\n '#03B3B2',\n '#008299',\n '#82BA00',\n '#D24726',\n '#AC193D',\n '#DC4FAD',\n '#3BD5FB',\n '#74E8D3',\n '#FFCC00',\n '#FB886E',\n '#CCCCCC',\n]\n\nconst _isNamedColor = (color: string | NamedColor | undefined): color is NamedColor =>\n typeof color !== 'string'\n\nconst _getColor = (colorList: (string | NamedColor)[], colorIndex: number) => {\n const index = colorIndex >= colorList.length ? 0 : colorIndex\n return colorList[index]\n}\n\ntype Props = {\n small?: boolean\n color?: number\n onChange?: (color: number) => void\n colorList?: (string | NamedColor)[]\n}\n\nfunction ColorPicker({ color = 0, small, onChange, colorList = COLORS }: Props) {\n return (\n <DeprecatedDropdown.Box right className=\"reactist_color_picker\">\n <DeprecatedDropdown.Trigger>\n {(() => {\n const backgroundColor = _getColor(colorList, color)\n\n return (\n <span\n className={classnames('color_trigger', { small })}\n style={{\n backgroundColor: _isNamedColor(backgroundColor)\n ? backgroundColor.color\n : backgroundColor,\n }}\n >\n <span className=\"color_trigger--inner_ring\" />\n </span>\n )\n })()}\n </DeprecatedDropdown.Trigger>\n <DeprecatedDropdown.Body>\n <div className=\"color_options\">\n {colorList.reduce<React.ReactNode[]>((items, currentColor, currentIndex) => {\n items.push(\n <ColorItem\n isActive={\n color >= colorList.length\n ? currentIndex === 0\n : currentIndex === color\n }\n key={currentIndex}\n color={\n _isNamedColor(currentColor) ? currentColor.color : currentColor\n }\n colorIndex={currentIndex}\n onClick={onChange}\n tooltip={_isNamedColor(currentColor) ? currentColor.name : null}\n />,\n )\n return items\n }, [])}\n </div>\n </DeprecatedDropdown.Body>\n </DeprecatedDropdown.Box>\n )\n}\nColorPicker.displayName = 'ColorPicker'\n\ntype ColorItemProps = {\n color: string\n colorIndex: number\n isActive?: boolean\n onClick?: (colorIndex: number) => void\n tooltip?: React.ReactNode\n}\n\nfunction ColorItem({ color, colorIndex, isActive, onClick, tooltip }: ColorItemProps) {\n const item = (\n <span\n className={'reactist color_item' + (isActive ? ' active' : '')}\n style={{ backgroundColor: color }}\n onClick={() => onClick?.(colorIndex)}\n >\n <span className=\"color_item--inner_ring\" />\n </span>\n )\n\n return tooltip ? <Tooltip content={tooltip}>{item}</Tooltip> : item\n}\nColorItem.displayName = 'ColorItem'\n\nexport { ColorPicker, ColorItem, COLORS }\n"],"names":["COLORS","_isNamedColor","color","ColorPicker","small","onChange","colorList","React","DeprecatedDropdown","Box","right","className","Trigger","backgroundColor","colorIndex","length","_getColor","classnames","style","Body","reduce","items","currentColor","currentIndex","push","ColorItem","isActive","key","onClick","tooltip","name","item","Tooltip","content","displayName"],"mappings":"qRAUMA,EAAS,CACX,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAGEC,EAAiBC,GACF,iBAAVA,EAcX,SAASC,GAAYD,MAAEA,EAAQ,EAAVE,MAAaA,EAAbC,SAAoBA,EAApBC,UAA8BA,EAAYN,IAC3D,OACIO,gBAACC,UAAmBC,KAAIC,SAAMC,UAAU,yBACpCJ,gBAACC,UAAmBI,aACf,MACG,MAAMC,EAjBR,EAACP,EAAoCQ,IAE5CR,EADOQ,GAAcR,EAAUS,OAAS,EAAID,GAgBXE,CAAUV,EAAWJ,GAE7C,OACIK,wBACII,UAAWM,EAAW,gBAAiB,CAAEb,MAAAA,IACzCc,MAAO,CACHL,gBAAiBZ,EAAcY,GACzBA,EAAgBX,MAChBW,IAGVN,wBAAMI,UAAU,gCAZ3B,IAiBLJ,gBAACC,UAAmBW,UAChBZ,uBAAKI,UAAU,iBACVL,EAAUc,OAA0B,CAACC,EAAOC,EAAcC,KACvDF,EAAMG,KACFjB,gBAACkB,GACGC,SACIxB,GAASI,EAAUS,OACI,IAAjBQ,EACAA,IAAiBrB,EAE3ByB,IAAKJ,EACLrB,MACID,EAAcqB,GAAgBA,EAAapB,MAAQoB,EAEvDR,WAAYS,EACZK,QAASvB,EACTwB,QAAS5B,EAAcqB,GAAgBA,EAAaQ,KAAO,QAG5DT,GACR,OAgBvB,SAASI,GAAUvB,MAAEA,EAAFY,WAASA,EAATY,SAAqBA,EAArBE,QAA+BA,UAASC,IACvD,MAAME,EACFxB,wBACII,UAAW,uBAAyBe,EAAW,UAAY,IAC3DR,MAAO,CAAEL,gBAAiBX,GAC1B0B,QAAS,UAAMA,SAAAA,EAAUd,IAEzBP,wBAAMI,UAAU,4BAIxB,OAAOkB,EAAUtB,gBAACyB,WAAQC,QAASJ,GAAUE,GAAkBA,EArBnE5B,EAAY+B,YAAc,cAuB1BT,EAAUS,YAAc"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.js","sources":["../../../src/components/deprecated-dropdown/dropdown.tsx"],"sourcesContent":["import React from 'react'\nimport ReactDOM from 'react-dom'\nimport classNames from 'classnames'\n\nimport Button from '../deprecated-button'\n\nimport './dropdown.less'\n\ntype BoxProps = {\n onShowBody?: () => void\n onHideBody?: () => void\n allowBodyInteractions?: boolean\n top?: boolean\n right?: boolean\n scrolling_parent?: string\n children?: [\n React.ReactElement<TriggerProps>,\n React.ReactElement<BodyProps> | ((props: BodyProps) => JSX.Element),\n ]\n className?: string\n}\n\ntype BoxState = {\n top: boolean\n showBody: boolean\n}\n\nclass Box extends React.Component<React.PropsWithChildren<BoxProps>, BoxState> {\n public static displayName: string\n\n constructor(props: BoxProps, context: React.Context<unknown>) {\n super(props, context)\n this.state = {\n showBody: false,\n top: props.top || false,\n }\n\n this._timeout = undefined\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this._handleClickOutside, true)\n if (this._timeout) {\n clearTimeout(this._timeout)\n }\n }\n _timeout?: ReturnType<typeof setTimeout>\n\n _handleClickOutside = (event: MouseEvent) => {\n const dropdownDOMNode = ReactDOM.findDOMNode(this)\n\n if (dropdownDOMNode && !dropdownDOMNode.contains(event.target as Node))\n this._toggleShowBody()\n else if (!this.props.allowBodyInteractions) {\n // won't close when body interactions are allowed\n this._timeout = setTimeout(() => {\n if (this.state.showBody) {\n this._toggleShowBody()\n }\n }, 100)\n }\n }\n\n _toggleShowBody = () => {\n if (!this.state.showBody) {\n // will show\n if (this.props.onShowBody) this.props.onShowBody()\n document.addEventListener('click', this._handleClickOutside, true)\n } else {\n // will hide\n if (this.props.onHideBody) this.props.onHideBody()\n document.removeEventListener('click', this._handleClickOutside, true)\n }\n\n this.setState({\n showBody: !this.state.showBody,\n })\n }\n\n _getTriggerComponent() {\n const _trigger = this.props.children?.[0]\n return _trigger\n ? React.cloneElement(_trigger, { onClick: this._toggleShowBody })\n : undefined\n }\n\n // https://facebook.github.io/react/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components\n _setPosition = (body: HTMLElement | null) => {\n if (body) {\n const scrollingParent = document.getElementById(\n this.props.scrolling_parent ? this.props.scrolling_parent : '',\n )\n\n if (scrollingParent) {\n const dropdown = ReactDOM.findDOMNode(this)\n if (!dropdown) {\n return\n }\n const dropdownVerticalPosition = (ReactDOM.findDOMNode(this) as HTMLElement)\n .offsetTop\n const dropdownTrigger = (dropdown as Element).querySelector('.trigger')\n if (!dropdownTrigger) {\n return\n }\n const dropdownTriggerHeight = dropdownTrigger.clientHeight\n const dropdownBodyHeight = body.clientHeight\n\n const scrollingParentHeight = scrollingParent.clientHeight\n const scrollingParentOffset = scrollingParent.scrollTop\n\n const bottomOffset =\n scrollingParentHeight +\n scrollingParentOffset -\n dropdownVerticalPosition -\n dropdownTriggerHeight\n\n const top = bottomOffset < dropdownBodyHeight\n\n if (top !== this.state.top) {\n this.setState({ top })\n }\n }\n }\n }\n\n _getBodyComponent() {\n if (!this.state.showBody) {\n return null\n }\n const { top } = this.state\n const { right = false, children } = this.props\n const props = { top, right, setPosition: this._setPosition }\n\n const className = classNames({\n body_wrapper: true,\n with_arrow: true,\n top: top,\n bottom: !top,\n })\n\n const body = children?.[1]\n\n const contentMarkup =\n typeof body === 'function'\n ? body(props)\n : body\n ? React.cloneElement(body, props)\n : undefined\n return (\n <div className={className} style={{ position: 'relative' }}>\n {contentMarkup}\n </div>\n )\n }\n\n render() {\n const className = classNames('reactist_dropdown', this.props.className)\n const { top } = this.state\n\n return (\n <div style={{ display: 'inline-block' }} className={className}>\n {top && this._getBodyComponent()}\n {this._getTriggerComponent()}\n {!top && this._getBodyComponent()}\n </div>\n )\n }\n}\n\nBox.displayName = 'Dropdown.Box'\n\ntype NativeButtonProps = React.DetailedHTMLProps<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n>\n\ntype TriggerProps = Omit<NativeButtonProps, 'title'> & {\n tooltip?: React.ReactNode\n}\n\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(function Trigger(\n { children, onClick, tooltip, className, ...props },\n ref,\n) {\n function handleClick(event: React.MouseEvent<HTMLButtonElement, MouseEvent>) {\n event.preventDefault()\n event.stopPropagation()\n if (onClick) onClick(event)\n }\n\n return (\n <Button\n {...props}\n className={classNames('trigger', className)}\n onClick={handleClick}\n tooltip={tooltip}\n ref={ref}\n >\n {children}\n </Button>\n )\n})\n\nTrigger.displayName = 'Dropdown.Trigger'\n\ntype BodyProps = {\n setPosition?: React.Ref<HTMLDivElement>\n children?: React.ReactNode\n top?: boolean\n right?: boolean\n}\n\nfunction Body({ top, right, children, setPosition }: BodyProps) {\n const style: React.CSSProperties = { position: 'absolute', right: 0, top: 0 }\n\n if (top) {\n style.top = 'auto'\n style.bottom = 0\n }\n\n if (right) {\n style.right = 'auto'\n style.left = 0\n }\n\n return (\n <div ref={setPosition} style={style} className=\"body\" id=\"reactist-dropdown-body\">\n {children}\n </div>\n )\n}\n\nBody.displayName = 'Dropdown.Body'\n\nconst Dropdown = {\n Box,\n Trigger,\n Body,\n}\n\nexport { Dropdown }\n"],"names":["Box","React","Component","constructor","props","context","super","_timeout","_handleClickOutside","event","dropdownDOMNode","ReactDOM","findDOMNode","this","contains","target","_toggleShowBody","allowBodyInteractions","setTimeout","state","showBody","onHideBody","document","removeEventListener","onShowBody","addEventListener","setState","_setPosition","body","scrollingParent","getElementById","scrolling_parent","dropdown","dropdownVerticalPosition","offsetTop","dropdownTrigger","querySelector","top","clientHeight","scrollTop","undefined","componentWillUnmount","clearTimeout","_getTriggerComponent","_trigger","children","_this$props$children","cloneElement","onClick","_getBodyComponent","right","setPosition","className","classNames","body_wrapper","with_arrow","bottom","contentMarkup","style","position","render","display","displayName","Trigger","forwardRef","ref","tooltip","Button","preventDefault","stopPropagation","Body","left","id"],"mappings":"kXA2BA,MAAMA,UAAYC,EAAMC,UAGpBC,YAAYC,EAAiBC,GACzBC,MAAMF,EAAOC,QAejBE,qBAEAC,oBAAuBC,IACnB,MAAMC,EAAkBC,EAASC,YAAYC,MAEzCH,IAAoBA,EAAgBI,SAASL,EAAMM,QACnDF,KAAKG,kBACCH,KAAKT,MAAMa,wBAEjBJ,KAAKN,SAAWW,WAAW,KACnBL,KAAKM,MAAMC,UACXP,KAAKG,mBAEV,YAIXA,gBAAkB,KACTH,KAAKM,MAAMC,UAMRP,KAAKT,MAAMiB,YAAYR,KAAKT,MAAMiB,aACtCC,SAASC,oBAAoB,QAASV,KAAKL,qBAAqB,KAL5DK,KAAKT,MAAMoB,YAAYX,KAAKT,MAAMoB,aACtCF,SAASG,iBAAiB,QAASZ,KAAKL,qBAAqB,IAOjEK,KAAKa,SAAS,CACVN,UAAWP,KAAKM,MAAMC,iBAY9BO,aAAgBC,IACZ,GAAIA,EAAM,CACN,MAAMC,EAAkBP,SAASQ,eAC7BjB,KAAKT,MAAM2B,iBAAmBlB,KAAKT,MAAM2B,iBAAmB,IAGhE,GAAIF,EAAiB,CACjB,MAAMG,EAAWrB,EAASC,YAAYC,MACtC,IAAKmB,EACD,OAEJ,MAAMC,EAA4BtB,EAASC,YAAYC,MAClDqB,UACCC,EAAmBH,EAAqBI,cAAc,YAC5D,IAAKD,EACD,OAEJ,MAYME,EATwBR,EAAgBS,aAChBT,EAAgBU,UAK1CN,EAT0BE,EAAgBG,aACnBV,EAAKU,aAa5BD,IAAQxB,KAAKM,MAAMkB,KACnBxB,KAAKa,SAAS,CAAEW,IAAAA,OAvF5BxB,KAAKM,MAAQ,CACTC,UAAU,EACViB,IAAKjC,EAAMiC,MAAO,GAGtBxB,KAAKN,cAAWiC,EAGpBC,uBACInB,SAASC,oBAAoB,QAASV,KAAKL,qBAAqB,GAC5DK,KAAKN,UACLmC,aAAa7B,KAAKN,UAoC1BoC,6BACI,MAAMC,WAAW/B,KAAKT,MAAMyC,iBAAXC,EAAsB,GACvC,OAAOF,EACD3C,EAAM8C,aAAaH,EAAU,CAAEI,QAASnC,KAAKG,uBAC7CwB,EA0CVS,oBACI,IAAKpC,KAAKM,MAAMC,SACZ,OAAO,KAEX,MAAMiB,IAAEA,GAAQxB,KAAKM,OACf+B,MAAEA,GAAQ,EAAVL,SAAiBA,GAAahC,KAAKT,MACnCA,EAAQ,CAAEiC,IAAAA,EAAKa,MAAAA,EAAOC,YAAatC,KAAKc,cAExCyB,EAAYC,EAAW,CACzBC,cAAc,EACdC,YAAY,EACZlB,IAAKA,EACLmB,QAASnB,IAGPT,QAAOiB,SAAAA,EAAW,GAElBY,EACc,mBAAT7B,EACDA,EAAKxB,GACLwB,EACA3B,EAAM8C,aAAanB,EAAMxB,QACzBoC,EACV,OACIvC,uBAAKmD,UAAWA,EAAWM,MAAO,CAAEC,SAAU,aACzCF,GAKbG,SACI,MAAMR,EAAYC,EAAW,oBAAqBxC,KAAKT,MAAMgD,YACvDf,IAAEA,GAAQxB,KAAKM,MAErB,OACIlB,uBAAKyD,MAAO,CAAEG,QAAS,gBAAkBT,UAAWA,GAC/Cf,GAAOxB,KAAKoC,oBACZpC,KAAK8B,wBACJN,GAAOxB,KAAKoC,sBAxIxBjD,EACY8D,mBA6IlB9D,EAAI8D,YAAc,eAWlB,MAAMC,EAAU9D,EAAM+D,YAA4C,WAE9DC,OADApB,SAAEA,EAAFG,QAAYA,EAAZkB,QAAqBA,EAArBd,UAA8BA,KAAchD,iCAS5C,OACIH,gBAACkE,6CACO/D,OACJgD,UAAWC,EAAW,UAAWD,GACjCJ,QAVR,SAAqBvC,GACjBA,EAAM2D,iBACN3D,EAAM4D,kBACFrB,GAASA,EAAQvC,IAQjByD,QAASA,EACTD,IAAKA,IAEJpB,MAcb,SAASyB,GAAKjC,IAAEA,EAAFa,MAAOA,EAAPL,SAAcA,EAAdM,YAAwBA,IAClC,MAAMO,EAA6B,CAAEC,SAAU,WAAYT,MAAO,EAAGb,IAAK,GAY1E,OAVIA,IACAqB,EAAMrB,IAAM,OACZqB,EAAMF,OAAS,GAGfN,IACAQ,EAAMR,MAAQ,OACdQ,EAAMa,KAAO,GAIbtE,uBAAKgE,IAAKd,EAAaO,MAAOA,EAAON,UAAU,OAAOoB,GAAG,0BACpD3B,GAxBbkB,EAAQD,YAAc,mBA6BtBQ,EAAKR,YAAc,iCAEF,CACb9D,IAAAA,EACA+D,QAAAA,EACAO,KAAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../src/components/deprecated-input/input.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport './input.less'\n\ntype InputProps = {\n /** Additional css class applied to the input. */\n className?: string\n ref?: React.Ref<HTMLInputElement>\n}\n\ntype Props = InputProps & React.InputHTMLAttributes<HTMLInputElement>\n\nconst Input: React.FC<React.PropsWithRef<Props>> = React.forwardRef(\n (props: Props, ref: React.Ref<HTMLInputElement>) => {\n const className = classNames('reactist_input', props.className)\n return <input {...props} className={className} ref={ref} />\n },\n)\nInput.displayName = 'Input'\n\nexport { Input }\n"],"names":["Input","React","forwardRef","props","ref","className","classNames","displayName"],"mappings":"8PAaMA,EAA6CC,EAAMC,WACrD,CAACC,EAAcC,KACX,MAAMC,EAAYC,EAAW,iBAAkBH,EAAME,WACrD,OAAOJ,2DAAWE,OAAOE,UAAWA,EAAWD,IAAKA,OAG5DJ,EAAMO,YAAc"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../../src/components/deprecated-select/select.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport './select.less'\n\ntype Option = {\n /** Optional key for each option. If not provided `value` is used. */\n key?: string | number\n /** Value of the option. */\n value: string | number\n /** Text to display for the option. */\n text?: string | number\n /** Whether the options is disabled or not. */\n disabled?: boolean\n}\n\ntype Props = {\n className?: string\n disabled?: boolean\n /** Currently selected value. */\n value?: string | number\n /** Callback for the change event. Will be called with the next value (not the full event). */\n onChange?: (value: string) => void\n /** Options that are rendered in the select. */\n options?: Option[]\n /** Value to initially be set */\n defaultValue?: string | number\n}\n\nfunction Select({\n value,\n options = [],\n onChange,\n disabled = true,\n className = '',\n defaultValue,\n ...otherProps\n}: Props) {\n const selectClassName = classNames('reactist_select', { disabled }, className)\n return (\n <select\n className={selectClassName}\n value={value}\n onChange={(event) => (onChange ? onChange(event.target.value) : undefined)}\n disabled={disabled}\n defaultValue={defaultValue}\n {...otherProps}\n >\n {options?.map((option) => (\n <option\n key={option.key || option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {option.text}\n </option>\n ))}\n </select>\n )\n}\nSelect.displayName = 'Select'\nSelect.defaultProps = {\n options: [],\n disabled: false,\n}\n\nexport { Select }\n"],"names":["Select","value","options","onChange","disabled","className","defaultValue","otherProps","selectClassName","classNames","React","event","target","undefined","map","option","key","text","displayName","defaultProps"],"mappings":"qUA6BA,SAASA,SAAOC,MACZA,EADYC,QAEZA,EAAU,GAFEC,SAGZA,EAHYC,SAIZA,GAAW,EAJCC,UAKZA,EAAY,GALAC,aAMZA,KACGC,iCAEH,MAAMC,EAAkBC,EAAW,kBAAmB,CAAEL,SAAAA,GAAYC,GACpE,OACIK,0CACIL,UAAWG,EACXP,MAAOA,EACPE,SAAWQ,GAAWR,EAAWA,EAASQ,EAAMC,OAAOX,YAASY,EAChET,SAAUA,EACVE,aAAcA,GACVC,SAEHL,SAAAA,EAASY,IAAKC,GACXL,0BACIM,IAAKD,EAAOC,KAAOD,EAAOd,MAC1BA,MAAOc,EAAOd,MACdG,SAAUW,EAAOX,UAEhBW,EAAOE,QAM5BjB,EAAOkB,YAAc,SACrBlB,EAAOmB,aAAe,CAClBjB,QAAS,GACTE,UAAU"}
|
|
File without changes
|
|
@@ -10,6 +10,6 @@ declare type TooltipProps = Omit<AriakitTooltipProps, 'children' | 'state'> & {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const SHOW_DELAY = 500;
|
|
12
12
|
export declare const HIDE_DELAY = 100;
|
|
13
|
-
declare function Tooltip({ children, content, position, gapSize, className, ...props }: TooltipProps): JSX.Element;
|
|
13
|
+
declare function Tooltip({ children, content, position, gapSize, className, ...props }: TooltipProps): JSX.Element | null;
|
|
14
14
|
export type { TooltipProps };
|
|
15
15
|
export { Tooltip };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=e(require("react")),o=e(require("classnames")),n=require("ariakit/tooltip");const c=["children","content","position","gapSize","className"];exports.HIDE_DELAY=100,exports.SHOW_DELAY=500,exports.Tooltip=function(e){let{children:u,content:l,position:s="top",gapSize:i=3,className:a}=e,p=t.objectWithoutProperties(e,c);const f=function(e){const o=n.useTooltipState(e),c=function(){const e=r.useRef(),t=r.useCallback((function(){null!=e.current&&clearTimeout(e.current)}),[]);return r.useEffect(()=>t,[t]),r.useCallback((function(r,o){return()=>{t(),e.current=setTimeout(r,o)}}),[t])}();return r.useMemo(()=>t.objectSpread2(t.objectSpread2({},o),{},{show:c(()=>o.show(),500),hide:c(()=>o.hide(),100)}),[c,o])}({placement:s,gutter:i}),d=r.Children.only(u);if(!l||!d)return d;if("string"==typeof d.ref)throw new Error("Tooltip: String refs cannot be used as they cannot be forwarded");return r.createElement(r.Fragment,null,r.createElement(n.TooltipAnchor,{state:f,ref:d.ref,onFocus:function(e){var t;e.currentTarget.addEventListener("keyup",(function(e){const t=e.key;"Escape"!==t&&"Enter"!==t&&"Space"!==t&&f.show()}),{once:!0}),e.preventDefault(),null==d||null==(t=d.props)||null==t.onFocus||t.onFocus(e)}},e=>r.cloneElement(d,t.objectSpread2(t.objectSpread2({},e),d.props))),f.visible?r.createElement(n.Tooltip,t.objectSpread2(t.objectSpread2({},p),{},{state:f,className:o("reactist_tooltip",a)}),"function"==typeof l?l():l):null)};
|
|
2
2
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport {\n useTooltipState as useAriakitTooltipState,\n TooltipStateProps as AriakitTooltipStateProps,\n Tooltip as AriakitTooltip,\n TooltipProps as AriakitTooltipProps,\n TooltipAnchor,\n TooltipAnchorProps,\n} from 'ariakit/tooltip'\nimport type { PopoverState } from 'ariakit/popover'\n\nimport './tooltip.less'\n\ntype TooltipProps = Omit<AriakitTooltipProps, 'children' | 'state'> & {\n children: React.ReactNode\n content: React.ReactNode | (() => React.ReactNode)\n position?: PopoverState['placement']\n gapSize?: number\n}\n\n// These are exported to be used in the tests, they are not meant to be exported publicly\nexport const SHOW_DELAY = 500\nexport const HIDE_DELAY = 100\n\nfunction useDelayedTooltipState(initialState: AriakitTooltipStateProps) {\n const tooltipState = useAriakitTooltipState(initialState)\n const delay = useDelay()\n return React.useMemo(\n () => ({\n ...tooltipState,\n show: delay(() => tooltipState.show(), SHOW_DELAY),\n hide: delay(() => tooltipState.hide(), HIDE_DELAY),\n }),\n [delay, tooltipState],\n )\n}\n\nfunction Tooltip({\n children,\n content,\n position = 'top',\n gapSize = 3,\n className,\n ...props\n}: TooltipProps) {\n const state = useDelayedTooltipState({ placement: position, gutter: gapSize })\n\n const child = React.Children.only(\n children as React.FunctionComponentElement<JSX.IntrinsicElements['div'] | null
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import React from 'react'\nimport classNames from 'classnames'\n\nimport {\n useTooltipState as useAriakitTooltipState,\n TooltipStateProps as AriakitTooltipStateProps,\n Tooltip as AriakitTooltip,\n TooltipProps as AriakitTooltipProps,\n TooltipAnchor,\n TooltipAnchorProps,\n} from 'ariakit/tooltip'\nimport type { PopoverState } from 'ariakit/popover'\n\nimport './tooltip.less'\n\ntype TooltipProps = Omit<AriakitTooltipProps, 'children' | 'state'> & {\n children: React.ReactNode\n content: React.ReactNode | (() => React.ReactNode)\n position?: PopoverState['placement']\n gapSize?: number\n}\n\n// These are exported to be used in the tests, they are not meant to be exported publicly\nexport const SHOW_DELAY = 500\nexport const HIDE_DELAY = 100\n\nfunction useDelayedTooltipState(initialState: AriakitTooltipStateProps) {\n const tooltipState = useAriakitTooltipState(initialState)\n const delay = useDelay()\n return React.useMemo(\n () => ({\n ...tooltipState,\n show: delay(() => tooltipState.show(), SHOW_DELAY),\n hide: delay(() => tooltipState.hide(), HIDE_DELAY),\n }),\n [delay, tooltipState],\n )\n}\n\nfunction Tooltip({\n children,\n content,\n position = 'top',\n gapSize = 3,\n className,\n ...props\n}: TooltipProps) {\n const state = useDelayedTooltipState({ placement: position, gutter: gapSize })\n\n const child = React.Children.only(\n children as React.FunctionComponentElement<JSX.IntrinsicElements['div']> | null,\n )\n\n if (!content || !child) {\n return child\n }\n\n if (typeof child.ref === 'string') {\n throw new Error('Tooltip: String refs cannot be used as they cannot be forwarded')\n }\n\n /**\n * Prevents the tooltip from automatically firing on focus all the time. This is to prevent\n * tooltips from showing when the trigger element is focused back after a popover or dialog that\n * it opened was closed. See link below for more details.\n * @see https://github.com/reakit/reakit/discussions/749\n */\n function handleFocus(event: React.FocusEvent<HTMLDivElement>) {\n // If focus is not followed by a key up event, does it mean that it's not\n // an intentional keyboard focus? Not sure but it seems to work.\n // This may be resolved soon in an upcoming version of reakit:\n // https://github.com/reakit/reakit/issues/750\n function handleKeyUp(e: Event) {\n const eventKey = (e as KeyboardEvent).key\n if (eventKey !== 'Escape' && eventKey !== 'Enter' && eventKey !== 'Space') {\n state.show()\n }\n }\n event.currentTarget.addEventListener('keyup', handleKeyUp, { once: true })\n // Prevent tooltip.show from being called by TooltipReference\n event.preventDefault()\n child?.props?.onFocus?.(event)\n }\n\n return (\n <>\n <TooltipAnchor state={state} ref={child.ref} onFocus={handleFocus}>\n {(anchorProps: TooltipAnchorProps) => {\n // Let child props override anchor props so user can specify attributes like tabIndex\n // Also, do not apply the child's props to TooltipAnchor as props like `as` can create problems\n // by applying the replacement component/element twice\n return React.cloneElement(child, { ...anchorProps, ...child.props })\n }}\n </TooltipAnchor>\n {state.visible ? (\n <AriakitTooltip\n {...props}\n state={state}\n className={classNames('reactist_tooltip', className)}\n >\n {typeof content === 'function' ? content() : content}\n </AriakitTooltip>\n ) : null}\n </>\n )\n}\n\nexport type { TooltipProps }\nexport { Tooltip }\n\n//\n// Internal helpers\n//\n\n/**\n * Returns a function offering the same interface as setTimeout, but cleans up on unmount.\n *\n * The timeout state is shared, and only one delayed function can be active at any given time. If\n * a new delayed function is called while another one was waiting for its time to run, that older\n * invocation is cleared and it never runs.\n *\n * This is suitable for our use case here, but probably not the most intuitive thing in general.\n * That's why this is not made a shared util or something like it.\n */\nfunction useDelay() {\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>()\n\n const clearTimeouts = React.useCallback(function clearTimeouts() {\n if (timeoutRef.current != null) {\n clearTimeout(timeoutRef.current)\n }\n }, [])\n\n // Runs clearTimeouts when the component is unmounted\n React.useEffect(() => clearTimeouts, [clearTimeouts])\n\n return React.useCallback(\n function delay(fn: () => void, delay: number) {\n return () => {\n clearTimeouts()\n timeoutRef.current = setTimeout(fn, delay)\n }\n },\n [clearTimeouts],\n )\n}\n"],"names":["children","content","position","gapSize","className","props","state","initialState","tooltipState","useAriakitTooltipState","delay","timeoutRef","React","useRef","clearTimeouts","useCallback","current","clearTimeout","useEffect","fn","setTimeout","useDelay","useMemo","show","hide","useDelayedTooltipState","placement","gutter","child","Children","only","ref","Error","TooltipAnchor","onFocus","event","currentTarget","addEventListener","e","eventKey","key","once","preventDefault","anchorProps","cloneElement","visible","AriakitTooltip","classNames"],"mappings":"wWAwB0B,uBADA,oBAgB1B,gBAAiBA,SACbA,EADaC,QAEbA,EAFaC,SAGbA,EAAW,MAHEC,QAIbA,EAAU,EAJGC,UAKbA,KACGC,iCAEH,MAAMC,EArBV,SAAgCC,GAC5B,MAAMC,EAAeC,kBAAuBF,GACtCG,EAgGV,WACI,MAAMC,EAAaC,EAAMC,SAEnBC,EAAgBF,EAAMG,aAAY,WACV,MAAtBJ,EAAWK,SACXC,aAAaN,EAAWK,WAE7B,IAKH,OAFAJ,EAAMM,UAAU,IAAMJ,EAAe,CAACA,IAE/BF,EAAMG,aACT,SAAeI,EAAgBT,GAC3B,MAAO,KACHI,IACAH,EAAWK,QAAUI,WAAWD,EAAIT,MAG5C,CAACI,IAnHSO,GACd,OAAOT,EAAMU,QACT,uCACOd,OACHe,KAAMb,EAAM,IAAMF,EAAae,OATjB,KAUdC,KAAMd,EAAM,IAAMF,EAAagB,OATjB,OAWlB,CAACd,EAAOF,IAYEiB,CAAuB,CAAEC,UAAWxB,EAAUyB,OAAQxB,IAE9DyB,EAAQhB,EAAMiB,SAASC,KACzB9B,GAGJ,IAAKC,IAAY2B,EACb,OAAOA,EAGX,GAAyB,iBAAdA,EAAMG,IACb,MAAM,IAAIC,MAAM,mEA0BpB,OACIpB,gCACIA,gBAACqB,iBAAc3B,MAAOA,EAAOyB,IAAKH,EAAMG,IAAKG,QAnBrD,SAAqBC,SAWjBA,EAAMC,cAAcC,iBAAiB,SANrC,SAAqBC,GACjB,MAAMC,EAAYD,EAAoBE,IACrB,WAAbD,GAAsC,UAAbA,GAAqC,UAAbA,GACjDjC,EAAMiB,SAG6C,CAAEkB,MAAM,IAEnEN,EAAMO,uBACNd,YAAAA,EAAOvB,gBAAO6B,WAAAA,QAAUC,KAMdQ,GAIS/B,EAAMgC,aAAahB,qCAAYe,GAAgBf,EAAMvB,SAGnEC,EAAMuC,QACHjC,gBAACkC,6CACOzC,OACJC,MAAOA,EACPF,UAAW2C,EAAW,mBAAoB3C,KAEtB,mBAAZH,EAAyBA,IAAYA,GAEjD"}
|
package/lib/index.d.ts
CHANGED
|
@@ -24,20 +24,16 @@ export * from './new-components/tabs';
|
|
|
24
24
|
export * from './new-components/modal';
|
|
25
25
|
export * from './new-components/avatar';
|
|
26
26
|
export * from './hooks/use-previous';
|
|
27
|
-
export { default as Checkbox } from './components/checkbox';
|
|
28
27
|
export { default as ColorPicker, COLORS } from './components/color-picker';
|
|
29
|
-
export { default as Dropdown } from './components/dropdown';
|
|
30
|
-
export { default as Input } from './components/input';
|
|
31
28
|
export { default as KeyboardShortcut } from './components/keyboard-shortcut';
|
|
32
29
|
export { default as KeyCapturer, SUPPORTED_KEYS } from './components/key-capturer';
|
|
33
|
-
export { default as Popover } from './components/popover';
|
|
34
30
|
export { default as ProgressBar } from './components/progress-bar';
|
|
35
|
-
export { default as Select } from './components/select';
|
|
36
31
|
export { default as Time } from './components/time';
|
|
37
32
|
export { Notification } from './components/notification/notification';
|
|
38
33
|
export { Tooltip } from './components/tooltip';
|
|
39
34
|
export type { TooltipProps } from './components/tooltip';
|
|
40
35
|
export * from './components/menu';
|
|
41
36
|
export { default as DeprecatedButton } from './components/deprecated-button';
|
|
42
|
-
export { default as
|
|
43
|
-
export {
|
|
37
|
+
export { default as DeprecatedDropdown } from './components/deprecated-dropdown';
|
|
38
|
+
export { default as DeprecatedInput } from './components/deprecated-input';
|
|
39
|
+
export { default as DeprecatedSelect } from './components/deprecated-select';
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./new-components/box/box.js"),o=require("./new-components/columns/columns.js"),t=require("./new-components/divider/divider.js"),r=require("./new-components/inline/inline.js"),n=require("./new-components/stack/stack.js"),s=require("./new-components/hidden/hidden.js"),i=require("./new-components/hidden-visually/hidden-visually.js"),p=require("./components/tooltip/tooltip.js"),d=require("./new-components/button/button.js"),u=require("./new-components/alert/alert.js"),a=require("./new-components/loading/loading.js"),l=require("./new-components/notice/notice.js"),c=require("./new-components/heading/heading.js"),x=require("./new-components/text/text.js"),m=require("./new-components/button-link/button-link.js"),j=require("./new-components/text-link/text-link.js"),q=require("./new-components/checkbox-field/checkbox-field.js"),w=require("./new-components/password-field/password-field.js"),b=require("./new-components/select-field/select-field.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./new-components/box/box.js"),o=require("./new-components/columns/columns.js"),t=require("./new-components/divider/divider.js"),r=require("./new-components/inline/inline.js"),n=require("./new-components/stack/stack.js"),s=require("./new-components/hidden/hidden.js"),i=require("./new-components/hidden-visually/hidden-visually.js"),p=require("./components/tooltip/tooltip.js"),d=require("./new-components/button/button.js"),u=require("./new-components/alert/alert.js"),a=require("./new-components/loading/loading.js"),l=require("./new-components/notice/notice.js"),c=require("./new-components/heading/heading.js"),x=require("./new-components/text/text.js"),m=require("./new-components/button-link/button-link.js"),j=require("./new-components/text-link/text-link.js"),q=require("./new-components/checkbox-field/checkbox-field.js"),w=require("./new-components/password-field/password-field.js"),b=require("./new-components/select-field/select-field.js"),k=require("./new-components/switch-field/switch-field.js"),M=require("./new-components/text-area/text-area.js"),f=require("./new-components/text-field/text-field.js"),T=require("./hooks/use-previous/use-previous.js"),S=require("./new-components/tabs/tabs.js"),h=require("./new-components/modal/modal.js"),v=require("./new-components/avatar/avatar.js"),B=require("./components/deprecated-button/index.js"),y=require("./components/deprecated-dropdown/index.js"),P=require("./components/color-picker/color-picker.js"),C=require("./components/color-picker/index.js"),F=require("./components/keyboard-shortcut/index.js"),L=require("./components/key-capturer/key-capturer.js"),g=require("./components/key-capturer/index.js"),A=require("./components/progress-bar/index.js"),D=require("./components/time/index.js"),H=require("./components/notification/notification.js"),O=require("./components/menu/menu.js"),I=require("./components/deprecated-input/index.js"),E=require("./components/deprecated-select/index.js");exports.Box=e.Box,exports.Column=o.Column,exports.Columns=o.Columns,exports.Divider=t.Divider,exports.Inline=r.Inline,exports.Stack=n.Stack,exports.Hidden=s.Hidden,exports.HiddenVisually=i.HiddenVisually,exports.Tooltip=p.Tooltip,exports.Button=d.Button,exports.Alert=u.Alert,exports.Loading=a.Loading,exports.Notice=l.Notice,exports.Heading=c.Heading,exports.Text=x.Text,exports.ButtonLink=m.ButtonLink,exports.TextLink=j.TextLink,exports.CheckboxField=q.CheckboxField,exports.PasswordField=w.PasswordField,exports.SelectField=b.SelectField,exports.SwitchField=k.SwitchField,exports.TextArea=M.TextArea,exports.TextField=f.TextField,exports.usePrevious=T.usePrevious,exports.Tab=S.Tab,exports.TabAwareSlot=S.TabAwareSlot,exports.TabList=S.TabList,exports.TabPanel=S.TabPanel,exports.Tabs=S.Tabs,exports.Modal=h.Modal,exports.ModalActions=h.ModalActions,exports.ModalBody=h.ModalBody,exports.ModalCloseButton=h.ModalCloseButton,exports.ModalFooter=h.ModalFooter,exports.ModalHeader=h.ModalHeader,exports.Avatar=v.Avatar,exports.DeprecatedButton=B.default,exports.DeprecatedDropdown=y.default,exports.COLORS=P.COLORS,exports.ColorPicker=C.default,exports.KeyboardShortcut=F.default,exports.SUPPORTED_KEYS=L.SUPPORTED_KEYS,exports.KeyCapturer=g.default,exports.ProgressBar=A.default,exports.Time=D.default,exports.Notification=H.Notification,exports.Menu=O.Menu,exports.MenuButton=O.MenuButton,exports.MenuGroup=O.MenuGroup,exports.MenuItem=O.MenuItem,exports.MenuList=O.MenuList,exports.SubMenu=O.SubMenu,exports.DeprecatedInput=I.default,exports.DeprecatedSelect=E.default;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -19,6 +19,13 @@ declare type CommonProps = {
|
|
|
19
19
|
* @default 'normal'
|
|
20
20
|
*/
|
|
21
21
|
size?: ButtonSize;
|
|
22
|
+
/**
|
|
23
|
+
* Controls the shape of the button. Specifically, it allows to make it have slightly curved
|
|
24
|
+
* corners (the default) vs. having them fully curved to the point that they are as round as
|
|
25
|
+
* possible. In icon-only buttons this allows to have the button be circular.
|
|
26
|
+
* @default 'normal'
|
|
27
|
+
*/
|
|
28
|
+
shape?: 'normal' | 'rounded';
|
|
22
29
|
/**
|
|
23
30
|
* Whether the button is disabled or not.
|
|
24
31
|
* @default false
|
|
@@ -37,10 +44,6 @@ declare type CommonProps = {
|
|
|
37
44
|
* A tooltip linked to the button element.
|
|
38
45
|
*/
|
|
39
46
|
tooltip?: TooltipProps['content'];
|
|
40
|
-
/**
|
|
41
|
-
* The distance between the button element and the linked tooltip.
|
|
42
|
-
*/
|
|
43
|
-
tooltipGapSize?: TooltipProps['gapSize'];
|
|
44
47
|
};
|
|
45
48
|
declare type AlignmentProps = {
|
|
46
49
|
width: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),l=require("../../utils/polymorphism.js"),n=require("../box/box.js"),a=require("../../components/tooltip/tooltip.js"),o=require("../spinner/spinner.js"),i=require("./base-button.module.css.js");const r=["as","variant","tone","size","shape","disabled","loading","tooltip","onClick","exceptionallySetClassName","children","startIcon","endIcon","icon","width","align"];function s(e){e.preventDefault()}exports.BaseButton=l.polymorphicComponent((function(l,d){let{as:u="div",variant:c,tone:p="normal",size:m="normal",shape:f="normal",disabled:b=!1,loading:h=!1,tooltip:x,onClick:v,exceptionallySetClassName:j,children:B,startIcon:E,endIcon:g,icon:q,width:y="auto",align:S="center"}=l,C=e.objectWithoutProperties(l,r);const I=h||b,N=t.createElement(n.Box,e.objectSpread2(e.objectSpread2({},C),{},{as:u,ref:d,"aria-disabled":I,onClick:I?s:v,width:q?void 0:y,className:[j,i.default.baseButton,i.default["variant-"+c],i.default["tone-"+p],i.default["size-"+m],"rounded"===f?i.default["shape-rounded"]:null,q?i.default.iconButton:null,b?i.default.disabled:null]}),q?h&&t.createElement(o.Spinner,null)||q:t.createElement(t.Fragment,null,E?t.createElement(n.Box,{display:"flex",className:i.default.startIcon,"aria-hidden":!0},h&&!g?t.createElement(o.Spinner,null):E):null,B?t.createElement(n.Box,{as:"span",className:i.default.label,overflow:"hidden",width:"full"===y?"full":void 0,textAlign:"auto"===y?"center":S},B):null,g||h&&!E?t.createElement(n.Box,{display:"flex",className:i.default.endIcon,"aria-hidden":!0},h?t.createElement(o.Spinner,null):g):null)),w=q&&void 0===x?C["aria-label"]:x;return w?t.createElement(a.Tooltip,{content:w},N):N}));
|
|
2
2
|
//# sourceMappingURL=base-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.js","sources":["../../../src/new-components/base-button/base-button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Tooltip, TooltipProps } from '../../components/tooltip'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { Box } from '../box'\nimport { Spinner } from '../spinner'\nimport styles from './base-button.module.css'\n\nfunction preventDefault(event: React.SyntheticEvent) {\n event.preventDefault()\n}\n\ntype ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary'\ntype ButtonTone = 'normal' | 'destructive'\ntype ButtonSize = 'small' | 'normal' | 'large'\ntype IconElement = React.ReactChild\n\ntype CommonProps = {\n /**\n * The button's variant.\n */\n variant: ButtonVariant\n /**\n * The button's tone.\n * @default 'normal'\n */\n tone?: ButtonTone\n /**\n * The button's size.\n * @default 'normal'\n */\n size?: ButtonSize\n /**\n * Whether the button is disabled or not.\n * @default false\n */\n disabled?: boolean\n /**\n * Whether the button is busy/loading.\n *\n * A button in this state is functionally and semantically disabled. Visually is does not look\n * dimmed (as disabled buttons normally do), but it shows a loading spinner instead.\n *\n * @default false\n */\n loading?: boolean\n /**\n * A tooltip linked to the button element.\n */\n tooltip?: TooltipProps['content']\n
|
|
1
|
+
{"version":3,"file":"base-button.js","sources":["../../../src/new-components/base-button/base-button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Tooltip, TooltipProps } from '../../components/tooltip'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { Box } from '../box'\nimport { Spinner } from '../spinner'\nimport styles from './base-button.module.css'\n\nfunction preventDefault(event: React.SyntheticEvent) {\n event.preventDefault()\n}\n\ntype ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary'\ntype ButtonTone = 'normal' | 'destructive'\ntype ButtonSize = 'small' | 'normal' | 'large'\ntype IconElement = React.ReactChild\n\ntype CommonProps = {\n /**\n * The button's variant.\n */\n variant: ButtonVariant\n\n /**\n * The button's tone.\n * @default 'normal'\n */\n tone?: ButtonTone\n\n /**\n * The button's size.\n * @default 'normal'\n */\n size?: ButtonSize\n\n /**\n * Controls the shape of the button. Specifically, it allows to make it have slightly curved\n * corners (the default) vs. having them fully curved to the point that they are as round as\n * possible. In icon-only buttons this allows to have the button be circular.\n * @default 'normal'\n */\n shape?: 'normal' | 'rounded'\n\n /**\n * Whether the button is disabled or not.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Whether the button is busy/loading.\n *\n * A button in this state is functionally and semantically disabled. Visually is does not look\n * dimmed (as disabled buttons normally do), but it shows a loading spinner instead.\n *\n * @default false\n */\n loading?: boolean\n\n /**\n * A tooltip linked to the button element.\n */\n tooltip?: TooltipProps['content']\n}\n\ntype AlignmentProps = {\n width: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full'\n align?: 'start' | 'center' | 'end'\n}\n\ntype AutoWidthProps = {\n width?: 'auto'\n align?: never\n}\n\ntype IconButtonProps = {\n icon: IconElement\n 'aria-label': string\n children?: never\n startIcon?: never\n endIcon?: never\n width?: never\n align?: never\n}\n\ntype LabelledButtonProps = {\n children: NonNullable<React.ReactNode>\n startIcon?: IconElement\n endIcon?: IconElement\n icon?: never\n} & (AutoWidthProps | AlignmentProps)\n\nexport type BaseButtonProps = CommonProps & (IconButtonProps | LabelledButtonProps)\n\n/**\n * The component that powers `Button` and `ButtonLink`, where the button styling logic and some\n * common functionality resides. This component is internal to Reactist.\n *\n * @see Button\n * @see ButtonLink\n */\nexport const BaseButton = polymorphicComponent<'div', BaseButtonProps>(function BaseButton(\n {\n as = 'div',\n variant,\n tone = 'normal',\n size = 'normal',\n shape = 'normal',\n disabled = false,\n loading = false,\n tooltip,\n onClick,\n exceptionallySetClassName,\n children,\n startIcon,\n endIcon,\n icon,\n width = 'auto',\n align = 'center',\n ...props\n },\n ref,\n) {\n const isDisabled = loading || disabled\n const buttonElement = (\n <Box\n {...props}\n as={as}\n ref={ref}\n aria-disabled={isDisabled}\n onClick={isDisabled ? preventDefault : onClick}\n width={icon ? undefined : width}\n className={[\n exceptionallySetClassName,\n styles.baseButton,\n styles[`variant-${variant}`],\n styles[`tone-${tone}`],\n styles[`size-${size}`],\n shape === 'rounded' ? styles['shape-rounded'] : null,\n icon ? styles.iconButton : null,\n disabled ? styles.disabled : null,\n ]}\n >\n {icon ? (\n (loading && <Spinner />) || icon\n ) : (\n <>\n {startIcon ? (\n <Box display=\"flex\" className={styles.startIcon} aria-hidden>\n {loading && !endIcon ? <Spinner /> : startIcon}\n </Box>\n ) : null}\n {children ? (\n <Box\n as=\"span\"\n className={styles.label}\n overflow=\"hidden\"\n width={width === 'full' ? 'full' : undefined}\n textAlign={width === 'auto' ? 'center' : align}\n >\n {children}\n </Box>\n ) : null}\n {endIcon || (loading && !startIcon) ? (\n <Box display=\"flex\" className={styles.endIcon} aria-hidden>\n {loading ? <Spinner /> : endIcon}\n </Box>\n ) : null}\n </>\n )}\n </Box>\n )\n\n // If it's an icon-only button, make sure it uses the aria-label as tooltip if no tooltip was provided\n const tooltipContent = icon && tooltip === undefined ? props['aria-label'] : tooltip\n return tooltipContent ? (\n <Tooltip content={tooltipContent}>{buttonElement}</Tooltip>\n ) : (\n buttonElement\n )\n})\n"],"names":["preventDefault","event","polymorphicComponent","ref","as","variant","tone","size","shape","disabled","loading","tooltip","onClick","exceptionallySetClassName","children","startIcon","endIcon","icon","width","align","props","isDisabled","buttonElement","React","Box","undefined","className","styles","baseButton","iconButton","Spinner","display","label","overflow","textAlign","tooltipContent","Tooltip","content"],"mappings":"igBAOA,SAASA,EAAeC,GACpBA,EAAMD,oCA4FgBE,wBAA6C,WAoBnEC,OAnBAC,GACIA,EAAK,MADTC,QAEIA,EAFJC,KAGIA,EAAO,SAHXC,KAIIA,EAAO,SAJXC,MAKIA,EAAQ,SALZC,SAMIA,GAAW,EANfC,QAOIA,GAAU,UACVC,EARJC,QASIA,EATJC,0BAUIA,EAVJC,SAWIA,EAXJC,UAYIA,EAZJC,QAaIA,EAbJC,KAcIA,EAdJC,MAeIA,EAAQ,OAfZC,MAgBIA,EAAQ,YACLC,iCAIP,MAAMC,EAAaX,GAAWD,EACxBa,EACFC,gBAACC,yCACOJ,OACJhB,GAAIA,EACJD,IAAKA,kBACUkB,EACfT,QAASS,EAAarB,EAAiBY,EACvCM,MAAOD,OAAOQ,EAAYP,EAC1BQ,UAAW,CACPb,EACAc,UAAOC,WACPD,qBAAkBtB,GAClBsB,kBAAerB,GACfqB,kBAAepB,GACL,YAAVC,EAAsBmB,UAAO,iBAAmB,KAChDV,EAAOU,UAAOE,WAAa,KAC3BpB,EAAWkB,UAAOlB,SAAW,QAGhCQ,EACIP,GAAWa,gBAACO,iBAAeb,EAE5BM,gCACKR,EACGQ,gBAACC,OAAIO,QAAQ,OAAOL,UAAWC,UAAOZ,4BACjCL,IAAYM,EAAUO,gBAACO,gBAAaf,GAEzC,KACHD,EACGS,gBAACC,OACGpB,GAAG,OACHsB,UAAWC,UAAOK,MAClBC,SAAS,SACTf,MAAiB,SAAVA,EAAmB,YAASO,EACnCS,UAAqB,SAAVhB,EAAmB,SAAWC,GAExCL,GAEL,KACHE,GAAYN,IAAYK,EACrBQ,gBAACC,OAAIO,QAAQ,OAAOL,UAAWC,UAAOX,0BACjCN,EAAUa,gBAACO,gBAAad,GAE7B,OAOdmB,EAAiBlB,QAAoBQ,IAAZd,EAAwBS,EAAM,cAAgBT,EAC7E,OAAOwB,EACHZ,gBAACa,WAAQC,QAASF,GAAiBb,GAEnCA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={baseButton:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={baseButton:"a8af2163",label:"bbdb467b","shape-rounded":"ca02fc07","size-small":"_45ffe137","size-normal":"_352995bd","size-large":"_3991076f",disabled:"f82232b7",iconButton:"ef4c88db",startIcon:"a08c25c7",endIcon:"_2f6adc11","variant-primary":"_3d1243b2","variant-secondary":"_16b6b062","variant-tertiary":"cffaea5e","variant-quaternary":"_98cd5c3f","tone-destructive":"_99cb1c4d"};
|
|
2
2
|
//# sourceMappingURL=base-button.module.css.js.map
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ResponsiveProp } from '../responsive-props';
|
|
3
2
|
import type { Space } from '../common-types';
|
|
4
3
|
declare type TabsProps = {
|
|
5
4
|
/** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */
|
|
6
5
|
children: React.ReactNode;
|
|
7
6
|
/**
|
|
8
|
-
* Determines the
|
|
7
|
+
* Determines the look and feel of the tabs.
|
|
9
8
|
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Determines the style of the tabs
|
|
13
|
-
*/
|
|
14
|
-
variant?: 'normal' | 'plain';
|
|
9
|
+
variant?: 'themed' | 'neutral';
|
|
15
10
|
/**
|
|
16
11
|
* The id of the selected tab. Assigning a value makes this a
|
|
17
12
|
* controlled component
|
|
@@ -30,7 +25,7 @@ declare type TabsProps = {
|
|
|
30
25
|
/**
|
|
31
26
|
* Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
|
|
32
27
|
*/
|
|
33
|
-
export declare function Tabs({ children, selectedId, defaultSelectedId,
|
|
28
|
+
export declare function Tabs({ children, selectedId, defaultSelectedId, variant, onSelectedIdChange, }: TabsProps): React.ReactElement;
|
|
34
29
|
declare type TabProps = {
|
|
35
30
|
/** The content to render inside of the tab button */
|
|
36
31
|
children: React.ReactNode;
|
|
@@ -63,7 +58,7 @@ declare type TabListProps = ({
|
|
|
63
58
|
/**
|
|
64
59
|
* Controls the spacing between tabs
|
|
65
60
|
*/
|
|
66
|
-
space?:
|
|
61
|
+
space?: Space;
|
|
67
62
|
};
|
|
68
63
|
/**
|
|
69
64
|
* A component used to group `<Tab>` elements together.
|
|
@@ -71,7 +66,7 @@ declare type TabListProps = ({
|
|
|
71
66
|
export declare function TabList({ children, space, ...props }: TabListProps): React.ReactElement | null;
|
|
72
67
|
declare type TabPanelProps = {
|
|
73
68
|
/** The content to be rendered inside the tab */
|
|
74
|
-
children
|
|
69
|
+
children?: React.ReactNode;
|
|
75
70
|
/** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */
|
|
76
71
|
id: string;
|
|
77
72
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react"),r=(e(a),e(require("classnames"))),n=require("../../utils/polymorphism.js"),l=require("../box/box.js"),s=require("../inline/inline.js"),o=require("ariakit/tab"),i=require("../../hooks/use-previous/use-previous.js"),c=require("./tabs.module.css.js");const u=["as","children","id","exceptionallySetClassName"],d=["children","space"],p=["children","id","as","render"],b=a.createContext(null),f=n.polymorphicComponent((function(e,n){let{as:l,children:s,id:i,exceptionallySetClassName:d}=e,p=t.objectWithoutProperties(e,u);const f=a.useContext(b);if(!f)return null;const{variant:m,tabState:x}=f;return a.createElement(o.Tab,t.objectSpread2(t.objectSpread2({},p),{},{as:l,className:r(d,c.default.tab,c.default["tab-"+m]),id:i,state:x,ref:n}),s)})),m=n.polymorphicComponent((function(e,r){let{children:n,id:l,as:s,render:i="always"}=e,c=t.objectWithoutProperties(e,p);const u=a.useContext(b),[d,f]=a.useState(!1),m=(null==u?void 0:u.tabState.selectedId)===l;if(a.useEffect((function(){!d&&m&&f(!0)}),[d,m]),!u)return null;const{tabState:x}=u;return"always"===i||"active"===i&&m||"lazy"===i&&(m||d)?a.createElement(o.TabPanel,t.objectSpread2(t.objectSpread2({tabId:l},c),{},{state:x,as:s,ref:r}),n):null}));exports.Tab=f,exports.TabAwareSlot=function({children:e}){const t=a.useContext(b);return t?e({selectedId:null==t?void 0:t.tabState.selectedId}):null},exports.TabList=function(e){let{children:n,space:i="xsmall"}=e,u=t.objectWithoutProperties(e,d);const p=a.useContext(b);if(!p)return null;const{tabState:f,variant:m}=p;return a.createElement(l.Box,null,a.createElement(o.TabList,t.objectSpread2({state:f,as:l.Box,position:"relative",width:"maxContent"},u),a.createElement(l.Box,{className:r(c.default.track,c.default["track-"+i],c.default["track-"+m])}),a.createElement(s.Inline,{space:i},n)))},exports.TabPanel=m,exports.Tabs=function({children:e,selectedId:t,defaultSelectedId:r,variant:n="neutral",onSelectedIdChange:l}){const s=o.useTabState({selectedId:t,setSelectedId:l}),c=i.usePrevious(r),{selectedId:u,select:d}=s;a.useEffect((function(){t||r===c||r===u||void 0===r||d(r)}),[t,r,u,d,c]);const p=a.useMemo((function(){return{tabState:s,variant:n}}),[n,s]);return a.createElement(b.Provider,{value:p},e)};
|
|
2
2
|
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../../src/new-components/tabs/tabs.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport {\n useTabState,\n Tab as BaseTab,\n TabList as BaseTabList,\n TabPanel as BaseTabPanel,\n TabState,\n} from 'ariakit/tab'\nimport { Inline } from '../inline'\nimport { usePrevious } from '../../hooks/use-previous'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport type { ResponsiveProp } from '../responsive-props'\nimport type { Space } from '../common-types'\n\nimport styles from './tabs.module.css'\n\ntype TabsContextValue = {\n tabState: TabState\n} & Pick<TabsProps, 'color' | 'variant'>\n\nconst TabsContext = React.createContext<TabsContextValue | null>(null)\n\ntype TabsProps = {\n /** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */\n children: React.ReactNode\n /**\n * Determines the primary colour of the tabs\n */\n color?: 'primary' | 'secondary' | 'tertiary'\n /**\n * Determines the style of the tabs\n */\n variant?: 'normal' | 'plain'\n /**\n * The id of the selected tab. Assigning a value makes this a\n * controlled component\n */\n selectedId?: string | null\n /**\n * The tab to initially select. This can be used if the component should not\n * be a controlled component but needs to have a tab selected\n */\n defaultSelectedId?: string | null\n /**\n * Called with the tab id when a tab is selected\n */\n onSelectedIdChange?: (selectedId: string | null | undefined) => void\n}\n\n/**\n * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.\n */\nexport function Tabs({\n children,\n selectedId,\n defaultSelectedId,\n color = 'primary',\n variant = 'normal',\n onSelectedIdChange,\n}: TabsProps): React.ReactElement {\n const tabState = useTabState({ selectedId, setSelectedId: onSelectedIdChange })\n const previousDefaultSelectedId = usePrevious(defaultSelectedId)\n const { selectedId: actualSelectedId, select } = tabState\n\n React.useEffect(\n function selectDefaultTab() {\n if (\n !selectedId &&\n defaultSelectedId !== previousDefaultSelectedId &&\n defaultSelectedId !== actualSelectedId &&\n defaultSelectedId !== undefined\n ) {\n select(defaultSelectedId)\n }\n },\n [selectedId, defaultSelectedId, actualSelectedId, select, previousDefaultSelectedId],\n )\n\n const memoizedTabState = React.useMemo(\n function memoizeTabState() {\n return {\n tabState,\n color,\n variant,\n }\n },\n [color, variant, tabState],\n )\n\n return <TabsContext.Provider value={memoizedTabState}>{children}</TabsContext.Provider>\n}\n\ntype TabProps = {\n /** The content to render inside of the tab button */\n children: React.ReactNode\n\n /** The tab's identifier. This must match its corresponding `<TabPanel>`'s id */\n id: string\n}\n\n/**\n * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.\n */\nexport const Tab = polymorphicComponent<'button', TabProps>(function Tab(\n { as, children, id, exceptionallySetClassName, ...props },\n ref,\n): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { color, variant, tabState } = tabContextValue\n\n return (\n <BaseTab\n {...props}\n as={as}\n className={classNames(\n exceptionallySetClassName,\n styles.tab,\n styles[`tab-${variant ?? ''}`],\n styles[`tab-${color ?? ''}`],\n )}\n id={id}\n state={tabState}\n ref={ref}\n >\n {children}\n </BaseTab>\n )\n})\n\ntype TabListProps = (\n | {\n /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */\n 'aria-label': string\n }\n | {\n /**\n * One or more element IDs used to label the tab list for assistive technologies. Required if\n * `aria-label` is omitted.\n */\n 'aria-labelledby': string\n }\n | {\n /**\n * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden\n */\n 'aria-hidden': boolean\n }\n) & {\n /**\n * A list of `<Tab>` elements\n */\n children: React.ReactNode\n\n /**\n * Controls the spacing between tabs\n */\n space?: ResponsiveProp<Space>\n}\n\n/**\n * A component used to group `<Tab>` elements together.\n */\nexport function TabList({\n children,\n space = 'medium',\n ...props\n}: TabListProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { tabState } = tabContextValue\n\n return (\n <BaseTabList state={tabState} {...props}>\n <Inline space={space}>{children}</Inline>\n </BaseTabList>\n )\n}\n\ntype TabPanelProps = {\n /** The content to be rendered inside the tab */\n children: React.ReactNode\n\n /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */\n id: string\n\n /**\n * By default, the tab panel's content is always rendered even when they are not active. This behaviour can be changed to\n * 'active', which renders only when the tab is active, and 'lazy', meaning while inactive tab panels will not be rendered\n * initially, they will remain mounted once they are active until the entire Tabs tree is unmounted.\n */\n render?: 'always' | 'active' | 'lazy'\n}\n\n/**\n * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.\n */\nexport const TabPanel = polymorphicComponent<'div', TabPanelProps, 'omitClassName'>(\n function TabPanel(\n { children, id, as, render = 'always', ...props },\n ref,\n ): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n const [tabRendered, setTabRendered] = React.useState(false)\n const tabIsActive = tabContextValue?.tabState.selectedId === id\n\n React.useEffect(\n function trackTabRenderedState() {\n if (!tabRendered && tabIsActive) {\n setTabRendered(true)\n }\n },\n [tabRendered, tabIsActive],\n )\n\n if (!tabContextValue) {\n return null\n }\n\n const { tabState } = tabContextValue\n\n return (\n <BaseTabPanel tabId={id} {...props} state={tabState} as={as} ref={ref}>\n {render === 'always' ? children : null}\n {render === 'active' && tabIsActive ? children : null}\n {render === 'lazy' && (tabIsActive || tabRendered) ? children : null}\n </BaseTabPanel>\n )\n },\n)\n\ntype TabAwareSlotProps = {\n /**\n * Render prop used to provide the content to be rendered inside the slot. The render prop will be\n * called with the current `selectedId`\n */\n children: (provided: { selectedId?: string | null }) => React.ReactElement | null\n}\n\n/**\n * Allows content to be rendered based on the current tab being selected while outside of the TabPanel\n * component. Can be placed freely within the main `<Tabs>` component.\n */\nexport function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n return tabContextValue ? children({ selectedId: tabContextValue?.tabState.selectedId }) : null\n}\n"],"names":["TabsContext","React","Tab","polymorphicComponent","ref","as","children","id","exceptionallySetClassName","props","tabContextValue","color","variant","tabState","BaseTab","className","classNames","styles","tab","state","TabPanel","render","tabRendered","setTabRendered","tabIsActive","selectedId","BaseTabPanel","tabId","space","BaseTabList","Inline","defaultSelectedId","onSelectedIdChange","useTabState","setSelectedId","previousDefaultSelectedId","usePrevious","actualSelectedId","select","undefined","memoizedTabState","Provider","value"],"mappings":"2iBAqBMA,EAAcC,gBAA6C,MAmFpDC,EAAMC,wBAAyC,WAExDC,OADAC,GAAEA,EAAFC,SAAMA,EAANC,GAAgBA,EAAhBC,0BAAoBA,KAA8BC,iCAGlD,MAAMC,EAAkBT,aAAiBD,GAEzC,IAAKU,EACD,OAAO,KAGX,MAAMC,MAAEA,EAAFC,QAASA,EAATC,SAAkBA,GAAaH,EAErC,OACIT,gBAACa,yCACOL,OACJJ,GAAIA,EACJU,UAAWC,EACPR,EACAS,UAAOC,IACPD,wBAAcL,EAAAA,EAAW,KACzBK,wBAAcN,EAAAA,EAAS,MAE3BJ,GAAIA,EACJY,MAAON,EACPT,IAAKA,IAEJE,MA4EAc,EAAWjB,wBACpB,WAEIC,OADAE,SAAEA,EAAFC,GAAYA,EAAZF,GAAgBA,EAAhBgB,OAAoBA,EAAS,YAAaZ,iCAG1C,MAAMC,EAAkBT,aAAiBD,IAClCsB,EAAaC,GAAkBtB,YAAe,GAC/CuB,SAAcd,SAAAA,EAAiBG,SAASY,cAAelB,EAW7D,GATAN,aACI,YACSqB,GAAeE,GAChBD,GAAe,KAGvB,CAACD,EAAaE,KAGbd,EACD,OAAO,KAGX,MAAMG,SAAEA,GAAaH,EAErB,OACIT,gBAACyB,4CAAaC,MAAOpB,GAAQE,OAAOU,MAAON,EAAUR,GAAIA,EAAID,IAAKA,IAClD,WAAXiB,EAAsBf,EAAW,KACtB,WAAXe,GAAuBG,EAAclB,EAAW,KACrC,SAAXe,IAAsBG,GAAeF,GAAehB,EAAW,sDAkBnDA,SAAEA,IAC3B,MAAMI,EAAkBT,aAAiBD,GAEzC,OAAOU,EAAkBJ,EAAS,CAAEmB,iBAAYf,SAAAA,EAAiBG,SAASY,aAAgB,sCAvFtEnB,SACpBA,EADoBsB,MAEpBA,EAAQ,YACLnB,iCAEH,MAAMC,EAAkBT,aAAiBD,GAEzC,IAAKU,EACD,OAAO,KAGX,MAAMG,SAAEA,GAAaH,EAErB,OACIT,gBAAC4B,2BAAYV,MAAON,GAAcJ,GAC9BR,gBAAC6B,UAAOF,MAAOA,GAAQtB,+CAlIdA,SACjBA,EADiBmB,WAEjBA,EAFiBM,kBAGjBA,EAHiBpB,MAIjBA,EAAQ,UAJSC,QAKjBA,EAAU,SALOoB,mBAMjBA,IAEA,MAAMnB,EAAWoB,cAAY,CAAER,WAAAA,EAAYS,cAAeF,IACpDG,EAA4BC,cAAYL,IACtCN,WAAYY,EAAdC,OAAgCA,GAAWzB,EAEjDZ,aACI,WAESwB,GACDM,IAAsBI,GACtBJ,IAAsBM,QACAE,IAAtBR,GAEAO,EAAOP,KAGf,CAACN,EAAYM,EAAmBM,EAAkBC,EAAQH,IAG9D,MAAMK,EAAmBvC,WACrB,WACI,MAAO,CACHY,SAAAA,EACAF,MAAAA,EACAC,QAAAA,KAGR,CAACD,EAAOC,EAASC,IAGrB,OAAOZ,gBAACD,EAAYyC,UAASC,MAAOF,GAAmBlC"}
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../../src/new-components/tabs/tabs.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport {\n useTabState,\n Tab as BaseTab,\n TabList as BaseTabList,\n TabPanel as BaseTabPanel,\n TabState,\n} from 'ariakit/tab'\nimport { Inline } from '../inline'\nimport { usePrevious } from '../../hooks/use-previous'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport type { Space } from '../common-types'\n\nimport styles from './tabs.module.css'\nimport { Box } from '../box'\n\ntype TabsContextValue = {\n tabState: TabState\n} & Required<Pick<TabsProps, 'variant'>>\n\nconst TabsContext = React.createContext<TabsContextValue | null>(null)\n\ntype TabsProps = {\n /** The `<Tabs>` component must be composed from a `<TabList>` and corresponding `<TabPanel>` components */\n children: React.ReactNode\n /**\n * Determines the look and feel of the tabs.\n */\n variant?: 'themed' | 'neutral'\n /**\n * The id of the selected tab. Assigning a value makes this a\n * controlled component\n */\n selectedId?: string | null\n /**\n * The tab to initially select. This can be used if the component should not\n * be a controlled component but needs to have a tab selected\n */\n defaultSelectedId?: string | null\n /**\n * Called with the tab id when a tab is selected\n */\n onSelectedIdChange?: (selectedId: string | null | undefined) => void\n}\n\n/**\n * Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.\n */\nexport function Tabs({\n children,\n selectedId,\n defaultSelectedId,\n variant = 'neutral',\n onSelectedIdChange,\n}: TabsProps): React.ReactElement {\n const tabState = useTabState({ selectedId, setSelectedId: onSelectedIdChange })\n const previousDefaultSelectedId = usePrevious(defaultSelectedId)\n const { selectedId: actualSelectedId, select } = tabState\n\n React.useEffect(\n function selectDefaultTab() {\n if (\n !selectedId &&\n defaultSelectedId !== previousDefaultSelectedId &&\n defaultSelectedId !== actualSelectedId &&\n defaultSelectedId !== undefined\n ) {\n select(defaultSelectedId)\n }\n },\n [selectedId, defaultSelectedId, actualSelectedId, select, previousDefaultSelectedId],\n )\n\n const memoizedTabState = React.useMemo(\n function memoizeTabState() {\n return {\n tabState,\n variant,\n }\n },\n [variant, tabState],\n )\n\n return <TabsContext.Provider value={memoizedTabState}>{children}</TabsContext.Provider>\n}\n\ntype TabProps = {\n /** The content to render inside of the tab button */\n children: React.ReactNode\n\n /** The tab's identifier. This must match its corresponding `<TabPanel>`'s id */\n id: string\n}\n\n/**\n * Represents the individual tab elements within the group. Each `<Tab>` must have a corresponding `<TabPanel>` component.\n */\nexport const Tab = polymorphicComponent<'button', TabProps>(function Tab(\n { as, children, id, exceptionallySetClassName, ...props },\n ref,\n): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { variant, tabState } = tabContextValue\n\n return (\n <BaseTab\n {...props}\n as={as}\n className={classNames(exceptionallySetClassName, styles.tab, styles[`tab-${variant}`])}\n id={id}\n state={tabState}\n ref={ref}\n >\n {children}\n </BaseTab>\n )\n})\n\ntype TabListProps = (\n | {\n /** Labels the tab list for assistive technologies. This must be provided if `aria-labelledby` is omitted. */\n 'aria-label': string\n }\n | {\n /**\n * One or more element IDs used to label the tab list for assistive technologies. Required if\n * `aria-label` is omitted.\n */\n 'aria-labelledby': string\n }\n | {\n /**\n * For cases where multiple instances of the tab list exists, the duplicates may be marked as aria-hidden\n */\n 'aria-hidden': boolean\n }\n) & {\n /**\n * A list of `<Tab>` elements\n */\n children: React.ReactNode\n\n /**\n * Controls the spacing between tabs\n */\n space?: Space\n}\n\n/**\n * A component used to group `<Tab>` elements together.\n */\nexport function TabList({\n children,\n space = 'xsmall',\n ...props\n}: TabListProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n if (!tabContextValue) {\n return null\n }\n\n const { tabState, variant } = tabContextValue\n\n return (\n // The extra <Box> prevents <Inline>'s negative margins from collapsing when used in a flex container\n // which will render the track with the wrong height\n <Box>\n <BaseTabList\n state={tabState}\n as={Box}\n position=\"relative\"\n width=\"maxContent\"\n {...props}\n >\n <Box\n className={classNames(\n styles.track,\n styles[`track-${space}`],\n styles[`track-${variant}`],\n )}\n />\n <Inline space={space}>{children}</Inline>\n </BaseTabList>\n </Box>\n )\n}\n\ntype TabPanelProps = {\n /** The content to be rendered inside the tab */\n children?: React.ReactNode\n\n /** The tabPanel's identifier. This must match its corresponding `<Tab>`'s id */\n id: string\n\n /**\n * By default, the tab panel's content is always rendered even when they are not active. This behaviour can be changed to\n * 'active', which renders only when the tab is active, and 'lazy', meaning while inactive tab panels will not be rendered\n * initially, they will remain mounted once they are active until the entire Tabs tree is unmounted.\n */\n render?: 'always' | 'active' | 'lazy'\n}\n\n/**\n * Used to define the content to be rendered when a tab is active. Each `<TabPanel>` must have a corresponding `<Tab>` component.\n */\nexport const TabPanel = polymorphicComponent<'div', TabPanelProps, 'omitClassName'>(\n function TabPanel(\n { children, id, as, render = 'always', ...props },\n ref,\n ): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n const [tabRendered, setTabRendered] = React.useState(false)\n const tabIsActive = tabContextValue?.tabState.selectedId === id\n\n React.useEffect(\n function trackTabRenderedState() {\n if (!tabRendered && tabIsActive) {\n setTabRendered(true)\n }\n },\n [tabRendered, tabIsActive],\n )\n\n if (!tabContextValue) {\n return null\n }\n\n const { tabState } = tabContextValue\n const shouldRender =\n render === 'always' ||\n (render === 'active' && tabIsActive) ||\n (render === 'lazy' && (tabIsActive || tabRendered))\n\n return shouldRender ? (\n <BaseTabPanel tabId={id} {...props} state={tabState} as={as} ref={ref}>\n {children}\n </BaseTabPanel>\n ) : null\n },\n)\n\ntype TabAwareSlotProps = {\n /**\n * Render prop used to provide the content to be rendered inside the slot. The render prop will be\n * called with the current `selectedId`\n */\n children: (provided: { selectedId?: string | null }) => React.ReactElement | null\n}\n\n/**\n * Allows content to be rendered based on the current tab being selected while outside of the TabPanel\n * component. Can be placed freely within the main `<Tabs>` component.\n */\nexport function TabAwareSlot({ children }: TabAwareSlotProps): React.ReactElement | null {\n const tabContextValue = React.useContext(TabsContext)\n\n return tabContextValue ? children({ selectedId: tabContextValue?.tabState.selectedId }) : null\n}\n"],"names":["TabsContext","React","Tab","polymorphicComponent","ref","as","children","id","exceptionallySetClassName","props","tabContextValue","variant","tabState","BaseTab","className","classNames","styles","tab","state","TabPanel","render","tabRendered","setTabRendered","tabIsActive","selectedId","BaseTabPanel","tabId","space","Box","BaseTabList","position","width","track","Inline","defaultSelectedId","onSelectedIdChange","useTabState","setSelectedId","previousDefaultSelectedId","usePrevious","actualSelectedId","select","undefined","memoizedTabState","Provider","value"],"mappings":"skBAqBMA,EAAcC,gBAA6C,MA6EpDC,EAAMC,wBAAyC,WAExDC,OADAC,GAAEA,EAAFC,SAAMA,EAANC,GAAgBA,EAAhBC,0BAAoBA,KAA8BC,iCAGlD,MAAMC,EAAkBT,aAAiBD,GAEzC,IAAKU,EACD,OAAO,KAGX,MAAMC,QAAEA,EAAFC,SAAWA,GAAaF,EAE9B,OACIT,gBAACY,yCACOJ,OACJJ,GAAIA,EACJS,UAAWC,EAAWP,EAA2BQ,UAAOC,IAAKD,iBAAcL,IAC3EJ,GAAIA,EACJW,MAAON,EACPR,IAAKA,IAEJE,MA6FAa,EAAWhB,wBACpB,WAEIC,OADAE,SAAEA,EAAFC,GAAYA,EAAZF,GAAgBA,EAAhBe,OAAoBA,EAAS,YAAaX,iCAG1C,MAAMC,EAAkBT,aAAiBD,IAClCqB,EAAaC,GAAkBrB,YAAe,GAC/CsB,SAAcb,SAAAA,EAAiBE,SAASY,cAAejB,EAW7D,GATAN,aACI,YACSoB,GAAeE,GAChBD,GAAe,KAGvB,CAACD,EAAaE,KAGbb,EACD,OAAO,KAGX,MAAME,SAAEA,GAAaF,EAMrB,MAJe,WAAXU,GACY,WAAXA,GAAuBG,GACZ,SAAXH,IAAsBG,GAAeF,GAGtCpB,gBAACwB,4CAAaC,MAAOnB,GAAQE,OAAOS,MAAON,EAAUP,GAAIA,EAAID,IAAKA,IAC7DE,GAEL,qDAgBiBA,SAAEA,IAC3B,MAAMI,EAAkBT,aAAiBD,GAEzC,OAAOU,EAAkBJ,EAAS,CAAEkB,iBAAYd,SAAAA,EAAiBE,SAASY,aAAgB,sCA1GtElB,SACpBA,EADoBqB,MAEpBA,EAAQ,YACLlB,iCAEH,MAAMC,EAAkBT,aAAiBD,GAEzC,IAAKU,EACD,OAAO,KAGX,MAAME,SAAEA,EAAFD,QAAYA,GAAYD,EAE9B,OAGIT,gBAAC2B,WACG3B,gBAAC4B,2BACGX,MAAON,EACPP,GAAIuB,MACJE,SAAS,WACTC,MAAM,cACFtB,GAEJR,gBAAC2B,OACGd,UAAWC,EACPC,UAAOgB,MACPhB,mBAAgBW,GAChBX,mBAAgBL,MAGxBV,gBAACgC,UAAON,MAAOA,GAAQrB,gDA3IlBA,SACjBA,EADiBkB,WAEjBA,EAFiBU,kBAGjBA,EAHiBvB,QAIjBA,EAAU,UAJOwB,mBAKjBA,IAEA,MAAMvB,EAAWwB,cAAY,CAAEZ,WAAAA,EAAYa,cAAeF,IACpDG,EAA4BC,cAAYL,IACtCV,WAAYgB,EAAdC,OAAgCA,GAAW7B,EAEjDX,aACI,WAESuB,GACDU,IAAsBI,GACtBJ,IAAsBM,QACAE,IAAtBR,GAEAO,EAAOP,KAGf,CAACV,EAAYU,EAAmBM,EAAkBC,EAAQH,IAG9D,MAAMK,EAAmB1C,WACrB,WACI,MAAO,CACHW,SAAAA,EACAD,QAAAA,KAGR,CAACA,EAASC,IAGd,OAAOX,gBAACD,EAAY4C,UAASC,MAAOF,GAAmBrC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={tab:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={tab:"_76bbcdaa",track:"_531eb92b","tab-neutral":"_13321d47","tab-themed":"_58c4d63d","track-neutral":"_11ef0184","track-themed":"ce590259","track-xsmall":"d8366aff","track-small":"e28fbcf0","track-medium":"_1e1d7d0e","track-large":"_611e18a3","track-xlarge":"_7e083426","track-xxlarge":"_37c54913"};
|
|
2
2
|
//# sourceMappingURL=tabs.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={inputWrapper:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={inputWrapper:"_9d172ece",bordered:"c59d0239",error:"_7e63ee20"};
|
|
2
2
|
//# sourceMappingURL=text-field.module.css.js.map
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@doist/reactist",
|
|
3
3
|
"description": "Open source React components by Doist",
|
|
4
4
|
"author": "Henning Muszynski <henning@doist.com> (http://doist.com)",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "14.0.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/Doist/reactist#readme",
|
|
8
8
|
"repository": "git+https://github.com/Doist/reactist.git",
|
package/styles/alert.css
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
._68ab48ca{min-width:0}._6fa2b565{min-width:var(--reactist-width-xsmall)}.dd50fabd{min-width:var(--reactist-width-small)}.e7e2c808{min-width:var(--reactist-width-medium)}._6abbe25e{min-width:var(--reactist-width-large)}._54f479ac{min-width:var(--reactist-width-xlarge)}._148492bc{max-width:var(--reactist-width-xsmall)}.bd023b96{max-width:var(--reactist-width-small)}.e102903f{max-width:var(--reactist-width-medium)}._0e8d76d7{max-width:var(--reactist-width-large)}._47a031d0{max-width:var(--reactist-width-xlarge)}.cd4c8183{max-width:100%}._5f5959e8{width:0}._8c75067a{width:100%}._56a651f6{width:auto}._26f87bb8{width:-moz-max-content;width:-webkit-max-content;width:max-content}._07a6ab44{width:-moz-min-content;width:-webkit-min-content;width:min-content}.a87016fa{width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}._1a972e50{width:var(--reactist-width-xsmall)}.c96d8261{width:var(--reactist-width-small)}.f3829d42{width:var(--reactist-width-medium)}._2caef228{width:var(--reactist-width-large)}._069e1491{width:var(--reactist-width-xlarge)}
|
|
5
5
|
.reactist_tooltip{font-size:.81rem;color:#202020;font-weight:400;line-height:1.6;text-align:center;text-overflow:ellipsis;overflow:hidden;max-width:100%;padding:5px 10px;background-color:#333;color:#fff;border:none;border-radius:3px;z-index:1000}
|
|
6
6
|
:root{--reactist-spinner-tint:var(--reactist-bg-brand);--reactist-spinner-fill:var(--reactist-framework-fill-crest)}@-webkit-keyframes _54fbe2b3{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes _54fbe2b3{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}._51539197{-webkit-animation-name:_54fbe2b3;animation-name:_54fbe2b3;-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.a0c466ed{fill:var(--reactist-spinner-tint)}._745b73d3{fill:var(--reactist-spinner-fill)}
|
|
7
|
-
:root{--reactist-button-small-font-size:var(--reactist-font-size-caption);--reactist-button-small-spacing:var(--reactist-spacing-small);--reactist-button-small-height:28px;--reactist-button-normal-font-size:var(--reactist-font-size-copy);--reactist-button-normal-spacing:var(--reactist-spacing-medium);--reactist-button-normal-height:32px;--reactist-button-large-font-size:var(--reactist-font-size-body);--reactist-button-large-spacing:var(--reactist-spacing-large);--reactist-button-large-height:36px;--reactist-actionable-primary-idle-tint:#fff;--reactist-actionable-primary-idle-fill:#008aa6;--reactist-actionable-primary-hover-tint:#fff;--reactist-actionable-primary-hover-fill:#007992;--reactist-actionable-primary-disabled-tint:#fff;--reactist-actionable-primary-disabled-fill:#99d0db;--reactist-actionable-secondary-idle-tint:#282f30;--reactist-actionable-secondary-idle-fill:#f2f6f7;--reactist-actionable-secondary-hover-tint:#282f30;--reactist-actionable-secondary-hover-fill:#e3e7e8;--reactist-actionable-secondary-disabled-tint:#a9acac;--reactist-actionable-secondary-disabled-fill:#f2f6f7;--reactist-actionable-tertiary-idle-tint:#006f85;--reactist-actionable-tertiary-hover-tint:#006f85;--reactist-actionable-tertiary-hover-fill:#f2f6f7;--reactist-actionable-tertiary-disabled-tint:#99c5ce;--reactist-actionable-quaternary-idle-tint:#6c777a;--reactist-actionable-quaternary-hover-tint:#282f30;--reactist-actionable-quaternary-hover-fill:#e0e7e8;--reactist-actionable-quaternary-disabled-tint:#c4c9ca;--reactist-actionable-primary-destructive-idle-tint:#fff;--reactist-actionable-primary-destructive-idle-fill:#dc4c3e;--reactist-actionable-primary-destructive-hover-tint:#fff;--reactist-actionable-primary-destructive-hover-fill:#b03d32;--reactist-actionable-primary-destructive-disabled-tint:#fff;--reactist-actionable-primary-destructive-disabled-fill:#f1b7b2;--reactist-actionable-secondary-destructive-idle-tint:#dc4c3e;--reactist-actionable-secondary-destructive-hover-tint:#b03d32;--reactist-actionable-secondary-destructive-hover-fill:transparent;--reactist-actionable-secondary-destructive-disabled-tint:#f1b7b2}.
|
|
7
|
+
:root{--reactist-button-small-font-size:var(--reactist-font-size-caption);--reactist-button-small-spacing:var(--reactist-spacing-small);--reactist-button-small-height:28px;--reactist-button-normal-font-size:var(--reactist-font-size-copy);--reactist-button-normal-spacing:var(--reactist-spacing-medium);--reactist-button-normal-height:32px;--reactist-button-large-font-size:var(--reactist-font-size-body);--reactist-button-large-spacing:var(--reactist-spacing-large);--reactist-button-large-height:36px;--reactist-actionable-primary-idle-tint:#fff;--reactist-actionable-primary-idle-fill:#008aa6;--reactist-actionable-primary-hover-tint:#fff;--reactist-actionable-primary-hover-fill:#007992;--reactist-actionable-primary-disabled-tint:#fff;--reactist-actionable-primary-disabled-fill:#99d0db;--reactist-actionable-secondary-idle-tint:#282f30;--reactist-actionable-secondary-idle-fill:#f2f6f7;--reactist-actionable-secondary-hover-tint:#282f30;--reactist-actionable-secondary-hover-fill:#e3e7e8;--reactist-actionable-secondary-disabled-tint:#a9acac;--reactist-actionable-secondary-disabled-fill:#f2f6f7;--reactist-actionable-tertiary-idle-tint:#006f85;--reactist-actionable-tertiary-hover-tint:#006f85;--reactist-actionable-tertiary-hover-fill:#f2f6f7;--reactist-actionable-tertiary-disabled-tint:#99c5ce;--reactist-actionable-quaternary-idle-tint:#6c777a;--reactist-actionable-quaternary-hover-tint:#282f30;--reactist-actionable-quaternary-hover-fill:#e0e7e8;--reactist-actionable-quaternary-disabled-tint:#c4c9ca;--reactist-actionable-primary-destructive-idle-tint:#fff;--reactist-actionable-primary-destructive-idle-fill:#dc4c3e;--reactist-actionable-primary-destructive-hover-tint:#fff;--reactist-actionable-primary-destructive-hover-fill:#b03d32;--reactist-actionable-primary-destructive-disabled-tint:#fff;--reactist-actionable-primary-destructive-disabled-fill:#f1b7b2;--reactist-actionable-secondary-destructive-idle-tint:#dc4c3e;--reactist-actionable-secondary-destructive-hover-tint:#b03d32;--reactist-actionable-secondary-destructive-hover-fill:transparent;--reactist-actionable-secondary-destructive-disabled-tint:#f1b7b2}.a8af2163{max-width:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:inherit;background-color:transparent;border-radius:var(--reactist-border-radius-small);white-space:nowrap;font-family:var(--reactist-font-family);font-weight:var(--reactist-font-weight-medium);text-decoration:none;border:1px solid transparent;transition-duration:.3s;transition-property:color,background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bbdb467b{text-overflow:ellipsis;white-space:nowrap;font-size:inherit}.a8af2163:active:not([aria-disabled=true]){transform:scale(.97);transition:transform .2s cubic-bezier(.02,1.505,.745,1.235)}.a8af2163{padding:0 var(--reactist-btn-spacing);font-size:var(--reactist-btn-font-size);height:var(--reactist-btn-height);line-height:var(--reactist-btn-height);--reactist-spinner-tint:var(--reactist-btn-idle-tint);--reactist-spinner-fill:var(--reactist-btn-idle-fill)}.a8af2163.ca02fc07{border-radius:1000px}.a8af2163._45ffe137{--reactist-btn-height:var(--reactist-button-small-height);--reactist-btn-spacing:var(--reactist-button-small-spacing);--reactist-btn-font-size:var(--reactist-button-small-font-size)}.a8af2163._352995bd{--reactist-btn-height:var(--reactist-button-normal-height);--reactist-btn-spacing:var(--reactist-button-normal-spacing);--reactist-btn-font-size:var(--reactist-button-normal-font-size)}.a8af2163._3991076f{--reactist-btn-height:var(--reactist-button-large-height);--reactist-btn-spacing:var(--reactist-button-large-spacing);--reactist-btn-font-size:var(--reactist-button-large-font-size)}.a8af2163:not(.f82232b7){color:var(--reactist-btn-idle-tint);background-color:var(--reactist-btn-idle-fill)}.a8af2163:focus-visible:not([aria-disabled=true]),.a8af2163:hover:not([aria-disabled=true]),.a8af2163[aria-expanded=true]{color:var(--reactist-btn-hover-tint);background-color:var(--reactist-btn-hover-fill)}.a8af2163.f82232b7{cursor:not-allowed;color:var(--reactist-btn-disabled-tint);background-color:var(--reactist-btn-disabled-fill)}.a8af2163:not(.ef4c88db){min-width:68px}.a8af2163.ef4c88db{width:var(--reactist-btn-height);height:var(--reactist-btn-height);padding:0}.a8af2163 .a08c25c7{margin-right:calc(var(--reactist-btn-spacing) - 6px);margin-left:-6px}.a8af2163 ._2f6adc11{margin-left:calc(var(--reactist-btn-spacing) - 6px);margin-right:-6px}._3d1243b2{--reactist-btn-idle-tint:var(--reactist-actionable-primary-idle-tint);--reactist-btn-idle-fill:var(--reactist-actionable-primary-idle-fill);--reactist-btn-hover-tint:var(--reactist-actionable-primary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-primary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-primary-disabled-tint);--reactist-btn-disabled-fill:var(--reactist-actionable-primary-disabled-fill)}._16b6b062{--reactist-btn-idle-tint:var(--reactist-actionable-secondary-idle-tint);--reactist-btn-idle-fill:var(--reactist-actionable-secondary-idle-fill);--reactist-btn-hover-tint:var(--reactist-actionable-secondary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-secondary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-secondary-disabled-tint);--reactist-btn-disabled-fill:var(--reactist-actionable-secondary-disabled-fill)}.cffaea5e{--reactist-btn-idle-tint:var(--reactist-actionable-tertiary-idle-tint);--reactist-btn-hover-tint:var(--reactist-actionable-tertiary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-tertiary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-tertiary-disabled-tint)}._98cd5c3f,.cffaea5e{--reactist-btn-idle-fill:transparent;--reactist-btn-disabled-fill:transparent}._98cd5c3f{--reactist-btn-idle-tint:var(--reactist-actionable-quaternary-idle-tint);--reactist-btn-hover-tint:var(--reactist-actionable-quaternary-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-quaternary-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-quaternary-disabled-tint)}._3d1243b2._99cb1c4d{--reactist-btn-idle-tint:var(--reactist-actionable-primary-destructive-idle-tint);--reactist-btn-idle-fill:var(--reactist-actionable-primary-destructive-idle-fill);--reactist-btn-hover-tint:var(--reactist-actionable-primary-destructive-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-primary-destructive-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-primary-destructive-disabled-tint);--reactist-btn-disabled-fill:var(--reactist-actionable-primary-destructive-disabled-fill)}._16b6b062._99cb1c4d{--reactist-btn-idle-tint:var(--reactist-actionable-secondary-destructive-idle-tint);--reactist-btn-idle-fill:transparent;--reactist-btn-hover-tint:var(--reactist-actionable-secondary-destructive-hover-tint);--reactist-btn-hover-fill:var(--reactist-actionable-secondary-destructive-hover-fill);--reactist-btn-disabled-tint:var(--reactist-actionable-secondary-destructive-disabled-tint);--reactist-btn-disabled-fill:transparent;border-color:var(--reactist-btn-idle-tint)}._16b6b062._99cb1c4d:hover{border-color:var(--reactist-btn-hover-tint)}._16b6b062._99cb1c4d.f82232b7{border-color:var(--reactist-btn-disabled-tint)}._98cd5c3f._99cb1c4d,.cffaea5e._99cb1c4d{--reactist-btn-idle-tint:var(--reactist-actionable-secondary-destructive-idle-tint);--reactist-btn-hover-tint:var(--reactist-actionable-secondary-destructive-hover-tint);--reactist-btn-disabled-tint:var(--reactist-actionable-secondary-destructive-disabled-tint)}
|
|
8
8
|
._6f59c771{margin-left:calc(var(--reactist-spacing-xsmall)*-1)}._6f59c771>._91e05f0f{padding-left:var(--reactist-spacing-xsmall)}._5a55af26{margin-left:calc(var(--reactist-spacing-small)*-1)}._5a55af26>._91e05f0f{padding-left:var(--reactist-spacing-small)}.fa261310{margin-left:calc(var(--reactist-spacing-medium)*-1)}.fa261310>._91e05f0f{padding-left:var(--reactist-spacing-medium)}._6ebd4e46{margin-left:calc(var(--reactist-spacing-large)*-1)}._6ebd4e46>._91e05f0f{padding-left:var(--reactist-spacing-large)}._55ce4aea{margin-left:calc(var(--reactist-spacing-xlarge)*-1)}._55ce4aea>._91e05f0f{padding-left:var(--reactist-spacing-xlarge)}._04c9c3ac{margin-left:calc(var(--reactist-spacing-xxlarge)*-1)}._04c9c3ac>._91e05f0f{padding-left:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.ab76d8cd{margin-left:calc(var(--reactist-spacing-xsmall)*-1)}.ab76d8cd>._91e05f0f{padding-left:var(--reactist-spacing-xsmall)}._14629bfb{margin-left:calc(var(--reactist-spacing-small)*-1)}._14629bfb>._91e05f0f{padding-left:var(--reactist-spacing-small)}._5b4e39ea{margin-left:calc(var(--reactist-spacing-medium)*-1)}._5b4e39ea>._91e05f0f{padding-left:var(--reactist-spacing-medium)}.ba270182{margin-left:calc(var(--reactist-spacing-large)*-1)}.ba270182>._91e05f0f{padding-left:var(--reactist-spacing-large)}.b96e7ec7{margin-left:calc(var(--reactist-spacing-xlarge)*-1)}.b96e7ec7>._91e05f0f{padding-left:var(--reactist-spacing-xlarge)}.d276612c{margin-left:calc(var(--reactist-spacing-xxlarge)*-1)}.d276612c>._91e05f0f{padding-left:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.d7a73106{margin-left:calc(var(--reactist-spacing-xsmall)*-1)}._8f5e0e9e>._91e05f0f{padding-left:var(--reactist-spacing-xsmall)}._8f5e0e9e{margin-left:calc(var(--reactist-spacing-small)*-1)}._8f5e0e9e>._91e05f0f{padding-left:var(--reactist-spacing-small)}._3a168411{margin-left:calc(var(--reactist-spacing-medium)*-1)}._3a168411>._91e05f0f{padding-left:var(--reactist-spacing-medium)}._0abcc12e{margin-left:calc(var(--reactist-spacing-large)*-1)}._0abcc12e>._91e05f0f{padding-left:var(--reactist-spacing-large)}.e0bafc60{margin-left:calc(var(--reactist-spacing-xlarge)*-1)}.e0bafc60>._91e05f0f{padding-left:var(--reactist-spacing-xlarge)}.d2df9afd{margin-left:calc(var(--reactist-spacing-xxlarge)*-1)}.d2df9afd>._91e05f0f{padding-left:var(--reactist-spacing-xxlarge)}}.b18d0b47{width:100%}._102a6b27{flex:0 0 50%}._829872fe{flex:0 0 33.33333%}.cf5aef9a{flex:0 0 66.66667%}._931bf714{flex:0 0 25%}.b0303130{flex:0 0 75%}.f6589a6f{flex:0 0 20%}._2823aed9{flex:0 0 40%}.d00ba3bb{flex:0 0 60%}._338f2d7c{flex:0 0 80%}._6f59c771{margin-top:calc(var(--reactist-spacing-xsmall)*-1)}._6f59c771>*{margin-top:var(--reactist-spacing-xsmall)}._5a55af26{margin-top:calc(var(--reactist-spacing-small)*-1)}._5a55af26>*{margin-top:var(--reactist-spacing-small)}.fa261310{margin-top:calc(var(--reactist-spacing-medium)*-1)}.fa261310>*{margin-top:var(--reactist-spacing-medium)}._6ebd4e46{margin-top:calc(var(--reactist-spacing-large)*-1)}._6ebd4e46>*{margin-top:var(--reactist-spacing-large)}._55ce4aea{margin-top:calc(var(--reactist-spacing-xlarge)*-1)}._55ce4aea>*{margin-top:var(--reactist-spacing-xlarge)}._04c9c3ac{margin-top:calc(var(--reactist-spacing-xxlarge)*-1)}._04c9c3ac>*{margin-top:var(--reactist-spacing-xxlarge)}@media (min-width:768px){.ab76d8cd{margin-top:calc(var(--reactist-spacing-xsmall)*-1)}._06582234>*{margin-top:var(--reactist-spacing-xsmall)}._14629bfb{margin-top:calc(var(--reactist-spacing-small)*-1)}._14629bfb>*{margin-top:var(--reactist-spacing-small)}._5b4e39ea{margin-top:calc(var(--reactist-spacing-medium)*-1)}._5b4e39ea>*{margin-top:var(--reactist-spacing-medium)}.ba270182{margin-top:calc(var(--reactist-spacing-large)*-1)}.ba270182>*{margin-top:var(--reactist-spacing-large)}.b96e7ec7{margin-top:calc(var(--reactist-spacing-xlarge)*-1)}.b96e7ec7>*{margin-top:var(--reactist-spacing-xlarge)}.d276612c{margin-top:calc(var(--reactist-spacing-xxlarge)*-1)}.d276612c>*{margin-top:var(--reactist-spacing-xxlarge)}}@media (min-width:992px){.d7a73106{margin-top:calc(var(--reactist-spacing-xsmall)*-1)}.d7a73106>*{margin-top:var(--reactist-spacing-xsmall)}._8f5e0e9e{margin-top:calc(var(--reactist-spacing-small)*-1)}._8f5e0e9e>*{margin-top:var(--reactist-spacing-small)}._3a168411{margin-top:calc(var(--reactist-spacing-medium)*-1)}._3a168411>*{margin-top:var(--reactist-spacing-medium)}._0abcc12e{margin-top:calc(var(--reactist-spacing-large)*-1)}._0abcc12e>*{margin-top:var(--reactist-spacing-large)}.e0bafc60{margin-top:calc(var(--reactist-spacing-xlarge)*-1)}.e0bafc60>*{margin-top:var(--reactist-spacing-xlarge)}.d2df9afd{margin-top:calc(var(--reactist-spacing-xxlarge)*-1)}.d2df9afd>*{margin-top:var(--reactist-spacing-xxlarge)}}
|
|
9
9
|
.eb665121{border-style:solid;border-width:1px;color:var(--reactist-content-primary);padding:var(--reactist-spacing-small);min-height:calc(2*var(--reactist-spacing-small) + var(--reactist-button-small-height) + 2px)}.d0373ff9{background-color:var(--reactist-alert-tone-info-background);border-color:var(--reactist-alert-tone-info-border)}.d0373ff9 svg{color:var(--reactist-alert-tone-info-icon)}.bb18dcab{background-color:var(--reactist-alert-tone-positive-background);border-color:var(--reactist-alert-tone-positive-border)}.bb18dcab svg{color:var(--reactist-alert-tone-positive-icon)}._0af02331{background-color:var(--reactist-alert-tone-caution-background);border-color:var(--reactist-alert-tone-caution-border)}._0af02331 svg{color:var(--reactist-alert-tone-caution-icon)}.f76146f9{background-color:var(--reactist-alert-tone-critical-background);border-color:var(--reactist-alert-tone-critical-border)}.f76146f9 svg{color:var(--reactist-alert-tone-critical-icon)}
|