@uxf/ui 1.0.0-beta.80 → 1.0.0-beta.82

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.
Files changed (45) hide show
  1. package/button/button.d.ts +1 -1
  2. package/button/button.js +2 -2
  3. package/button/button.stories.d.ts +7 -0
  4. package/button/button.stories.js +17 -8
  5. package/button/theme.d.ts +1 -2
  6. package/chip/chip.d.ts +4 -1
  7. package/chip/chip.js +8 -3
  8. package/chip/chip.stories.d.ts +7 -0
  9. package/chip/chip.stories.js +16 -6
  10. package/chip/theme.d.ts +12 -3
  11. package/combobox/combobox.d.ts +0 -1
  12. package/combobox/combobox.js +3 -5
  13. package/css/button.css +82 -113
  14. package/css/button.old.css +231 -0
  15. package/css/chip.css +144 -10
  16. package/css/chip.old.css +37 -0
  17. package/css/combobox.css +6 -2
  18. package/css/combobox.old.css +102 -0
  19. package/css/dropdown.css +1 -1
  20. package/css/dropdown.old.css +24 -0
  21. package/css/input.css +17 -11
  22. package/css/input.old.css +193 -0
  23. package/css/select.css +6 -2
  24. package/css/select.old.css +66 -0
  25. package/date-picker-input/date-picker-decade.js +2 -2
  26. package/date-picker-input/date-picker-month.js +2 -2
  27. package/date-picker-input/date-picker-year.js +2 -2
  28. package/icon/icon.stories.d.ts +7 -0
  29. package/icon/icon.stories.js +6 -0
  30. package/input/input.stories.d.ts +1 -0
  31. package/input/input.stories.js +14 -4
  32. package/input/theme.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/select/select.d.ts +0 -1
  35. package/select/select.js +3 -5
  36. package/time-picker-input/time-picker.js +4 -4
  37. package/utils/storybook-config.d.ts +8 -1
  38. package/utils/storybook-config.js +8 -3
  39. package/checkbox-input/checkbox-input.d.ts +0 -2
  40. package/checkbox-input/checkbox-input.js +0 -12
  41. package/checkbox-input/checkbox-input.stories.d.ts +0 -7
  42. package/checkbox-input/checkbox-input.stories.js +0 -17
  43. package/checkbox-input/index.d.ts +0 -1
  44. package/checkbox-input/index.js +0 -17
  45. package/css/checkbox-input.css +0 -3
@@ -7,8 +7,8 @@ export declare type ButtonColor = keyof ButtonColors;
7
7
  export interface ButtonProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "type">, UseAnchorProps {
8
8
  color?: ButtonColor;
9
9
  isFullWidth?: boolean;
10
+ isIconButton?: boolean;
10
11
  size?: ButtonSize;
11
12
  variant?: ButtonVariant;
12
- iconButton?: boolean;
13
13
  }
14
14
  export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement>>;
package/button/button.js CHANGED
@@ -10,10 +10,10 @@ const react_1 = __importDefault(require("react"));
10
10
  const forwardRef_1 = require("@uxf/core/utils/forwardRef");
