@corva/ui 3.19.0-0 → 3.19.0-1

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.
@@ -0,0 +1,24 @@
1
+ import { ChangeEvent, ReactNode, Ref } from 'react';
2
+ export type SwitchProps = {
3
+ onLabel?: ReactNode;
4
+ offLabel?: ReactNode;
5
+ /**
6
+ * Checked state
7
+ */
8
+ checked?: boolean;
9
+ disabled?: boolean;
10
+ onChange?: (checked: boolean, event: ChangeEvent<HTMLInputElement>) => void;
11
+ size?: 'small' | 'medium';
12
+ /**
13
+ * If set to `true`, Switch will have the colors/styles as if it's checked. Labels will change color depending on checked status
14
+ */
15
+ disableOffState?: boolean;
16
+ /**
17
+ * Ref to underlying input
18
+ */
19
+ inputRef?: Ref<HTMLInputElement>;
20
+ className?: string;
21
+ testId?: string;
22
+ };
23
+ export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLLabelElement>>;
24
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/Switch.NEXT/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkC,SAAS,EAAE,GAAG,EAAe,MAAM,OAAO,CAAC;AAOjG,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5E,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAEjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA6BF,eAAO,MAAM,MAAM,0GAiElB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { ComponentProps } from 'react';
3
+ import { Switch } from './Switch';
4
+ type Props = ComponentProps<typeof Switch>;
5
+ declare const meta: Meta<Props>;
6
+ export default meta;
7
+ export declare const Default: (props: Props) => JSX.Element;
8
+ export declare const Sizes: () => JSX.Element;
9
+ export declare const Disabled: () => JSX.Element;
10
+ export declare const AOrB: () => JSX.Element;
11
+ export declare const UsageWithoutLabels: () => JSX.Element;
12
+ //# sourceMappingURL=Switch.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/Switch.NEXT/Switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAsBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAYnC,CAAC;AAEF,eAAO,MAAM,KAAK,mBAKjB,CAAC;AAQF,eAAO,MAAM,QAAQ,mBAKpB,CAAC;AAKF,eAAO,MAAM,IAAI,mBAqBhB,CAAC;AAQF,eAAO,MAAM,kBAAkB,mBAkB9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Switch';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/Switch.NEXT/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.19.0-0",
3
+ "version": "3.19.0-1",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"