@gobolt/genesis 0.6.0 → 0.6.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.
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/icon-button-styles.d.ts +1 -1
- package/dist/components/Button/styles.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +0 -2
- package/dist/components/Select/SelectTrigger.d.ts +1 -1
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.d.ts +1 -5
- package/dist/components/Table/TableControls/TableControls.d.ts +0 -6
- package/dist/components/Table/TableControls/index.d.ts +1 -1
- package/dist/components/Typography/Typography.d.ts +3 -1
- package/dist/components/Typography/styles.d.ts +3 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/constants/index.d.ts +0 -2
- package/dist/index.cjs +76 -114
- package/dist/index.js +76 -114
- package/package.json +2 -2
- package/dist/components/InputAddon/styles.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React, MouseEvent } from 'react';
|
|
2
2
|
import { ButtonProps as AntButtonProperties } from 'antd/es/button';
|
|
3
3
|
import { STATE } from '../../constants';
|
|
4
|
-
type ButtonThemeType = "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon"
|
|
4
|
+
type ButtonThemeType = "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon";
|
|
5
5
|
export interface ButtonProps extends Omit<AntButtonProperties, "type" | "size"> {
|
|
6
6
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
children?: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
2
|
interface StyledIconButtonProperties {
|
|
3
3
|
theme?: GenesisTheme;
|
|
4
|
-
$themeType?: "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon"
|
|
4
|
+
$themeType?: "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon";
|
|
5
5
|
$state?: "active" | "hover" | "pressed" | "focus" | "disabled" | "selected";
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
$isIconButton?: boolean;
|
|
@@ -2,7 +2,7 @@ import { ButtonProps as AntButtonProperties } from 'antd/es/button';
|
|
|
2
2
|
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
3
3
|
interface StyledButtonProperties extends Omit<AntButtonProperties, "type" | "size"> {
|
|
4
4
|
theme?: GenesisTheme;
|
|
5
|
-
$themeType?: "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon"
|
|
5
|
+
$themeType?: "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon";
|
|
6
6
|
$state?: "active" | "hover" | "pressed" | "focus" | "disabled" | "selected";
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
$isIconButton?: boolean;
|
|
@@ -8,8 +8,6 @@ export interface InputProps extends BaseInputProps {
|
|
|
8
8
|
size?: "normal" | "small" | "large";
|
|
9
9
|
onChange?: (actionEvent: InputEvent) => void;
|
|
10
10
|
value?: string;
|
|
11
|
-
rest?: HTMLInputElement;
|
|
12
|
-
isPassword?: boolean;
|
|
13
11
|
}
|
|
14
12
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
|
|
15
13
|
export default Input;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { STATE } from '../../constants';
|
|
3
3
|
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
4
|
-
type ThemeType = "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon"
|
|
4
|
+
type ThemeType = "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon";
|
|
5
5
|
type Variant = "none" | "simple";
|
|
6
6
|
interface SelectTriggerProperties {
|
|
7
7
|
type?: ThemeType;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { Change } from '../Table';
|
|
2
2
|
import { InfiniteScrollChangeEvent } from '../InfiniteScrollTable/types';
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
type Item = {
|
|
5
|
-
label: string;
|
|
6
|
-
value: unknown;
|
|
7
|
-
};
|
|
8
4
|
export type Groups = {
|
|
9
|
-
[key: string]: string[]
|
|
5
|
+
[key: string]: string[];
|
|
10
6
|
};
|
|
11
7
|
export interface SecondaryTableControlsRowProps {
|
|
12
8
|
groups: Groups | null;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { PrimaryTableControlsRowProps } from './PrimaryTableControlsRow';
|
|
2
2
|
import { SecondaryTableControlsRowProps } from './SecondaryTableControlsRow';
|
|
3
3
|
import { ActionEvent, TableEventPayload } from '../../../types/events';
|
|
4
|
-
export declare const TABLE_CONTROLS_EVENTS: {
|
|
5
|
-
GROUP_ITEM_CLICK: string;
|
|
6
|
-
ORDER_CLICK: string;
|
|
7
|
-
PRIMARY_SORT_CHANGE: string;
|
|
8
|
-
INPUT_CHANGE: string;
|
|
9
|
-
};
|
|
10
4
|
export type TableControlsData = {
|
|
11
5
|
primaryTableRowData: PrimaryTableControlsRowProps;
|
|
12
6
|
secondaryTableRowData?: SecondaryTableControlsRowProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default } from './TableControls';
|
|
2
2
|
export type { TableControlsProps } from './TableControls';
|
|
@@ -12,6 +12,8 @@ export interface TypographyProps {
|
|
|
12
12
|
isFullWidth?: boolean;
|
|
13
13
|
style?: CSSProperties;
|
|
14
14
|
isDisabled?: boolean;
|
|
15
|
+
fontWeight?: number;
|
|
16
|
+
fontSize?: string;
|
|
15
17
|
}
|
|
16
|
-
declare const Typography: ({ children, themeType, variant, state, color, isText, isFullWidth, style, isDisabled, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const Typography: ({ children, themeType, variant, state, color, isText, isFullWidth, style, fontSize, fontWeight, isDisabled, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export default Typography;
|
|
@@ -5,8 +5,10 @@ interface TypographyStyledProperties {
|
|
|
5
5
|
$themeType?: keyof typeof TYPE;
|
|
6
6
|
variant?: string;
|
|
7
7
|
state?: keyof typeof STATE;
|
|
8
|
-
breakpoint?:
|
|
8
|
+
breakpoint?: string;
|
|
9
9
|
color?: string;
|
|
10
|
+
fontWeight?: number;
|
|
11
|
+
fontSize?: string;
|
|
10
12
|
$isFullWidth?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const Headline: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd/es/typography/Title').TitleProps & import('react').RefAttributes<HTMLElement>, "ref"> & {
|
|
@@ -68,7 +68,6 @@ export type { TableWithControlsProps } from './TableWithControls';
|
|
|
68
68
|
export { useTable } from './Table';
|
|
69
69
|
export { useTableWithControls } from './TableWithControls';
|
|
70
70
|
export type { UseTableConfig } from './Table';
|
|
71
|
-
export { TABLE_CONTROLS_EVENTS } from './Table/TableControls';
|
|
72
71
|
export { default as Tabs } from './Tabs';
|
|
73
72
|
export type { TabsProps } from './Tabs';
|
|
74
73
|
export { default as Tile } from './Tile';
|
|
@@ -5,7 +5,6 @@ export declare const TYPE: {
|
|
|
5
5
|
destructive: string;
|
|
6
6
|
utility: string;
|
|
7
7
|
icon: string;
|
|
8
|
-
password: string;
|
|
9
8
|
};
|
|
10
9
|
export declare const BREAKPOINTS: {
|
|
11
10
|
wide: string;
|
|
@@ -87,7 +86,6 @@ declare const _default: {
|
|
|
87
86
|
destructive: string;
|
|
88
87
|
utility: string;
|
|
89
88
|
icon: string;
|
|
90
|
-
password: string;
|
|
91
89
|
};
|
|
92
90
|
BREAKPOINTS: {
|
|
93
91
|
wide: string;
|
package/dist/index.cjs
CHANGED
|
@@ -59296,37 +59296,39 @@ const Avatar$1 = styled(Avatar$2)`
|
|
|
59296
59296
|
return getGenesisClass$d(theme, type4, state);
|
|
59297
59297
|
}}
|
|
59298
59298
|
`;
|
|
59299
|
+
const getBreakpoint = (breakpoint) => {
|
|
59300
|
+
{
|
|
59301
|
+
return "medium";
|
|
59302
|
+
}
|
|
59303
|
+
};
|
|
59299
59304
|
const getVariant$2 = (typography2, variant, breakpoint) => {
|
|
59300
|
-
const typeClass = typography2["medium"];
|
|
59301
59305
|
return `
|
|
59302
|
-
font-size: ${
|
|
59303
|
-
line-height: ${
|
|
59304
|
-
letter-spacing: ${
|
|
59305
|
-
font-weight: ${
|
|
59306
|
+
font-size: ${typography2[getBreakpoint()][variant].fontSize}px !important;
|
|
59307
|
+
line-height: ${typography2[getBreakpoint()][variant].lineHeight};
|
|
59308
|
+
letter-spacing: ${typography2[getBreakpoint()][variant].letterSpacing}px;
|
|
59309
|
+
font-weight: ${typography2[getBreakpoint()][variant].fontWeight};
|
|
59306
59310
|
`;
|
|
59307
59311
|
};
|
|
59308
59312
|
const getColor = (color2, colors2, $themeType) => {
|
|
59309
59313
|
if (color2) {
|
|
59310
59314
|
return color2;
|
|
59311
59315
|
}
|
|
59312
|
-
|
|
59313
|
-
if (themeColor?.active?.default) {
|
|
59314
|
-
return themeColor.active.default;
|
|
59315
|
-
}
|
|
59316
|
-
return colors2?.secondary?.active?.default || "#000000";
|
|
59316
|
+
return colors2[$themeType].active.color;
|
|
59317
59317
|
};
|
|
59318
59318
|
const getFontFamily = (variant) => {
|
|
59319
59319
|
return `
|
|
59320
59320
|
${variant.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
59321
59321
|
`;
|
|
59322
59322
|
};
|
|
59323
|
-
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth) => `
|
|
59323
|
+
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, fontSize, fontWeight, $isFullWidth) => `
|
|
59324
59324
|
&.ant-typography {
|
|
59325
59325
|
font-family: ${getFontFamily(variant)};
|
|
59326
59326
|
color: ${getColor(color2, colors2, $themeType)} !important;
|
|
59327
|
-
${getVariant$2(typography2)}
|
|
59327
|
+
${getVariant$2(typography2, variant)}
|
|
59328
59328
|
margin-bottom: 0 !important;
|
|
59329
59329
|
width: ${$isFullWidth ? "100%" : "auto"};
|
|
59330
|
+
font-weight: ${fontWeight} !important;
|
|
59331
|
+
font-size: ${fontSize} !important;
|
|
59330
59332
|
line-height: 1;
|
|
59331
59333
|
-webkit-font-smoothing: antialiased;
|
|
59332
59334
|
|
|
@@ -59345,6 +59347,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59345
59347
|
state,
|
|
59346
59348
|
breakpoint,
|
|
59347
59349
|
color: color2,
|
|
59350
|
+
fontSize,
|
|
59351
|
+
fontWeight,
|
|
59348
59352
|
$isFullWidth
|
|
59349
59353
|
}) => {
|
|
59350
59354
|
return getGenesisTypographyClass(
|
|
@@ -59354,6 +59358,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59354
59358
|
state,
|
|
59355
59359
|
breakpoint,
|
|
59356
59360
|
color2,
|
|
59361
|
+
fontSize,
|
|
59362
|
+
fontWeight,
|
|
59357
59363
|
$isFullWidth
|
|
59358
59364
|
);
|
|
59359
59365
|
}}
|
|
@@ -59368,7 +59374,9 @@ const Paragraph = styled(
|
|
|
59368
59374
|
state,
|
|
59369
59375
|
breakpoint,
|
|
59370
59376
|
color: color2,
|
|
59371
|
-
$isFullWidth
|
|
59377
|
+
$isFullWidth,
|
|
59378
|
+
fontSize,
|
|
59379
|
+
fontWeight
|
|
59372
59380
|
}) => {
|
|
59373
59381
|
return getGenesisTypographyClass(
|
|
59374
59382
|
theme,
|
|
@@ -59377,6 +59385,8 @@ const Paragraph = styled(
|
|
|
59377
59385
|
state,
|
|
59378
59386
|
breakpoint,
|
|
59379
59387
|
color2,
|
|
59388
|
+
fontSize,
|
|
59389
|
+
fontWeight,
|
|
59380
59390
|
$isFullWidth
|
|
59381
59391
|
);
|
|
59382
59392
|
}}
|
|
@@ -59389,6 +59399,8 @@ const Text = styled(Typography$1.Text)`
|
|
|
59389
59399
|
state,
|
|
59390
59400
|
breakpoint,
|
|
59391
59401
|
color: color2,
|
|
59402
|
+
fontSize,
|
|
59403
|
+
fontWeight,
|
|
59392
59404
|
$isFullWidth
|
|
59393
59405
|
}) => {
|
|
59394
59406
|
return getGenesisTypographyClass(
|
|
@@ -59398,6 +59410,8 @@ const Text = styled(Typography$1.Text)`
|
|
|
59398
59410
|
state,
|
|
59399
59411
|
breakpoint,
|
|
59400
59412
|
color2,
|
|
59413
|
+
fontSize,
|
|
59414
|
+
fontWeight,
|
|
59401
59415
|
$isFullWidth
|
|
59402
59416
|
);
|
|
59403
59417
|
}}
|
|
@@ -59828,8 +59842,7 @@ const TYPE = {
|
|
|
59828
59842
|
tertiary: "tertiary",
|
|
59829
59843
|
destructive: "destructive",
|
|
59830
59844
|
utility: "utility",
|
|
59831
|
-
icon: "icon"
|
|
59832
|
-
password: "primary"
|
|
59845
|
+
icon: "icon"
|
|
59833
59846
|
};
|
|
59834
59847
|
const BREAKPOINTS = {
|
|
59835
59848
|
wide: "wide",
|
|
@@ -60368,6 +60381,8 @@ const Typography = ({
|
|
|
60368
60381
|
isText = false,
|
|
60369
60382
|
isFullWidth,
|
|
60370
60383
|
style: style2,
|
|
60384
|
+
fontSize,
|
|
60385
|
+
fontWeight,
|
|
60371
60386
|
isDisabled,
|
|
60372
60387
|
...rest
|
|
60373
60388
|
}) => {
|
|
@@ -60385,6 +60400,8 @@ const Typography = ({
|
|
|
60385
60400
|
level: Number.parseInt(level),
|
|
60386
60401
|
$isFullWidth: isFullWidth,
|
|
60387
60402
|
style: style2,
|
|
60403
|
+
fontSize,
|
|
60404
|
+
fontWeight,
|
|
60388
60405
|
disabled: isDisabled,
|
|
60389
60406
|
...rest,
|
|
60390
60407
|
children: children2
|
|
@@ -60404,6 +60421,8 @@ const Typography = ({
|
|
|
60404
60421
|
$isFullWidth: isFullWidth,
|
|
60405
60422
|
style: style2,
|
|
60406
60423
|
disabled: isDisabled,
|
|
60424
|
+
fontSize,
|
|
60425
|
+
fontWeight,
|
|
60407
60426
|
...rest,
|
|
60408
60427
|
children: children2
|
|
60409
60428
|
}
|
|
@@ -60420,6 +60439,8 @@ const Typography = ({
|
|
|
60420
60439
|
$isFullWidth: isFullWidth,
|
|
60421
60440
|
style: style2,
|
|
60422
60441
|
disabled: isDisabled,
|
|
60442
|
+
fontSize,
|
|
60443
|
+
fontWeight,
|
|
60423
60444
|
...rest,
|
|
60424
60445
|
children: children2
|
|
60425
60446
|
}
|
|
@@ -74099,11 +74120,11 @@ const Message$1 = ({ message: message2, handle, isThinking = false }) => {
|
|
|
74099
74120
|
/* @__PURE__ */ jsxRuntime.jsx(TextContainer, { $isBot: isBot, children: isThinking ? /* @__PURE__ */ jsxRuntime.jsx(ThinkingIndicator, {}) : handle === "bot" ? /* @__PURE__ */ jsxRuntime.jsx(Markdown, { children: message2 }) : /* @__PURE__ */ jsxRuntime.jsx(MessageText, { children: message2 }) })
|
|
74100
74121
|
] });
|
|
74101
74122
|
};
|
|
74102
|
-
const getStateColors = (colors2,
|
|
74123
|
+
const getStateColors = (colors2, type4, state) => {
|
|
74103
74124
|
const filled = {
|
|
74104
74125
|
color: colors2.inputs.onsurface.active,
|
|
74105
74126
|
borderColor: colors2[TYPE.secondary].active.borderColor,
|
|
74106
|
-
ringColor: colors2[
|
|
74127
|
+
ringColor: colors2[type4]?.focussed?.ringColor
|
|
74107
74128
|
};
|
|
74108
74129
|
const success = {
|
|
74109
74130
|
color: colors2.status.success.default,
|
|
@@ -74119,7 +74140,7 @@ const getStateColors = (colors2, variant, state = "themeState") => {
|
|
|
74119
74140
|
color: colors2.inputs.onsurface.active,
|
|
74120
74141
|
backgroundColor: colors2.inputs.surface.active,
|
|
74121
74142
|
borderColor: colors2.inputs.surface.border,
|
|
74122
|
-
ringColor:
|
|
74143
|
+
ringColor: type4 && state ? colors2[type4]?.[state]?.ringColor : void 0
|
|
74123
74144
|
} : null;
|
|
74124
74145
|
const stateMap = {
|
|
74125
74146
|
filled,
|
|
@@ -74134,8 +74155,8 @@ const getStateColors = (colors2, variant, state = "themeState") => {
|
|
|
74134
74155
|
const css = stateMap[getValidKey(state)];
|
|
74135
74156
|
return css;
|
|
74136
74157
|
};
|
|
74137
|
-
const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, components: components2, shadows: shadows2 }, type4, state, hasBeforeAddon, hasAfterAddon, size
|
|
74138
|
-
const stateColors = getStateColors(colors2,
|
|
74158
|
+
const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, components: components2, shadows: shadows2 }, type4, state, hasBeforeAddon, hasAfterAddon, size) => {
|
|
74159
|
+
const stateColors = getStateColors(colors2, type4, state);
|
|
74139
74160
|
const getBorderRadius = (hasBeforeAddon2, hasAfterAddon2) => {
|
|
74140
74161
|
if (hasAfterAddon2 && !hasBeforeAddon2) {
|
|
74141
74162
|
return `${borderRadius2.BorderRadiusMd}px 0px 0px ${borderRadius2.BorderRadiusMd}px`;
|
|
@@ -74159,8 +74180,8 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74159
74180
|
&.ant-input.ant-input:focus-visible,
|
|
74160
74181
|
&.ant-input.ant-input-focused {
|
|
74161
74182
|
outline: none !important;
|
|
74162
|
-
border-color: ${colors2[
|
|
74163
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74183
|
+
border-color: ${colors2[type4].focussed.borderColor} !important;
|
|
74184
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor} !important;
|
|
74164
74185
|
}
|
|
74165
74186
|
|
|
74166
74187
|
&.ant-input-outlined {
|
|
@@ -74176,13 +74197,13 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74176
74197
|
outline: none;
|
|
74177
74198
|
color: ${stateColors.color};
|
|
74178
74199
|
box-shadow: none;
|
|
74179
|
-
border-color: ${colors2[
|
|
74200
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74180
74201
|
}
|
|
74181
74202
|
}
|
|
74182
74203
|
|
|
74183
74204
|
.ant-input-group:focus-within {
|
|
74184
74205
|
outline: none;
|
|
74185
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74206
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74186
74207
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74187
74208
|
transition: box-shadow 0.2s ease-in-out;
|
|
74188
74209
|
|
|
@@ -74190,7 +74211,7 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74190
74211
|
.ant-input:focus-within {
|
|
74191
74212
|
box-shadow: none;
|
|
74192
74213
|
border-radius: 0;
|
|
74193
|
-
border-radius: ${getBorderRadius(hasBeforeAddon
|
|
74214
|
+
border-radius: ${getBorderRadius(hasBeforeAddon, hasAfterAddon)};
|
|
74194
74215
|
border-color: #ddd;
|
|
74195
74216
|
}
|
|
74196
74217
|
}
|
|
@@ -74201,13 +74222,13 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74201
74222
|
.ant-input-group .ant-input:focus-within {
|
|
74202
74223
|
outline: none;
|
|
74203
74224
|
box-shadow: none;
|
|
74204
|
-
border-color: ${colors2[
|
|
74225
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74205
74226
|
}
|
|
74206
74227
|
|
|
74207
74228
|
/* Single focus ring on group */
|
|
74208
74229
|
.ant-input-group:focus-within {
|
|
74209
74230
|
outline: none;
|
|
74210
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74231
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74211
74232
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74212
74233
|
transition: box-shadow 0.2s ease-in-out;
|
|
74213
74234
|
}
|
|
@@ -74216,18 +74237,18 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74216
74237
|
&:not(.ant-input-group):focus-visible {
|
|
74217
74238
|
outline: none;
|
|
74218
74239
|
color: ${stateColors.color};
|
|
74219
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74240
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74220
74241
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74221
|
-
border-color: ${colors2[
|
|
74242
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74222
74243
|
transition: box-shadow 0.2s ease-in-out;
|
|
74223
74244
|
}
|
|
74224
74245
|
|
|
74225
74246
|
&:not(.ant-input-group .ant-input):focus-visible {
|
|
74226
74247
|
outline: none;
|
|
74227
74248
|
color: ${stateColors.color};
|
|
74228
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74249
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74229
74250
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74230
|
-
border-color: ${colors2[
|
|
74251
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74231
74252
|
transition: box-shadow 0.2s ease-in-out;
|
|
74232
74253
|
}
|
|
74233
74254
|
|
|
@@ -74268,7 +74289,7 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74268
74289
|
`;
|
|
74269
74290
|
};
|
|
74270
74291
|
const Input$1 = styled(Input$2)`
|
|
74271
|
-
${({ theme, state, type: type4, size = "normal", ...rest }) => {
|
|
74292
|
+
${({ theme, state, type: type4 = TYPE.primary, size = "normal", ...rest }) => {
|
|
74272
74293
|
const hasBeforeAddon = !!rest.addonBefore;
|
|
74273
74294
|
const hasAfterAddon = !!rest.addonAfter;
|
|
74274
74295
|
return getGenesisInputClass(
|
|
@@ -74277,8 +74298,7 @@ const Input$1 = styled(Input$2)`
|
|
|
74277
74298
|
state,
|
|
74278
74299
|
hasBeforeAddon,
|
|
74279
74300
|
hasAfterAddon,
|
|
74280
|
-
size
|
|
74281
|
-
TYPE.primary
|
|
74301
|
+
size
|
|
74282
74302
|
);
|
|
74283
74303
|
}}
|
|
74284
74304
|
`;
|
|
@@ -74310,9 +74330,9 @@ const Input2 = React.forwardRef(
|
|
|
74310
74330
|
size = "normal",
|
|
74311
74331
|
onChange,
|
|
74312
74332
|
value: value2,
|
|
74313
|
-
isPassword,
|
|
74314
74333
|
...rest
|
|
74315
74334
|
}, ref) => {
|
|
74335
|
+
const { type: type4, ...validRest } = rest;
|
|
74316
74336
|
const addonAfter = React.isValidElement(rest.addonAfter) && rest.addonAfter.type === Select$1 ? React.cloneElement(
|
|
74317
74337
|
rest.addonAfter,
|
|
74318
74338
|
{
|
|
@@ -74335,7 +74355,7 @@ const Input2 = React.forwardRef(
|
|
|
74335
74355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74336
74356
|
Input$1,
|
|
74337
74357
|
{
|
|
74338
|
-
...
|
|
74358
|
+
...validRest,
|
|
74339
74359
|
ref,
|
|
74340
74360
|
size,
|
|
74341
74361
|
state,
|
|
@@ -74770,53 +74790,6 @@ const Solid = (properties) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
74770
74790
|
const UnitNumber = ({ variant }) => {
|
|
74771
74791
|
return variant === "outline" ? /* @__PURE__ */ jsxRuntime.jsx(Outline, {}) : /* @__PURE__ */ jsxRuntime.jsx(Solid, {});
|
|
74772
74792
|
};
|
|
74773
|
-
const StyledFormInput = styled(Input2)`
|
|
74774
|
-
/* Ensure the border color matches regular Input using Genesis theme token */
|
|
74775
|
-
&.ant-input,
|
|
74776
|
-
.ant-input-group .ant-input {
|
|
74777
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74778
|
-
}
|
|
74779
|
-
|
|
74780
|
-
/* Input group wrapper styling - most specific selector for addon scenarios */
|
|
74781
|
-
&.ant-input-group-wrapper .ant-input-group {
|
|
74782
|
-
.ant-input {
|
|
74783
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74784
|
-
}
|
|
74785
|
-
|
|
74786
|
-
.ant-input-group-addon {
|
|
74787
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74788
|
-
background-color: #f5f5f5;
|
|
74789
|
-
}
|
|
74790
|
-
}
|
|
74791
|
-
|
|
74792
|
-
/* When input is in a group wrapper */
|
|
74793
|
-
.ant-input-group-wrapper & {
|
|
74794
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74795
|
-
}
|
|
74796
|
-
|
|
74797
|
-
/* Direct targeting of input group elements */
|
|
74798
|
-
.ant-input-group .ant-input {
|
|
74799
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74800
|
-
}
|
|
74801
|
-
|
|
74802
|
-
.ant-input-group-addon {
|
|
74803
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74804
|
-
}
|
|
74805
|
-
|
|
74806
|
-
/* Hover and focus states should maintain the correct colors */
|
|
74807
|
-
&.ant-input:hover,
|
|
74808
|
-
&.ant-input:focus,
|
|
74809
|
-
.ant-input-group .ant-input:hover,
|
|
74810
|
-
.ant-input-group .ant-input:focus,
|
|
74811
|
-
.ant-input-group-wrapper .ant-input-group:hover .ant-input,
|
|
74812
|
-
.ant-input-group-wrapper .ant-input-group:focus-within .ant-input,
|
|
74813
|
-
.ant-input-group-wrapper .ant-input-group:hover .ant-input-group-addon,
|
|
74814
|
-
.ant-input-group-wrapper
|
|
74815
|
-
.ant-input-group:focus-within
|
|
74816
|
-
.ant-input-group-addon {
|
|
74817
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74818
|
-
}
|
|
74819
|
-
`;
|
|
74820
74793
|
const defaultValidator = (_rule, value2) => {
|
|
74821
74794
|
console.log(`Validating value: ${value2}, Type: ${typeof value2}`);
|
|
74822
74795
|
if (!value2 || /^\d+$/.test(value2)) {
|
|
@@ -74837,7 +74810,7 @@ const FormInput = React.forwardRef((props, ref) => {
|
|
|
74837
74810
|
const { addonBefore, addonAfter, placeholder } = inputProps;
|
|
74838
74811
|
if (addonBefore && !addonAfter) {
|
|
74839
74812
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74840
|
-
|
|
74813
|
+
Input2,
|
|
74841
74814
|
{
|
|
74842
74815
|
...inputProps,
|
|
74843
74816
|
ref,
|
|
@@ -74851,7 +74824,7 @@ const FormInput = React.forwardRef((props, ref) => {
|
|
|
74851
74824
|
}
|
|
74852
74825
|
if (addonAfter && !addonBefore) {
|
|
74853
74826
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74854
|
-
|
|
74827
|
+
Input2,
|
|
74855
74828
|
{
|
|
74856
74829
|
...inputProps,
|
|
74857
74830
|
ref,
|
|
@@ -74864,7 +74837,7 @@ const FormInput = React.forwardRef((props, ref) => {
|
|
|
74864
74837
|
);
|
|
74865
74838
|
}
|
|
74866
74839
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74867
|
-
|
|
74840
|
+
Input2,
|
|
74868
74841
|
{
|
|
74869
74842
|
...inputProps,
|
|
74870
74843
|
ref,
|
|
@@ -82573,7 +82546,6 @@ const TypographyWideFontSizeBody1 = 16;
|
|
|
82573
82546
|
const TypographyMediumFontSizeBody1 = 16;
|
|
82574
82547
|
const TypographyWideFontSizeHeading3 = Size4;
|
|
82575
82548
|
const TypographyWideFontSizeSubHeading1 = 20;
|
|
82576
|
-
const TypographyWideFontSizeSubHeading2 = 16;
|
|
82577
82549
|
const TypographyWideFontSizeSubHeading3 = 14;
|
|
82578
82550
|
const TypographyWideFontSizeBody2 = 14;
|
|
82579
82551
|
const TypographyWideFontSizeBody3 = 12;
|
|
@@ -82772,9 +82744,9 @@ const wideTypography = {
|
|
|
82772
82744
|
letterSpacing: "0"
|
|
82773
82745
|
},
|
|
82774
82746
|
subHeading2: {
|
|
82775
|
-
fontSize:
|
|
82776
|
-
lineHeight: "
|
|
82777
|
-
fontWeight:
|
|
82747
|
+
fontSize: "24px",
|
|
82748
|
+
lineHeight: "32px",
|
|
82749
|
+
fontWeight: 400,
|
|
82778
82750
|
letterSpacing: "0"
|
|
82779
82751
|
},
|
|
82780
82752
|
subHeading3: {
|
|
@@ -85794,7 +85766,7 @@ const GroupItem = ({
|
|
|
85794
85766
|
onGroupItemClick,
|
|
85795
85767
|
getCustomIcon
|
|
85796
85768
|
}) => {
|
|
85797
|
-
if (
|
|
85769
|
+
if (items.length === 0) return null;
|
|
85798
85770
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
85799
85771
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip2, { tip: title, isAbsolutePositioned: false, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
85800
85772
|
"div",
|
|
@@ -85809,21 +85781,18 @@ const GroupItem = ({
|
|
|
85809
85781
|
children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
|
|
85810
85782
|
}
|
|
85811
85783
|
) }),
|
|
85812
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items
|
|
85813
|
-
|
|
85814
|
-
|
|
85815
|
-
|
|
85816
|
-
|
|
85817
|
-
|
|
85818
|
-
|
|
85819
|
-
|
|
85820
|
-
|
|
85821
|
-
|
|
85822
|
-
|
|
85823
|
-
|
|
85824
|
-
!item ? "Undefined" : item?.toString()
|
|
85825
|
-
);
|
|
85826
|
-
}) })
|
|
85784
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
85785
|
+
Badge$1,
|
|
85786
|
+
{
|
|
85787
|
+
label: item,
|
|
85788
|
+
hasClose: true,
|
|
85789
|
+
hasIcon: false,
|
|
85790
|
+
state: "generic",
|
|
85791
|
+
size: "small",
|
|
85792
|
+
onClick: () => onGroupItemClick(title, item)
|
|
85793
|
+
},
|
|
85794
|
+
item.toString()
|
|
85795
|
+
)) })
|
|
85827
85796
|
] });
|
|
85828
85797
|
};
|
|
85829
85798
|
const GroupsRow = ({
|
|
@@ -85840,7 +85809,7 @@ const GroupsRow = ({
|
|
|
85840
85809
|
GroupItem,
|
|
85841
85810
|
{
|
|
85842
85811
|
title: group.title,
|
|
85843
|
-
items: group
|
|
85812
|
+
items: group.items,
|
|
85844
85813
|
onGroupItemClick,
|
|
85845
85814
|
getCustomIcon
|
|
85846
85815
|
},
|
|
@@ -85941,12 +85910,6 @@ const SecondaryTableControlsRow = ({
|
|
|
85941
85910
|
}
|
|
85942
85911
|
);
|
|
85943
85912
|
};
|
|
85944
|
-
const TABLE_CONTROLS_EVENTS = {
|
|
85945
|
-
GROUP_ITEM_CLICK: "groupItemClick",
|
|
85946
|
-
ORDER_CLICK: "orderClick",
|
|
85947
|
-
PRIMARY_SORT_CHANGE: "primarySortChange",
|
|
85948
|
-
INPUT_CHANGE: "inputChange"
|
|
85949
|
-
};
|
|
85950
85913
|
const TableControls = ({
|
|
85951
85914
|
primaryTableRowData,
|
|
85952
85915
|
secondaryTableRowData,
|
|
@@ -87446,7 +87409,6 @@ exports.SegmentedControls = SegmentedControls;
|
|
|
87446
87409
|
exports.Select = Select;
|
|
87447
87410
|
exports.Shapes = Shapes;
|
|
87448
87411
|
exports.Switch = Switch;
|
|
87449
|
-
exports.TABLE_CONTROLS_EVENTS = TABLE_CONTROLS_EVENTS;
|
|
87450
87412
|
exports.Table = TablePagination;
|
|
87451
87413
|
exports.TableWithControls = TableWithControls;
|
|
87452
87414
|
exports.Tabs = Tabs;
|
package/dist/index.js
CHANGED
|
@@ -59278,37 +59278,39 @@ const Avatar$1 = styled(Avatar$2)`
|
|
|
59278
59278
|
return getGenesisClass$d(theme, type4, state);
|
|
59279
59279
|
}}
|
|
59280
59280
|
`;
|
|
59281
|
+
const getBreakpoint = (breakpoint) => {
|
|
59282
|
+
{
|
|
59283
|
+
return "medium";
|
|
59284
|
+
}
|
|
59285
|
+
};
|
|
59281
59286
|
const getVariant$2 = (typography2, variant, breakpoint) => {
|
|
59282
|
-
const typeClass = typography2["medium"];
|
|
59283
59287
|
return `
|
|
59284
|
-
font-size: ${
|
|
59285
|
-
line-height: ${
|
|
59286
|
-
letter-spacing: ${
|
|
59287
|
-
font-weight: ${
|
|
59288
|
+
font-size: ${typography2[getBreakpoint()][variant].fontSize}px !important;
|
|
59289
|
+
line-height: ${typography2[getBreakpoint()][variant].lineHeight};
|
|
59290
|
+
letter-spacing: ${typography2[getBreakpoint()][variant].letterSpacing}px;
|
|
59291
|
+
font-weight: ${typography2[getBreakpoint()][variant].fontWeight};
|
|
59288
59292
|
`;
|
|
59289
59293
|
};
|
|
59290
59294
|
const getColor = (color2, colors2, $themeType) => {
|
|
59291
59295
|
if (color2) {
|
|
59292
59296
|
return color2;
|
|
59293
59297
|
}
|
|
59294
|
-
|
|
59295
|
-
if (themeColor?.active?.default) {
|
|
59296
|
-
return themeColor.active.default;
|
|
59297
|
-
}
|
|
59298
|
-
return colors2?.secondary?.active?.default || "#000000";
|
|
59298
|
+
return colors2[$themeType].active.color;
|
|
59299
59299
|
};
|
|
59300
59300
|
const getFontFamily = (variant) => {
|
|
59301
59301
|
return `
|
|
59302
59302
|
${variant.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
59303
59303
|
`;
|
|
59304
59304
|
};
|
|
59305
|
-
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth) => `
|
|
59305
|
+
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, fontSize, fontWeight, $isFullWidth) => `
|
|
59306
59306
|
&.ant-typography {
|
|
59307
59307
|
font-family: ${getFontFamily(variant)};
|
|
59308
59308
|
color: ${getColor(color2, colors2, $themeType)} !important;
|
|
59309
|
-
${getVariant$2(typography2)}
|
|
59309
|
+
${getVariant$2(typography2, variant)}
|
|
59310
59310
|
margin-bottom: 0 !important;
|
|
59311
59311
|
width: ${$isFullWidth ? "100%" : "auto"};
|
|
59312
|
+
font-weight: ${fontWeight} !important;
|
|
59313
|
+
font-size: ${fontSize} !important;
|
|
59312
59314
|
line-height: 1;
|
|
59313
59315
|
-webkit-font-smoothing: antialiased;
|
|
59314
59316
|
|
|
@@ -59327,6 +59329,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59327
59329
|
state,
|
|
59328
59330
|
breakpoint,
|
|
59329
59331
|
color: color2,
|
|
59332
|
+
fontSize,
|
|
59333
|
+
fontWeight,
|
|
59330
59334
|
$isFullWidth
|
|
59331
59335
|
}) => {
|
|
59332
59336
|
return getGenesisTypographyClass(
|
|
@@ -59336,6 +59340,8 @@ const Headline = styled(Typography$1.Title)`
|
|
|
59336
59340
|
state,
|
|
59337
59341
|
breakpoint,
|
|
59338
59342
|
color2,
|
|
59343
|
+
fontSize,
|
|
59344
|
+
fontWeight,
|
|
59339
59345
|
$isFullWidth
|
|
59340
59346
|
);
|
|
59341
59347
|
}}
|
|
@@ -59350,7 +59356,9 @@ const Paragraph = styled(
|
|
|
59350
59356
|
state,
|
|
59351
59357
|
breakpoint,
|
|
59352
59358
|
color: color2,
|
|
59353
|
-
$isFullWidth
|
|
59359
|
+
$isFullWidth,
|
|
59360
|
+
fontSize,
|
|
59361
|
+
fontWeight
|
|
59354
59362
|
}) => {
|
|
59355
59363
|
return getGenesisTypographyClass(
|
|
59356
59364
|
theme,
|
|
@@ -59359,6 +59367,8 @@ const Paragraph = styled(
|
|
|
59359
59367
|
state,
|
|
59360
59368
|
breakpoint,
|
|
59361
59369
|
color2,
|
|
59370
|
+
fontSize,
|
|
59371
|
+
fontWeight,
|
|
59362
59372
|
$isFullWidth
|
|
59363
59373
|
);
|
|
59364
59374
|
}}
|
|
@@ -59371,6 +59381,8 @@ const Text = styled(Typography$1.Text)`
|
|
|
59371
59381
|
state,
|
|
59372
59382
|
breakpoint,
|
|
59373
59383
|
color: color2,
|
|
59384
|
+
fontSize,
|
|
59385
|
+
fontWeight,
|
|
59374
59386
|
$isFullWidth
|
|
59375
59387
|
}) => {
|
|
59376
59388
|
return getGenesisTypographyClass(
|
|
@@ -59380,6 +59392,8 @@ const Text = styled(Typography$1.Text)`
|
|
|
59380
59392
|
state,
|
|
59381
59393
|
breakpoint,
|
|
59382
59394
|
color2,
|
|
59395
|
+
fontSize,
|
|
59396
|
+
fontWeight,
|
|
59383
59397
|
$isFullWidth
|
|
59384
59398
|
);
|
|
59385
59399
|
}}
|
|
@@ -59810,8 +59824,7 @@ const TYPE = {
|
|
|
59810
59824
|
tertiary: "tertiary",
|
|
59811
59825
|
destructive: "destructive",
|
|
59812
59826
|
utility: "utility",
|
|
59813
|
-
icon: "icon"
|
|
59814
|
-
password: "primary"
|
|
59827
|
+
icon: "icon"
|
|
59815
59828
|
};
|
|
59816
59829
|
const BREAKPOINTS = {
|
|
59817
59830
|
wide: "wide",
|
|
@@ -60350,6 +60363,8 @@ const Typography = ({
|
|
|
60350
60363
|
isText = false,
|
|
60351
60364
|
isFullWidth,
|
|
60352
60365
|
style: style2,
|
|
60366
|
+
fontSize,
|
|
60367
|
+
fontWeight,
|
|
60353
60368
|
isDisabled,
|
|
60354
60369
|
...rest
|
|
60355
60370
|
}) => {
|
|
@@ -60367,6 +60382,8 @@ const Typography = ({
|
|
|
60367
60382
|
level: Number.parseInt(level),
|
|
60368
60383
|
$isFullWidth: isFullWidth,
|
|
60369
60384
|
style: style2,
|
|
60385
|
+
fontSize,
|
|
60386
|
+
fontWeight,
|
|
60370
60387
|
disabled: isDisabled,
|
|
60371
60388
|
...rest,
|
|
60372
60389
|
children: children2
|
|
@@ -60386,6 +60403,8 @@ const Typography = ({
|
|
|
60386
60403
|
$isFullWidth: isFullWidth,
|
|
60387
60404
|
style: style2,
|
|
60388
60405
|
disabled: isDisabled,
|
|
60406
|
+
fontSize,
|
|
60407
|
+
fontWeight,
|
|
60389
60408
|
...rest,
|
|
60390
60409
|
children: children2
|
|
60391
60410
|
}
|
|
@@ -60402,6 +60421,8 @@ const Typography = ({
|
|
|
60402
60421
|
$isFullWidth: isFullWidth,
|
|
60403
60422
|
style: style2,
|
|
60404
60423
|
disabled: isDisabled,
|
|
60424
|
+
fontSize,
|
|
60425
|
+
fontWeight,
|
|
60405
60426
|
...rest,
|
|
60406
60427
|
children: children2
|
|
60407
60428
|
}
|
|
@@ -74081,11 +74102,11 @@ const Message$1 = ({ message: message2, handle, isThinking = false }) => {
|
|
|
74081
74102
|
/* @__PURE__ */ jsx(TextContainer, { $isBot: isBot, children: isThinking ? /* @__PURE__ */ jsx(ThinkingIndicator, {}) : handle === "bot" ? /* @__PURE__ */ jsx(Markdown, { children: message2 }) : /* @__PURE__ */ jsx(MessageText, { children: message2 }) })
|
|
74082
74103
|
] });
|
|
74083
74104
|
};
|
|
74084
|
-
const getStateColors = (colors2,
|
|
74105
|
+
const getStateColors = (colors2, type4, state) => {
|
|
74085
74106
|
const filled = {
|
|
74086
74107
|
color: colors2.inputs.onsurface.active,
|
|
74087
74108
|
borderColor: colors2[TYPE.secondary].active.borderColor,
|
|
74088
|
-
ringColor: colors2[
|
|
74109
|
+
ringColor: colors2[type4]?.focussed?.ringColor
|
|
74089
74110
|
};
|
|
74090
74111
|
const success = {
|
|
74091
74112
|
color: colors2.status.success.default,
|
|
@@ -74101,7 +74122,7 @@ const getStateColors = (colors2, variant, state = "themeState") => {
|
|
|
74101
74122
|
color: colors2.inputs.onsurface.active,
|
|
74102
74123
|
backgroundColor: colors2.inputs.surface.active,
|
|
74103
74124
|
borderColor: colors2.inputs.surface.border,
|
|
74104
|
-
ringColor:
|
|
74125
|
+
ringColor: type4 && state ? colors2[type4]?.[state]?.ringColor : void 0
|
|
74105
74126
|
} : null;
|
|
74106
74127
|
const stateMap = {
|
|
74107
74128
|
filled,
|
|
@@ -74116,8 +74137,8 @@ const getStateColors = (colors2, variant, state = "themeState") => {
|
|
|
74116
74137
|
const css = stateMap[getValidKey(state)];
|
|
74117
74138
|
return css;
|
|
74118
74139
|
};
|
|
74119
|
-
const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, components: components2, shadows: shadows2 }, type4, state, hasBeforeAddon, hasAfterAddon, size
|
|
74120
|
-
const stateColors = getStateColors(colors2,
|
|
74140
|
+
const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, components: components2, shadows: shadows2 }, type4, state, hasBeforeAddon, hasAfterAddon, size) => {
|
|
74141
|
+
const stateColors = getStateColors(colors2, type4, state);
|
|
74121
74142
|
const getBorderRadius = (hasBeforeAddon2, hasAfterAddon2) => {
|
|
74122
74143
|
if (hasAfterAddon2 && !hasBeforeAddon2) {
|
|
74123
74144
|
return `${borderRadius2.BorderRadiusMd}px 0px 0px ${borderRadius2.BorderRadiusMd}px`;
|
|
@@ -74141,8 +74162,8 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74141
74162
|
&.ant-input.ant-input:focus-visible,
|
|
74142
74163
|
&.ant-input.ant-input-focused {
|
|
74143
74164
|
outline: none !important;
|
|
74144
|
-
border-color: ${colors2[
|
|
74145
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74165
|
+
border-color: ${colors2[type4].focussed.borderColor} !important;
|
|
74166
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor} !important;
|
|
74146
74167
|
}
|
|
74147
74168
|
|
|
74148
74169
|
&.ant-input-outlined {
|
|
@@ -74158,13 +74179,13 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74158
74179
|
outline: none;
|
|
74159
74180
|
color: ${stateColors.color};
|
|
74160
74181
|
box-shadow: none;
|
|
74161
|
-
border-color: ${colors2[
|
|
74182
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74162
74183
|
}
|
|
74163
74184
|
}
|
|
74164
74185
|
|
|
74165
74186
|
.ant-input-group:focus-within {
|
|
74166
74187
|
outline: none;
|
|
74167
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74188
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74168
74189
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74169
74190
|
transition: box-shadow 0.2s ease-in-out;
|
|
74170
74191
|
|
|
@@ -74172,7 +74193,7 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74172
74193
|
.ant-input:focus-within {
|
|
74173
74194
|
box-shadow: none;
|
|
74174
74195
|
border-radius: 0;
|
|
74175
|
-
border-radius: ${getBorderRadius(hasBeforeAddon
|
|
74196
|
+
border-radius: ${getBorderRadius(hasBeforeAddon, hasAfterAddon)};
|
|
74176
74197
|
border-color: #ddd;
|
|
74177
74198
|
}
|
|
74178
74199
|
}
|
|
@@ -74183,13 +74204,13 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74183
74204
|
.ant-input-group .ant-input:focus-within {
|
|
74184
74205
|
outline: none;
|
|
74185
74206
|
box-shadow: none;
|
|
74186
|
-
border-color: ${colors2[
|
|
74207
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74187
74208
|
}
|
|
74188
74209
|
|
|
74189
74210
|
/* Single focus ring on group */
|
|
74190
74211
|
.ant-input-group:focus-within {
|
|
74191
74212
|
outline: none;
|
|
74192
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74213
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74193
74214
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74194
74215
|
transition: box-shadow 0.2s ease-in-out;
|
|
74195
74216
|
}
|
|
@@ -74198,18 +74219,18 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74198
74219
|
&:not(.ant-input-group):focus-visible {
|
|
74199
74220
|
outline: none;
|
|
74200
74221
|
color: ${stateColors.color};
|
|
74201
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74222
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74202
74223
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74203
|
-
border-color: ${colors2[
|
|
74224
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74204
74225
|
transition: box-shadow 0.2s ease-in-out;
|
|
74205
74226
|
}
|
|
74206
74227
|
|
|
74207
74228
|
&:not(.ant-input-group .ant-input):focus-visible {
|
|
74208
74229
|
outline: none;
|
|
74209
74230
|
color: ${stateColors.color};
|
|
74210
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[
|
|
74231
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74211
74232
|
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74212
|
-
border-color: ${colors2[
|
|
74233
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74213
74234
|
transition: box-shadow 0.2s ease-in-out;
|
|
74214
74235
|
}
|
|
74215
74236
|
|
|
@@ -74250,7 +74271,7 @@ const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, co
|
|
|
74250
74271
|
`;
|
|
74251
74272
|
};
|
|
74252
74273
|
const Input$1 = styled(Input$2)`
|
|
74253
|
-
${({ theme, state, type: type4, size = "normal", ...rest }) => {
|
|
74274
|
+
${({ theme, state, type: type4 = TYPE.primary, size = "normal", ...rest }) => {
|
|
74254
74275
|
const hasBeforeAddon = !!rest.addonBefore;
|
|
74255
74276
|
const hasAfterAddon = !!rest.addonAfter;
|
|
74256
74277
|
return getGenesisInputClass(
|
|
@@ -74259,8 +74280,7 @@ const Input$1 = styled(Input$2)`
|
|
|
74259
74280
|
state,
|
|
74260
74281
|
hasBeforeAddon,
|
|
74261
74282
|
hasAfterAddon,
|
|
74262
|
-
size
|
|
74263
|
-
TYPE.primary
|
|
74283
|
+
size
|
|
74264
74284
|
);
|
|
74265
74285
|
}}
|
|
74266
74286
|
`;
|
|
@@ -74292,9 +74312,9 @@ const Input2 = React__default.forwardRef(
|
|
|
74292
74312
|
size = "normal",
|
|
74293
74313
|
onChange,
|
|
74294
74314
|
value: value2,
|
|
74295
|
-
isPassword,
|
|
74296
74315
|
...rest
|
|
74297
74316
|
}, ref) => {
|
|
74317
|
+
const { type: type4, ...validRest } = rest;
|
|
74298
74318
|
const addonAfter = React__default.isValidElement(rest.addonAfter) && rest.addonAfter.type === Select$1 ? React__default.cloneElement(
|
|
74299
74319
|
rest.addonAfter,
|
|
74300
74320
|
{
|
|
@@ -74317,7 +74337,7 @@ const Input2 = React__default.forwardRef(
|
|
|
74317
74337
|
return /* @__PURE__ */ jsx(
|
|
74318
74338
|
Input$1,
|
|
74319
74339
|
{
|
|
74320
|
-
...
|
|
74340
|
+
...validRest,
|
|
74321
74341
|
ref,
|
|
74322
74342
|
size,
|
|
74323
74343
|
state,
|
|
@@ -74752,53 +74772,6 @@ const Solid = (properties) => /* @__PURE__ */ jsx(
|
|
|
74752
74772
|
const UnitNumber = ({ variant }) => {
|
|
74753
74773
|
return variant === "outline" ? /* @__PURE__ */ jsx(Outline, {}) : /* @__PURE__ */ jsx(Solid, {});
|
|
74754
74774
|
};
|
|
74755
|
-
const StyledFormInput = styled(Input2)`
|
|
74756
|
-
/* Ensure the border color matches regular Input using Genesis theme token */
|
|
74757
|
-
&.ant-input,
|
|
74758
|
-
.ant-input-group .ant-input {
|
|
74759
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74760
|
-
}
|
|
74761
|
-
|
|
74762
|
-
/* Input group wrapper styling - most specific selector for addon scenarios */
|
|
74763
|
-
&.ant-input-group-wrapper .ant-input-group {
|
|
74764
|
-
.ant-input {
|
|
74765
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74766
|
-
}
|
|
74767
|
-
|
|
74768
|
-
.ant-input-group-addon {
|
|
74769
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74770
|
-
background-color: #f5f5f5;
|
|
74771
|
-
}
|
|
74772
|
-
}
|
|
74773
|
-
|
|
74774
|
-
/* When input is in a group wrapper */
|
|
74775
|
-
.ant-input-group-wrapper & {
|
|
74776
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74777
|
-
}
|
|
74778
|
-
|
|
74779
|
-
/* Direct targeting of input group elements */
|
|
74780
|
-
.ant-input-group .ant-input {
|
|
74781
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74782
|
-
}
|
|
74783
|
-
|
|
74784
|
-
.ant-input-group-addon {
|
|
74785
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74786
|
-
}
|
|
74787
|
-
|
|
74788
|
-
/* Hover and focus states should maintain the correct colors */
|
|
74789
|
-
&.ant-input:hover,
|
|
74790
|
-
&.ant-input:focus,
|
|
74791
|
-
.ant-input-group .ant-input:hover,
|
|
74792
|
-
.ant-input-group .ant-input:focus,
|
|
74793
|
-
.ant-input-group-wrapper .ant-input-group:hover .ant-input,
|
|
74794
|
-
.ant-input-group-wrapper .ant-input-group:focus-within .ant-input,
|
|
74795
|
-
.ant-input-group-wrapper .ant-input-group:hover .ant-input-group-addon,
|
|
74796
|
-
.ant-input-group-wrapper
|
|
74797
|
-
.ant-input-group:focus-within
|
|
74798
|
-
.ant-input-group-addon {
|
|
74799
|
-
border-color: ${({ theme }) => theme.colors.inputs.surface.border} !important;
|
|
74800
|
-
}
|
|
74801
|
-
`;
|
|
74802
74775
|
const defaultValidator = (_rule, value2) => {
|
|
74803
74776
|
console.log(`Validating value: ${value2}, Type: ${typeof value2}`);
|
|
74804
74777
|
if (!value2 || /^\d+$/.test(value2)) {
|
|
@@ -74819,7 +74792,7 @@ const FormInput = React__default.forwardRef((props, ref) => {
|
|
|
74819
74792
|
const { addonBefore, addonAfter, placeholder } = inputProps;
|
|
74820
74793
|
if (addonBefore && !addonAfter) {
|
|
74821
74794
|
return /* @__PURE__ */ jsx(
|
|
74822
|
-
|
|
74795
|
+
Input2,
|
|
74823
74796
|
{
|
|
74824
74797
|
...inputProps,
|
|
74825
74798
|
ref,
|
|
@@ -74833,7 +74806,7 @@ const FormInput = React__default.forwardRef((props, ref) => {
|
|
|
74833
74806
|
}
|
|
74834
74807
|
if (addonAfter && !addonBefore) {
|
|
74835
74808
|
return /* @__PURE__ */ jsx(
|
|
74836
|
-
|
|
74809
|
+
Input2,
|
|
74837
74810
|
{
|
|
74838
74811
|
...inputProps,
|
|
74839
74812
|
ref,
|
|
@@ -74846,7 +74819,7 @@ const FormInput = React__default.forwardRef((props, ref) => {
|
|
|
74846
74819
|
);
|
|
74847
74820
|
}
|
|
74848
74821
|
return /* @__PURE__ */ jsx(
|
|
74849
|
-
|
|
74822
|
+
Input2,
|
|
74850
74823
|
{
|
|
74851
74824
|
...inputProps,
|
|
74852
74825
|
ref,
|
|
@@ -82555,7 +82528,6 @@ const TypographyWideFontSizeBody1 = 16;
|
|
|
82555
82528
|
const TypographyMediumFontSizeBody1 = 16;
|
|
82556
82529
|
const TypographyWideFontSizeHeading3 = Size4;
|
|
82557
82530
|
const TypographyWideFontSizeSubHeading1 = 20;
|
|
82558
|
-
const TypographyWideFontSizeSubHeading2 = 16;
|
|
82559
82531
|
const TypographyWideFontSizeSubHeading3 = 14;
|
|
82560
82532
|
const TypographyWideFontSizeBody2 = 14;
|
|
82561
82533
|
const TypographyWideFontSizeBody3 = 12;
|
|
@@ -82754,9 +82726,9 @@ const wideTypography = {
|
|
|
82754
82726
|
letterSpacing: "0"
|
|
82755
82727
|
},
|
|
82756
82728
|
subHeading2: {
|
|
82757
|
-
fontSize:
|
|
82758
|
-
lineHeight: "
|
|
82759
|
-
fontWeight:
|
|
82729
|
+
fontSize: "24px",
|
|
82730
|
+
lineHeight: "32px",
|
|
82731
|
+
fontWeight: 400,
|
|
82760
82732
|
letterSpacing: "0"
|
|
82761
82733
|
},
|
|
82762
82734
|
subHeading3: {
|
|
@@ -85776,7 +85748,7 @@ const GroupItem = ({
|
|
|
85776
85748
|
onGroupItemClick,
|
|
85777
85749
|
getCustomIcon
|
|
85778
85750
|
}) => {
|
|
85779
|
-
if (
|
|
85751
|
+
if (items.length === 0) return null;
|
|
85780
85752
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
85781
85753
|
/* @__PURE__ */ jsx(Tooltip2, { tip: title, isAbsolutePositioned: false, children: /* @__PURE__ */ jsx(
|
|
85782
85754
|
"div",
|
|
@@ -85791,21 +85763,18 @@ const GroupItem = ({
|
|
|
85791
85763
|
children: getCustomIcon ? getCustomIcon(title) : getIcon$1(title)
|
|
85792
85764
|
}
|
|
85793
85765
|
) }),
|
|
85794
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items
|
|
85795
|
-
|
|
85796
|
-
|
|
85797
|
-
|
|
85798
|
-
|
|
85799
|
-
|
|
85800
|
-
|
|
85801
|
-
|
|
85802
|
-
|
|
85803
|
-
|
|
85804
|
-
|
|
85805
|
-
|
|
85806
|
-
!item ? "Undefined" : item?.toString()
|
|
85807
|
-
);
|
|
85808
|
-
}) })
|
|
85766
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => /* @__PURE__ */ jsx(
|
|
85767
|
+
Badge$1,
|
|
85768
|
+
{
|
|
85769
|
+
label: item,
|
|
85770
|
+
hasClose: true,
|
|
85771
|
+
hasIcon: false,
|
|
85772
|
+
state: "generic",
|
|
85773
|
+
size: "small",
|
|
85774
|
+
onClick: () => onGroupItemClick(title, item)
|
|
85775
|
+
},
|
|
85776
|
+
item.toString()
|
|
85777
|
+
)) })
|
|
85809
85778
|
] });
|
|
85810
85779
|
};
|
|
85811
85780
|
const GroupsRow = ({
|
|
@@ -85822,7 +85791,7 @@ const GroupsRow = ({
|
|
|
85822
85791
|
GroupItem,
|
|
85823
85792
|
{
|
|
85824
85793
|
title: group.title,
|
|
85825
|
-
items: group
|
|
85794
|
+
items: group.items,
|
|
85826
85795
|
onGroupItemClick,
|
|
85827
85796
|
getCustomIcon
|
|
85828
85797
|
},
|
|
@@ -85923,12 +85892,6 @@ const SecondaryTableControlsRow = ({
|
|
|
85923
85892
|
}
|
|
85924
85893
|
);
|
|
85925
85894
|
};
|
|
85926
|
-
const TABLE_CONTROLS_EVENTS = {
|
|
85927
|
-
GROUP_ITEM_CLICK: "groupItemClick",
|
|
85928
|
-
ORDER_CLICK: "orderClick",
|
|
85929
|
-
PRIMARY_SORT_CHANGE: "primarySortChange",
|
|
85930
|
-
INPUT_CHANGE: "inputChange"
|
|
85931
|
-
};
|
|
85932
85895
|
const TableControls = ({
|
|
85933
85896
|
primaryTableRowData,
|
|
85934
85897
|
secondaryTableRowData,
|
|
@@ -87429,7 +87392,6 @@ export {
|
|
|
87429
87392
|
Select,
|
|
87430
87393
|
Shapes,
|
|
87431
87394
|
Switch,
|
|
87432
|
-
TABLE_CONTROLS_EVENTS,
|
|
87433
87395
|
TablePagination as Table,
|
|
87434
87396
|
TableWithControls,
|
|
87435
87397
|
Tabs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobolt/genesis",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "genesis design system",
|
|
5
5
|
"author": "gobolt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
},
|
|
151
151
|
"dependencies": {
|
|
152
152
|
"@ant-design/icons": "^5.5.2",
|
|
153
|
-
"@gobolt/genesis-tokens": "^0.0.
|
|
153
|
+
"@gobolt/genesis-tokens": "^0.0.10",
|
|
154
154
|
"@mdx-js/react": "^3.0.1",
|
|
155
155
|
"@secondcloset/types": "^3.4.6",
|
|
156
156
|
"@types/d3": "^7.4.3",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const StyledFormInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('..').InputProps & import('react').RefAttributes<import('rc-input').InputRef>, "ref"> & {
|
|
2
|
-
ref?: ((instance: import('rc-input').InputRef | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<import('rc-input').InputRef> | null | undefined;
|
|
3
|
-
}, never>> & string & Omit<import('react').ForwardRefExoticComponent<import('..').InputProps & import('react').RefAttributes<import('rc-input').InputRef>>, keyof import('react').Component<any, {}, any>>;
|