@kushagradhawan/kookie-ui 0.1.2 → 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 +5 -41
- 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 +7 -12
- package/src/components/_internal/base-button.props.ts +2 -0
- package/src/components/_internal/base-button.tsx +20 -6
- package/src/components/button.css +0 -24
- package/src/components/button.tsx +18 -5
- package/src/components/icon-button.css +2 -31
- 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 +5 -41
package/components.css
CHANGED
|
@@ -1783,6 +1783,7 @@
|
|
|
1783
1783
|
font-family: var(--default-font-family);
|
|
1784
1784
|
font-style: normal;
|
|
1785
1785
|
text-align: center;
|
|
1786
|
+
height: var(--base-button-height);
|
|
1786
1787
|
}
|
|
1787
1788
|
.rt-BaseButton:where([data-disabled]) {
|
|
1788
1789
|
--spinner-opacity: 1;
|
|
@@ -1790,13 +1791,9 @@
|
|
|
1790
1791
|
.rt-BaseButton:where(.rt-loading) {
|
|
1791
1792
|
position: relative;
|
|
1792
1793
|
}
|
|
1793
|
-
.rt-BaseButton:where(
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
.rt-BaseButton:where(.rt-variant-ghost) {
|
|
1797
|
-
box-sizing: content-box;
|
|
1798
|
-
height: -moz-fit-content;
|
|
1799
|
-
height: fit-content;
|
|
1794
|
+
.rt-BaseButton:where(.rt-full-width) {
|
|
1795
|
+
display: flex;
|
|
1796
|
+
width: 100%;
|
|
1800
1797
|
}
|
|
1801
1798
|
.rt-BaseButton:where(.rt-r-size-1) {
|
|
1802
1799
|
--base-button-classic-active-padding-top: 1px;
|
|
@@ -2209,21 +2206,6 @@
|
|
|
2209
2206
|
}
|
|
2210
2207
|
.rt-Button:where(.rt-variant-ghost) {
|
|
2211
2208
|
padding: var(--button-ghost-padding-y) var(--button-ghost-padding-x);
|
|
2212
|
-
--margin-top: 0px;
|
|
2213
|
-
--margin-right: 0px;
|
|
2214
|
-
--margin-bottom: 0px;
|
|
2215
|
-
--margin-left: 0px;
|
|
2216
|
-
--margin-top-override: calc(var(--margin-top) - var(--button-ghost-padding-y));
|
|
2217
|
-
--margin-right-override: calc(var(--margin-right) - var(--button-ghost-padding-x));
|
|
2218
|
-
--margin-bottom-override: calc(var(--margin-bottom) - var(--button-ghost-padding-y));
|
|
2219
|
-
--margin-left-override: calc(var(--margin-left) - var(--button-ghost-padding-x));
|
|
2220
|
-
margin: var(--margin-top-override) var(--margin-right-override) var(--margin-bottom-override) var(--margin-left-override);
|
|
2221
|
-
}
|
|
2222
|
-
:where(.rt-Button:where(.rt-variant-ghost)) > * {
|
|
2223
|
-
--margin-top-override: initial;
|
|
2224
|
-
--margin-right-override: initial;
|
|
2225
|
-
--margin-bottom-override: initial;
|
|
2226
|
-
--margin-left-override: initial;
|
|
2227
2209
|
}
|
|
2228
2210
|
.rt-Button:where(.rt-r-size-1) {
|
|
2229
2211
|
gap: var(--space-1);
|
|
@@ -5684,28 +5666,10 @@
|
|
|
5684
5666
|
border-radius: var(--radius-5);
|
|
5685
5667
|
}
|
|
5686
5668
|
}
|
|
5687
|
-
.rt-IconButton
|
|
5669
|
+
.rt-IconButton {
|
|
5688
5670
|
height: var(--base-button-height);
|
|
5689
5671
|
width: var(--base-button-height);
|
|
5690
5672
|
}
|
|
5691
|
-
.rt-IconButton:where(.rt-variant-ghost) {
|
|
5692
|
-
padding: var(--icon-button-ghost-padding);
|
|
5693
|
-
--margin-top: 0px;
|
|
5694
|
-
--margin-right: 0px;
|
|
5695
|
-
--margin-bottom: 0px;
|
|
5696
|
-
--margin-left: 0px;
|
|
5697
|
-
--margin-top-override: calc(var(--margin-top) - var(--icon-button-ghost-padding));
|
|
5698
|
-
--margin-right-override: calc(var(--margin-right) - var(--icon-button-ghost-padding));
|
|
5699
|
-
--margin-bottom-override: calc(var(--margin-bottom) - var(--icon-button-ghost-padding));
|
|
5700
|
-
--margin-left-override: calc(var(--margin-left) - var(--icon-button-ghost-padding));
|
|
5701
|
-
margin: var(--margin-top-override) var(--margin-right-override) var(--margin-bottom-override) var(--margin-left-override);
|
|
5702
|
-
}
|
|
5703
|
-
:where(.rt-IconButton:where(.rt-variant-ghost)) > * {
|
|
5704
|
-
--margin-top-override: initial;
|
|
5705
|
-
--margin-right-override: initial;
|
|
5706
|
-
--margin-bottom-override: initial;
|
|
5707
|
-
--margin-left-override: initial;
|
|
5708
|
-
}
|
|
5709
5673
|
.rt-IconButton:where(.rt-r-size-1) :where(svg) {
|
|
5710
5674
|
width: 13px;
|
|
5711
5675
|
height: 13px;
|
|
@@ -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,mBAAmB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,KAAK,QAAQ,EAA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AAM,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,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,8BAkB/B,MAAMC,EAAaX,EAAM,WAA+C,CAACY,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAOX,EAAmB,KAAK,OAAQ,EAAIS,EAC7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EAAWT,EAAM,QACjB,GAAGU,CACL,EAAIf,EAAaK,EAAOT,EAAoBO,CAAc,EAGpDa,EAAON,EAAUf,EAAK,KAAOgB,GAAM,SAGnCM,EACJP,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAEzE,OACElB,EAAA,cAACuB,EAAA,CAEC,gBAAeF,GAAY,OAC3B,oBAAmBF,EACnB,cAAaC,EACZ,GAAGE,EACJ,IAAKT,EACL,UAAWZ,EAAW,WAAY,gBAAiBc,CAAS,EAC3D,GAAIS,GAAsB,CAAE,SAAAH,CAAS,GAErCT,EAAM,QACLZ,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEgB,CACH,EACAhB,EAAA,cAACM,EAAA,KAAgBU,CAAS,EAE1BhB,EAAA,cAACI,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEJ,EAAA,cAAC,YACCA,EAAA,cAACK,EAAA,CAAQ,KAAMG,EAAkBM,EAAML,CAA0B,EAAG,CACtE,CACF,CACF,EAEAO,CAEJ,CAEJ,CAAC,EACDL,EAAW,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "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"}
|