Skip to content

Commit

Permalink
add isDisabled and isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
snqb committed Oct 5, 2023
1 parent f409cb6 commit b697a2a
Show file tree
Hide file tree
Showing 9 changed files with 405 additions and 395 deletions.
6 changes: 3 additions & 3 deletions dist/index-6738d64c.mjs → dist/index-0bdca193.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { j as $, k as M, s as xe, t as c, l as Ae, P as et, T as tt, m as E, n as rt, g as j, o as I, q as R, a as ae, r as nt, u as st, v as it, w as ot, x as at, y as lt, f as ht, i as ft, z as ut, A as dt, B as le, C as pt } from "./index-cfe56674.mjs";
import { C as ct } from "./index-4d20bbe9.mjs";
import { htmlCompletionSource as mt, html as gt } from "./index-9bdbca3f.mjs";
import { j as $, k as M, s as xe, t as c, l as Ae, P as et, T as tt, m as E, n as rt, g as j, o as I, q as R, a as ae, r as nt, u as st, v as it, w as ot, x as at, y as lt, f as ht, i as ft, z as ut, A as dt, B as le, C as pt } from "./index-1cd978ce.mjs";
import { C as ct } from "./index-5feb2974.mjs";
import { htmlCompletionSource as mt, html as gt } from "./index-3e888653.mjs";
import "./Flex-93c26849.mjs";
import "react";
import "react-dom";
Expand Down
771 changes: 387 additions & 384 deletions dist/index-cfe56674.mjs → dist/index-1cd978ce.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-30e836c6.mjs → dist/index-1f957282.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { g as f, L as w, p as v, i as y, c as k, f as x, h as z, a as S, I as q, N as C } from "./index-cfe56674.mjs";
import { g as f, L as w, p as v, i as y, c as k, f as x, h as z, a as S, I as q, N as C } from "./index-1cd978ce.mjs";
import "./Flex-93c26849.mjs";
import "react";
import "react-dom";
Expand Down
2 changes: 1 addition & 1 deletion dist/index-aba189ae.mjs → dist/index-3e17e8a4.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { i as J, c as ee, f as te, s as ae, t as i, L as re, a as ne, E as ie, b as se, d as oe, e as le, g as ce } from "./index-cfe56674.mjs";
import { i as J, c as ee, f as te, s as ae, t as i, L as re, a as ne, E as ie, b as se, d as oe, e as le, g as ce } from "./index-1cd978ce.mjs";
import "./Flex-93c26849.mjs";
import "react";
import "react-dom";
Expand Down
4 changes: 2 additions & 2 deletions dist/index-9bdbca3f.mjs → dist/index-3e888653.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { D as qe, E as q, s as _e, t as b, b as Ce, n as Ae, L as se, p as Qe, i as oe, c as Ye, f as ie, h as Me, a as ue, g as E, I as Re, N as ze, F as Ze, G as Ee, o as Be } from "./index-cfe56674.mjs";
import { t as We, j as Ne, a as De, b as B, c as Ge } from "./index-4d20bbe9.mjs";
import { D as qe, E as q, s as _e, t as b, b as Ce, n as Ae, L as se, p as Qe, i as oe, c as Ye, f as ie, h as Me, a as ue, g as E, I as Re, N as ze, F as Ze, G as Ee, o as Be } from "./index-1cd978ce.mjs";
import { t as We, j as Ne, a as De, b as B, c as Ge } from "./index-5feb2974.mjs";
import "./Flex-93c26849.mjs";
import "react";
import "react-dom";
Expand Down
2 changes: 1 addition & 1 deletion dist/index-4d20bbe9.mjs → dist/index-5feb2974.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { g as b, H as ne, S as F, r as oe, u as ie, G as $, R as le, J as re, x as ae, K as k, M as se, o as T, O as ce, Q as j, W as fe, L as pe, U as me, i as de, c as I, V as ue, X as he, f as ge, h as ye, Y as V, a as be, I as we, y as xe, N as Se } from "./index-cfe56674.mjs";
import { g as b, H as ne, S as F, r as oe, u as ie, G as $, R as le, J as re, x as ae, K as k, M as se, o as T, O as ce, Q as j, W as fe, L as pe, U as me, i as de, c as I, V as ue, X as he, f as ge, h as ye, Y as V, a as be, I as we, y as xe, N as Se } from "./index-1cd978ce.mjs";
class Ye {
/**
Create a new completion context. (Mostly useful for testing
Expand Down
2 changes: 1 addition & 1 deletion dist/index.mjs

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/src/components/single-select/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ export type Props = ParentProps & CleanBoxProps & Conditionals & {
labelPosition?: 'side' | 'inline' | 'outside';
invertLabelPosition?: boolean;
isInvalid?: boolean;
isDisabled?: boolean;
isLoading?: boolean;
errorMessage?: ReactNode;
intent?: Intents;
customFilter?: React.ReactNode;
bottomActionText?: string;
bottomActionHandler?: () => void;
};
export declare const SingleSelect: ({ options: rawOptions, value, onChange, placeholder, disabled, label, labelAction, width, maxListHeight, variant, noDataMessage, editable, isClearable, labelPosition, invertLabelPosition, isInvalid, errorMessage, menuPlacement, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
export declare const SingleSelect: ({ options: rawOptions, value, onChange, placeholder, disabled, label, labelAction, width, maxListHeight, variant, noDataMessage, editable, isClearable, labelPosition, invertLabelPosition, isInvalid, isDisabled, isLoading, errorMessage, menuPlacement, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
export {};
7 changes: 6 additions & 1 deletion src/components/single-select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export type Props = ParentProps &
labelPosition?: 'side' | 'inline' | 'outside';
invertLabelPosition?: boolean;
isInvalid?: boolean;
isDisabled?: boolean;
isLoading?: boolean;
errorMessage?: ReactNode;

// out of scope rn
Expand Down Expand Up @@ -99,6 +101,8 @@ export const SingleSelect = ({
labelPosition = 'outside',
invertLabelPosition = false,
isInvalid,
isDisabled,
isLoading,
errorMessage = '',
menuPlacement,
...props
Expand Down Expand Up @@ -135,13 +139,13 @@ export const SingleSelect = ({

return (
<FormControl
isDisabled={disabled}
width={width}
display="flex"
alignItems="baseline"
justifyContent="start"
flexDirection={flexDirection}
isInvalid={isInvalid}
isDisabled={disabled}
{...props}
>
{['outside', 'side'].includes(labelPosition) && label && (
Expand Down Expand Up @@ -209,6 +213,7 @@ export const SingleSelect = ({
Option,
} as any
}
isLoading={isLoading}
// Additional customization can be added here
// {...props}
{...labelProps}
Expand Down

0 comments on commit b697a2a

Please sign in to comment.