baseui 0.0.0-next-e19fc5fd2 → 0.0.0-next-ff0c2b52d

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/tag/types.d.ts CHANGED
@@ -2,6 +2,16 @@ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
3
  export declare const TagKind: Readonly<{
4
4
  readonly custom: "custom";
5
+ readonly gray: "gray";
6
+ readonly red: "red";
7
+ readonly orange: "orange";
8
+ readonly yellow: "yellow";
9
+ readonly green: "green";
10
+ readonly blue: "blue";
11
+ readonly purple: "purple";
12
+ readonly magenta: "magenta";
13
+ readonly teal: "teal";
14
+ readonly lime: "lime";
5
15
  readonly neutral: "neutral";
6
16
  readonly primary: "primary";
7
17
  readonly accent: "accent";
@@ -9,21 +19,14 @@ export declare const TagKind: Readonly<{
9
19
  readonly warning: "warning";
10
20
  readonly negative: "negative";
11
21
  readonly black: "black";
12
- readonly blue: "blue";
13
- readonly green: "green";
14
- readonly red: "red";
15
- readonly yellow: "yellow";
16
- readonly orange: "orange";
17
- readonly purple: "purple";
18
22
  readonly brown: "brown";
19
- readonly teal: "teal";
20
- readonly lime: "lime";
21
23
  }>;
22
24
  export declare const TagHierarchy: Readonly<Readonly<{
23
25
  readonly primary: "primary";
24
26
  readonly secondary: "secondary";
25
27
  }>>;
26
28
  export declare const TagSize: Readonly<{
29
+ readonly xSmall: "xSmall";
27
30
  readonly small: "small";
28
31
  readonly medium: "medium";
29
32
  readonly large: "large";
@@ -58,9 +61,9 @@ export type TagProps = {
58
61
  color?: string;
59
62
  /** Text to display in native OS tooltip on long hover. */
60
63
  title?: string;
61
- /** onClick handler for the action button element. */
64
+ /** onClick handler for the action button(the "x" button) element. */
62
65
  onActionClick?: (e: Event, children?: React.ReactNode) => unknown;
63
- /** keydown handler for the action button element. */
66
+ /** keydown handler for the action button(the "x" button) element. */
64
67
  onActionKeyDown?: (e: Event, children?: React.ReactNode) => unknown;
65
68
  /** onClick handler for the tag. Passing an onClick handler also makes the tag clickable. */
66
69
  onClick?: null | ((event: Event) => unknown);
@@ -68,7 +71,9 @@ export type TagProps = {
68
71
  onKeyDown?: null | ((event: Event) => unknown);
69
72
  /** Determines the size of the Tag. */
70
73
  size?: TagSize;
71
- startEnhancer?: React.ComponentType<{}>;
74
+ startEnhancer?: React.ComponentType<{
75
+ size?: number | string;
76
+ }>;
72
77
  contentMaxWidth?: string | null;
73
78
  };
74
79
  export type SharedPropsArg = {
@@ -89,9 +89,102 @@ var _default = (foundation = _colorFoundationTokens.default) => {
89
89
  backgroundLightWarning: coreExtensions.backgroundWarningLight,
90
90
  backgroundLightNegative: coreExtensions.backgroundNegativeLight
91
91
  };
92
+ const tagTokens = {
93
+ tagGrayBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.gray400Dark,
94
+ tagGrayBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
95
+ tagGrayContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.gray900Dark,
96
+ tagGrayContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray700Dark,
97
+ tagGrayBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
98
+ tagGrayContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray400Dark,
99
+ tagGrayBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.gray500Dark,
100
+ tagGrayBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.gray500Dark,
101
+ tagGrayBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.gray800Dark,
102
+ tagRedBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.red400Dark,
103
+ tagRedBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.red100Dark,
104
+ tagRedContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.red900Dark,
105
+ tagRedContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.red700Dark,
106
+ tagRedBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.red100Dark,
107
+ tagRedContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.red400Dark,
108
+ tagRedBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.red500Dark,
109
+ tagRedBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.red500Dark,
110
+ tagRedBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.red800Dark,
111
+ tagOrangeBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.orange400Dark,
112
+ tagOrangeBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.orange100Dark,
113
+ tagOrangeContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.orange900Dark,
114
+ tagOrangeContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.orange700Dark,
115
+ tagOrangeBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.orange100Dark,
116
+ tagOrangeContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.orange400Dark,
117
+ tagYellowBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.yellow700Dark,
118
+ tagOrangeBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.orange500Dark,
119
+ tagYellowBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.yellow100Dark,
120
+ tagOrangeBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.orange500Dark,
121
+ tagOrangeBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.orange800Dark,
122
+ tagYellowContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.yellow50Dark,
123
+ tagYellowContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.yellow900Dark,
124
+ tagYellowBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.yellow100Dark,
125
+ tagYellowContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.yellow400Dark,
126
+ tagYellowBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.yellow800Dark,
127
+ tagYellowBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.yellow500Dark,
128
+ tagYellowBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.yellow800Dark,
129
+ tagGreenBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.green400Dark,
130
+ tagGreenBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.green100Dark,
131
+ tagGreenContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.green900Dark,
132
+ tagGreenContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.green700Dark,
133
+ tagGreenBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.green100Dark,
134
+ tagGreenContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.green400Dark,
135
+ tagGreenBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.green500Dark,
136
+ tagBlueBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.blue400Dark,
137
+ tagBlueBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.blue100Dark,
138
+ tagGreenBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.green500Dark,
139
+ tagBlueContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.blue900Dark,
140
+ tagGreenBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.green800Dark,
141
+ tagBlueContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.blue700Dark,
142
+ tagBlueBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.blue100Dark,
143
+ tagBlueContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.blue400Dark,
144
+ tagBlueBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.blue500Dark,
145
+ tagPurpleBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.purple400Dark,
146
+ tagPurpleBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.purple100Dark,
147
+ tagBlueBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.blue500Dark,
148
+ tagBlueBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.blue800Dark,
149
+ tagPurpleContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.purple900Dark,
150
+ tagPurpleContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.purple700Dark,
151
+ tagPurpleBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.purple100Dark,
152
+ tagPurpleContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.purple400Dark,
153
+ tagPurpleBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.purple500Dark,
154
+ tagMagentaBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.magenta400Dark,
155
+ tagPurpleBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.purple500Dark,
156
+ tagMagentaBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.magenta100Dark,
157
+ tagPurpleBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.purple800Dark,
158
+ tagMagentaContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.magenta900Dark,
159
+ tagMagentaContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.magenta700Dark,
160
+ tagMagentaBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.magenta100Dark,
161
+ tagMagentaContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.magenta400Dark,
162
+ tagMagentaBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.magenta500Dark,
163
+ tagMagentaBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.magenta500Dark,
164
+ tagMagentaBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.magenta800Dark,
165
+ tagTealBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.teal400Dark,
166
+ tagTealBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.teal100Dark,
167
+ tagTealContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.teal900Dark,
168
+ tagTealContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.teal700Dark,
169
+ tagTealBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.teal100Dark,
170
+ tagTealContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.teal400Dark,
171
+ tagTealBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.teal500Dark,
172
+ tagTealBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.teal500Dark,
173
+ tagTealBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.teal800Dark,
174
+ tagLimeBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.lime400Dark,
175
+ tagLimeBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.lime100Dark,
176
+ tagLimeContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.lime900Dark,
177
+ tagLimeContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.lime700Dark,
178
+ tagLimeBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.lime100Dark,
179
+ tagLimeContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.lime400Dark,
180
+ tagLimeBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.lime500Dark,
181
+ tagLimeBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.lime500Dark,
182
+ tagLimeBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.lime800Dark
183
+ };
92
184
  return {
93
185
  ...core,
94
186
  ...coreExtensions,
187
+ ...tagTokens,
95
188
  ...deprecated
96
189
  };
97
190
  };
@@ -92,9 +92,102 @@ foundation = _colorFoundationTokens.default) => {
92
92
  backgroundLightWarning: coreExtensions.backgroundWarningLight,
93
93
  backgroundLightNegative: coreExtensions.backgroundNegativeLight
94
94
  };
95
+ const tagTokens = {
96
+ tagGrayBackgroundPrimary: _colorPrimitiveTokens.default.gray600,
97
+ tagGrayBackgroundSecondary: _colorPrimitiveTokens.default.gray50,
98
+ tagGrayContentPrimary: _colorPrimitiveTokens.default.white,
99
+ tagGrayContentSecondary: _colorPrimitiveTokens.default.gray700,
100
+ tagGrayBackgroundStateDisabled: _colorPrimitiveTokens.default.gray50,
101
+ tagGrayContentStateDisabled: _colorPrimitiveTokens.default.gray300,
102
+ tagGrayBorderPrimaryUnselected: _colorPrimitiveTokens.default.gray700,
103
+ tagGrayBorderSecondaryUnselected: _colorPrimitiveTokens.default.gray100,
104
+ tagGrayBorderSecondarySelected: _colorPrimitiveTokens.default.gray600,
105
+ tagRedBackgroundPrimary: _colorPrimitiveTokens.default.red600,
106
+ tagRedBackgroundSecondary: _colorPrimitiveTokens.default.red50,
107
+ tagRedContentPrimary: _colorPrimitiveTokens.default.white,
108
+ tagRedContentSecondary: _colorPrimitiveTokens.default.red700,
109
+ tagRedBackgroundStateDisabled: _colorPrimitiveTokens.default.red50,
110
+ tagRedContentStateDisabled: _colorPrimitiveTokens.default.red300,
111
+ tagRedBorderPrimaryUnselected: _colorPrimitiveTokens.default.red700,
112
+ tagRedBorderSecondaryUnselected: _colorPrimitiveTokens.default.red100,
113
+ tagRedBorderSecondarySelected: _colorPrimitiveTokens.default.red700,
114
+ tagOrangeBackgroundPrimary: _colorPrimitiveTokens.default.orange600,
115
+ tagOrangeBackgroundSecondary: _colorPrimitiveTokens.default.orange50,
116
+ tagOrangeContentPrimary: _colorPrimitiveTokens.default.white,
117
+ tagOrangeContentSecondary: _colorPrimitiveTokens.default.orange700,
118
+ tagOrangeBackgroundStateDisabled: _colorPrimitiveTokens.default.orange50,
119
+ tagOrangeContentStateDisabled: _colorPrimitiveTokens.default.orange300,
120
+ tagYellowBackgroundPrimary: _colorPrimitiveTokens.default.yellow300,
121
+ tagOrangeBorderPrimaryUnselected: _colorPrimitiveTokens.default.orange700,
122
+ tagYellowBackgroundSecondary: _colorPrimitiveTokens.default.yellow50,
123
+ tagOrangeBorderSecondaryUnselected: _colorPrimitiveTokens.default.orange100,
124
+ tagOrangeBorderSecondarySelected: _colorPrimitiveTokens.default.orange700,
125
+ tagYellowContentPrimary: _colorPrimitiveTokens.default.black,
126
+ tagYellowContentSecondary: _colorPrimitiveTokens.default.yellow700,
127
+ tagYellowBackgroundStateDisabled: _colorPrimitiveTokens.default.yellow50,
128
+ tagYellowContentStateDisabled: _colorPrimitiveTokens.default.yellow200,
129
+ tagYellowBorderPrimaryUnselected: _colorPrimitiveTokens.default.yellow400,
130
+ tagYellowBorderSecondaryUnselected: _colorPrimitiveTokens.default.yellow100,
131
+ tagYellowBorderSecondarySelected: _colorPrimitiveTokens.default.yellow700,
132
+ tagGreenBackgroundPrimary: _colorPrimitiveTokens.default.green600,
133
+ tagGreenBackgroundSecondary: _colorPrimitiveTokens.default.green50,
134
+ tagGreenContentPrimary: _colorPrimitiveTokens.default.white,
135
+ tagGreenContentSecondary: _colorPrimitiveTokens.default.green700,
136
+ tagGreenBackgroundStateDisabled: _colorPrimitiveTokens.default.green50,
137
+ tagGreenContentStateDisabled: _colorPrimitiveTokens.default.green300,
138
+ tagGreenBorderPrimaryUnselected: _colorPrimitiveTokens.default.green700,
139
+ tagBlueBackgroundPrimary: _colorPrimitiveTokens.default.blue600,
140
+ tagBlueBackgroundSecondary: _colorPrimitiveTokens.default.blue50,
141
+ tagGreenBorderSecondaryUnselected: _colorPrimitiveTokens.default.green100,
142
+ tagBlueContentPrimary: _colorPrimitiveTokens.default.white,
143
+ tagGreenBorderSecondarySelected: _colorPrimitiveTokens.default.green700,
144
+ tagBlueContentSecondary: _colorPrimitiveTokens.default.blue700,
145
+ tagBlueBackgroundStateDisabled: _colorPrimitiveTokens.default.blue50,
146
+ tagBlueContentStateDisabled: _colorPrimitiveTokens.default.blue300,
147
+ tagBlueBorderPrimaryUnselected: _colorPrimitiveTokens.default.blue700,
148
+ tagPurpleBackgroundPrimary: _colorPrimitiveTokens.default.purple600,
149
+ tagPurpleBackgroundSecondary: _colorPrimitiveTokens.default.purple50,
150
+ tagBlueBorderSecondaryUnselected: _colorPrimitiveTokens.default.blue100,
151
+ tagBlueBorderSecondarySelected: _colorPrimitiveTokens.default.blue700,
152
+ tagPurpleContentPrimary: _colorPrimitiveTokens.default.white,
153
+ tagPurpleContentSecondary: _colorPrimitiveTokens.default.purple700,
154
+ tagPurpleBackgroundStateDisabled: _colorPrimitiveTokens.default.purple50,
155
+ tagPurpleContentStateDisabled: _colorPrimitiveTokens.default.purple300,
156
+ tagPurpleBorderPrimaryUnselected: _colorPrimitiveTokens.default.purple700,
157
+ tagMagentaBackgroundPrimary: _colorPrimitiveTokens.default.magenta600,
158
+ tagPurpleBorderSecondaryUnselected: _colorPrimitiveTokens.default.purple100,
159
+ tagMagentaBackgroundSecondary: _colorPrimitiveTokens.default.magenta50,
160
+ tagPurpleBorderSecondarySelected: _colorPrimitiveTokens.default.purple700,
161
+ tagMagentaContentPrimary: _colorPrimitiveTokens.default.white,
162
+ tagMagentaContentSecondary: _colorPrimitiveTokens.default.magenta700,
163
+ tagMagentaBackgroundStateDisabled: _colorPrimitiveTokens.default.magenta50,
164
+ tagMagentaContentStateDisabled: _colorPrimitiveTokens.default.magenta300,
165
+ tagMagentaBorderPrimaryUnselected: _colorPrimitiveTokens.default.magenta700,
166
+ tagMagentaBorderSecondaryUnselected: _colorPrimitiveTokens.default.magenta100,
167
+ tagMagentaBorderSecondarySelected: _colorPrimitiveTokens.default.magenta700,
168
+ tagTealBackgroundPrimary: _colorPrimitiveTokens.default.teal600,
169
+ tagTealBackgroundSecondary: _colorPrimitiveTokens.default.teal50,
170
+ tagTealContentPrimary: _colorPrimitiveTokens.default.white,
171
+ tagTealContentSecondary: _colorPrimitiveTokens.default.teal700,
172
+ tagTealBackgroundStateDisabled: _colorPrimitiveTokens.default.teal50,
173
+ tagTealContentStateDisabled: _colorPrimitiveTokens.default.teal300,
174
+ tagTealBorderPrimaryUnselected: _colorPrimitiveTokens.default.teal700,
175
+ tagTealBorderSecondaryUnselected: _colorPrimitiveTokens.default.teal100,
176
+ tagTealBorderSecondarySelected: _colorPrimitiveTokens.default.teal700,
177
+ tagLimeBackgroundPrimary: _colorPrimitiveTokens.default.lime600,
178
+ tagLimeBackgroundSecondary: _colorPrimitiveTokens.default.lime50,
179
+ tagLimeContentPrimary: _colorPrimitiveTokens.default.white,
180
+ tagLimeContentSecondary: _colorPrimitiveTokens.default.lime700,
181
+ tagLimeBackgroundStateDisabled: _colorPrimitiveTokens.default.lime50,
182
+ tagLimeContentStateDisabled: _colorPrimitiveTokens.default.lime300,
183
+ tagLimeBorderPrimaryUnselected: _colorPrimitiveTokens.default.lime700,
184
+ tagLimeBorderSecondaryUnselected: _colorPrimitiveTokens.default.lime100,
185
+ tagLimeBorderSecondarySelected: _colorPrimitiveTokens.default.lime700
186
+ };
95
187
  return {
96
188
  ...core,
97
189
  ...coreExtensions,
190
+ ...tagTokens,
98
191
  ...deprecated
99
192
  };
100
193
  };