@kushagradhawan/kookie-ui 0.1.3 → 0.1.4
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/components.css +4 -0
- package/dist/cjs/components/_internal/base-button.d.ts +4 -2
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/_internal/base-button.props.d.ts +5 -0
- package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.props.js +1 -1
- package/dist/cjs/components/_internal/base-button.props.js.map +2 -2
- package/dist/cjs/components/button.d.ts +12 -3
- package/dist/cjs/components/button.d.ts.map +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/icon-button.d.ts +12 -3
- package/dist/cjs/components/icon-button.d.ts.map +1 -1
- package/dist/cjs/components/icon-button.js +1 -1
- package/dist/cjs/components/icon-button.js.map +2 -2
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/toggle-button.d.ts +11 -0
- package/dist/cjs/components/toggle-button.d.ts.map +1 -0
- package/dist/cjs/components/toggle-button.js +2 -0
- package/dist/cjs/components/toggle-button.js.map +7 -0
- package/dist/cjs/components/toggle-icon-button.d.ts +11 -0
- package/dist/cjs/components/toggle-icon-button.d.ts.map +1 -0
- package/dist/cjs/components/toggle-icon-button.js +2 -0
- package/dist/cjs/components/toggle-icon-button.js.map +7 -0
- package/dist/esm/components/_internal/base-button.d.ts +4 -2
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.js.map +3 -3
- package/dist/esm/components/_internal/base-button.props.d.ts +5 -0
- package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.props.js +1 -1
- package/dist/esm/components/_internal/base-button.props.js.map +2 -2
- package/dist/esm/components/button.d.ts +12 -3
- package/dist/esm/components/button.d.ts.map +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/icon-button.d.ts +12 -3
- package/dist/esm/components/icon-button.d.ts.map +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/icon-button.js.map +2 -2
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/toggle-button.d.ts +11 -0
- package/dist/esm/components/toggle-button.d.ts.map +1 -0
- package/dist/esm/components/toggle-button.js +2 -0
- package/dist/esm/components/toggle-button.js.map +7 -0
- package/dist/esm/components/toggle-icon-button.d.ts +11 -0
- package/dist/esm/components/toggle-icon-button.d.ts.map +1 -0
- package/dist/esm/components/toggle-icon-button.js +2 -0
- package/dist/esm/components/toggle-icon-button.js.map +7 -0
- package/package.json +1 -1
- package/src/components/_internal/base-button.css +5 -0
- package/src/components/_internal/base-button.props.ts +2 -0
- package/src/components/_internal/base-button.tsx +20 -6
- package/src/components/button.tsx +18 -5
- package/src/components/icon-button.tsx +21 -5
- package/src/components/index.tsx +2 -0
- package/src/components/toggle-button.tsx +30 -0
- package/src/components/toggle-icon-button.tsx +30 -0
- package/styles.css +4 -0
package/components.css
CHANGED
|
@@ -1791,6 +1791,10 @@
|
|
|
1791
1791
|
.rt-BaseButton:where(.rt-loading) {
|
|
1792
1792
|
position: relative;
|
|
1793
1793
|
}
|
|
1794
|
+
.rt-BaseButton:where(.rt-full-width) {
|
|
1795
|
+
display: flex;
|
|
1796
|
+
width: 100%;
|
|
1797
|
+
}
|
|
1794
1798
|
.rt-BaseButton:where(.rt-r-size-1) {
|
|
1795
1799
|
--base-button-classic-active-padding-top: 1px;
|
|
1796
1800
|
--base-button-height: var(--space-5);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { baseButtonPropDefs } from './base-button.props.js';
|
|
3
3
|
import type { MarginProps } from '../../props/margin.props.js';
|
|
4
|
-
import type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';
|
|
5
4
|
import type { GetPropDefTypes } from '../../props/prop-def.js';
|
|
6
5
|
type BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;
|
|
7
|
-
|
|
6
|
+
type PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {
|
|
7
|
+
as?: C;
|
|
8
|
+
} & BaseButtonOwnProps & MarginProps & Omit<React.ComponentPropsWithoutRef<C>, keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;
|
|
9
|
+
interface BaseButtonProps extends PolymorphicBaseButtonProps {
|
|
8
10
|
}
|
|
9
11
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
12
|
export { BaseButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGrE,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D,QAAA,MAAM,UAAU,2FAwDd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var T=Object.create;var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var v=(t,o)=>{for(var e in o)p(t,e,{get:o[e],enumerable:!0})},f=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of E(o))!O.call(t,s)&&s!==e&&p(t,s,{get:()=>o[s],enumerable:!(n=j(o,s))||n.enumerable});return t};var B=(t,o,e)=>(e=t!=null?T(N(t)):{},f(o||!t||!t.__esModule?p(e,"default",{value:t,enumerable:!0}):e,t)),M=t=>f(p({},"__esModule",{value:!0}),t);var k={};v(k,{BaseButton:()=>d});module.exports=M(k);var r=B(require("react")),P=B(require("classnames")),y=require("radix-ui"),m=require("./base-button.props.js"),c=require("../flex.js"),b=require("../spinner.js"),h=require("../visually-hidden.js"),C=require("../../helpers/extract-props.js"),a=require("../../helpers/map-prop-values.js"),g=require("../../props/margin.props.js");const d=r.forwardRef((t,o)=>{const{size:e=m.baseButtonPropDefs.size.default}=t,{className:n,children:s,asChild:l,as:i,color:x,radius:D,disabled:u=t.loading,...w}=(0,C.extractProps)(t,m.baseButtonPropDefs,g.marginPropDefs),z=l?y.Slot.Root:i||"button",S=l||!i||["button","input","textarea","select"].includes(i);return r.createElement(z,{"data-disabled":u||void 0,"data-accent-color":x,"data-radius":D,...w,ref:o,className:(0,P.default)("rt-reset","rt-BaseButton",n),...S&&{disabled:u}},t.loading?r.createElement(r.Fragment,null,r.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},s),r.createElement(h.VisuallyHidden,null,s),r.createElement(c.Flex,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},r.createElement("span",null,r.createElement(b.Spinner,{size:(0,a.mapResponsiveProp)(e,a.mapButtonSizeToSpinnerSize)})))):s)});d.displayName="BaseButton";
|
|
2
2
|
//# sourceMappingURL=base-button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqB,oBAErBC,EAAmC,kCACnCC,EAAqB,sBACrBC,EAAwB,yBACxBC,EAA+B,iCAC/BC,EAA6B,0CAC7BC,EAA8D,4CAC9DC,EAA+B,
|
|
6
|
-
"names": ["base_button_exports", "__export", "BaseButton", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_base_button_props", "import_flex", "import_spinner", "import_visually_hidden", "import_extract_props", "import_map_prop_values", "import_margin_props", "props", "forwardedRef", "size", "className", "children", "asChild", "color", "radius", "disabled", "baseButtonProps", "Comp", "classNames"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n// Polymorphic types\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n Omit<React.ComponentPropsWithoutRef<C>, keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n disabled = props.loading,\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // asChild takes precedence over as prop\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n {...baseButtonProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqB,oBAErBC,EAAmC,kCACnCC,EAAqB,sBACrBC,EAAwB,yBACxBC,EAA+B,iCAC/BC,EAA6B,0CAC7BC,EAA8D,4CAC9DC,EAA+B,uCAkB/B,MAAMX,EAAaE,EAAM,WAA+C,CAACU,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAO,qBAAmB,KAAK,OAAQ,EAAIF,EAC7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EAAWT,EAAM,QACjB,GAAGU,CACL,KAAI,gBAAaV,EAAO,qBAAoB,gBAAc,EAGpDW,EAAON,EAAU,OAAK,KAAOC,GAAM,SAGnCM,EACJP,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAEzE,OACEhB,EAAA,cAACqB,EAAA,CAEC,gBAAeF,GAAY,OAC3B,oBAAmBF,EACnB,cAAaC,EACZ,GAAGE,EACJ,IAAKT,EACL,aAAW,EAAAY,SAAW,WAAY,gBAAiBV,CAAS,EAC3D,GAAIS,GAAsB,CAAE,SAAAH,CAAS,GAErCT,EAAM,QACLV,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEc,CACH,EACAd,EAAA,cAAC,sBAAgBc,CAAS,EAE1Bd,EAAA,cAAC,QAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEA,EAAA,cAAC,YACCA,EAAA,cAAC,WAAQ,QAAM,qBAAkBY,EAAM,4BAA0B,EAAG,CACtE,CACF,CACF,EAEAE,CAEJ,CAEJ,CAAC,EACDhB,EAAW,YAAc",
|
|
6
|
+
"names": ["base_button_exports", "__export", "BaseButton", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_base_button_props", "import_flex", "import_spinner", "import_visually_hidden", "import_extract_props", "import_map_prop_values", "import_margin_props", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "disabled", "baseButtonProps", "Comp", "shouldPassDisabled", "classNames"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcvB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var t in e)a(o,t,{get:e[t],enumerable:!0})},D=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u(e))!d.call(o,s)&&s!==t&&a(o,s,{get:()=>e[s],enumerable:!(r=m(e,s))||r.enumerable});return o};var P=o=>D(a({},"__esModule",{value:!0}),o);var h={};c(h,{baseButtonPropDefs:()=>n});module.exports=P(h);var i=require("../../props/as-child.prop.js"),l=require("../../props/color.prop.js"),f=require("../../props/high-contrast.prop.js"),p=require("../../props/radius.prop.js");const v=["1","2","3","4"],b=["classic","solid","soft","surface","outline","ghost"],n={...i.asChildPropDef,size:{type:"enum",className:"rt-r-size",values:v,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:b,default:"solid"},...l.accentColorPropDef,...f.highContrastPropDef,...p.radiusPropDef,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1}};
|
|
2
2
|
//# sourceMappingURL=base-button.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-button.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+B,wCAC/BC,EAAmC,qCACnCC,EAAoC,6CACpCC,EAA8B,sCAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAErEP,EAAqB,CACzB,GAAG,iBACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQM,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAG,qBACH,GAAG,sBACH,GAAG,gBACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+B,wCAC/BC,EAAmC,qCACnCC,EAAoC,6CACpCC,EAA8B,sCAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAErEP,EAAqB,CACzB,GAAG,iBACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQM,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAG,qBACH,GAAG,sBACH,GAAG,gBACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EACpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,CAC3E",
|
|
6
6
|
"names": ["base_button_props_exports", "__export", "baseButtonPropDefs", "__toCommonJS", "import_as_child_prop", "import_color_prop", "import_high_contrast_prop", "import_radius_prop", "sizes", "variants"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseButton } from './_internal/base-button.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { BaseButtonProps } from './_internal/base-button.js';
|
|
4
|
+
type ButtonElement = React.ElementRef<typeof BaseButton>;
|
|
5
|
+
type ButtonOwnProps = Omit<BaseButtonProps, 'as'>;
|
|
6
|
+
type ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {
|
|
7
|
+
as?: C;
|
|
8
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;
|
|
9
|
+
type ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & {
|
|
10
|
+
ref?: React.ForwardedRef<ButtonElement>;
|
|
11
|
+
}) => React.ReactElement | null;
|
|
12
|
+
declare const Button: ButtonComponent & {
|
|
13
|
+
displayName?: string;
|
|
14
|
+
};
|
|
6
15
|
export { Button };
|
|
7
16
|
export type { ButtonProps };
|
|
8
17
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,KAAK,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAGzD,KAAK,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAElD,KAAK,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI,cAAc,GAAG;IAC1E,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,cAAc,CAAC,CAAC;AAElE,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAC5D,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B,QAAA,MAAM,MAAM,EAIP,eAAe,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAIhD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var l=Object.create;var p=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty;var P=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},a=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of y(e))!i.call(t,n)&&n!==o&&p(t,n,{get:()=>e[n],enumerable:!(s=R(e,n))||s.enumerable});return t};var m=(t,e,o)=>(o=t!=null?l(c(t)):{},a(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),d=t=>a(p({},"__esModule",{value:!0}),t);var C={};P(C,{Button:()=>r});module.exports=d(C);var u=m(require("react")),B=m(require("classnames")),f=require("./_internal/base-button.js");const r=u.forwardRef(({className:t,...e},o)=>u.createElement(f.BaseButton,{...e,ref:o,className:(0,B.default)("rt-Button",t)}));r.displayName="Button";
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBAEvBC,EAA2B,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n// Polymorphic Button props\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as'>;\n\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\ntype ButtonComponent = <C extends React.ElementType = 'button'>(\n props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> },\n) => React.ReactElement | null;\n\nconst Button = React.forwardRef(\n ({ className, ...props }: ButtonProps, forwardedRef: React.ForwardedRef<ButtonElement>) => (\n <BaseButton {...props} ref={forwardedRef} className={classNames('rt-Button', className)} />\n ),\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBAEvBC,EAA2B,sCAgB3B,MAAMJ,EAASE,EAAM,WACnB,CAAC,CAAE,UAAAG,EAAW,GAAGC,CAAM,EAAgBC,IACrCL,EAAA,cAAC,cAAY,GAAGI,EAAO,IAAKC,EAAc,aAAW,EAAAC,SAAW,YAAaH,CAAS,EAAG,CAE7F,EAEAL,EAAO,YAAc",
|
|
6
6
|
"names": ["button_exports", "__export", "Button", "__toCommonJS", "React", "import_classnames", "import_base_button", "className", "props", "forwardedRef", "classNames"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseButton } from './_internal/base-button.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { BaseButtonProps } from './_internal/base-button.js';
|
|
4
|
+
type IconButtonElement = React.ElementRef<typeof BaseButton>;
|
|
5
|
+
type IconButtonOwnProps = Omit<BaseButtonProps, 'as'>;
|
|
6
|
+
type IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {
|
|
7
|
+
as?: C;
|
|
8
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;
|
|
9
|
+
type IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & {
|
|
10
|
+
ref?: React.ForwardedRef<IconButtonElement>;
|
|
11
|
+
}) => React.ReactElement | null;
|
|
12
|
+
declare const IconButton: IconButtonComponent & {
|
|
13
|
+
displayName?: string;
|
|
14
|
+
};
|
|
6
15
|
export { IconButton };
|
|
7
16
|
export type { IconButtonProps };
|
|
8
17
|
//# sourceMappingURL=icon-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,KAAK,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAG7D,KAAK,kBAAkB,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAEtD,KAAK,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI,kBAAkB,GAAG;IAClF,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,kBAAkB,CAAC,CAAC;AAEtE,KAAK,mBAAmB,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAChE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;CAAE,KACxE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B,QAAA,MAAM,UAAU,EAOX,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAIpD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var I=Object.create;var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var i=(t,o)=>{for(var e in o)p(t,e,{get:o[e],enumerable:!0})},a=(t,o,e,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of l(o))!y.call(t,n)&&n!==e&&p(t,n,{get:()=>o[n],enumerable:!(s=f(o,n))||s.enumerable});return t};var c=(t,o,e)=>(e=t!=null?I(R(t)):{},a(o||!t||!t.__esModule?p(e,"default",{value:t,enumerable:!0}):e,t)),P=t=>a(p({},"__esModule",{value:!0}),t);var d={};i(d,{IconButton:()=>r});module.exports=P(d);var m=c(require("react")),u=c(require("classnames")),B=require("./_internal/base-button.js");const r=m.forwardRef(({className:t,...o},e)=>m.createElement(B.BaseButton,{...o,ref:e,className:(0,u.default)("rt-IconButton",t)}));r.displayName="IconButton";
|
|
2
2
|
//# sourceMappingURL=icon-button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/icon-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBAEvBC,EAA2B,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n// Polymorphic IconButton props\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'>;\n\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(\n props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> },\n) => React.ReactElement | null;\n\nconst IconButton = React.forwardRef(\n (\n { className, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => (\n <BaseButton {...props} ref={forwardedRef} className={classNames('rt-IconButton', className)} />\n ),\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBAEvBC,EAA2B,sCAgB3B,MAAMJ,EAAaE,EAAM,WACvB,CACE,CAAE,UAAAG,EAAW,GAAGC,CAAM,EACtBC,IAEAL,EAAA,cAAC,cAAY,GAAGI,EAAO,IAAKC,EAAc,aAAW,EAAAC,SAAW,gBAAiBH,CAAS,EAAG,CAEjG,EAEAL,EAAW,YAAc",
|
|
6
6
|
"names": ["icon_button_exports", "__export", "IconButton", "__toCommonJS", "React", "import_classnames", "import_base_button", "className", "props", "forwardedRef", "classNames"]
|
|
7
7
|
}
|
|
@@ -54,6 +54,8 @@ export * as TextField from './text-field.js';
|
|
|
54
54
|
export { Text, type TextProps } from './text.js';
|
|
55
55
|
export { ThemePanel, type ThemePanelProps } from './theme-panel.js';
|
|
56
56
|
export { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';
|
|
57
|
+
export { ToggleButton, type ToggleButtonProps } from './toggle-button.js';
|
|
58
|
+
export { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';
|
|
57
59
|
export { Tooltip, type TooltipProps } from './tooltip.js';
|
|
58
60
|
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';
|
|
59
61
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,m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AAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Y=Object.create;var m=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,oo=Object.prototype.hasOwnProperty;var ro=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0})},n=(r,e,t,f)=>{if(e&&typeof e=="object"||typeof e=="function")for(let x of _(e))!oo.call(r,x)&&x!==t&&m(r,x,{get:()=>e[x],enumerable:!(f=Z(e,x))||f.enumerable});return r};var o=(r,e,t)=>(t=r!=null?Y($(r)):{},n(e||!r||!r.__esModule?m(t,"default",{value:r,enumerable:!0}):t,r)),eo=r=>n(m({},"__esModule",{value:!0}),r);var to={};ro(to,{AccessibleIcon:()=>P.AccessibleIcon,AlertDialog:()=>po,AspectRatio:()=>y.AspectRatio,Avatar:()=>i.Avatar,Badge:()=>l.Badge,Blockquote:()=>c.Blockquote,Box:()=>d.Box,Button:()=>T.Button,Callout:()=>so,Card:()=>C.Card,Checkbox:()=>g.Checkbox,CheckboxCards:()=>xo,CheckboxGroup:()=>mo,ChevronDownIcon:()=>p.ChevronDownIcon,Code:()=>u.Code,Container:()=>S.Container,ContextMenu:()=>ao,DataList:()=>fo,Dialog:()=>no,DropdownMenu:()=>Po,Em:()=>h.Em,Flex:()=>k.Flex,Grid:()=>B.Grid,Heading:()=>I.Heading,HoverCard:()=>yo,IconButton:()=>b.IconButton,Inset:()=>A.Inset,Kbd:()=>R.Kbd,Link:()=>v.Link,Popover:()=>io,Portal:()=>D.Portal,Progress:()=>H.Progress,Quote:()=>w.Quote,Radio:()=>G.Radio,RadioCards:()=>lo,RadioGroup:()=>co,Reset:()=>F.Reset,ScrollArea:()=>L.ScrollArea,Section:()=>q.Section,SegmentedControl:()=>To,Select:()=>Co,Separator:()=>E.Separator,Skeleton:()=>K.Skeleton,Slider:()=>M.Slider,Slot:()=>a.Slot,Slottable:()=>a.Slottable,Spinner:()=>Q.Spinner,Strong:()=>V.Strong,Switch:()=>z.Switch,TabNav:()=>go,Table:()=>uo,Tabs:()=>So,Text:()=>j.Text,TextArea:()=>N.TextArea,TextField:()=>ho,Theme:()=>s.Theme,ThemeContext:()=>s.ThemeContext,ThemePanel:()=>J.ThemePanel,ThickCheckIcon:()=>p.ThickCheckIcon,ThickChevronRightIcon:()=>p.ThickChevronRightIcon,ThickDividerHorizontalIcon:()=>p.ThickDividerHorizontalIcon,ToggleButton:()=>O.ToggleButton,ToggleIconButton:()=>U.ToggleIconButton,Tooltip:()=>W.Tooltip,VisuallyHidden:()=>X.VisuallyHidden,useThemeContext:()=>s.useThemeContext});module.exports=eo(to);var P=require("./accessible-icon.js"),po=o(require("./alert-dialog.js")),y=require("./aspect-ratio.js"),i=require("./avatar.js"),l=require("./badge.js"),c=require("./blockquote.js"),d=require("./box.js"),T=require("./button.js"),so=o(require("./callout.js")),C=require("./card.js"),xo=o(require("./checkbox-cards.js")),mo=o(require("./checkbox-group.js")),g=require("./checkbox.js"),u=require("./code.js"),S=require("./container.js"),ao=o(require("./context-menu.js")),fo=o(require("./data-list.js")),no=o(require("./dialog.js")),Po=o(require("./dropdown-menu.js")),h=require("./em.js"),k=require("./flex.js"),B=require("./grid.js"),I=require("./heading.js"),yo=o(require("./hover-card.js")),b=require("./icon-button.js"),p=require("./icons.js"),A=require("./inset.js"),R=require("./kbd.js"),v=require("./link.js"),io=o(require("./popover.js")),D=require("./portal.js"),H=require("./progress.js"),w=require("./quote.js"),lo=o(require("./radio-cards.js")),co=o(require("./radio-group.js")),G=require("./radio.js"),F=require("./reset.js"),L=require("./scroll-area.js"),To=o(require("./segmented-control.js")),q=require("./section.js"),Co=o(require("./select.js")),E=require("./separator.js"),K=require("./skeleton.js"),M=require("./slider.js"),a=require("./slot.js"),Q=require("./spinner.js"),V=require("./strong.js"),z=require("./switch.js"),go=o(require("./tab-nav.js")),uo=o(require("./table.js")),So=o(require("./tabs.js")),N=require("./text-area.js"),ho=o(require("./text-field.js")),j=require("./text.js"),J=require("./theme-panel.js"),s=require("./theme.js"),O=require("./toggle-button.js"),U=require("./toggle-icon-button.js"),W=require("./tooltip.js"),X=require("./visually-hidden.js");
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["components_exports", "__export", "AlertDialog", "Callout", "CheckboxCards", "CheckboxGroup", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "HoverCard", "Popover", "RadioCards", "RadioGroup", "SegmentedControl", "Select", "TabNav", "Table", "Tabs", "TextField", "__toCommonJS", "import_accessible_icon", "import_aspect_ratio", "import_avatar", "import_badge", "import_blockquote", "import_box", "import_button", "import_card", "import_checkbox", "import_code", "import_container", "import_em", "import_flex", "import_grid", "import_heading", "import_icon_button", "import_icons", "import_inset", "import_kbd", "import_link", "import_portal", "import_progress", "import_quote", "import_radio", "import_reset", "import_scroll_area", "import_section", "import_separator", "import_skeleton", "import_slider", "import_slot", "import_spinner", "import_strong", "import_switch", "import_text_area", "import_text", "import_theme_panel", "import_theme", "import_tooltip", "import_visually_hidden"]
|
|
4
|
+
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\n"],
|
|
5
|
+
"mappings": "8jBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,qDAAAE,GAAA,8IAAAC,GAAA,0DAAAC,GAAA,kBAAAC,GAAA,gGAAAC,GAAA,aAAAC,GAAA,WAAAC,GAAA,iBAAAC,GAAA,gFAAAC,GAAA,wFAAAC,GAAA,+FAAAC,GAAA,eAAAC,GAAA,yFAAAC,GAAA,WAAAC,GAAA,yLAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,sDAAAC,GAAA,yZAAAC,GAAApB,IAAA,IAAAqB,EAAyD,gCACzDnB,GAA6B,gCAC7BoB,EAAmD,6BACnDC,EAAyC,uBACzCC,EAAuC,sBACvCC,EAAiD,2BACjDC,EAAmC,oBACnCC,EAAyC,uBACzCxB,GAAyB,2BACzByB,EAAqC,qBACrCxB,GAA+B,kCAC/BC,GAA+B,kCAC/BwB,EAA6C,yBAC7CC,EAAqC,qBACrCC,EAA+C,0BAC/CzB,GAA6B,gCAC7BC,GAA0B,6BAC1BC,GAAwB,0BACxBC,GAA8B,iCAC9BuB,EAAiC,mBACjCC,EAAqC,qBACrCC,EAAqC,qBACrCC,EAA2C,wBAC3CzB,GAA2B,8BAC3B0B,EAAiD,4BACjDC,EAMO,sBACPC,EAAuC,sBACvCC,EAAmC,oBACnCC,EAAqC,qBACrC7B,GAAyB,2BACzB8B,EAAyC,uBACzCC,EAA6C,yBAC7CC,EAAuC,sBACvC/B,GAA4B,+BAC5BC,GAA4B,+BAC5B+B,EAAuC,sBACvCC,EAAuC,sBACvCC,EAAiD,4BACjDhC,GAAkC,qCAClCiC,EAA2C,wBAC3ChC,GAAwB,0BACxBiC,EAA+C,0BAC/CC,EAA6C,yBAC7CC,EAAyC,uBACzCC,EAAgC,qBAChCC,EAA2C,wBAC3CC,EAAyC,uBACzCC,EAAyC,uBACzCtC,GAAwB,2BACxBC,GAAuB,yBACvBC,GAAsB,wBACtBqC,EAA6C,0BAC7CpC,GAA2B,8BAC3BqC,EAAqC,qBACrCC,EAAiD,4BACjDC,EAAsE,sBACtEC,EAAqD,8BACrDC,EAA6D,mCAC7DC,EAA2C,wBAC3CC,EAAyD",
|
|
6
|
+
"names": ["components_exports", "__export", "AlertDialog", "Callout", "CheckboxCards", "CheckboxGroup", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "HoverCard", "Popover", "RadioCards", "RadioGroup", "SegmentedControl", "Select", "TabNav", "Table", "Tabs", "TextField", "__toCommonJS", "import_accessible_icon", "import_aspect_ratio", "import_avatar", "import_badge", "import_blockquote", "import_box", "import_button", "import_card", "import_checkbox", "import_code", "import_container", "import_em", "import_flex", "import_grid", "import_heading", "import_icon_button", "import_icons", "import_inset", "import_kbd", "import_link", "import_portal", "import_progress", "import_quote", "import_radio", "import_reset", "import_scroll_area", "import_section", "import_separator", "import_skeleton", "import_slider", "import_slot", "import_spinner", "import_strong", "import_switch", "import_text_area", "import_text", "import_theme_panel", "import_theme", "import_toggle_button", "import_toggle_icon_button", "import_tooltip", "import_visually_hidden"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof Button> {
|
|
4
|
+
pressed?: boolean;
|
|
5
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
6
|
+
defaultPressed?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ToggleButton: React.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { ToggleButton };
|
|
10
|
+
export type { ToggleButtonProps };
|
|
11
|
+
//# sourceMappingURL=toggle-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,UAAU,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,MAAM,CAAC;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,QAAA,MAAM,YAAY,0GAajB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var u=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var i=(e,o)=>{for(var t in o)s(e,t,{get:o[t],enumerable:!0})},p=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of m(o))!T.call(e,n)&&n!==t&&s(e,n,{get:()=>o[n],enumerable:!(r=f(o,n))||r.enumerable});return e};var P=(e,o,t)=>(t=e!=null?u(B(e)):{},p(o||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),R=e=>p(s({},"__esModule",{value:!0}),e);var y={};i(y,{ToggleButton:()=>l});module.exports=R(y);var g=P(require("react")),a=require("radix-ui"),d=require("./button.js");const l=g.forwardRef(({pressed:e,onPressedChange:o,defaultPressed:t,...r},n)=>g.createElement(a.Toggle.Root,{pressed:e,onPressedChange:o,defaultPressed:t,asChild:!0},g.createElement(d.Button,{...r,ref:n})));l.displayName="ToggleButton";
|
|
2
|
+
//# sourceMappingURL=toggle-button.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/toggle-button.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { Button } from './button.js';\n\ninterface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof Button> {\n pressed?: boolean;\n onPressedChange?: (pressed: boolean) => void;\n defaultPressed?: boolean;\n}\n\ntype ToggleButtonElement = React.ElementRef<typeof Button>;\n\nconst ToggleButton = React.forwardRef<ToggleButtonElement, ToggleButtonProps>(\n ({ pressed, onPressedChange, defaultPressed, ...buttonProps }, forwardedRef) => {\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={onPressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <Button {...buttonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n },\n);\nToggleButton.displayName = 'ToggleButton';\n\nexport { ToggleButton };\nexport type { ToggleButtonProps };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,oBACvBC,EAAuB,uBAUvB,MAAMJ,EAAeE,EAAM,WACzB,CAAC,CAAE,QAAAG,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAY,EAAGC,IAE3DP,EAAA,cAAC,SAAO,KAAP,CACC,QAASG,EACT,gBAAiBC,EACjB,eAAgBC,EAChB,QAAO,IAEPL,EAAA,cAAC,UAAQ,GAAGM,EAAa,IAAKC,EAAc,CAC9C,CAGN,EACAT,EAAa,YAAc",
|
|
6
|
+
"names": ["toggle_button_exports", "__export", "ToggleButton", "__toCommonJS", "React", "import_radix_ui", "import_button", "pressed", "onPressedChange", "defaultPressed", "buttonProps", "forwardedRef"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconButton } from './icon-button.js';
|
|
3
|
+
interface ToggleIconButtonProps extends React.ComponentPropsWithoutRef<typeof IconButton> {
|
|
4
|
+
pressed?: boolean;
|
|
5
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
6
|
+
defaultPressed?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ToggleIconButton: React.ForwardRefExoticComponent<Omit<ToggleIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { ToggleIconButton };
|
|
10
|
+
export type { ToggleIconButtonProps };
|
|
11
|
+
//# sourceMappingURL=toggle-icon-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,QAAA,MAAM,gBAAgB,8GAarB,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var u=Object.create;var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var I=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},p=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!B.call(o,n)&&n!==t&&s(o,n,{get:()=>e[n],enumerable:!(r=c(e,n))||r.enumerable});return o};var T=(o,e,t)=>(t=o!=null?u(m(o)):{},p(e||!o||!o.__esModule?s(t,"default",{value:o,enumerable:!0}):t,o)),i=o=>p(s({},"__esModule",{value:!0}),o);var P={};I(P,{ToggleIconButton:()=>l});module.exports=i(P);var g=T(require("react")),a=require("radix-ui"),d=require("./icon-button.js");const l=g.forwardRef(({pressed:o,onPressedChange:e,defaultPressed:t,...r},n)=>g.createElement(a.Toggle.Root,{pressed:o,onPressedChange:e,defaultPressed:t,asChild:!0},g.createElement(d.IconButton,{...r,ref:n})));l.displayName="ToggleIconButton";
|
|
2
|
+
//# sourceMappingURL=toggle-icon-button.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/toggle-icon-button.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { IconButton } from './icon-button.js';\n\ninterface ToggleIconButtonProps extends React.ComponentPropsWithoutRef<typeof IconButton> {\n pressed?: boolean;\n onPressedChange?: (pressed: boolean) => void;\n defaultPressed?: boolean;\n}\n\ntype ToggleIconButtonElement = React.ElementRef<typeof IconButton>;\n\nconst ToggleIconButton = React.forwardRef<ToggleIconButtonElement, ToggleIconButtonProps>(\n ({ pressed, onPressedChange, defaultPressed, ...iconButtonProps }, forwardedRef) => {\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={onPressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <IconButton {...iconButtonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n },\n);\nToggleIconButton.displayName = 'ToggleIconButton';\n\nexport { ToggleIconButton };\nexport type { ToggleIconButtonProps };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,oBACvBC,EAA2B,4BAU3B,MAAMJ,EAAmBE,EAAM,WAC7B,CAAC,CAAE,QAAAG,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAgB,EAAGC,IAE/DP,EAAA,cAAC,SAAO,KAAP,CACC,QAASG,EACT,gBAAiBC,EACjB,eAAgBC,EAChB,QAAO,IAEPL,EAAA,cAAC,cAAY,GAAGM,EAAiB,IAAKC,EAAc,CACtD,CAGN,EACAT,EAAiB,YAAc",
|
|
6
|
+
"names": ["toggle_icon_button_exports", "__export", "ToggleIconButton", "__toCommonJS", "React", "import_radix_ui", "import_icon_button", "pressed", "onPressedChange", "defaultPressed", "iconButtonProps", "forwardedRef"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { baseButtonPropDefs } from './base-button.props.js';
|
|
3
3
|
import type { MarginProps } from '../../props/margin.props.js';
|
|
4
|
-
import type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';
|
|
5
4
|
import type { GetPropDefTypes } from '../../props/prop-def.js';
|
|
6
5
|
type BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;
|
|
7
|
-
|
|
6
|
+
type PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {
|
|
7
|
+
as?: C;
|
|
8
|
+
} & BaseButtonOwnProps & MarginProps & Omit<React.ComponentPropsWithoutRef<C>, keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;
|
|
9
|
+
interface BaseButtonProps extends PolymorphicBaseButtonProps {
|
|
8
10
|
}
|
|
9
11
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
12
|
export { BaseButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGrE,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D,QAAA,MAAM,UAAU,2FAwDd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import y from"classnames";import{Slot as c}from"radix-ui";import{baseButtonPropDefs as p}from"./base-button.props.js";import{Flex as b}from"../flex.js";import{Spinner as h}from"../spinner.js";import{VisuallyHidden as C}from"../visually-hidden.js";import{extractProps as g}from"../../helpers/extract-props.js";import{mapResponsiveProp as x,mapButtonSizeToSpinnerSize as D}from"../../helpers/map-prop-values.js";import{marginPropDefs as w}from"../../props/margin.props.js";const a=t.forwardRef((o,i)=>{const{size:m=p.size.default}=o,{className:d,children:e,asChild:r,as:s,color:l,radius:u,disabled:n=o.loading,...f}=g(o,p,w),B=r?c.Root:s||"button",P=r||!s||["button","input","textarea","select"].includes(s);return t.createElement(B,{"data-disabled":n||void 0,"data-accent-color":l,"data-radius":u,...f,ref:i,className:y("rt-reset","rt-BaseButton",d),...P&&{disabled:n}},o.loading?t.createElement(t.Fragment,null,t.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},e),t.createElement(C,null,e),t.createElement(b,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},t.createElement("span",null,t.createElement(h,{size:x(m,D)})))):e)});a.displayName="BaseButton";export{a as BaseButton};
|
|
2
2
|
//# sourceMappingURL=base-button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,
|
|
6
|
-
"names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "color", "radius", "disabled", "baseButtonProps", "Comp"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n// Polymorphic types\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n Omit<React.ComponentPropsWithoutRef<C>, keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n disabled = props.loading,\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // asChild takes precedence over as prop\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n {...baseButtonProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,O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mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "disabled", "baseButtonProps", "Comp", "shouldPassDisabled"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcvB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asChildPropDef as
|
|
1
|
+
import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as o}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";import{radiusPropDef as t}from"../../props/radius.prop.js";const a=["1","2","3","4"],r=["classic","solid","soft","surface","outline","ghost"],i={...e,size:{type:"enum",className:"rt-r-size",values:a,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid"},...o,...s,...t,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1}};export{i as baseButtonPropDefs};
|
|
2
2
|
//# sourceMappingURL=base-button.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/_internal/base-button.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAErEC,EAAqB,CACzB,GAAGN,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAErEC,EAAqB,CACzB,GAAGN,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EACpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,CAC3E",
|
|
6
6
|
"names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "baseButtonPropDefs"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseButton } from './_internal/base-button.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { BaseButtonProps } from './_internal/base-button.js';
|
|
4
|
+
type ButtonElement = React.ElementRef<typeof BaseButton>;
|
|
5
|
+
type ButtonOwnProps = Omit<BaseButtonProps, 'as'>;
|
|
6
|
+
type ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {
|
|
7
|
+
as?: C;
|
|
8
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;
|
|
9
|
+
type ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & {
|
|
10
|
+
ref?: React.ForwardedRef<ButtonElement>;
|
|
11
|
+
}) => React.ReactElement | null;
|
|
12
|
+
declare const Button: ButtonComponent & {
|
|
13
|
+
displayName?: string;
|
|
14
|
+
};
|
|
6
15
|
export { Button };
|
|
7
16
|
export type { ButtonProps };
|
|
8
17
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,KAAK,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAGzD,KAAK,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAElD,KAAK,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI,cAAc,GAAG;IAC1E,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,cAAc,CAAC,CAAC;AAElE,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAC5D,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B,QAAA,MAAM,MAAM,EAIP,eAAe,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAIhD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as t from"react";import
|
|
1
|
+
import*as t from"react";import r from"classnames";import{BaseButton as s}from"./_internal/base-button.js";const e=t.forwardRef(({className:o,...n},p)=>t.createElement(s,{...n,ref:p,className:r("rt-Button",o)}));e.displayName="Button";export{e as Button};
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,MAAkB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n// Polymorphic Button props\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as'>;\n\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\ntype ButtonComponent = <C extends React.ElementType = 'button'>(\n props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> },\n) => React.ReactElement | null;\n\nconst Button = React.forwardRef(\n ({ className, ...props }: ButtonProps, forwardedRef: React.ForwardedRef<ButtonElement>) => (\n <BaseButton {...props} ref={forwardedRef} className={classNames('rt-Button', className)} />\n ),\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,MAAkB,6BAgB3B,MAAMC,EAASH,EAAM,WACnB,CAAC,CAAE,UAAAI,EAAW,GAAGC,CAAM,EAAgBC,IACrCN,EAAA,cAACE,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAc,UAAWL,EAAW,YAAaG,CAAS,EAAG,CAE7F,EAEAD,EAAO,YAAc",
|
|
6
6
|
"names": ["React", "classNames", "BaseButton", "Button", "className", "props", "forwardedRef"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseButton } from './_internal/base-button.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { BaseButtonProps } from './_internal/base-button.js';
|
|
4
|
+
type IconButtonElement = React.ElementRef<typeof BaseButton>;
|
|
5
|
+
type IconButtonOwnProps = Omit<BaseButtonProps, 'as'>;
|
|
6
|
+
type IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {
|
|
7
|
+
as?: C;
|
|
8
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;
|
|
9
|
+
type IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & {
|
|
10
|
+
ref?: React.ForwardedRef<IconButtonElement>;
|
|
11
|
+
}) => React.ReactElement | null;
|
|
12
|
+
declare const IconButton: IconButtonComponent & {
|
|
13
|
+
displayName?: string;
|
|
14
|
+
};
|
|
6
15
|
export { IconButton };
|
|
7
16
|
export type { IconButtonProps };
|
|
8
17
|
//# sourceMappingURL=icon-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,KAAK,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAG7D,KAAK,kBAAkB,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAEtD,KAAK,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI,kBAAkB,GAAG;IAClF,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,kBAAkB,CAAC,CAAC;AAEtE,KAAK,mBAAmB,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAChE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;CAAE,KACxE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B,QAAA,MAAM,UAAU,EAOX,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAIpD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as t from"react";import
|
|
1
|
+
import*as t from"react";import r from"classnames";import{BaseButton as s}from"./_internal/base-button.js";const o=t.forwardRef(({className:e,...n},p)=>t.createElement(s,{...n,ref:p,className:r("rt-IconButton",e)}));o.displayName="IconButton";export{o as IconButton};
|
|
2
2
|
//# sourceMappingURL=icon-button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/icon-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,MAAkB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n// Polymorphic IconButton props\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'>;\n\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(\n props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> },\n) => React.ReactElement | null;\n\nconst IconButton = React.forwardRef(\n (\n { className, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => (\n <BaseButton {...props} ref={forwardedRef} className={classNames('rt-IconButton', className)} />\n ),\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,MAAkB,6BAgB3B,MAAMC,EAAaH,EAAM,WACvB,CACE,CAAE,UAAAI,EAAW,GAAGC,CAAM,EACtBC,IAEAN,EAAA,cAACE,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAc,UAAWL,EAAW,gBAAiBG,CAAS,EAAG,CAEjG,EAEAD,EAAW,YAAc",
|
|
6
6
|
"names": ["React", "classNames", "BaseButton", "IconButton", "className", "props", "forwardedRef"]
|
|
7
7
|
}
|
|
@@ -54,6 +54,8 @@ export * as TextField from './text-field.js';
|
|
|
54
54
|
export { Text, type TextProps } from './text.js';
|
|
55
55
|
export { ThemePanel, type ThemePanelProps } from './theme-panel.js';
|
|
56
56
|
export { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';
|
|
57
|
+
export { ToggleButton, type ToggleButtonProps } from './toggle-button.js';
|
|
58
|
+
export { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';
|
|
57
59
|
export { Tooltip, type TooltipProps } from './tooltip.js';
|
|
58
60
|
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';
|
|
59
61
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,MAAM,EA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;AAC5C,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{AccessibleIcon as e}from"./accessible-icon.js";import*as t from"./alert-dialog.js";import{AspectRatio as s}from"./aspect-ratio.js";import{Avatar as m}from"./avatar.js";import{Badge as f}from"./badge.js";import{Blockquote as P}from"./blockquote.js";import{Box as
|
|
1
|
+
import{AccessibleIcon as e}from"./accessible-icon.js";import*as t from"./alert-dialog.js";import{AspectRatio as s}from"./aspect-ratio.js";import{Avatar as m}from"./avatar.js";import{Badge as f}from"./badge.js";import{Blockquote as P}from"./blockquote.js";import{Box as i}from"./box.js";import{Button as c}from"./button.js";import*as d from"./callout.js";import{Card as C}from"./card.js";import*as g from"./checkbox-cards.js";import*as u from"./checkbox-group.js";import{Checkbox as h}from"./checkbox.js";import{Code as B}from"./code.js";import{Container as b}from"./container.js";import*as A from"./context-menu.js";import*as R from"./data-list.js";import*as v from"./dialog.js";import*as D from"./dropdown-menu.js";import{Em as w}from"./em.js";import{Flex as F}from"./flex.js";import{Grid as q}from"./grid.js";import{Heading as K}from"./heading.js";import*as M from"./hover-card.js";import{IconButton as V}from"./icon-button.js";import{ChevronDownIcon as N,ThickCheckIcon as j,ThickChevronRightIcon as J,ThickDividerHorizontalIcon as O}from"./icons.js";import{Inset as W}from"./inset.js";import{Kbd as Y}from"./kbd.js";import{Link as _}from"./link.js";import*as $ from"./popover.js";import{Portal as ro}from"./portal.js";import{Progress as to}from"./progress.js";import{Quote as so}from"./quote.js";import*as xo from"./radio-cards.js";import*as mo from"./radio-group.js";import{Radio as fo}from"./radio.js";import{Reset as Po}from"./reset.js";import{ScrollArea as io}from"./scroll-area.js";import*as lo from"./segmented-control.js";import{Section as To}from"./section.js";import*as Co from"./select.js";import{Separator as uo}from"./separator.js";import{Skeleton as ho}from"./skeleton.js";import{Slider as Bo}from"./slider.js";import{Slot as bo,Slottable as Ao}from"./slot.js";import{Spinner as vo}from"./spinner.js";import{Strong as Ho}from"./strong.js";import{Switch as Go}from"./switch.js";import*as Fo from"./tab-nav.js";import*as Lo from"./table.js";import*as qo from"./tabs.js";import{TextArea as Ko}from"./text-area.js";import*as Mo from"./text-field.js";import{Text as Vo}from"./text.js";import{ThemePanel as No}from"./theme-panel.js";import{Theme as Jo,ThemeContext as Oo,useThemeContext as Uo}from"./theme.js";import{ToggleButton as Xo}from"./toggle-button.js";import{ToggleIconButton as Zo}from"./toggle-icon-button.js";import{Tooltip as $o}from"./tooltip.js";import{VisuallyHidden as rr}from"./visually-hidden.js";export{e as AccessibleIcon,t as AlertDialog,s as AspectRatio,m as Avatar,f as Badge,P as Blockquote,i as Box,c as Button,d as Callout,C as Card,h as Checkbox,g as CheckboxCards,u as CheckboxGroup,N as ChevronDownIcon,B as Code,b as Container,A as ContextMenu,R as DataList,v as Dialog,D as DropdownMenu,w as Em,F as Flex,q as Grid,K as Heading,M as HoverCard,V as IconButton,W as Inset,Y as Kbd,_ as Link,$ as Popover,ro as Portal,to as Progress,so as Quote,fo as Radio,xo as RadioCards,mo as RadioGroup,Po as Reset,io as ScrollArea,To as Section,lo as SegmentedControl,Co as Select,uo as Separator,ho as Skeleton,Bo as Slider,bo as Slot,Ao as Slottable,vo as Spinner,Ho as Strong,Go as Switch,Fo as TabNav,Lo as Table,qo as Tabs,Vo as Text,Ko as TextArea,Mo as TextField,Jo as Theme,Oo as ThemeContext,No as ThemePanel,j as ThickCheckIcon,J as ThickChevronRightIcon,O as ThickDividerHorizontalIcon,Xo as ToggleButton,Zo as ToggleIconButton,$o as Tooltip,rr as VisuallyHidden,Uo as useThemeContext};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAgD,uBACzD,UAAYC,MAAiB,oBAC7B,OAAS,eAAAC,MAA0C,oBACnD,OAAS,UAAAC,MAAgC,cACzC,OAAS,SAAAC,MAA8B,aACvC,OAAS,cAAAC,MAAwC,kBACjD,OAAS,OAAAC,MAA0B,WACnC,OAAS,UAAAC,MAAgC,cACzC,UAAYC,MAAa,eACzB,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAmB,sBAC/B,UAAYC,MAAmB,sBAC/B,OAAS,YAAAC,MAAoC,gBAC7C,OAAS,QAAAC,MAA4B,YACrC,OAAS,aAAAC,MAAsC,iBAC/C,UAAYC,MAAiB,oBAC7B,UAAYC,MAAc,iBAC1B,UAAYC,MAAY,cACxB,UAAYC,MAAkB,qBAC9B,OAAS,MAAAC,MAAwB,UACjC,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,MAA4B,YACrC,OAAS,WAAAC,MAAkC,eAC3C,UAAYC,MAAe,kBAC3B,OAAS,cAAAC,MAAwC,mBACjD,OAEE,mBAAAC,EACA,kBAAAC,EACA,yBAAAC,EACA,8BAAAC,MACK,aACP,OAAS,SAAAC,MAA8B,aACvC,OAAS,OAAAC,MAA0B,WACnC,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAa,eACzB,OAAS,UAAAC,OAAgC,cACzC,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,SAAAC,OAA8B,aACvC,UAAYC,OAAgB,mBAC5B,UAAYC,OAAgB,mBAC5B,OAAS,SAAAC,OAA8B,aACvC,OAAS,SAAAC,OAA8B,aACvC,OAAS,cAAAC,OAAwC,mBACjD,UAAYC,OAAsB,yBAClC,OAAS,WAAAC,OAAkC,eAC3C,UAAYC,OAAY,cACxB,OAAS,aAAAC,OAAsC,iBAC/C,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,UAAAC,OAAgC,cACzC,OAAS,QAAAC,GAAM,aAAAC,OAAiB,YAChC,OAAS,WAAAC,OAAkC,eAC3C,OAAS,UAAAC,OAAgC,cACzC,OAAS,UAAAC,OAAgC,cACzC,UAAYC,OAAY,eACxB,UAAYC,OAAW,aACvB,UAAYC,OAAU,YACtB,OAAS,YAAAC,OAAoC,iBAC7C,UAAYC,OAAe,kBAC3B,OAAS,QAAAC,OAA4B,YACrC,OAAS,cAAAC,OAAwC,mBACjD,OAAS,SAAAC,GAAO,gBAAAC,GAA+B,mBAAAC,OAAuB,aACtE,OAAS,WAAAC,OAAkC,eAC3C,OAAS,kBAAAC,OAAgD",
|
|
6
|
-
"names": ["AccessibleIcon", "AlertDialog", "AspectRatio", "Avatar", "Badge", "Blockquote", "Box", "Button", "Callout", "Card", "CheckboxCards", "CheckboxGroup", "Checkbox", "Code", "Container", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "Em", "Flex", "Grid", "Heading", "HoverCard", "IconButton", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "Inset", "Kbd", "Link", "Popover", "Portal", "Progress", "Quote", "RadioCards", "RadioGroup", "Radio", "Reset", "ScrollArea", "SegmentedControl", "Section", "Select", "Separator", "Skeleton", "Slider", "Slot", "Slottable", "Spinner", "Strong", "Switch", "TabNav", "Table", "Tabs", "TextArea", "TextField", "Text", "ThemePanel", "Theme", "ThemeContext", "useThemeContext", "Tooltip", "VisuallyHidden"]
|
|
4
|
+
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAgD,uBACzD,UAAYC,MAAiB,oBAC7B,OAAS,eAAAC,MAA0C,oBACnD,OAAS,UAAAC,MAAgC,cACzC,OAAS,SAAAC,MAA8B,aACvC,OAAS,cAAAC,MAAwC,kBACjD,OAAS,OAAAC,MAA0B,WACnC,OAAS,UAAAC,MAAgC,cACzC,UAAYC,MAAa,eACzB,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAmB,sBAC/B,UAAYC,MAAmB,sBAC/B,OAAS,YAAAC,MAAoC,gBAC7C,OAAS,QAAAC,MAA4B,YACrC,OAAS,aAAAC,MAAsC,iBAC/C,UAAYC,MAAiB,oBAC7B,UAAYC,MAAc,iBAC1B,UAAYC,MAAY,cACxB,UAAYC,MAAkB,qBAC9B,OAAS,MAAAC,MAAwB,UACjC,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,MAA4B,YACrC,OAAS,WAAAC,MAAkC,eAC3C,UAAYC,MAAe,kBAC3B,OAAS,cAAAC,MAAwC,mBACjD,OAEE,mBAAAC,EACA,kBAAAC,EACA,yBAAAC,EACA,8BAAAC,MACK,aACP,OAAS,SAAAC,MAA8B,aACvC,OAAS,OAAAC,MAA0B,WACnC,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAa,eACzB,OAAS,UAAAC,OAAgC,cACzC,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,SAAAC,OAA8B,aACvC,UAAYC,OAAgB,mBAC5B,UAAYC,OAAgB,mBAC5B,OAAS,SAAAC,OAA8B,aACvC,OAAS,SAAAC,OAA8B,aACvC,OAAS,cAAAC,OAAwC,mBACjD,UAAYC,OAAsB,yBAClC,OAAS,WAAAC,OAAkC,eAC3C,UAAYC,OAAY,cACxB,OAAS,aAAAC,OAAsC,iBAC/C,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,UAAAC,OAAgC,cACzC,OAAS,QAAAC,GAAM,aAAAC,OAAiB,YAChC,OAAS,WAAAC,OAAkC,eAC3C,OAAS,UAAAC,OAAgC,cACzC,OAAS,UAAAC,OAAgC,cACzC,UAAYC,OAAY,eACxB,UAAYC,OAAW,aACvB,UAAYC,OAAU,YACtB,OAAS,YAAAC,OAAoC,iBAC7C,UAAYC,OAAe,kBAC3B,OAAS,QAAAC,OAA4B,YACrC,OAAS,cAAAC,OAAwC,mBACjD,OAAS,SAAAC,GAAO,gBAAAC,GAA+B,mBAAAC,OAAuB,aACtE,OAAS,gBAAAC,OAA4C,qBACrD,OAAS,oBAAAC,OAAoD,0BAC7D,OAAS,WAAAC,OAAkC,eAC3C,OAAS,kBAAAC,OAAgD",
|
|
6
|
+
"names": ["AccessibleIcon", "AlertDialog", "AspectRatio", "Avatar", "Badge", "Blockquote", "Box", "Button", "Callout", "Card", "CheckboxCards", "CheckboxGroup", "Checkbox", "Code", "Container", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "Em", "Flex", "Grid", "Heading", "HoverCard", "IconButton", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "Inset", "Kbd", "Link", "Popover", "Portal", "Progress", "Quote", "RadioCards", "RadioGroup", "Radio", "Reset", "ScrollArea", "SegmentedControl", "Section", "Select", "Separator", "Skeleton", "Slider", "Slot", "Slottable", "Spinner", "Strong", "Switch", "TabNav", "Table", "Tabs", "TextArea", "TextField", "Text", "ThemePanel", "Theme", "ThemeContext", "useThemeContext", "ToggleButton", "ToggleIconButton", "Tooltip", "VisuallyHidden"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof Button> {
|
|
4
|
+
pressed?: boolean;
|
|
5
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
6
|
+
defaultPressed?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ToggleButton: React.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { ToggleButton };
|
|
10
|
+
export type { ToggleButtonProps };
|
|
11
|
+
//# sourceMappingURL=toggle-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,UAAU,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,MAAM,CAAC;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,QAAA,MAAM,YAAY,0GAajB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"react";import{Toggle as l}from"radix-ui";import{Button as p}from"./button.js";const o=e.forwardRef(({pressed:t,onPressedChange:n,defaultPressed:r,...s},g)=>e.createElement(l.Root,{pressed:t,onPressedChange:n,defaultPressed:r,asChild:!0},e.createElement(p,{...s,ref:g})));o.displayName="ToggleButton";export{o as ToggleButton};
|
|
2
|
+
//# sourceMappingURL=toggle-button.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/toggle-button.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { Button } from './button.js';\n\ninterface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof Button> {\n pressed?: boolean;\n onPressedChange?: (pressed: boolean) => void;\n defaultPressed?: boolean;\n}\n\ntype ToggleButtonElement = React.ElementRef<typeof Button>;\n\nconst ToggleButton = React.forwardRef<ToggleButtonElement, ToggleButtonProps>(\n ({ pressed, onPressedChange, defaultPressed, ...buttonProps }, forwardedRef) => {\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={onPressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <Button {...buttonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n },\n);\nToggleButton.displayName = 'ToggleButton';\n\nexport { ToggleButton };\nexport type { ToggleButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAS,UAAAC,MAAc,WACvB,OAAS,UAAAC,MAAc,cAUvB,MAAMC,EAAeH,EAAM,WACzB,CAAC,CAAE,QAAAI,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAY,EAAGC,IAE3DR,EAAA,cAACC,EAAO,KAAP,CACC,QAASG,EACT,gBAAiBC,EACjB,eAAgBC,EAChB,QAAO,IAEPN,EAAA,cAACE,EAAA,CAAQ,GAAGK,EAAa,IAAKC,EAAc,CAC9C,CAGN,EACAL,EAAa,YAAc",
|
|
6
|
+
"names": ["React", "Toggle", "Button", "ToggleButton", "pressed", "onPressedChange", "defaultPressed", "buttonProps", "forwardedRef"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconButton } from './icon-button.js';
|
|
3
|
+
interface ToggleIconButtonProps extends React.ComponentPropsWithoutRef<typeof IconButton> {
|
|
4
|
+
pressed?: boolean;
|
|
5
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
6
|
+
defaultPressed?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ToggleIconButton: React.ForwardRefExoticComponent<Omit<ToggleIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { ToggleIconButton };
|
|
10
|
+
export type { ToggleIconButtonProps };
|
|
11
|
+
//# sourceMappingURL=toggle-icon-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,UAAU,qBAAsB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,QAAA,MAAM,gBAAgB,8GAarB,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as o from"react";import{Toggle as l}from"radix-ui";import{IconButton as p}from"./icon-button.js";const e=o.forwardRef(({pressed:t,onPressedChange:n,defaultPressed:r,...s},g)=>o.createElement(l.Root,{pressed:t,onPressedChange:n,defaultPressed:r,asChild:!0},o.createElement(p,{...s,ref:g})));e.displayName="ToggleIconButton";export{e as ToggleIconButton};
|
|
2
|
+
//# sourceMappingURL=toggle-icon-button.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/toggle-icon-button.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { IconButton } from './icon-button.js';\n\ninterface ToggleIconButtonProps extends React.ComponentPropsWithoutRef<typeof IconButton> {\n pressed?: boolean;\n onPressedChange?: (pressed: boolean) => void;\n defaultPressed?: boolean;\n}\n\ntype ToggleIconButtonElement = React.ElementRef<typeof IconButton>;\n\nconst ToggleIconButton = React.forwardRef<ToggleIconButtonElement, ToggleIconButtonProps>(\n ({ pressed, onPressedChange, defaultPressed, ...iconButtonProps }, forwardedRef) => {\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={onPressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <IconButton {...iconButtonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n },\n);\nToggleIconButton.displayName = 'ToggleIconButton';\n\nexport { ToggleIconButton };\nexport type { ToggleIconButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAS,UAAAC,MAAc,WACvB,OAAS,cAAAC,MAAkB,mBAU3B,MAAMC,EAAmBH,EAAM,WAC7B,CAAC,CAAE,QAAAI,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAgB,EAAGC,IAE/DR,EAAA,cAACC,EAAO,KAAP,CACC,QAASG,EACT,gBAAiBC,EACjB,eAAgBC,EAChB,QAAO,IAEPN,EAAA,cAACE,EAAA,CAAY,GAAGK,EAAiB,IAAKC,EAAc,CACtD,CAGN,EACAL,EAAiB,YAAc",
|
|
6
|
+
"names": ["React", "Toggle", "IconButton", "ToggleIconButton", "pressed", "onPressedChange", "defaultPressed", "iconButtonProps", "forwardedRef"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
height: var(--base-button-height);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.rt-BaseButton:where(.rt-full-width) {
|
|
25
|
+
display: flex;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
/***************************************************************************************************
|
|
25
30
|
* *
|
|
26
31
|
* SIZES *
|
|
@@ -16,10 +16,12 @@ const baseButtonPropDefs = {
|
|
|
16
16
|
...highContrastPropDef,
|
|
17
17
|
...radiusPropDef,
|
|
18
18
|
loading: { type: 'boolean', className: 'rt-loading', default: false },
|
|
19
|
+
fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },
|
|
19
20
|
} satisfies {
|
|
20
21
|
size: PropDef<(typeof sizes)[number]>;
|
|
21
22
|
variant: PropDef<(typeof variants)[number]>;
|
|
22
23
|
loading: PropDef<boolean>;
|
|
24
|
+
fullWidth: PropDef<boolean>;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
export { baseButtonPropDefs };
|
|
@@ -16,22 +16,36 @@ import type { GetPropDefTypes } from '../../props/prop-def.js';
|
|
|
16
16
|
|
|
17
17
|
type BaseButtonElement = React.ElementRef<'button'>;
|
|
18
18
|
type BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
|
|
20
|
+
// Polymorphic types
|
|
21
|
+
type PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {
|
|
22
|
+
as?: C;
|
|
23
|
+
} & BaseButtonOwnProps &
|
|
24
|
+
MarginProps &
|
|
25
|
+
Omit<React.ComponentPropsWithoutRef<C>, keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;
|
|
26
|
+
|
|
27
|
+
interface BaseButtonProps extends PolymorphicBaseButtonProps {}
|
|
28
|
+
|
|
23
29
|
const BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {
|
|
24
30
|
const { size = baseButtonPropDefs.size.default } = props;
|
|
25
31
|
const {
|
|
26
32
|
className,
|
|
27
33
|
children,
|
|
28
34
|
asChild,
|
|
35
|
+
as,
|
|
29
36
|
color,
|
|
30
37
|
radius,
|
|
31
38
|
disabled = props.loading,
|
|
32
39
|
...baseButtonProps
|
|
33
40
|
} = extractProps(props, baseButtonPropDefs, marginPropDefs);
|
|
34
|
-
|
|
41
|
+
|
|
42
|
+
// asChild takes precedence over as prop
|
|
43
|
+
const Comp = asChild ? Slot.Root : as || 'button';
|
|
44
|
+
|
|
45
|
+
// Only pass disabled for elements that support it
|
|
46
|
+
const shouldPassDisabled =
|
|
47
|
+
asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);
|
|
48
|
+
|
|
35
49
|
return (
|
|
36
50
|
<Comp
|
|
37
51
|
// The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`
|
|
@@ -41,7 +55,7 @@ const BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props,
|
|
|
41
55
|
{...baseButtonProps}
|
|
42
56
|
ref={forwardedRef}
|
|
43
57
|
className={classNames('rt-reset', 'rt-BaseButton', className)}
|
|
44
|
-
|
|
58
|
+
{...(shouldPassDisabled && { disabled })}
|
|
45
59
|
>
|
|
46
60
|
{props.loading ? (
|
|
47
61
|
<>
|
|
@@ -2,14 +2,27 @@ import * as React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
|
|
4
4
|
import { BaseButton } from './_internal/base-button.js';
|
|
5
|
+
import type { BaseButtonProps } from './_internal/base-button.js';
|
|
5
6
|
|
|
6
7
|
type ButtonElement = React.ElementRef<typeof BaseButton>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
// Polymorphic Button props
|
|
10
|
+
type ButtonOwnProps = Omit<BaseButtonProps, 'as'>;
|
|
11
|
+
|
|
12
|
+
type ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {
|
|
13
|
+
as?: C;
|
|
14
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;
|
|
15
|
+
|
|
16
|
+
type ButtonComponent = <C extends React.ElementType = 'button'>(
|
|
17
|
+
props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> },
|
|
18
|
+
) => React.ReactElement | null;
|
|
19
|
+
|
|
20
|
+
const Button = React.forwardRef(
|
|
21
|
+
({ className, ...props }: ButtonProps, forwardedRef: React.ForwardedRef<ButtonElement>) => (
|
|
10
22
|
<BaseButton {...props} ref={forwardedRef} className={classNames('rt-Button', className)} />
|
|
11
|
-
)
|
|
12
|
-
);
|
|
23
|
+
),
|
|
24
|
+
) as ButtonComponent & { displayName?: string };
|
|
25
|
+
|
|
13
26
|
Button.displayName = 'Button';
|
|
14
27
|
|
|
15
28
|
export { Button };
|
|
@@ -2,14 +2,30 @@ import * as React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
|
|
4
4
|
import { BaseButton } from './_internal/base-button.js';
|
|
5
|
+
import type { BaseButtonProps } from './_internal/base-button.js';
|
|
5
6
|
|
|
6
7
|
type IconButtonElement = React.ElementRef<typeof BaseButton>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
// Polymorphic IconButton props
|
|
10
|
+
type IconButtonOwnProps = Omit<BaseButtonProps, 'as'>;
|
|
11
|
+
|
|
12
|
+
type IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {
|
|
13
|
+
as?: C;
|
|
14
|
+
} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;
|
|
15
|
+
|
|
16
|
+
type IconButtonComponent = <C extends React.ElementType = 'button'>(
|
|
17
|
+
props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> },
|
|
18
|
+
) => React.ReactElement | null;
|
|
19
|
+
|
|
20
|
+
const IconButton = React.forwardRef(
|
|
21
|
+
(
|
|
22
|
+
{ className, ...props }: IconButtonProps,
|
|
23
|
+
forwardedRef: React.ForwardedRef<IconButtonElement>,
|
|
24
|
+
) => (
|
|
10
25
|
<BaseButton {...props} ref={forwardedRef} className={classNames('rt-IconButton', className)} />
|
|
11
|
-
)
|
|
12
|
-
);
|
|
26
|
+
),
|
|
27
|
+
) as IconButtonComponent & { displayName?: string };
|
|
28
|
+
|
|
13
29
|
IconButton.displayName = 'IconButton';
|
|
14
30
|
|
|
15
31
|
export { IconButton };
|
package/src/components/index.tsx
CHANGED
|
@@ -60,5 +60,7 @@ export * as TextField from './text-field.js';
|
|
|
60
60
|
export { Text, type TextProps } from './text.js';
|
|
61
61
|
export { ThemePanel, type ThemePanelProps } from './theme-panel.js';
|
|
62
62
|
export { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';
|
|
63
|
+
export { ToggleButton, type ToggleButtonProps } from './toggle-button.js';
|
|
64
|
+
export { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';
|
|
63
65
|
export { Tooltip, type TooltipProps } from './tooltip.js';
|
|
64
66
|
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Toggle } from 'radix-ui';
|
|
3
|
+
import { Button } from './button.js';
|
|
4
|
+
|
|
5
|
+
interface ToggleButtonProps extends React.ComponentPropsWithoutRef<typeof Button> {
|
|
6
|
+
pressed?: boolean;
|
|
7
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
8
|
+
defaultPressed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type ToggleButtonElement = React.ElementRef<typeof Button>;
|
|
12
|
+
|
|
13
|
+
const ToggleButton = React.forwardRef<ToggleButtonElement, ToggleButtonProps>(
|
|
14
|
+
({ pressed, onPressedChange, defaultPressed, ...buttonProps }, forwardedRef) => {
|
|
15
|
+
return (
|
|
16
|
+
<Toggle.Root
|
|
17
|
+
pressed={pressed}
|
|
18
|
+
onPressedChange={onPressedChange}
|
|
19
|
+
defaultPressed={defaultPressed}
|
|
20
|
+
asChild
|
|
21
|
+
>
|
|
22
|
+
<Button {...buttonProps} ref={forwardedRef} />
|
|
23
|
+
</Toggle.Root>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
ToggleButton.displayName = 'ToggleButton';
|
|
28
|
+
|
|
29
|
+
export { ToggleButton };
|
|
30
|
+
export type { ToggleButtonProps };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Toggle } from 'radix-ui';
|
|
3
|
+
import { IconButton } from './icon-button.js';
|
|
4
|
+
|
|
5
|
+
interface ToggleIconButtonProps extends React.ComponentPropsWithoutRef<typeof IconButton> {
|
|
6
|
+
pressed?: boolean;
|
|
7
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
8
|
+
defaultPressed?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type ToggleIconButtonElement = React.ElementRef<typeof IconButton>;
|
|
12
|
+
|
|
13
|
+
const ToggleIconButton = React.forwardRef<ToggleIconButtonElement, ToggleIconButtonProps>(
|
|
14
|
+
({ pressed, onPressedChange, defaultPressed, ...iconButtonProps }, forwardedRef) => {
|
|
15
|
+
return (
|
|
16
|
+
<Toggle.Root
|
|
17
|
+
pressed={pressed}
|
|
18
|
+
onPressedChange={onPressedChange}
|
|
19
|
+
defaultPressed={defaultPressed}
|
|
20
|
+
asChild
|
|
21
|
+
>
|
|
22
|
+
<IconButton {...iconButtonProps} ref={forwardedRef} />
|
|
23
|
+
</Toggle.Root>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
ToggleIconButton.displayName = 'ToggleIconButton';
|
|
28
|
+
|
|
29
|
+
export { ToggleIconButton };
|
|
30
|
+
export type { ToggleIconButtonProps };
|
package/styles.css
CHANGED
|
@@ -6553,6 +6553,10 @@
|
|
|
6553
6553
|
.rt-BaseButton:where(.rt-loading) {
|
|
6554
6554
|
position: relative;
|
|
6555
6555
|
}
|
|
6556
|
+
.rt-BaseButton:where(.rt-full-width) {
|
|
6557
|
+
display: flex;
|
|
6558
|
+
width: 100%;
|
|
6559
|
+
}
|
|
6556
6560
|
.rt-BaseButton:where(.rt-r-size-1) {
|
|
6557
6561
|
--base-button-classic-active-padding-top: 1px;
|
|
6558
6562
|
--base-button-height: var(--space-5);
|