@ssa-ui-kit/core 2.18.3 → 2.19.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.
@@ -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,12 +8175,13 @@ 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;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);
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;&: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);
8177
8179
  ;// ./src/components/ButtonGroup/ButtonGroup.tsx
8178
8180
 
8179
8181
 
8180
8182
 
8181
8183
 
8184
+
8182
8185
  const ButtonGroup = ({
8183
8186
  items,
8184
8187
  buttonStyles,
@@ -8206,7 +8209,10 @@ const ButtonGroup = ({
8206
8209
  onClick: handleClick(item),
8207
8210
  css: [ButtonItem, buttonStyles, true ? "" : 0, true ? "" : 0],
8208
8211
  className: isActive ? 'active' : '',
8209
- children: item.text
8212
+ children: (0,jsx_runtime_namespaceObject.jsx)(Typography_Typography, {
8213
+ variant: "body1",
8214
+ children: item.text
8215
+ })
8210
8216
  }, item.id);
8211
8217
  })
8212
8218
  });
@@ -11758,11 +11764,131 @@ const CollapsibleNavBarCustomIconSVG = ({
11758
11764
 
11759
11765
 
11760
11766
 
11761
- ;// external "@emotion/css"
11762
- const css_namespaceObject = require("@emotion/css");
11763
11767
  ;// external "@rc-component/color-picker"
11764
11768
  const color_picker_namespaceObject = require("@rc-component/color-picker");
11765
11769
  var color_picker_default = /*#__PURE__*/__webpack_require__.n(color_picker_namespaceObject);
11770
+ ;// ./src/components/ColorPicker/utils.ts
11771
+ const colorFormatter = {
11772
+ hex: color => color.toHexString(),
11773
+ rgb: color => color.toRgbString(),
11774
+ hsl: color => color.toHslString()
11775
+ };
11776
+ ;// ./src/components/ColorPicker/ColorPickerContext.tsx
11777
+
11778
+
11779
+
11780
+
11781
+
11782
+ const ColorPickerContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({
11783
+ format: 'hex',
11784
+ rawColor: undefined,
11785
+ copy() {
11786
+ // no-op
11787
+ },
11788
+ setFormat() {
11789
+ // no-op
11790
+ },
11791
+ setRawColor() {
11792
+ // no-op
11793
+ }
11794
+ });
11795
+ const ColorPickerProvider = ({
11796
+ children,
11797
+ providedColor,
11798
+ providedFormat,
11799
+ defaultColor,
11800
+ defaultFormat,
11801
+ classnames,
11802
+ disabledAlpha,
11803
+ disabled,
11804
+ label,
11805
+ colorsPalette,
11806
+ onChange
11807
+ }) => {
11808
+ const {
11809
+ copy
11810
+ } = (0,hooks_namespaceObject.useClipboard)();
11811
+ const [format, setFormat] = (0,hooks_namespaceObject.useUncontrolled)({
11812
+ value: providedFormat,
11813
+ defaultValue: defaultFormat,
11814
+ finalValue: 'hex'
11815
+ });
11816
+ const [rawColor, setRawColor] = (0,hooks_namespaceObject.useUncontrolled)({
11817
+ value: providedColor,
11818
+ defaultValue: defaultColor,
11819
+ onChange: color => {
11820
+ if (color) {
11821
+ onChange?.(colorFormatter[format](new color_picker_namespaceObject.Color(color)));
11822
+ }
11823
+ }
11824
+ });
11825
+ return (0,jsx_runtime_namespaceObject.jsx)(ColorPickerContext.Provider, {
11826
+ value: {
11827
+ defaultColor,
11828
+ defaultFormat,
11829
+ format,
11830
+ rawColor,
11831
+ classnames,
11832
+ disabledAlpha,
11833
+ disabled,
11834
+ label,
11835
+ colorsPalette,
11836
+ copy,
11837
+ setFormat,
11838
+ setRawColor,
11839
+ onChange
11840
+ },
11841
+ children: children
11842
+ });
11843
+ };
11844
+ const useColorPickerContext = () => {
11845
+ const context = (0,external_react_namespaceObject.useContext)(ColorPickerContext);
11846
+ if (!context) {
11847
+ throw new Error('useColorPickerContext must be used within a ColorPickerProvider');
11848
+ }
11849
+ return context;
11850
+ };
11851
+ ;// ./src/components/ColorPicker/components/TabColorPalette.tsx
11852
+
11853
+
11854
+ 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)."; }
11855
+
11856
+
11857
+
11858
+ const TabColorPaletteItem = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
11859
+ target: "et6h5v0"
11860
+ } : 0)("width:28px;height:28px;border-radius:4px;cursor:pointer;border:1px solid ", ({
11861
+ theme
11862
+ }) => theme.colors.greySelectedMenuItem, ";" + ( true ? "" : 0));
11863
+ var TabColorPalette_ref = true ? {
11864
+ name: "dzb9g1",
11865
+ styles: "gap:16px;width:248px;height:240px;align-items:flex-start;align-content:flex-start;flex-wrap:wrap"
11866
+ } : 0;
11867
+ const TabColorPalette = () => {
11868
+ const {
11869
+ setRawColor,
11870
+ colorsPalette
11871
+ } = useColorPickerContext();
11872
+ const handleColorSelect = event => {
11873
+ const target = event.currentTarget;
11874
+ const selectedColor = target.getAttribute('data-color');
11875
+ if (selectedColor) {
11876
+ setRawColor(selectedColor);
11877
+ }
11878
+ };
11879
+ return (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
11880
+ css: TabColorPalette_ref,
11881
+ children: colorsPalette?.map(color => (0,jsx_runtime_namespaceObject.jsx)(TabColorPaletteItem, {
11882
+ "data-color": color,
11883
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
11884
+ backgroundColor: color
11885
+ }, true ? "" : 0, true ? "" : 0),
11886
+ onClick: handleColorSelect
11887
+ }, color))
11888
+ });
11889
+ };
11890
+ ;// external "@emotion/css"
11891
+ const css_namespaceObject = require("@emotion/css");
11766
11892
  ;// ./src/components/ColorPicker/components/BaseInput.tsx
