@ssa-ui-kit/core 2.18.2 → 2.19.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,18 +1,3 @@
1
+ import { ColorPickerProps } from './types';
1
2
  import '@rc-component/color-picker/assets/index.css';
2
- declare const COLOR_FORMAT: {
3
- readonly hex: "HEX";
4
- readonly rgb: "RGB";
5
- readonly hsl: "HSL";
6
- };
7
- type ColorFormat = keyof typeof COLOR_FORMAT;
8
- export interface ColorPickerProps {
9
- defaultColor?: string;
10
- color?: string;
11
- disabledAlpha?: boolean;
12
- disabled?: boolean;
13
- format?: ColorFormat;
14
- defaultFormat?: ColorFormat;
15
- onChange?: (color: string) => void;
16
- }
17
- export declare const ColorPicker: ({ color: providedColor, defaultColor, disabledAlpha, disabled, format: providedFormat, defaultFormat, onChange, }: ColorPickerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
18
- export {};
3
+ export declare const ColorPicker: ({ color: providedColor, format: providedFormat, colorsPalette, ...rest }: ColorPickerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ColorPickerProviderOutputProps, ColorPickerProviderInputProps } from './types';
2
+ export declare const ColorPickerContext: import("react").Context<ColorPickerProviderOutputProps>;
3
+ export declare const ColorPickerProvider: ({ children, providedColor, providedFormat, defaultColor, defaultFormat, classnames, disabledAlpha, disabled, label, colorsPalette, onChange, }: React.PropsWithChildren<ColorPickerProviderInputProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
+ export declare const useColorPickerContext: () => ColorPickerProviderOutputProps;
@@ -0,0 +1 @@
1
+ export declare const ColorPickerTrigger: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TabColorPalette: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TabColorPicker: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TabContent: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -3,3 +3,6 @@ export * from './HlsInput';
3
3
  export * from './RgbInput';
4
4
  export * from './CopyButton';
5
5
  export * from './ColorDropdown';
6
+ export * from './TabColorPicker';
7
+ export * from './TabColorPalette';
8
+ export * from './TabContent';
@@ -0,0 +1,6 @@
1
+ export declare const COLOR_FORMAT: {
2
+ readonly hex: "HEX";
3
+ readonly rgb: "RGB";
4
+ readonly hsl: "HSL";
5
+ };
6
+ export declare const COLORS_PALETTE: string[];
@@ -0,0 +1,37 @@
1
+ import { Color } from '@rc-component/color-picker';
2
+ import { SmallTabProps, TabProps } from '../TabBar/types';
3
+ import { COLOR_FORMAT } from './constants';
4
+ export type ColorFormat = keyof typeof COLOR_FORMAT;
5
+ export interface ColorPickerProps {
6
+ defaultColor?: string;
7
+ defaultFormat?: ColorFormat;
8
+ disabledAlpha?: boolean;
9
+ disabled?: boolean;
10
+ color?: string;
11
+ format?: ColorFormat;
12
+ label?: string;
13
+ colorsPalette?: string[];
14
+ classnames?: {
15
+ trigger?: string;
16
+ content?: string;
17
+ button?: string;
18
+ colorPicker?: string;
19
+ colorDropdown?: string;
20
+ output?: string;
21
+ };
22
+ onChange?: (color: string) => void;
23
+ }
24
+ export type ColorPickerProviderInputProps = Omit<ColorPickerProps, 'color' | 'format'> & {
25
+ providedColor: ColorPickerProps['color'];
26
+ providedFormat: ColorPickerProps['format'];
27
+ };
28
+ export type ColorPickerProviderOutputProps = Omit<ColorPickerProps, 'color'> & {
29
+ rawColor?: string | Color;
30
+ format: ColorFormat;
31
+ copy: (valueToCopy: string) => void;
32
+ setRawColor: (color: string | Color) => void;
33
+ setFormat: (format: ColorFormat) => void;
34
+ };
35
+ export type ColorPickerTabProps = Pick<TabProps, 'tabId' | 'isActive' | 'ariaControls' | 'onClick'> & Pick<SmallTabProps, 'text'> & {
36
+ isActive?: boolean;
37
+ };
@@ -0,0 +1,3 @@
1
+ import { Color } from '@rc-component/color-picker';
2
+ import { ColorFormat } from './types';
3
+ export declare const colorFormatter: Record<ColorFormat, (color: Color) => string>;
@@ -6,5 +6,5 @@ import { TabBarProps } from './types';
6
6
  * component to decide where to render the contents of the
7
7
  * selected tab.
8
8
  * */
9
- declare const TabBar: ({ children }: TabBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ declare const TabBar: ({ children, className }: TabBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
10
  export default TabBar;
@@ -19,6 +19,7 @@ export interface LargeTabProps extends TabProps {
19
19
  }
20
20
  export interface TabBarProps {
21
21
  children: React.ReactElement<React.PropsWithChildren<TabProps>>[];
22
+ className?: string;
22
23
  }
23
24
  export interface TabBarContextProps {
24
25
  activeTab?: TabProps;
package/dist/index.js CHANGED
@@ -7435,7 +7435,8 @@ const TabBarBase = /*#__PURE__*/base_default()("div", true ? {
7435
7435
  * selected tab.
7436
7436
  * */
7437
7437
  const TabBar = ({
7438
- children
7438
+ children,
7439
+ className
7439
7440
  }) => {
7440
7441
  const {
7441
7442
  activeTab,
@@ -7444,6 +7445,7 @@ const TabBar = ({
7444
7445
  const activeTabId = activeTab?.tabId;
7445
7446
  return (0,jsx_runtime_namespaceObject.jsx)(TabBarBase, {
7446
7447
  role: "tablist",
7448
+ className: className,
7447
7449
  children: external_react_namespaceObject.Children.map(children, child => {
7448
7450
  // istanbul ignore else
7449
7451
  if (/*#__PURE__*/(0,external_react_namespaceObject.isValidElement)(child)) {
@@ -8173,13 +8175,12 @@ const AddNewAccountCard = ({
8173
8175
 
8174
8176
  ;// ./src/components/ButtonGroup/styles.ts
8175
8177
 
8176
- const ButtonItem = theme => /*#__PURE__*/(0,react_namespaceObject.css)("justify-content:center;min-width:40px;height:auto;padding:8px;text-align:center;letter-spacing:0em;border-radius:0;box-shadow:none;user-select:none;&:hover,&:focus,&:active{box-shadow:none;}&:first-of-type{border-radius:6px 0 0 6px;}&:last-child{border-radius:0 6px 6px 0;}&:not(:last-child){margin-right:1px;}&.active{background:", theme.colors.greyFocused, ";}&:disabled{background:", theme.colors.grey, ";p{color:", theme.colors.grey40, ";}}", theme.mediaQueries.md, "{min-width:65px;padding:12px;p{font-size:13.3px;line-height:15px;}}" + ( true ? "" : 0), true ? "" : 0);
8178
+ const ButtonItem = theme => /*#__PURE__*/(0,react_namespaceObject.css)("justify-content:center;min-width:40px;height:auto;padding:8px;text-align:center;letter-spacing:0em;border-radius:0;box-shadow:none;user-select:none;font-size:0.694rem;line-height:0.938rem;font-style:normal;font-weight:500;&:hover,&:focus,&:active{box-shadow:none;}&:first-of-type{border-radius:6px 0 0 6px;}&:last-child{border-radius:0 6px 6px 0;}&:not(:last-child){margin-right:1px;}&.active{background:", theme.colors.greyFocused, ";}&:disabled{background:", theme.colors.grey, ";color:", theme.colors.grey40, ";}", theme.mediaQueries.md, "{min-width:65px;padding:12px;font-size:13.3px;line-height:15px;}" + ( true ? "" : 0), true ? "" : 0);
8177
8179
  ;// ./src/components/ButtonGroup/ButtonGroup.tsx
8178
8180
 
8179
8181
 
8180
8182
 
8181
8183
 
8182
-
8183
8184
  const ButtonGroup = ({
8184
8185
  items,
8185
8186
  buttonStyles,
@@ -8207,10 +8208,7 @@ const ButtonGroup = ({
8207
8208
  onClick: handleClick(item),
8208
8209
  css: [ButtonItem, buttonStyles, true ? "" : 0, true ? "" : 0],
8209
8210
  className: isActive ? 'active' : '',
8210
- children: (0,jsx_runtime_namespaceObject.jsx)(Typography_Typography, {
8211
- variant: "body1",
8212
- children: item.text
8213
- })
8211
+ children: item.text
8214
8212
  }, item.id);
8215
8213
  })
8216
8214
  });
@@ -11762,11 +11760,131 @@ const CollapsibleNavBarCustomIconSVG = ({
11762
11760
 
11763
11761
 
11764
11762
 
11765
- ;// external "@emotion/css"
11766
- const css_namespaceObject = require("@emotion/css");
11767
11763
  ;// external "@rc-component/color-picker"
11768
11764
  const color_picker_namespaceObject = require("@rc-component/color-picker");
11769
11765
  var color_picker_default = /*#__PURE__*/__webpack_require__.n(color_picker_namespaceObject);
11766
+ ;// ./src/components/ColorPicker/utils.ts
11767
+ const colorFormatter = {
11768
+ hex: color => color.toHexString(),
11769
+ rgb: color => color.toRgbString(),
11770
+ hsl: color => color.toHslString()
11771
+ };
11772
+ ;// ./src/components/ColorPicker/ColorPickerContext.tsx
11773
+
11774
+
11775
+
11776
+
11777
+
11778
+ const ColorPickerContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({
11779
+ format: 'hex',
11780
+ rawColor: undefined,
11781
+ copy() {
11782
+ // no-op
11783
+ },
11784
+ setFormat() {
11785
+ // no-op
11786
+ },
11787
+ setRawColor() {
11788
+ // no-op
11789
+ }
11790
+ });
11791
+ const ColorPickerProvider = ({
11792
+ children,
11793
+ providedColor,
11794
+ providedFormat,
11795
+ defaultColor,
11796
+ defaultFormat,
11797
+ classnames,
11798
+ disabledAlpha,
11799
+ disabled,
11800
+ label,
11801
+ colorsPalette,
11802
+ onChange
11803
+ }) => {
11804
+ const {
11805
+ copy
11806
+ } = (0,hooks_namespaceObject.useClipboard)();
11807
+ const [format, setFormat] = (0,hooks_namespaceObject.useUncontrolled)({
11808
+ value: providedFormat,
11809
+ defaultValue: defaultFormat,
11810
+ finalValue: 'hex'
11811
+ });
11812
+ const [rawColor, setRawColor] = (0,hooks_namespaceObject.useUncontrolled)({
11813
+ value: providedColor,
11814
+ defaultValue: defaultColor,
11815
+ onChange: color => {
11816
+ if (color) {
11817
+ onChange?.(colorFormatter[format](new color_picker_namespaceObject.Color(color)));
11818
+ }
11819
+ }
11820
+ });
11821
+ return (0,jsx_runtime_namespaceObject.jsx)(ColorPickerContext.Provider, {
11822
+ value: {
11823
+ defaultColor,
11824
+ defaultFormat,
11825
+ format,
11826
+ rawColor,
11827
+ classnames,
11828
+ disabledAlpha,
11829
+ disabled,
11830
+ label,
11831
+ colorsPalette,
11832
+ copy,
11833
+ setFormat,
11834
+ setRawColor,
11835
+ onChange
11836
+ },
11837
+ children: children
11838
+ });
11839
+ };
11840
+ const useColorPickerContext = () => {
11841
+ const context = (0,external_react_namespaceObject.useContext)(ColorPickerContext);
11842
+ if (!context) {
11843
+ throw new Error('useColorPickerContext must be used within a ColorPickerProvider');
11844
+ }
11845
+ return context;
11846
+ };
11847
+ ;// ./src/components/ColorPicker/components/TabColorPalette.tsx
11848
+
11849
+
11850
+ function TabColorPalette_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
11851
+
11852
+
11853
+
11854
+ const TabColorPaletteItem = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
11855
+ target: "et6h5v0"
11856
+ } : 0)("width:28px;height:28px;border-radius:4px;cursor:pointer;border:1px solid ", ({
11857
+ theme
11858
+ }) => theme.colors.greySelectedMenuItem, ";" + ( true ? "" : 0));
11859
+ var TabColorPalette_ref = true ? {
11860
+ name: "dzb9g1",
11861
+ styles: "gap:16px;width:248px;height:240px;align-items:flex-start;align-content:flex-start;flex-wrap:wrap"
11862
+ } : 0;
11863
+ const TabColorPalette = () => {
11864
+ const {
11865
+ setRawColor,
11866
+ colorsPalette
11867
+ } = useColorPickerContext();
11868
+ const handleColorSelect = event => {
11869
+ const target = event.currentTarget;
11870
+ const selectedColor = target.getAttribute('data-color');
11871
+ if (selectedColor) {
11872
+ setRawColor(selectedColor);
11873
+ }
11874
+ };
11875
+ return (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
11876
+ css: TabColorPalette_ref,
11877
+ children: colorsPalette?.map(color => (0,jsx_runtime_namespaceObject.jsx)(TabColorPaletteItem, {
11878
+ "data-color": color,
11879
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
11880
+ backgroundColor: color
11881
+ }, true ? "" : 0, true ? "" : 0),
11882
+ onClick: handleColorSelect
11883
+ }, color))
11884
+ });
11885
+ };
11886
+ ;// external "@emotion/css"
11887
+ const css_namespaceObject = require("@emotion/css");
11770
11888
  ;// ./src/components/ColorPicker/components/BaseInput.tsx
11771
11889
 
11772
11890
  function BaseInput_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
@@ -11963,11 +12081,16 @@ const CopyButton = /*#__PURE__*/base_default()(Button_Button, true ? {
11963
12081
  }) => theme.colors.grey, ";&:hover,&:focus{background:none;box-shadow:none;&::before{display:none;}}&:hover{svg path{fill:", ({
11964
12082
  theme
11965
12083
  }) => theme.colors.greyDarker, ";}}" + ( true ? "" : 0));
11966
- ;// external "@rc-component/color-picker/assets/index.css"
11967
- const index_css_namespaceObject = require("@rc-component/color-picker/assets/index.css");
11968
- ;// ./src/components/ColorPicker/ColorPicker.tsx
11969
- function ColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
12084
+ ;// ./src/components/ColorPicker/constants.ts
12085
+ const COLOR_FORMAT = {
12086
+ hex: 'HEX',
12087
+ rgb: 'RGB',
12088
+ hsl: 'HSL'
12089
+ };
12090
+ const COLORS_PALETTE = ['#F463EA', '#BE49EC', '#9260FC', '#5B8DEC', '#4CBFFD', '#62E1F7', '#2CBB97', '#5FC855', '#99E176', '#CEEC83', '#F9F789', '#FDE47D', '#FDC67D', '#FFA069', '#FF7379'];
12091
+ ;// ./src/components/ColorPicker/components/TabColorPicker.tsx
11970
12092
 
12093
+ function TabColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
11971
12094
 
11972
12095
 
11973
12096
 
@@ -11977,51 +12100,29 @@ function ColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried t
11977
12100
 
11978
12101
 
11979
12102
 
11980
- const COLOR_FORMAT = {
11981
- hex: 'HEX',
11982
- rgb: 'RGB',
11983
- hsl: 'HSL'
11984
- };
11985
- const colorFormatter = {
11986
- hex: color => color.toHexString(),
11987
- rgb: color => color.toRgbString(),
11988
- hsl: color => color.toHslString()
11989
- };
11990
- var ColorPicker_ref = true ? {
11991
- name: "16s5rj8",
11992
- styles: "width:280px"
12103
+
12104
+
12105
+ var TabColorPicker_ref = true ? {
12106
+ name: "qsz8ux",
12107
+ styles: "width:248px;box-shadow:none;padding:0;& .rc-color-picker-slider-container{padding-left:4px;}"
11993
12108
  } : 0;
11994
- var ColorPicker_ref2 = true ? {
12109
+ var TabColorPicker_ref2 = true ? {
11995
12110
  name: "71zmeu",
11996
12111
  styles: "justify-content:space-between;gap:5px"
11997
12112
  } : 0;
11998
- const ColorPicker = ({
11999
- color: providedColor,
12000
- defaultColor,
12001
- disabledAlpha,
12002
- disabled,
12003
- format: providedFormat,
12004
- defaultFormat,
12005
- onChange
12006
- }) => {
12113
+ const TabColorPicker = () => {
12007
12114
  const theme = (0,react_namespaceObject.useTheme)();
12008
- const [format, setFormat] = (0,hooks_namespaceObject.useUncontrolled)({
12009
- value: providedFormat,
12010
- defaultValue: defaultFormat,
12011
- finalValue: 'hex'
12012
- });
12013
- const [rawColor, setRawColor] = (0,hooks_namespaceObject.useUncontrolled)({
12014
- value: providedColor,
12015
- defaultValue: defaultColor,
12016
- onChange: color => {
12017
- if (color) {
12018
- onChange?.(colorFormatter[format](new color_picker_namespaceObject.Color(color)));
12019
- }
12020
- }
12021
- });
12022
12115
  const {
12023
- copy
12024
- } = (0,hooks_namespaceObject.useClipboard)();
12116
+ rawColor,
12117
+ disabled,
12118
+ disabledAlpha,
12119
+ classnames,
12120
+ format,
12121
+ copy,
12122
+ onChange,
12123
+ setFormat,
12124
+ setRawColor
12125
+ } = useColorPickerContext();
12025
12126
  const parsedColor = rawColor ? new color_picker_namespaceObject.Color(rawColor) : undefined;
12026
12127
  const handleFormatSelect = format => {
12027
12128
  onChange?.(colorFormatter[format](new color_picker_namespaceObject.Color(rawColor)));
@@ -12046,16 +12147,17 @@ const ColorPicker = ({
12046
12147
  onChange: setRawColor,
12047
12148
  disabledAlpha: disabledAlpha,
12048
12149
  disabled: disabled,
12049
- css: ColorPicker_ref,
12150
+ css: TabColorPicker_ref,
12151
+ className: classnames?.colorPicker,
12050
12152
  panelRender: panel => (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
12051
12153
  children: [panel, (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
12052
12154
  alignItems: "center",
12053
- css: ColorPicker_ref2,
12155
+ css: TabColorPicker_ref2,
12054
12156
  children: [(0,jsx_runtime_namespaceObject.jsx)(ColorDropdown, {
12055
- className: /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
12157
+ className: [/*#__PURE__*/(0,css_namespaceObject.css)( true ? {
12056
12158
  name: "2746za",
12057
12159
  styles: "height:28px"
12058
- } : 0),
12160
+ } : 0), classnames?.colorDropdown].join(' '),
12059
12161
  selectedItem: {
12060
12162
  value: COLOR_FORMAT[format],
12061
12163
  id: format
@@ -12073,6 +12175,7 @@ const ColorPicker = ({
12073
12175
  overflow: 'hidden',
12074
12176
  alignSelf: 'stretch'
12075
12177
  }, true ? "" : 0, true ? "" : 0),
12178
+ className: classnames?.output,
12076
12179
  children: Input[format]()
12077
12180
  }), (0,jsx_runtime_namespaceObject.jsx)(CopyButton, {
12078
12181
  variant: "tertiary",
@@ -12088,6 +12191,136 @@ const ColorPicker = ({
12088
12191
  })
12089
12192
  });
12090
12193
  };
12194
+ ;// ./src/components/ColorPicker/components/TabContent.tsx
12195
+
12196
+
12197
+
12198
+
12199
+ const TabContent = () => {
12200
+ const {
12201
+ activeTab
12202
+ } = useTabBarContext();
12203
+ return (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
12204
+ children: [activeTab?.tabId === 'color-picker' && (0,jsx_runtime_namespaceObject.jsx)(TabColorPicker, {}), activeTab?.tabId === 'color-palette' && (0,jsx_runtime_namespaceObject.jsx)(TabColorPalette, {})]
12205
+ });
12206
+ };
12207
+ ;// ./src/components/ColorPicker/components/ColorPickerTrigger.tsx
12208
+ function ColorPickerTrigger_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
12209
+
12210
+
12211
+
12212
+
12213
+
12214
+
12215
+
12216
+ var ColorPickerTrigger_ref = true ? {
12217
+ name: "1ue162o",
12218
+ styles: "padding:0;height:20px;min-width:20px;font-size:16px;font-weight:500;gap:8px"
12219
+ } : 0;
12220
+ const ColorPickerTrigger = () => {
12221
+ const theme = (0,react_namespaceObject.useTheme)();
12222
+ const {
12223
+ classnames,
12224
+ rawColor,
12225
+ label
12226
+ } = useColorPickerContext();
12227
+ return (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
12228
+ asChild: true,
12229
+ className: classnames?.trigger,
12230
+ children: (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
12231
+ variant: "tertiary",
12232
+ className: classnames?.button,
12233
+ "data-testid": "color-picker-trigger",
12234
+ css: ColorPickerTrigger_ref,
12235
+ startIcon: (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
12236
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
12237
+ width: 20,
12238
+ height: 20,
12239
+ background: rawColor && new color_picker_namespaceObject.Color(rawColor).toRgbString(),
12240
+ borderRadius: 4,
12241
+ border: `1px solid ${theme.colors.greySelectedMenuItem}`,
12242
+ '&:hover': {
12243
+ border: `1px solid ${theme.colors.grey}`
12244
+ },
12245
+ '&:active': {
12246
+ border: `1px solid ${theme.colors.greyBackground}`
12247
+ }
12248
+ }, true ? "" : 0, true ? "" : 0)
12249
+ }),
12250
+ children: label
12251
+ })
12252
+ });
12253
+ };
12254
+ ;// external "@rc-component/color-picker/assets/index.css"
12255
+ const index_css_namespaceObject = require("@rc-component/color-picker/assets/index.css");
12256
+ ;// ./src/components/ColorPicker/ColorPicker.tsx
12257
+ function ColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
12258
+
12259
+
12260
+
12261
+
12262
+
12263
+
12264
+
12265
+
12266
+
12267
+ var ColorPicker_ref = true ? {
12268
+ name: "dl37cv",
12269
+ styles: "gap:16px;padding:16px;border-radius:8px;box-shadow:0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05)"
12270
+ } : 0;
12271
+ var ColorPicker_ref2 = true ? {
12272
+ name: "xyzkeb",
12273
+ styles: "align-self:flex-start"
12274
+ } : 0;
12275
+ const ColorPicker = ({
12276
+ color: providedColor,
12277
+ format: providedFormat,
12278
+ colorsPalette = COLORS_PALETTE,
12279
+ ...rest
12280
+ }) => {
12281
+ const tabsConfig = {
12282
+ colorPalette: {
12283
+ tabId: 'color-palette',
12284
+ ariaControls: 'color-palette-panel',
12285
+ text: 'General',
12286
+ renderContent: TabColorPalette
12287
+ },
12288
+ colorPicker: {
12289
+ tabId: 'color-picker',
12290
+ ariaControls: 'color-picker-panel',
12291
+ text: 'Custom',
12292
+ renderContent: TabColorPicker
12293
+ }
12294
+ };
12295
+ return (0,jsx_runtime_namespaceObject.jsx)(TabBarContextProvider, {
12296
+ initialTab: {
12297
+ tabId: tabsConfig.colorPalette.tabId,
12298
+ renderContent: tabsConfig.colorPalette.renderContent
12299
+ },
12300
+ children: (0,jsx_runtime_namespaceObject.jsx)(ColorPickerProvider, {
12301
+ providedColor: providedColor,
12302
+ providedFormat: providedFormat,
12303
+ colorsPalette: colorsPalette,
12304
+ ...rest,
12305
+ children: (0,jsx_runtime_namespaceObject.jsxs)(Popover, {
12306
+ interactionsEnabled: 'click',
12307
+ placement: 'top-start',
12308
+ children: [(0,jsx_runtime_namespaceObject.jsx)(ColorPickerTrigger, {}), (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
12309
+ css: ColorPicker_ref,
12310
+ className: rest.classnames?.content,
12311
+ children: [(0,jsx_runtime_namespaceObject.jsxs)(TabBar_TabBar, {
12312
+ css: ColorPicker_ref2,
12313
+ children: [(0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
12314
+ ...tabsConfig.colorPalette
12315
+ }), (0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
12316
+ ...tabsConfig.colorPicker
12317
+ })]
12318
+ }), (0,jsx_runtime_namespaceObject.jsx)(TabContent, {})]
12319
+ })]
12320
+ })
12321
+ })
12322
+ });
12323
+ };
12091
12324
  ;// ./src/components/ColorPicker/index.ts
12092
12325
 
12093
12326
  ;// ./src/components/DatePicker/constants.ts