11
11
  exports.Button = (0, forwardRef_1.forwardRef)("Button", (props, ref) => {
12
12
  // eslint-disable-next-line react/destructuring-assignment
13
- const { color, iconButton, isFullWidth, size, variant, className, ...restProps } = props;
13
+ const { color, isIconButton, isFullWidth, size, variant, className, ...restProps } = props;
14
14
  const anchorProps = (0, useAnchorProps_1.useAnchorProps)({
15
15
  ...restProps,
16
- className: (0, cx_1.cx)("uxf-button", `uxf-button--color-${color !== null && color !== void 0 ? color : "default"}`, `uxf-button--size-${size !== null && size !== void 0 ? size : "default"}`, `uxf-button--variant-${variant !== null && variant !== void 0 ? variant : "default"}`, iconButton && "uxf-button--icon-button", isFullWidth && "uxf-button--full-width", className),
16
+ className: (0, cx_1.cx)("uxf-button", `uxf-button--color-${color !== null && color !== void 0 ? color : "default"}`, `uxf-button--size-${size !== null && size !== void 0 ? size : "default"}`, `uxf-button--variant-${variant !== null && variant !== void 0 ? variant : "default"}`, isIconButton && "uxf-button--icon-button", isFullWidth && "uxf-button--full-width", className),
17
17
  });
18
18
  return (react_1.default.createElement("a", { ref: ref, ...anchorProps },
19
19
  typeof props.children === "string" ? (react_1.default.createElement("span", { className: "uxf-button__text" }, props.children)) : (props.children),
@@ -1,7 +1,14 @@
1
+ /// <reference types="mdx" />
1
2
  import React from "react";
3
+ import Docs from "./button.docs.mdx";
2
4
  declare const _default: {
3
5
  title: string;
4
6
  component: React.ForwardRefExoticComponent<import("@uxf/ui/button").ButtonProps & React.RefAttributes<HTMLAnchorElement>>;
7
+ parameters: {
8
+ docs: {
9
+ page: typeof Docs;
10
+ };
11
+ };
5
12
  };
6
13
  export default _default;
7
14
  export declare function Default(): JSX.Element;
@@ -22,19 +22,28 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
25
28
  Object.defineProperty(exports, "__esModule", { value: true });
26
29
  exports.Default = void 0;
27
30
  const react_1 = __importStar(require("react"));
28
31
  const button_1 = require("@uxf/ui/button");
29
32
  const storybook_config_1 = require("@uxf/ui/utils/storybook-config");
30
33
  const icon_1 = require("@uxf/ui/icon");
34
+ const button_docs_mdx_1 = __importDefault(require("./button.docs.mdx"));
31
35
  exports.default = {
32
36
  title: "UI/Button",
33
37
  component: button_1.Button,
38
+ parameters: {
39
+ docs: {
40
+ page: button_docs_mdx_1.default,
41
+ },
42
+ },
34
43
  };
35
44
  function Default() {
36
45
  const config = (0, storybook_config_1.useStorybookConfig)("Button");
37
- const allButtons = (react_1.default.createElement(react_1.default.Fragment, null, config.variants.map((variant) => (react_1.default.createElement(react_1.Fragment, { key: variant }, config.colors.map((color) => (react_1.default.createElement(react_1.Fragment, { key: color }, config.sizes.map((size) => (react_1.default.createElement("div", { key: `${size}${color}${variant}`, className: "space-y-2 pb-4" },
46
+ return (react_1.default.createElement(react_1.default.Fragment, null, config.variants.map((variant) => (react_1.default.createElement(react_1.Fragment, { key: variant }, config.colors.map((color) => (react_1.default.createElement(react_1.Fragment, { key: color }, config.sizes.map((size) => (react_1.default.createElement("div", { key: `${size}${color}${variant}`, className: "space-y-2 pb-4" },
38
47
  react_1.default.createElement("div", { className: "text-sm" },
39
48
  "Variant: ",
40
49
  react_1.default.createElement("span", { className: "font-semibold" }, variant),
@@ -48,12 +57,12 @@ function Default() {
48
57
  react_1.default.createElement(button_1.Button, { color: color, onClick: () => void null, size: size, variant: variant }, "Default"),
49
58
  react_1.default.createElement(button_1.Button, { color: color, loading: true, onClick: () => void null, size: size, variant: variant }, "Loading"),
50
59
  react_1.default.createElement(button_1.Button, { color: color, disabled: true, onClick: () => void null, size: size, variant: variant }, "Disabled"),
51
- react_1.default.createElement(button_1.Button, { color: color, iconButton: true, onClick: () => void null, size: size, variant: variant },
52
- react_1.default.createElement(icon_1.Icon, { name: "check", size: size === "xs" || size === "sm" ? 16 : 24 }))),
53
- react_1.default.createElement(button_1.Button, { className: "w-[200px]", color: color, onClick: () => void null, size: size, variant: variant }, "Custom width"),
54
- react_1.default.createElement(button_1.Button, { color: color, isFullWidth: true, onClick: () => void null, size: size, variant: variant }, "Full width"))))))))))));
55
- return (react_1.default.createElement("div", { className: "flex flex-col space-x-8 lg:flex-row" },
56
- react_1.default.createElement("div", { className: "light space-y-2 rounded bg-white p-8" }, allButtons),
57
- react_1.default.createElement("div", { className: "dark space-y-2 rounded bg-gray-900 p-8 text-white" }, allButtons)));
60
+ react_1.default.createElement(button_1.Button, { color: color, isIconButton: true, onClick: () => void null, size: size, variant: variant },
61
+ react_1.default.createElement(icon_1.Icon, { name: "check" })),
62
+ react_1.default.createElement(button_1.Button, { color: color, isIconButton: true, onClick: () => void null, size: size, variant: variant, loading: true },
63
+ react_1.default.createElement(icon_1.Icon, { name: "check" })),
64
+ react_1.default.createElement(button_1.Button, { className: "w-[200px]", color: color, onClick: () => void null, size: size, variant: variant }, "Custom width")),
65
+ react_1.default.createElement(button_1.Button, { color: color, isFullWidth: true, onClick: () => void null, size: size, variant: variant }, "Full width"),
66
+ react_1.default.createElement("hr", null))))))))))));
58
67
  }
59
68
  exports.Default = Default;
package/button/theme.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export interface ButtonVariants {
2
2
  default: true;
3
+ white: true;
3
4
  outlined: true;
4
5
  text: true;
5
6
  }
@@ -12,8 +13,6 @@ export interface ButtonSizes {
12
13
  }
13
14
  export interface ButtonColors {
14
15
  default: true;
15
- white: true;
16
16
  success: true;
17
- warning: true;
18
17
  error: true;
19
18
  }
package/chip/chip.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import React, { HTMLAttributes } from "react";
2
- import { ChipColors } from "@uxf/ui/chip/theme";
2
+ import { ChipColors, ChipSizes } from "@uxf/ui/chip/theme";
3
3
  export declare type ChipColor = keyof ChipColors;
4
+ export declare type ChipSize = keyof ChipSizes;
4
5
  export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
5
6
  color?: ChipColor;
7
+ size?: ChipSize;
8
+ onClose?: () => void;
6
9
  }
7
10
  export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
package/chip/chip.js CHANGED
@@ -8,7 +8,12 @@ const cx_1 = require("@uxf/core/utils/cx");
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const forwardRef_1 = require("@uxf/core/utils/forwardRef");
10
10
  exports.Chip = (0, forwardRef_1.forwardRef)("Chip", (props, ref) => {
11
- var _a;
12
- const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "success"}`, props.className);
13
- return (react_1.default.createElement("div", { ref: ref, className: chipClassName }, typeof props.children === "string" ? (react_1.default.createElement("span", { className: "uxf-chip__text" }, props.children)) : (props.children)));
11
+ var _a, _b;
12
+ const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "default"}`, `uxf-chip--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, props.onClose && "has-button", props.className);
13
+ return (react_1.default.createElement("div", { ref: ref, className: chipClassName },
14
+ typeof props.children === "string" ? (react_1.default.createElement("span", { className: "uxf-chip__text" }, props.children)) : (props.children),
15
+ props.onClose && (react_1.default.createElement("button", { type: "button", onClick: props.onClose, className: "uxf-chip__button" },
16
+ react_1.default.createElement("span", { className: "sr-only" }, "Remove option"),
17
+ react_1.default.createElement("svg", { stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" },
18
+ react_1.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" }))))));
14
19
  });
@@ -1,7 +1,14 @@
1
+ /// <reference types="mdx" />
1
2
  import React from "react";
3
+ import Docs from "./chip.docs.mdx";
2
4
  declare const _default: {
3
5
  title: string;
4
6
  component: React.ForwardRefExoticComponent<import("./chip").ChipProps & React.RefAttributes<HTMLDivElement>>;
7
+ parameters: {
8
+ docs: {
9
+ page: typeof Docs;
10
+ };
11
+ };
5
12
  };
6
13
  export default _default;
7
14
  export declare function Default(): JSX.Element;
@@ -6,17 +6,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Default = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const chip_1 = require("@uxf/ui/chip");
9
+ const storybook_config_1 = require("../utils/storybook-config");
10
+ const chip_docs_mdx_1 = __importDefault(require("./chip.docs.mdx"));
9
11
  exports.default = {
10
12
  title: "UI/Chip",
11
13
  component: chip_1.Chip,
14
+ parameters: {
15
+ docs: {
16
+ page: chip_docs_mdx_1.default,
17
+ },
18
+ },
12
19
  };
13
20
  function Default() {
14
- const allChips = (react_1.default.createElement(react_1.default.Fragment, null,
15
- react_1.default.createElement(chip_1.Chip, { color: "success" }, "Success"),
16
- react_1.default.createElement(chip_1.Chip, { color: "warning" }, "Warning"),
17
- react_1.default.createElement(chip_1.Chip, { color: "error" }, "Error")));
21
+ const config = (0, storybook_config_1.useStorybookConfig)("Chip");
22
+ const allChips = config.colors.map((color) => (react_1.default.createElement(chip_1.Chip, { key: color, color: color, onClose: () => null }, color)));
23
+ const allChipsLarge = config.colors.map((color) => (react_1.default.createElement(chip_1.Chip, { key: color, color: color, size: "large" }, color)));
18
24
  return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
19
- react_1.default.createElement("div", { className: "light space-x-4 rounded bg-white p-8" }, allChips),
20
- react_1.default.createElement("div", { className: "dark space-x-4 rounded bg-gray-900 p-8 text-white" }, allChips)));
25
+ react_1.default.createElement("div", { className: "light space-y-4 rounded bg-white p-8" },
26
+ react_1.default.createElement("div", { className: "space-x-4" }, allChips),
27
+ react_1.default.createElement("div", { className: "space-x-4" }, allChipsLarge)),
28
+ react_1.default.createElement("div", { className: "dark space-y-4 rounded bg-gray-900 p-8" },
29
+ react_1.default.createElement("div", { className: "space-x-4" }, allChips),
30
+ react_1.default.createElement("div", { className: "space-x-4" }, allChipsLarge))));
21
31
  }
22
32
  exports.Default = Default;
package/chip/theme.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  export interface ChipColors {
2
- success: true;
3
- warning: true;
4
- error: true;
2
+ default: true;
3
+ red: true;
4
+ yellow: true;
5
+ green: true;
6
+ blue: true;
7
+ indigo: true;
8
+ purple: true;
9
+ pink: true;
10
+ }
11
+ export interface ChipSizes {
12
+ default: true;
13
+ large: true;
5
14
  }
@@ -14,7 +14,6 @@ export interface ComboboxProps<Value = ComboboxValue, Option = ComboboxOption<Va
14
14
  helperText?: ReactNode;
15
15
  hiddenLabel?: boolean;
16
16
  iconName?: keyof IconsSet;
17
- iconSize?: number;
18
17
  id?: string;
19
18
  keyExtractor?: (option: Option) => string | number;
20
19
  label: string;
@@ -36,7 +36,7 @@ const use_dropdown_1 = require("../hooks/use-dropdown");
36
36
  const icon_1 = require("../icon");
37
37
  const label_1 = require("../label");
38
38
  exports.Combobox = (0, forwardRef_1.forwardRef)("Combobox", (props, ref) => {
39
- var _a, _b, _c, _d;
39
+ var _a, _b, _c;
40
40
  const generatedId = (0, react_2.useId)();
41
41
  const id = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
42
42
  const [query, setQuery] = (0, react_2.useState)("");
@@ -47,14 +47,12 @@ exports.Combobox = (0, forwardRef_1.forwardRef)("Combobox", (props, ref) => {
47
47
  const input = (0, useInputFocus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
48
48
  const dropdown = (0, use_dropdown_1.useDropdown)((_b = props.dropdownPlacement) !== null && _b !== void 0 ? _b : "bottom", true);
49
49
  const stableRef = (0, react_2.useMemo)(() => (0, composeRefs_1.composeRefs)(innerRef, ref, dropdown.reference), [ref, dropdown.reference]);
50
- const getIconClassName = (open) => (0, cx_1.cx)("uxf-select__button-icon", open && "is-open");
51
- const iconName = (_c = props.iconName) !== null && _c !== void 0 ? _c : "caretDown";
52
- const iconSize = (_d = props.iconSize) !== null && _d !== void 0 ? _d : 24;
50
+ const iconName = (_c = props.iconName) !== null && _c !== void 0 ? _c : "chevronDown";
53
51
  return (react_2.default.createElement(react_1.Combobox, { as: "div", className: (0, cx_1.cx)("uxf-combobox", props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isRequired && classes_1.CLASSES.IS_REQUIRED, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.className), onChange: (v) => { var _a; return (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, v.id); }, value: selectedOption, disabled: props.isDisabled || props.isReadOnly }, (renderProps) => (react_2.default.createElement(react_2.default.Fragment, null,
54
52
  react_2.default.createElement(react_1.Combobox.Label, { as: label_1.Label, isHidden: props.hiddenLabel, onClick: props.isDisabled || props.isReadOnly ? undefined : input.focus }, props.label),
55
53
  react_2.default.createElement(react_1.Combobox.Button, { as: "div", className: (0, cx_1.cx)("uxf-combobox__button", (renderProps.open || input.focused) && classes_1.CLASSES.IS_FOCUSED, renderProps.disabled && classes_1.CLASSES.IS_DISABLED, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.isInvalid && classes_1.CLASSES.IS_INVALID, dropdown.placement === "bottom" && "is-open--bottom", dropdown.placement === "top" && "is-open--top", renderProps.open && "is-open"), onBlur: input.onBlur, onFocus: input.onFocus, tabIndex: props.isDisabled || props.isReadOnly ? undefined : 0, ref: stableRef, "aria-invalid": props.isInvalid, "aria-describedby": errorId },
56
54
  react_2.default.createElement(react_1.Combobox.Input, { className: (0, cx_1.cx)("uxf-combobox__input"), displayValue: (item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : ""; }, onBlur: props.onBlur, onChange: (event) => setQuery(event.target.value), placeholder: props.placeholder, ref: stableRef, type: "text" }),
57
- react_2.default.createElement(icon_1.Icon, { className: getIconClassName(renderProps.open), name: iconName, size: iconSize })),
55
+ react_2.default.createElement(icon_1.Icon, { className: (0, cx_1.cx)("uxf-select__button-icon", renderProps.open && "is-open"), name: iconName })),
58
56
  react_2.default.createElement(react_1.Combobox.Options, { className: (0, cx_1.cx)("uxf-dropdown", dropdown.placement === "bottom" && "uxf-dropdown--bottom", dropdown.placement === "top" && "uxf-dropdown--top"), ref: dropdown.floating }, filteredData.map((option) => {
59
57
  var _a, _b, _c, _d;
60
58
  return (react_2.default.createElement(react_1.Combobox.Option, { key: (_b = (_a = props.keyExtractor) === null || _a === void 0 ? void 0 : _a.call(props, option)) !== null && _b !== void 0 ? _b : option.id, value: option, className: (optionState) => (0, cx_1.cx)("uxf-dropdown__item", optionState.active && classes_1.CLASSES.IS_ACTIVE, optionState.disabled && classes_1.CLASSES.IS_DISABLED, optionState.selected && classes_1.CLASSES.IS_SELECTED) }, (_d = (_c = props.renderOption) === null || _c === void 0 ? void 0 : _c.call(props, option)) !== null && _d !== void 0 ? _d : option.label));
package/css/button.css CHANGED
@@ -5,9 +5,11 @@
5
5
  }
6
6
 
7
7
  .uxf-button {
8
- @apply inline-flex items-center justify-center text-center rounded-lg before:rounded-lg font-semibold
9
- focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 relative cursor-pointer transition
10
- before:transition;
8
+ @apply inline-flex items-center justify-center rounded-md font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2;
9
+
10
+ .uxf-icon {
11
+ @apply h-6;
12
+ }
11
13
 
12
14
  &__text {
13
15
  @apply truncate;
@@ -21,6 +23,12 @@
21
23
  @apply pointer-events-none;
22
24
  }
23
25
 
26
+ &.uxf-button--icon-button.is-loading {
27
+ &::after {
28
+ @apply ml-0
29
+ }
30
+ }
31
+
24
32
  &.is-loading {
25
33
  @apply pointer-events-none;
26
34
 
@@ -34,10 +42,18 @@
34
42
  margin-left: 8px;
35
43
  width: 20px;
36
44
  }
45
+
46
+ &.uxf-button--icon-button::after {
47
+ margin-left: 0;
48
+ }
49
+
50
+ .uxf-icon {
51
+ @apply hidden;
52
+ }
37
53
  }
38
54
 
39
55
  &--size-xs {
40
- @apply px-2.5 py-1.5 text-xs;
56
+ @apply px-2.5 h-7 text-xs rounded;
41
57
 
42
58
  &.is-loading::after {
43
59
  height: 14px;
@@ -45,12 +61,16 @@
45
61
  }
46
62
 
47
63
  &.uxf-button--icon-button {
48
- @apply p-0 h-7 w-7;
64
+ @apply p-0 w-7;
65
+ }
66
+
67
+ .uxf-icon {
68
+ @apply h-4;
49
69
  }
50
70
  }
51
71
 
52
72
  &--size-sm {
53
- @apply px-3 py-2 text-sm leading-4;
73
+ @apply px-3 h-8 text-sm leading-4;
54
74
 
55
75
  &.is-loading::after {
56
76
  height: 16px;
@@ -58,54 +78,55 @@
58
78
  }
59
79
 
60
80
  &.uxf-button--icon-button {
61
- @apply p-0 h-8 w-8;
81
+ @apply p-0 w-8;
82
+ }
83
+
84
+ .uxf-icon {
85
+ @apply h-4;
62
86
  }
63
87
  }
64
88
 
65
89
  &--size-default {
66
- @apply px-4 py-3 text-base;
90
+ @apply px-4 h-9 text-sm;
67
91
 
68
92
  &.uxf-button--icon-button {
69
- @apply p-0 h-12 w-12;
93
+ @apply p-0 w-9;
70
94
  }
71
95
  }
72
96
 
73
97
  &--size-lg {
74
- @apply px-8 py-5 text-base;
98
+ @apply px-4 h-10 text-base;
75
99
 
76
100
  &.uxf-button--icon-button {
77
- @apply p-0 h-16 w-16;
101
+ @apply p-0 w-10;
78
102
  }
79
103
  }
80
104
 
81
105
  &--size-xl {
82
- @apply px-10 py-6 text-base;
106
+ @apply px-6 h-11 text-base;
83
107
 
84
108
  &.uxf-button--icon-button {
85
- @apply p-0 h-[72px] w-[72px];
109
+ @apply p-0 w-11;
86
110
  }
87
111
  }
88
112
 
89
113
  &--variant-outlined {
90
- @apply before:absolute before:pointer-events-none before:inset-0 before:border is-hoverable:before:border-2
91
- bg-transparent;
114
+ @apply border bg-white;
92
115
 
93
- :root .light & {
94
- @apply before:border-gray-300 is-hoverable:bg-primary-100 is-hoverable:before:border-primary-400
95
- focus-visible:ring-primary-500 focus-visible:ring-offset-white;
116
+ &.uxf-button--color-default {
117
+ @apply text-primary-600 border-primary-500 hover:bg-primary-50;
118
+ }
96
119
 
97
- &.is-disabled {
98
- @apply before:border-gray-100 text-gray-400;
99
- }
120
+ &.uxf-button--color-success {
121
+ @apply text-success-600 border-success-500 hover:bg-success-50;
100
122
  }
101
123
 
102
- :root .dark & {
103
- @apply before:border-gray-300 is-hoverable:bg-white/10 focus-visible:ring-primary-500
104
- focus-visible:ring-offset-gray-900;
124
+ &.uxf-button--color-error {
125
+ @apply text-error-600 border-error-500 hover:bg-error-50;
126
+ }
105
127
 
106
- &.is-disabled {
107
- @apply before:border-gray-700 text-gray-600;
108
- }
128
+ &.is-disabled {
129
+ @apply border-gray-300 text-gray-400;
109
130
  }
110
131
  }
111
132
 
@@ -113,119 +134,67 @@
113
134
  @apply text-white;
114
135
 
115
136
  &.uxf-button--color-default {
116
- :root .light & {
117
- @apply text-white bg-primary-500 is-hoverable:bg-primary-400 focus-visible:ring-primary-500;
118
-
119
- &.is-disabled {
120
- @apply bg-gray-100 text-gray-400;
121
- }
122
- }
123
-
124
- :root .dark & {
125
- @apply text-white bg-primary-500 is-hoverable:bg-primary-400 focus-visible:ring-primary-500
126
- focus-visible:ring-offset-gray-900;
127
-
128
- &.is-disabled {
129
- @apply bg-gray-700 text-gray-400;
130
- }
131
- }
132
- }
133
-
134
- &.uxf-button--color-white {
135
- :root .light & {
136
- @apply bg-white is-hoverable:bg-gray-200 focus-visible:ring-gray-200;
137
+ @apply text-white bg-primary-500 is-hoverable:bg-primary-400 focus-visible:ring-primary-500;
137
138
 
138
- &.is-disabled {
139
- @apply bg-gray-100 text-gray-400;
140
- }
141
- }
142
-
143
- :root .dark & {
144
- @apply bg-white is-hoverable:bg-gray-200 focus-visible:ring-gray-200;
145
-
146
- &.is-disabled {
147
- @apply bg-gray-100 text-gray-400;
148
- }
139
+ &.is-disabled {
140
+ @apply bg-gray-100 text-gray-400;
149
141
  }
150
-
151
- @apply bg-gray-50 text-gray-700 is-hoverable:bg-gray-100 focus-visible:ring-gray-500;
152
142
  }
153
143
 
154
144
  &.uxf-button--color-success {
155
- :root .light & {
156
- @apply text-white bg-success-500 is-hoverable:bg-success-400 focus-visible:ring-success-500;
145
+ @apply text-white bg-success-500 is-hoverable:bg-success-400 focus-visible:ring-success-500;
157
146
 
158
- &.is-disabled {
159
- @apply bg-gray-100 text-gray-400;
160
- }
147
+ &.is-disabled {
148
+ @apply bg-gray-100 text-gray-400;
161
149
  }
150
+ }
162
151
 
163
- :root .dark & {
164
- @apply text-white bg-success-500 is-hoverable:bg-success-400 focus-visible:ring-success-500
165
- focus-visible:ring-offset-gray-900;
152
+ &.uxf-button--color-error {
153
+ @apply text-white bg-error-500 is-hoverable:bg-error-400 focus-visible:ring-error-500;
166
154
 
167
- &.is-disabled {
168
- @apply bg-gray-700 text-gray-400;
169
- }
155
+ &.is-disabled {
156
+ @apply bg-gray-100 text-gray-400;
170
157
  }
171
158
  }
159
+ }
172
160
 
173
- &.uxf-button--color-warning {
174
- :root .light & {
175
- @apply text-white bg-warning-500 is-hoverable:bg-warning-400 focus-visible:ring-warning-500;
176
-
177
- &.is-disabled {
178
- @apply bg-gray-100 text-gray-400;
179
- }
180
- }
161
+ &--variant-white {
162
+ @apply border border-gray-300 bg-white hover:bg-gray-50;
181
163
 
182
- :root .dark & {
183
- @apply text-white bg-warning-500 is-hoverable:bg-warning-400 focus-visible:ring-warning-500
184
- focus-visible:ring-offset-gray-900;
164
+ &.uxf-button--color-default {
165
+ @apply text-primary-600;
166
+ }
185
167
 
186
- &.is-disabled {
187
- @apply bg-gray-700 text-gray-400;
188
- }
189
- }
168
+ &.uxf-button--color-success {
169
+ @apply text-success-600;
190
170
  }
191
171
 
192
172
  &.uxf-button--color-error {
193
- :root .light & {
194
- @apply text-white bg-error-500 is-hoverable:bg-error-400 focus-visible:ring-error-500;
195
-
196
- &.is-disabled {
197
- @apply bg-gray-100 text-gray-400;
198
- }
199
- }
200
-
201
- :root .dark & {
202
- @apply text-white bg-error-500 is-hoverable:bg-error-400 focus-visible:ring-error-500
203
- focus-visible:ring-offset-gray-900;
173
+ @apply text-error-600;
174
+ }
204
175
 
205
- &.is-disabled {
206
- @apply bg-gray-700 text-gray-400;
207
- }
208
- }
176
+ &.is-disabled {
177
+ @apply border-gray-300 text-gray-400;
209
178
  }
210
179
  }
211
180
 
212
181
  &--variant-text {
213
- @apply before:border-transparent;
182
+ @apply shadow-none;
214
183
 
215
- :root .light & {
216
- @apply is-hoverable:bg-gray-200 focus-visible:ring-primary-500 focus-visible:ring-offset-white;
184
+ &.uxf-button--color-default {
185
+ @apply text-primary-600 hover:text-primary-800;
186
+ }
217
187
 
218
- &.is-disabled {
219
- @apply text-gray-400;
220
- }
188
+ &.uxf-button--color-success {
189
+ @apply text-success-600 hover:text-success-800;
221
190
  }
222
191
 
223
- :root .dark & {
224
- @apply is-hoverable:bg-gray-800 focus-visible:ring-primary-500 focus-visible:ring-offset-gray-900;
192
+ &.uxf-button--color-error {
193
+ @apply text-error-600 hover:text-error-800;
194
+ }
225
195
 
226
- &.is-disabled {
227
- @apply text-gray-600;
228
- }
196
+ &.is-disabled {
197
+ @apply text-gray-400;
229
198
  }
230
199
  }
231
200
  }