11767
11893
 
11768
11894
  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)."; }
@@ -11959,11 +12085,16 @@ const CopyButton = /*#__PURE__*/base_default()(Button_Button, true ? {
11959
12085
  }) => theme.colors.grey, ";&:hover,&:focus{background:none;box-shadow:none;&::before{display:none;}}&:hover{svg path{fill:", ({
11960
12086
  theme
11961
12087
  }) => theme.colors.greyDarker, ";}}" + ( true ? "" : 0));
11962
- ;// external "@rc-component/color-picker/assets/index.css"
11963
- const index_css_namespaceObject = require("@rc-component/color-picker/assets/index.css");
11964
- ;// ./src/components/ColorPicker/ColorPicker.tsx
11965
- 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)."; }
12088
+ ;// ./src/components/ColorPicker/constants.ts
12089
+ const COLOR_FORMAT = {
12090
+ hex: 'HEX',
12091
+ rgb: 'RGB',
12092
+ hsl: 'HSL'
12093
+ };
12094
+ const COLORS_PALETTE = ['#F463EA', '#BE49EC', '#9260FC', '#5B8DEC', '#4CBFFD', '#62E1F7', '#2CBB97', '#5FC855', '#99E176', '#CEEC83', '#F9F789', '#FDE47D', '#FDC67D', '#FFA069', '#FF7379'];
12095
+ ;// ./src/components/ColorPicker/components/TabColorPicker.tsx
11966
12096
 
12097
+ 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)."; }
11967
12098
 
11968
12099
 
11969
12100
 
@@ -11973,51 +12104,29 @@ function ColorPicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried t
11973
12104
 
11974
12105
 
11975
12106
 
