@veracity/vui 4.1.0-alpha.381237.2603161102 → 4.1.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectButton.d.ts","names":[],"sources":["../../src/select/selectButton.tsx"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"selectButton.d.ts","names":[],"sources":["../../src/select/selectButton.tsx"],"mappings":";;;;;;;;;;cAaa,YAAA,EAAY,YAAA,WAkEvB,WAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cs, ellipsisOverflow } from "../utils/styles.js";
|
|
2
|
+
import { inputColors } from "../input/consts.js";
|
|
2
3
|
import { useStyleConfig } from "../core/theme.js";
|
|
3
4
|
import vui from "../core/vui.js";
|
|
4
5
|
import Button from "../button/button.js";
|
|
@@ -40,8 +41,8 @@ const SelectButton = vui((props, ref) => {
|
|
|
40
41
|
borderColor: "energyRed.45",
|
|
41
42
|
hoverBorderColor: "energyRed.45"
|
|
42
43
|
} : void 0;
|
|
43
|
-
const textColor =
|
|
44
|
-
const iconColor = disabled ?
|
|
44
|
+
const textColor = inputColors.inputText;
|
|
45
|
+
const iconColor = disabled ? inputColors.inputText : "seaBlue.main";
|
|
45
46
|
return /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
46
47
|
as: LineButton,
|
|
47
48
|
bg: "white",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectButton.js","names":[],"sources":["../../src/select/selectButton.tsx"],"sourcesContent":["import Button, { LineButton } from '../button'\nimport { useStyleConfig, vui } from '../core'\nimport { PopoverTrigger } from '../popover'\nimport { cs, ellipsisOverflow } from '../utils'\nimport { useSelectContext } from './context'\nimport type { SelectButtonProps } from './select.types'\n\n/**\n * Displays a custom button component, which opens a popover on click.\n * Text within the button is either selected value or placeholder.\n * Includes special styling for disabled, readOnly and invalid states.\n */\nexport const SelectButton = vui<'button', SelectButtonProps>((props, ref) => {\n const { className, ...rest } = props\n const { disabled, isInvalid, placeholder, readOnly, valueText } = useSelectContext() ?? {}\n const styles = useStyleConfig('Select', useSelectContext())\n\n const text = valueText || placeholder\n\n const disabledProps = disabled\n ? {\n activeBg: 'sandstone.79',\n cursor: 'not-allowed',\n backgroundColor: 'sandstone.79',\n borderColor: 'sandstone.79',\n hoverBg: 'sandstone.79',\n hoverBorderColor: 'sandstone.79',\n activeBorderColor: 'sandstone.79',\n }\n : undefined\n\n const readOnlyProps = readOnly\n ? {\n activeBg: 'sandstone.95',\n bg: 'sandstone.95',\n color: 'seaBlue.main',\n cursor: 'auto',\n disabled: true,\n hoverBg: 'sandstone.95',\n opacity: 1,\n }\n : undefined\n\n const isInvalidProps = isInvalid\n ? {\n borderColor: 'energyRed.45',\n hoverBorderColor: 'energyRed.45',\n }\n : undefined\n\n const textColor =
|
|
1
|
+
{"version":3,"file":"selectButton.js","names":[],"sources":["../../src/select/selectButton.tsx"],"sourcesContent":["import Button, { LineButton } from '../button'\nimport { useStyleConfig, vui } from '../core'\nimport { inputColors } from '../input/consts'\nimport { PopoverTrigger } from '../popover'\nimport { cs, ellipsisOverflow } from '../utils'\nimport { useSelectContext } from './context'\nimport type { SelectButtonProps } from './select.types'\n\n/**\n * Displays a custom button component, which opens a popover on click.\n * Text within the button is either selected value or placeholder.\n * Includes special styling for disabled, readOnly and invalid states.\n */\nexport const SelectButton = vui<'button', SelectButtonProps>((props, ref) => {\n const { className, ...rest } = props\n const { disabled, isInvalid, placeholder, readOnly, valueText } = useSelectContext() ?? {}\n const styles = useStyleConfig('Select', useSelectContext())\n\n const text = valueText || placeholder\n\n const disabledProps = disabled\n ? {\n activeBg: 'sandstone.79',\n cursor: 'not-allowed',\n backgroundColor: 'sandstone.79',\n borderColor: 'sandstone.79',\n hoverBg: 'sandstone.79',\n hoverBorderColor: 'sandstone.79',\n activeBorderColor: 'sandstone.79',\n }\n : undefined\n\n const readOnlyProps = readOnly\n ? {\n activeBg: 'sandstone.95',\n bg: 'sandstone.95',\n color: 'seaBlue.main',\n cursor: 'auto',\n disabled: true,\n hoverBg: 'sandstone.95',\n opacity: 1,\n }\n : undefined\n\n const isInvalidProps = isInvalid\n ? {\n borderColor: 'energyRed.45',\n hoverBorderColor: 'energyRed.45',\n }\n : undefined\n\n const textColor = inputColors.inputText\n const iconColor = disabled ? inputColors.inputText : 'seaBlue.main'\n\n return (\n <PopoverTrigger\n as={LineButton}\n bg=\"white\"\n className={cs('vui-selectButton', className)}\n disabled={disabled}\n focusRing={2}\n fontWeight=\"regular\"\n iconRight={<Button.Icon color={iconColor} ml=\"auto\" name=\"uiAngleDown\" />}\n isFullWidth\n px={1}\n ref={ref}\n text={\n <Button.Text color={textColor} {...ellipsisOverflow}>\n {text}\n </Button.Text>\n }\n userSelect=\"text\"\n {...styles.button}\n {...disabledProps}\n {...readOnlyProps}\n {...isInvalidProps}\n {...rest}\n />\n )\n})\n\nSelectButton.displayName = 'SelectButton'\nexport default SelectButton\n"],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAa,eAAe,KAAkC,OAAO,QAAQ;CAC3E,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,MAAM,EAAE,UAAU,WAAW,aAAa,UAAU,cAAc,kBAAkB,IAAI,EAAE;CAC1F,MAAM,SAAS,eAAe,UAAU,kBAAkB,CAAC;CAE3D,MAAM,OAAO,aAAa;CAE1B,MAAM,gBAAgB,WAClB;EACE,UAAU;EACV,QAAQ;EACR,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,kBAAkB;EAClB,mBAAmB;EACpB,GACD;CAEJ,MAAM,gBAAgB,WAClB;EACE,UAAU;EACV,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,UAAU;EACV,SAAS;EACT,SAAS;EACV,GACD;CAEJ,MAAM,iBAAiB,YACnB;EACE,aAAa;EACb,kBAAkB;EACnB,GACD;CAEJ,MAAM,YAAY,YAAY;CAC9B,MAAM,YAAY,WAAW,YAAY,YAAY;AAErD,QACE,oBAAC;EACC,IAAI;EACJ,IAAG;EACH,WAAW,GAAG,oBAAoB,UAAU;EAClC;EACV,WAAW;EACX,YAAW;EACX,WAAW,oBAAC,OAAO;GAAK,OAAO;GAAW,IAAG;GAAO,MAAK;IAAgB;EACzE;EACA,IAAI;EACC;EACL,MACE,oBAAC,OAAO;GAAK,OAAO;GAAW,GAAI;aAChC;IACW;EAEhB,YAAW;EACX,GAAI,OAAO;EACX,GAAI;EACJ,GAAI;EACJ,GAAI;EACJ,GAAI;GACJ;EAEJ;AAEF,aAAa,cAAc"}
|
package/dist/select/theme.js
CHANGED
|
@@ -18,8 +18,8 @@ const sizes = {
|
|
|
18
18
|
size: "sm",
|
|
19
19
|
fontSize: "sm"
|
|
20
20
|
},
|
|
21
|
-
group: { size: "
|
|
22
|
-
option: { size: "
|
|
21
|
+
group: { size: "md" },
|
|
22
|
+
option: { size: "md" },
|
|
23
23
|
label: { fontSize: "sm" }
|
|
24
24
|
},
|
|
25
25
|
md: {
|
|
@@ -27,8 +27,8 @@ const sizes = {
|
|
|
27
27
|
size: "md",
|
|
28
28
|
fontSize: "md"
|
|
29
29
|
},
|
|
30
|
-
group: { size: "
|
|
31
|
-
option: { size: "
|
|
30
|
+
group: { size: "lg" },
|
|
31
|
+
option: { size: "lg" },
|
|
32
32
|
label: { fontSize: "md" }
|
|
33
33
|
},
|
|
34
34
|
lg: {
|
package/dist/select/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":[],"sources":["../../src/select/theme.ts"],"sourcesContent":["const baseStyle = {}\n\nconst defaultProps = {\n size: 'lg',\n variant: 'outlined',\n}\n\nconst parts = ['container', 'button', 'content', 'group', 'option', 'label']\n\nconst sizes = {\n sm: {\n button: {\n size: 'sm',\n fontSize: 'sm',\n },\n group: {\n size: '
|
|
1
|
+
{"version":3,"file":"theme.js","names":[],"sources":["../../src/select/theme.ts"],"sourcesContent":["const baseStyle = {}\n\nconst defaultProps = {\n size: 'lg',\n variant: 'outlined',\n}\n\nconst parts = ['container', 'button', 'content', 'group', 'option', 'label']\n\nconst sizes = {\n sm: {\n button: {\n size: 'sm',\n fontSize: 'sm',\n },\n group: {\n size: 'md',\n },\n option: {\n size: 'md',\n },\n label: {\n fontSize: 'sm',\n },\n },\n md: {\n button: {\n size: 'md',\n fontSize: 'md',\n },\n group: {\n size: 'lg',\n },\n option: {\n size: 'lg',\n },\n label: {\n fontSize: 'md',\n },\n },\n lg: {\n button: {\n size: 'lg',\n fontSize: 'md',\n },\n group: {\n size: 'lg',\n },\n option: {\n size: 'lg',\n },\n label: {\n fontSize: 'md',\n },\n },\n xl: {\n button: {\n size: 'xl',\n fontSize: 'lg',\n },\n group: {\n size: 'xl',\n },\n option: {\n size: 'xl',\n },\n label: {\n fontSize: 'md',\n },\n },\n}\n\nconst variants = {\n outlined: {\n button: {\n hoverBg: 'white',\n activeBg: 'white',\n borderColor: 'sandstone.60',\n hoverBorderColor: 'sandstone.60',\n },\n },\n text: {\n button: {\n hoverBg: 'white',\n activeBg: 'white',\n borderColor: 'transparent',\n hoverBorderColor: 'transparent',\n },\n },\n}\n\nexport default {\n baseStyle,\n defaultProps,\n parts,\n sizes,\n variants,\n}\n"],"mappings":";AAAA,MAAM,YAAY,EAAE;AAEpB,MAAM,eAAe;CACnB,MAAM;CACN,SAAS;CACV;AAED,MAAM,QAAQ;CAAC;CAAa;CAAU;CAAW;CAAS;CAAU;CAAQ;AAE5E,MAAM,QAAQ;CACZ,IAAI;EACF,QAAQ;GACN,MAAM;GACN,UAAU;GACX;EACD,OAAO,EACL,MAAM,MACP;EACD,QAAQ,EACN,MAAM,MACP;EACD,OAAO,EACL,UAAU,MACX;EACF;CACD,IAAI;EACF,QAAQ;GACN,MAAM;GACN,UAAU;GACX;EACD,OAAO,EACL,MAAM,MACP;EACD,QAAQ,EACN,MAAM,MACP;EACD,OAAO,EACL,UAAU,MACX;EACF;CACD,IAAI;EACF,QAAQ;GACN,MAAM;GACN,UAAU;GACX;EACD,OAAO,EACL,MAAM,MACP;EACD,QAAQ,EACN,MAAM,MACP;EACD,OAAO,EACL,UAAU,MACX;EACF;CACD,IAAI;EACF,QAAQ;GACN,MAAM;GACN,UAAU;GACX;EACD,OAAO,EACL,MAAM,MACP;EACD,QAAQ,EACN,MAAM,MACP;EACD,OAAO,EACL,UAAU,MACX;EACF;CACF;AAED,MAAM,WAAW;CACf,UAAU,EACR,QAAQ;EACN,SAAS;EACT,UAAU;EACV,aAAa;EACb,kBAAkB;EACnB,EACF;CACD,MAAM,EACJ,QAAQ;EACN,SAAS;EACT,UAAU;EACV,aAAa;EACb,kBAAkB;EACnB,EACF;CACF;AAED,oBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "4.1.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Veracity",
|