11976
- const COLOR_FORMAT = {
11977
- hex: 'HEX',
11978
- rgb: 'RGB',
11979
- hsl: 'HSL'
11980
- };
11981
- const colorFormatter = {
11982
- hex: color => color.toHexString(),
11983
- rgb: color => color.toRgbString(),
11984
- hsl: color => color.toHslString()
11985
- };
11986
- var ColorPicker_ref = true ? {
11987
- name: "16s5rj8",
11988
- styles: "width:280px"
12107
+
12108
+
12109
+ var TabColorPicker_ref = true ? {
12110
+ name: "qsz8ux",
12111
+ styles: "width:248px;box-shadow:none;padding:0;& .rc-color-picker-slider-container{padding-left:4px;}"
11989
12112
  } : 0;
11990
- var ColorPicker_ref2 = true ? {
12113
+ var TabColorPicker_ref2 = true ? {
11991
12114
  name: "71zmeu",
11992
12115
  styles: "justify-content:space-between;gap:5px"
11993
12116
  } : 0;
11994
- const ColorPicker = ({
11995
- color: providedColor,
11996
- defaultColor,
11997
- disabledAlpha,
11998
- disabled,
11999
- format: providedFormat,
12000
- defaultFormat,
12001
- onChange
12002
- }) => {
12117
+ const TabColorPicker = () => {
12003
12118
  const theme = (0,react_namespaceObject.useTheme)();
12004
- const [format, setFormat] = (0,hooks_namespaceObject.useUncontrolled)({
12005
- value: providedFormat,
12006
- defaultValue: defaultFormat,
12007
- finalValue: 'hex'
12008
- });
12009
- const [rawColor, setRawColor] = (0,hooks_namespaceObject.useUncontrolled)({
12010
- value: providedColor,
12011
- defaultValue: defaultColor,
12012
- onChange: color => {
12013
- if (color) {
12014
- onChange?.(colorFormatter[format](new color_picker_namespaceObject.Color(color)));
12015
- }
12016
- }
12017
- });
12018
12119
  const {
12019
- copy
12020
- } = (0,hooks_namespaceObject.useClipboard)();
12120
+ rawColor,
12121
+ disabled,
12122
+ disabledAlpha,
12123
+ classnames,
12124
+ format,
12125
+ copy,
12126
+ onChange,
12127
+ setFormat,
12128
+ setRawColor
12129
+ } = useColorPickerContext();
12021
12130
  const parsedColor = rawColor ? new color_picker_namespaceObject.Color(rawColor) : undefined;
12022
12131
  const handleFormatSelect = format => {
12023
12132
  onChange?.(colorFormatter[format](new color_picker_namespaceObject.Color(rawColor)));
@@ -12042,16 +12151,17 @@ const ColorPicker = ({
12042
12151
  onChange: setRawColor,
12043
12152
  disabledAlpha: disabledAlpha,
12044
12153
  disabled: disabled,
12045
- css: ColorPicker_ref,
12154
+ css: TabColorPicker_ref,
12155
+ className: classnames?.colorPicker,
12046
12156
  panelRender: panel => (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
12047
12157
  children: [panel, (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
12048
12158
  alignItems: "center",
12049
- css: ColorPicker_ref2,
12159
+ css: TabColorPicker_ref2,
12050
12160
  children: [(0,jsx_runtime_namespaceObject.jsx)(ColorDropdown, {
12051
- className: /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
12161
+ className: [/*#__PURE__*/(0,css_namespaceObject.css)( true ? {
12052
12162
  name: "2746za",
12053
12163
  styles: "height:28px"
12054
- } : 0),
12164
+ } : 0), classnames?.colorDropdown].join(' '),
12055
12165
  selectedItem: {
12056
12166
  value: COLOR_FORMAT[format],
12057
12167
  id: format
@@ -12069,6 +12179,7 @@ const ColorPicker = ({
12069
12179
  overflow: 'hidden',
12070
12180
  alignSelf: 'stretch'
12071
12181
  }, true ? "" : 0, true ? "" : 0),
12182
+ className: classnames?.output,
12072
12183
  children: Input[format]()
12073
12184
  }), (0,jsx_runtime_namespaceObject.jsx)(CopyButton, {
12074
12185
  variant: "tertiary",
@@ -12084,6 +12195,136 @@ const ColorPicker = ({
12084
12195
  })
12085
12196
  });
12086
12197
  };
12198
+ ;// ./src/components/ColorPicker/components/TabContent.tsx
12199
+
12200
+
12201
+
12202
+
12203
+ const TabContent = () => {
12204
+ const {
12205
+ activeTab
12206
+ } = useTabBarContext();
12207
+ return (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
12208
+ children: [activeTab?.tabId === 'color-picker' && (0,jsx_runtime_namespaceObject.jsx)(TabColorPicker, {}), activeTab?.tabId === 'color-palette' && (0,jsx_runtime_namespaceObject.jsx)(TabColorPalette, {})]
12209
+ });
12210
+ };
12211
+ ;// ./src/components/ColorPicker/components/ColorPickerTrigger.tsx
12212
+ 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)."; }
12213
+
12214
+
12215
+
12216
+
12217
+
12218
+
12219
+
12220
+ var ColorPickerTrigger_ref = true ? {
12221
+ name: "1ue162o",
12222
+ styles: "padding:0;height:20px;min-width:20px;font-size:16px;font-weight:500;gap:8px"
12223
+ } : 0;
12224
+ const ColorPickerTrigger = () => {
12225
+ const theme = (0,react_namespaceObject.useTheme)();
12226
+ const {
12227
+ classnames,
12228
+ rawColor,
12229
+ label
12230
+ } = useColorPickerContext();
12231
+ return (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
12232
+ asChild: true,
12233
+ className: classnames?.trigger,
12234
+ children: (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
12235
+ variant: "tertiary",
12236
+ className: classnames?.button,
12237
+ "data-testid": "color-picker-trigger",
12238
+ css: ColorPickerTrigger_ref,
12239
+ startIcon: (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
12240
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
12241
+ width: 20,
12242
+ height: 20,
12243
+ background: rawColor && new color_picker_namespaceObject.Color(rawColor).toRgbString(),
12244
+ borderRadius: 4,
12245
+ border: `1px solid ${theme.colors.greySelectedMenuItem}`,
12246
+ '&:hover': {
12247
+ border: `1px solid ${theme.colors.grey}`
12248
+ },
12249
+ '&:active': {
12250
+ border: `1px solid ${theme.colors.greyBackground}`
12251
+ }
12252
+ }, true ? "" : 0, true ? "" : 0)
12253
+ }),
12254
+ children: label
12255
+ })
12256
+ });
12257
+ };
12258
+ ;// external "@rc-component/color-picker/assets/index.css"
12259
+ const index_css_namespaceObject = require("@rc-component/color-picker/assets/index.css");
12260
+ ;// ./src/components/ColorPicker/ColorPicker.tsx
12261
+ 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)."; }
12262
+
12263
+
12264
+
12265
+
12266
+
12267
+
12268
+
12269
+
12270
+
12271
+ var ColorPicker_ref = true ? {
12272
+ name: "dl37cv",
12273
+ 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)"
12274
+ } : 0;
12275
+ var ColorPicker_ref2 = true ? {
12276
+ name: "xyzkeb",
12277
+ styles: "align-self:flex-start"
12278
+ } : 0;
12279
+ const ColorPicker = ({
12280
+ color: providedColor,
12281
+ format: providedFormat,
12282
+ colorsPalette = COLORS_PALETTE,
12283
+ ...rest
12284
+ }) => {
12285
+ const tabsConfig = {
12286
+ colorPalette: {
12287
+ tabId: 'color-palette',
12288
+ ariaControls: 'color-palette-panel',
12289
+ text: 'General',
12290
+ renderContent: TabColorPalette
12291
+ },
12292
+ colorPicker: {
12293
+ tabId: 'color-picker',
12294
+ ariaControls: 'color-picker-panel',
12295
+ text: 'Custom',
12296
+ renderContent: TabColorPicker
12297
+ }
12298
+ };
12299
+ return (0,jsx_runtime_namespaceObject.jsx)(TabBarContextProvider, {
12300
+ initialTab: {
12301
+ tabId: tabsConfig.colorPalette.tabId,
12302
+ renderContent: tabsConfig.colorPalette.renderContent
12303
+ },
12304
+ children: (0,jsx_runtime_namespaceObject.jsx)(ColorPickerProvider, {
12305
+ providedColor: providedColor,
12306
+ providedFormat: providedFormat,
12307
+ colorsPalette: colorsPalette,
12308
+ ...rest,
12309
+ children: (0,jsx_runtime_namespaceObject.jsxs)(Popover, {
12310
+ interactionsEnabled: 'click',
12311
+ placement: 'top-start',
12312
+ children: [(0,jsx_runtime_namespaceObject.jsx)(ColorPickerTrigger, {}), (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
12313
+ css: ColorPicker_ref,
12314
+ className: rest.classnames?.content,
12315
+ children: [(0,jsx_runtime_namespaceObject.jsxs)(TabBar_TabBar, {
12316
+ css: ColorPicker_ref2,
12317
+ children: [(0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
12318
+ ...tabsConfig.colorPalette
12319
+ }), (0,jsx_runtime_namespaceObject.jsx)(Tab_Tab, {
12320
+ ...tabsConfig.colorPicker
12321
+ })]
12322
+ }), (0,jsx_runtime_namespaceObject.jsx)(TabContent, {})]
12323
+ })]
12324
+ })
12325
+ })
12326
+ });
12327
+ };
12087
12328
  ;// ./src/components/ColorPicker/index.ts
12088
12329
 
12089
12330
  ;// ./src/components/DatePicker/constants.ts