gd-design-library 1.7.2 → 1.8.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/ai/testing_prompts/molecular_prompts.md +155 -0
- package/components/atoms/Avatar/Avatar.d.ts +6 -3
- package/components/atoms/Avatar/Avatar.js +25 -22
- package/components/atoms/Avatar/AvatarStyled.js +1 -1
- package/components/atoms/Button/Button.js +8 -8
- package/components/atoms/Input/Input.d.ts +1 -1
- package/components/atoms/Input/constants.js +1 -1
- package/components/atoms/Input/useInputHandlers.js +5 -5
- package/components/atoms/Link/Link.js +6 -6
- package/components/atoms/Loader/Loader.js +9 -9
- package/components/atoms/Select/Select.js +5 -5
- package/components/layout/ChatContainer/ChatContainer.js +1 -1
- package/components/layout/ChatContainer/ChatContainerStyled.js +4 -4
- package/components/molecules/AvatarUser/AvatarUser.d.ts +1 -1
- package/components/molecules/AvatarUser/AvatarUser.js +1 -1
- package/components/molecules/Counter/Counter.js +6 -6
- package/components/molecules/Counter/CounterStyled.js +1 -1
- package/components/molecules/DropdownItem/DropdownItem.js +1 -1
- package/components/molecules/Form/utils.js +5 -5
- package/components/molecules/Menu/Menu.js +12 -12
- package/components/molecules/Snackbar/SnackbarStyled.js +6 -6
- package/components/molecules/Tabs/TabsStyled.js +3 -3
- package/components/molecules/index.d.ts +1 -0
- package/components/organisms/Chart/ChartCartesian.js +72 -83
- package/components/organisms/Chart/ChartPie.js +16 -17
- package/components/organisms/Chart/useChartTheme.d.ts +45 -45
- package/package.json +2 -8
- package/_virtual/Area.js +0 -7
- package/_virtual/Area2.js +0 -4
- package/_virtual/D3ShapeFactories.js +0 -4
- package/_virtual/GridColumns.js +0 -7
- package/_virtual/GridColumns2.js +0 -4
- package/_virtual/GridRows.js +0 -7
- package/_virtual/GridRows2.js +0 -4
- package/_virtual/Line.js +0 -4
- package/_virtual/LinePath.js +0 -7
- package/_virtual/LinePath2.js +0 -4
- package/_virtual/ParentSize.js +0 -7
- package/_virtual/ParentSize2.js +0 -4
- package/_virtual/_commonjsHelpers.js +0 -28
- package/_virtual/accessors.js +0 -5
- package/_virtual/accessors2.js +0 -4
- package/_virtual/align.js +0 -4
- package/_virtual/array.js +0 -4
- package/_virtual/array2.js +0 -4
- package/_virtual/ascending.js +0 -4
- package/_virtual/band.js +0 -4
- package/_virtual/base.js +0 -4
- package/_virtual/basis.js +0 -4
- package/_virtual/basisClosed.js +0 -4
- package/_virtual/bin.js +0 -4
- package/_virtual/bisect.js +0 -4
- package/_virtual/bisector.js +0 -4
- package/_virtual/blur.js +0 -4
- package/_virtual/clamp.js +0 -4
- package/_virtual/color.js +0 -4
- package/_virtual/color2.js +0 -4
- package/_virtual/constant.js +0 -4
- package/_virtual/constant2.js +0 -4
- package/_virtual/constant3.js +0 -4
- package/_virtual/constant4.js +0 -4
- package/_virtual/continuous.js +0 -4
- package/_virtual/count.js +0 -4
- package/_virtual/createColorInterpolator.js +0 -4
- package/_virtual/cross.js +0 -4
- package/_virtual/cubehelix.js +0 -4
- package/_virtual/cubehelix2.js +0 -4
- package/_virtual/cumsum.js +0 -4
- package/_virtual/date.js +0 -4
- package/_virtual/day.js +0 -4
- package/_virtual/debounce.js +0 -7
- package/_virtual/decompose.js +0 -4
- package/_virtual/defaultLocale.js +0 -4
- package/_virtual/defaultLocale2.js +0 -4
- package/_virtual/define.js +0 -4
- package/_virtual/descending.js +0 -4
- package/_virtual/deviation.js +0 -4
- package/_virtual/difference.js +0 -4
- package/_virtual/discrete.js +0 -4
- package/_virtual/disjoint.js +0 -4
- package/_virtual/diverging.js +0 -4
- package/_virtual/domain.js +0 -4
- package/_virtual/duration.js +0 -4
- package/_virtual/every.js +0 -4
- package/_virtual/exponent.js +0 -4
- package/_virtual/exponent2.js +0 -4
- package/_virtual/extent.js +0 -4
- package/_virtual/filter.js +0 -4
- package/_virtual/formatDecimal.js +0 -4
- package/_virtual/formatGroup.js +0 -4
- package/_virtual/formatNumerals.js +0 -4
- package/_virtual/formatPrefixAuto.js +0 -4
- package/_virtual/formatRounded.js +0 -4
- package/_virtual/formatSpecifier.js +0 -4
- package/_virtual/formatTrim.js +0 -4
- package/_virtual/formatTypes.js +0 -4
- package/_virtual/freedmanDiaconis.js +0 -4
- package/_virtual/fsum.js +0 -4
- package/_virtual/getBandwidth.js +0 -7
- package/_virtual/getBandwidth2.js +0 -4
- package/_virtual/getScaleBandwidth.js +0 -4
- package/_virtual/greatest.js +0 -4
- package/_virtual/greatestIndex.js +0 -4
- package/_virtual/group.js +0 -4
- package/_virtual/groupSort.js +0 -4
- package/_virtual/hcl.js +0 -4
- package/_virtual/hour.js +0 -4
- package/_virtual/hsl.js +0 -4
- package/_virtual/hue.js +0 -4
- package/_virtual/identity.js +0 -4
- package/_virtual/identity2.js +0 -4
- package/_virtual/identity3.js +0 -4
- package/_virtual/index.js +0 -7
- package/_virtual/index10.js +0 -6
- package/_virtual/index11.js +0 -7
- package/_virtual/index12.js +0 -4
- package/_virtual/index13.js +0 -4
- package/_virtual/index14.js +0 -4
- package/_virtual/index15.js +0 -4
- package/_virtual/index16.js +0 -4
- package/_virtual/index17.js +0 -4
- package/_virtual/index18.js +0 -4
- package/_virtual/index19.js +0 -4
- package/_virtual/index2.js +0 -7
- package/_virtual/index3.js +0 -4
- package/_virtual/index4.js +0 -4
- package/_virtual/index5.js +0 -6
- package/_virtual/index6.js +0 -6
- package/_virtual/index7.js +0 -6
- package/_virtual/index8.js +0 -4
- package/_virtual/index9.js +0 -4
- package/_virtual/init.js +0 -4
- package/_virtual/interpolate.js +0 -4
- package/_virtual/intersection.js +0 -4
- package/_virtual/interval.js +0 -4
- package/_virtual/isUtcScale.js +0 -4
- package/_virtual/isoFormat.js +0 -4
- package/_virtual/isoParse.js +0 -4
- package/_virtual/lab.js +0 -4
- package/_virtual/lab2.js +0 -4
- package/_virtual/least.js +0 -4
- package/_virtual/leastIndex.js +0 -4
- package/_virtual/linear.js +0 -4
- package/_virtual/locale.js +0 -4
- package/_virtual/locale2.js +0 -4
- package/_virtual/log.js +0 -4
- package/_virtual/map.js +0 -4
- package/_virtual/math.js +0 -4
- package/_virtual/max.js +0 -4
- package/_virtual/maxIndex.js +0 -4
- package/_virtual/mean.js +0 -4
- package/_virtual/median.js +0 -4
- package/_virtual/memoize.js +0 -7
- package/_virtual/merge.js +0 -4
- package/_virtual/millisecond.js +0 -4
- package/_virtual/min.js +0 -4
- package/_virtual/minIndex.js +0 -4
- package/_virtual/minute.js +0 -4
- package/_virtual/mode.js +0 -4
- package/_virtual/month.js +0 -4
- package/_virtual/nice.js +0 -4
- package/_virtual/nice2.js +0 -4
- package/_virtual/nice3.js +0 -4
- package/_virtual/number.js +0 -4
- package/_virtual/number2.js +0 -4
- package/_virtual/number3.js +0 -4
- package/_virtual/numberArray.js +0 -4
- package/_virtual/object.js +0 -4
- package/_virtual/ordinal.js +0 -7
- package/_virtual/ordinal2.js +0 -4
- package/_virtual/ordinal3.js +0 -4
- package/_virtual/padding.js +0 -4
- package/_virtual/pairs.js +0 -4
- package/_virtual/parse.js +0 -4
- package/_virtual/permute.js +0 -4
- package/_virtual/piecewise.js +0 -4
- package/_virtual/pow.js +0 -4
- package/_virtual/precisionFixed.js +0 -4
- package/_virtual/precisionPrefix.js +0 -4
- package/_virtual/precisionRound.js +0 -4
- package/_virtual/quantile.js +0 -4
- package/_virtual/quantile2.js +0 -4
- package/_virtual/quantize.js +0 -4
- package/_virtual/quantize2.js +0 -4
- package/_virtual/quickselect.js +0 -4
- package/_virtual/radial.js +0 -4
- package/_virtual/range.js +0 -4
- package/_virtual/range2.js +0 -4
- package/_virtual/rank.js +0 -4
- package/_virtual/react-is.development.js +0 -4
- package/_virtual/react-is.production.min.js +0 -4
- package/_virtual/reduce.js +0 -4
- package/_virtual/reverse.js +0 -4
- package/_virtual/reverse2.js +0 -4
- package/_virtual/rgb.js +0 -4
- package/_virtual/round.js +0 -4
- package/_virtual/round2.js +0 -4
- package/_virtual/scaleOperator.js +0 -4
- package/_virtual/scan.js +0 -4
- package/_virtual/scott.js +0 -4
- package/_virtual/second.js +0 -4
- package/_virtual/sequential.js +0 -4
- package/_virtual/sequentialQuantile.js +0 -4
- package/_virtual/setNumberOrNumberAccessor.js +0 -4
- package/_virtual/shuffle.js +0 -4
- package/_virtual/some.js +0 -4
- package/_virtual/sort.js +0 -4
- package/_virtual/stackOffset.js +0 -7
- package/_virtual/stackOffset2.js +0 -4
- package/_virtual/stackOrder.js +0 -7
- package/_virtual/stackOrder2.js +0 -4
- package/_virtual/string.js +0 -4
- package/_virtual/sturges.js +0 -4
- package/_virtual/subset.js +0 -4
- package/_virtual/sum.js +0 -4
- package/_virtual/superset.js +0 -4
- package/_virtual/symlog.js +0 -4
- package/_virtual/threshold.js +0 -4
- package/_virtual/tickFormat.js +0 -4
- package/_virtual/ticks.js +0 -4
- package/_virtual/ticks2.js +0 -4
- package/_virtual/time.js +0 -4
- package/_virtual/transpose.js +0 -4
- package/_virtual/union.js +0 -4
- package/_virtual/unknown.js +0 -4
- package/_virtual/useParentSize.js +0 -4
- package/_virtual/utcTime.js +0 -4
- package/_virtual/value.js +0 -4
- package/_virtual/variance.js +0 -4
- package/_virtual/week.js +0 -4
- package/_virtual/year.js +0 -4
- package/_virtual/zero.js +0 -4
- package/_virtual/zip.js +0 -4
- package/_virtual/zoom.js +0 -4
- /package/ai/{testing_promts/atomic_promts.md → testing_prompts/atomic_prompts.md} +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Molecular Component Testing Prompts
|
|
2
|
+
|
|
3
|
+
## PROMPT FOR ACCORDION
|
|
4
|
+
|
|
5
|
+
Generate default Accordion with 2 titles: one already opened with title = 'Cappuccino', the second closed with title = 'Latte' containing 1–2 sentences about coffee.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## PROMPT FOR BREADCRUMBS
|
|
10
|
+
|
|
11
|
+
Generate breadcrumbs with string separator = `|`, content = 'product', 'home', 'category', and with an information icon at the end, colored with border.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## PROMPT FOR COUNTER
|
|
16
|
+
|
|
17
|
+
Generate 2 different counters:
|
|
18
|
+
|
|
19
|
+
1. Simple counter with initial value = 5, min = 0, and max = 20
|
|
20
|
+
2. Disabled counter with initial value = 25
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## PROMPT FOR DROPDOWN
|
|
25
|
+
|
|
26
|
+
Generate 2 different dropdowns:
|
|
27
|
+
|
|
28
|
+
1. Simple dropdown with 2 options: 'drop' and 'down'
|
|
29
|
+
2. Dropdown with checkboxes: 'drop' and 'up'
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## PROMPT FOR FORM
|
|
34
|
+
|
|
35
|
+
Generate a complete form containing the following components:
|
|
36
|
+
|
|
37
|
+
- Input with email variant/type
|
|
38
|
+
- Input with password variant/type
|
|
39
|
+
- Checkbox input with label = 'Remember me'
|
|
40
|
+
- Radio input group with options = 'yes', 'no', 'maybe'
|
|
41
|
+
- Submit button with text = 'Submit data'
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## PROMPT FOR INLINE NOTIFICATION
|
|
46
|
+
|
|
47
|
+
Generate 3 types of inline notifications:
|
|
48
|
+
|
|
49
|
+
1. Default inline notification with text: 'Default InlineNotification'
|
|
50
|
+
2. Inline notification with text: 'Info InlineNotification'
|
|
51
|
+
3. Warning inline notification
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## PROMPT FOR LIST
|
|
56
|
+
|
|
57
|
+
Generate list component with 3 list items: 'Item1', 'Item2', 'Item3'.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## PROMPT FOR MENU
|
|
62
|
+
|
|
63
|
+
Generate menu component with 3 items inside it: 'Open', 'Close', 'Profile'.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## PROMPT FOR PRICE
|
|
68
|
+
|
|
69
|
+
Generate 3 different types of price:
|
|
70
|
+
|
|
71
|
+
1. Default price = 50 with decimals, size small
|
|
72
|
+
2. With old price: new = 120, old = 300, European convention, size medium
|
|
73
|
+
3. Free price, old one is 300, size large
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## PROMPT FOR PROGRESSBAR
|
|
78
|
+
|
|
79
|
+
Generate 2 different types of progress bar:
|
|
80
|
+
|
|
81
|
+
1. Default progress bar with value = 20 and percentage text displayed on it
|
|
82
|
+
2. Progress bar with value = 50, no percentage displayed
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## PROMPT FOR RADIOGROUP
|
|
87
|
+
|
|
88
|
+
Generate 3 different radio groups:
|
|
89
|
+
|
|
90
|
+
1. Default radio group with 5 basic options, where the second option is disabled and with a pre-selected `defaultValue` = 3
|
|
91
|
+
2. Color picker using the 'grid' variant with `gridColumns` = 3 and `gridColumnGutter`
|
|
92
|
+
3. Visual image picker where options contain an `image` URL and `tooltip`
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## PROMPT FOR RATING
|
|
97
|
+
|
|
98
|
+
Generate 3 different ratings:
|
|
99
|
+
|
|
100
|
+
1. Default interactive rating with a pre-selected `defaultValue` = 3
|
|
101
|
+
2. Read-only rating with a fractional value = 4.5 and size = 'lg'
|
|
102
|
+
3. Rating with max = 10, value = 7, size = 'sm', with custom color = #FF0000
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## PROMPT FOR SNACKBAR
|
|
107
|
+
|
|
108
|
+
Generate a component with 4 buttons that trigger different snackbars using the `showSnackbar` function:
|
|
109
|
+
|
|
110
|
+
1. Success snackbar with title = 'Saved' and a short duration of 3000ms
|
|
111
|
+
2. Persistent error snackbar (duration = 0, dismissOnClick = false) containing an 'action' button 'Retry'
|
|
112
|
+
3. Warning snackbar with the 'colored' property enabled (filled background)
|
|
113
|
+
4. Info snackbar that overrides the default icon with a custom icon
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## PROMPT FOR STEPPER
|
|
118
|
+
|
|
119
|
+
Generate 3 different steppers:
|
|
120
|
+
|
|
121
|
+
1. Default checkout stepper with 4 steps ('Cart', 'Shipping', 'Payment', 'Review') where activeStep = 1
|
|
122
|
+
2. Stepper displaying validation states: first step has validationStatus = 'success', second step has validationStatus = 'error', and activeStep = 2
|
|
123
|
+
3. Icons view stepper (`isIconsView` = true) with 3 steps
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## PROMPT FOR TABLE
|
|
128
|
+
|
|
129
|
+
Generate 4 different tables:
|
|
130
|
+
|
|
131
|
+
1. Basic table where the first column has a fixed width of '200px' and the second has a width of '15%', using a small dataset
|
|
132
|
+
2. Table with expandable rows (`expandableRows` = true) that renders a custom Box with text inside `renderExpandedContent`
|
|
133
|
+
3. Table with stickyHeader and sticky footer including a generated large dataset of 30 items
|
|
134
|
+
4. Table in a loading state (`loading` = true) that displays a custom `loadingState` using Skeleton components instead of data
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## PROMPT FOR TABS
|
|
139
|
+
|
|
140
|
+
Generate 3 different tabs:
|
|
141
|
+
|
|
142
|
+
1. Default tabs with 3 items ('Overview', 'Details', 'Reviews') where activeTab = 1
|
|
143
|
+
2. Tabs where one of the items has a noticeCounter = 3
|
|
144
|
+
3. Tabs where the last item is disabled
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## PROMPT FOR TOOLTIP
|
|
149
|
+
|
|
150
|
+
Generate 2 different tooltips:
|
|
151
|
+
|
|
152
|
+
1. Default tooltip with content = 'Save your changes' wrapping a standard Button
|
|
153
|
+
2. Tooltip with rich content (using a Typography component inside the content prop)
|
|
154
|
+
|
|
155
|
+
---
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { AvatarUser } from '../../molecules';
|
|
1
2
|
import { AvatarProps } from './Avatar.types';
|
|
2
|
-
|
|
3
|
+
declare const AvatarBase: import('react').ForwardRefExoticComponent<AvatarProps & {
|
|
3
4
|
children?: import('react').ReactNode | undefined;
|
|
4
|
-
} & import('react').RefAttributes<HTMLDivElement
|
|
5
|
-
|
|
5
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const Avatar: typeof AvatarBase & {
|
|
7
|
+
User: typeof AvatarUser;
|
|
6
8
|
};
|
|
9
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as l, jsx as i } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { forwardRef as E, useState as S } from "react";
|
|
4
4
|
import { COMPONENT_NAME as d, FALLBACK_COMPONENT as B, BADGE_COMPONENT as F } from "./constants.js";
|
|
5
|
-
import { AvatarStyled as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { AvatarStyled as P, AvatarImageWrapperStyled as T, FallbackComponentWrapperStyled as $, FallbackTextStyled as x, BadgeStyled as z } from "./AvatarStyled.js";
|
|
6
|
+
import { Image as M } from "../Image/Image.js";
|
|
7
|
+
import { AvatarUser as V } from "../../molecules/AvatarUser/AvatarUser.js";
|
|
8
8
|
import { useTheme as j } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
-
const m = E((
|
|
9
|
+
const m = E((f, p) => {
|
|
10
10
|
const {
|
|
11
|
-
id:
|
|
12
|
-
sizeVariant:
|
|
13
|
-
withBadge:
|
|
14
|
-
badgeColor:
|
|
11
|
+
id: u,
|
|
12
|
+
sizeVariant: a,
|
|
13
|
+
withBadge: b,
|
|
14
|
+
badgeColor: g = "bg.fill.success.primary.default",
|
|
15
15
|
backgroundColor: y,
|
|
16
|
-
src:
|
|
16
|
+
src: t,
|
|
17
17
|
alt: o,
|
|
18
18
|
className: A,
|
|
19
19
|
placeholder: C,
|
|
@@ -21,28 +21,31 @@ const m = E((p, f) => {
|
|
|
21
21
|
fallbackComponent: e,
|
|
22
22
|
styles: h = {},
|
|
23
23
|
...O
|
|
24
|
-
} =
|
|
25
|
-
theme:
|
|
26
|
-
} = j(), [
|
|
24
|
+
} = f, {
|
|
25
|
+
theme: r
|
|
26
|
+
} = j(), [s, n] = S(!1), k = () => {
|
|
27
27
|
n(!0);
|
|
28
28
|
}, v = () => {
|
|
29
29
|
n(!1);
|
|
30
30
|
}, c = typeof e == "string" || typeof e == "number";
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
!
|
|
34
|
-
(
|
|
35
|
-
c && /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ l(P, { theme: r, role: "img", "aria-label": o, $sizeVariant: a, styles: h, ref: p, className: A, "data-testid": d, ...O, children: [
|
|
32
|
+
/* @__PURE__ */ l(T, { $color: y, theme: r, children: [
|
|
33
|
+
!s && t && /* @__PURE__ */ i(M, { id: u, src: t, alt: o, placeholder: C, onClick: N, onError: k, onLoad: v }),
|
|
34
|
+
(s || !t) && /* @__PURE__ */ l($, { "data-testid": B, "aria-label": o, children: [
|
|
35
|
+
c && /* @__PURE__ */ i(x, { $sizeVariant: a, theme: r, children: e }),
|
|
36
36
|
!c && e
|
|
37
37
|
] })
|
|
38
38
|
] }),
|
|
39
|
-
|
|
39
|
+
b && /* @__PURE__ */ i(z, { "data-testid": F, role: "status", $color: g, theme: r, $sizeVariant: a })
|
|
40
40
|
] });
|
|
41
41
|
});
|
|
42
42
|
m.displayName = d;
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const L = m;
|
|
44
|
+
Object.defineProperty(L, "User", {
|
|
45
|
+
configurable: !0,
|
|
46
|
+
enumerable: !0,
|
|
47
|
+
get: () => V
|
|
45
48
|
});
|
|
46
49
|
export {
|
|
47
|
-
|
|
50
|
+
L as Avatar
|
|
48
51
|
};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { getBoxStyles as i, tokensHandler as u, resolveThemeColor as P } from "../../../tokens/utils.js";
|
|
4
4
|
import { Row as x } from "../../layout/Row/Row.js";
|
|
5
|
-
import { Typography as b } from "../Typography/Typography.js";
|
|
6
5
|
import { get as o } from "../../../utils/helpers.js";
|
|
6
|
+
import { Typography as b } from "../Typography/Typography.js";
|
|
7
7
|
const $ = (t) => {
|
|
8
8
|
const {
|
|
9
9
|
theme: {
|
|
@@ -4,27 +4,27 @@ import { forwardRef as v } from "react";
|
|
|
4
4
|
import { convertToInlineBoxStyles as C } from "../../../tokens/utils.js";
|
|
5
5
|
import { COMPONENT_NAME as o } from "./constants.js";
|
|
6
6
|
import { ButtonStyled as E, StartIconStyled as N, ContentStyled as g, EndIconStyled as j } from "./ButtonStyled.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Loader as L } from "../Loader/Loader.js";
|
|
8
|
+
import { useTheme as P } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { ButtonVariant as W, ButtonTypes as w, ButtonRole as M } from "../../../types/button.js";
|
|
10
10
|
import { get as O } from "../../../utils/helpers.js";
|
|
11
11
|
import { TabIndex as R } from "../../../types/accesability.js";
|
|
12
12
|
const k = v((m, u) => {
|
|
13
13
|
const {
|
|
14
14
|
theme: t
|
|
15
|
-
} =
|
|
16
|
-
variant: f =
|
|
15
|
+
} = P(), {
|
|
16
|
+
variant: f = W.Primary,
|
|
17
17
|
rounded: c = O(t, "button.attrs.rounded", "none"),
|
|
18
18
|
children: n,
|
|
19
19
|
iconStart: a = null,
|
|
20
20
|
iconEnd: i = null,
|
|
21
|
-
type: p =
|
|
21
|
+
type: p = w.Button,
|
|
22
22
|
disabled: y = !1,
|
|
23
23
|
isIcon: h = !1,
|
|
24
24
|
isLoading: r = !1,
|
|
25
25
|
ariaLabel: l,
|
|
26
26
|
ariaPressed: d,
|
|
27
|
-
role: b =
|
|
27
|
+
role: b = M.Button,
|
|
28
28
|
fullWidth: B = !1,
|
|
29
29
|
tabIndex: x = R.Default,
|
|
30
30
|
onClick: I,
|
|
@@ -35,7 +35,7 @@ const k = v((m, u) => {
|
|
|
35
35
|
"aria-label": l
|
|
36
36
|
} : {}, ...d ? {
|
|
37
37
|
"aria-pressed": d
|
|
38
|
-
} : {}, children: r ? /* @__PURE__ */ e(
|
|
38
|
+
} : {}, children: r ? /* @__PURE__ */ e(L, { size: "xs", withWrapper: !1 }) : /* @__PURE__ */ $(T, { children: [
|
|
39
39
|
a ? /* @__PURE__ */ e(N, { theme: t, "data-testid": `${o}-icon-start`, children: a }) : null,
|
|
40
40
|
n ? /* @__PURE__ */ e(g, { theme: t, styles: s ? {
|
|
41
41
|
justifyContent: s
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputFieldProps } from './Input.types';
|
|
2
|
-
export declare const Input: import('react').ForwardRefExoticComponent<(InputFieldProps & Partial<Omit<HTMLInputElement, "color" | "prefix" | "disabled" | "tabIndex" | "type" | "hidden" | "width" | "content" | "translate" | "name" | "label" | "children" | "className" | "styles" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "
|
|
2
|
+
export declare const Input: import('react').ForwardRefExoticComponent<(InputFieldProps & Partial<Omit<HTMLInputElement, "color" | "prefix" | "disabled" | "tabIndex" | "type" | "hidden" | "width" | "content" | "translate" | "name" | "label" | "children" | "className" | "styles" | "onClick" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "readOnly" | "placeholder" | "required" | "ariaRequired" | "ariaDescribedBy" | "inputmode" | "debounceCallbackTime" | "wrapperAs" | "helperText" | "adornmentStart" | "adornmentEnd">>) & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useState as A, useCallback as d } from "react";
|
|
3
3
|
import { COMPONENT_NAME as c } from "./constants.js";
|
|
4
|
-
import {
|
|
5
|
-
import { debounce as p } from "../../../utils/helpers.js";
|
|
4
|
+
import { debounce as m } from "../../../utils/helpers.js";
|
|
6
5
|
import { useLogger as E } from "../../../hooks/useLogger/useLogger.js";
|
|
6
|
+
import { KEYBOARD_KEYS as p } from "../../../constants/keyboard.js";
|
|
7
7
|
const n = ({
|
|
8
8
|
onMouseDown: s,
|
|
9
9
|
onChange: f,
|
|
@@ -14,16 +14,16 @@ const n = ({
|
|
|
14
14
|
const [i, g] = A(!1), e = E(), o = d((t) => {
|
|
15
15
|
g(!0), e.debug(`${c}: MouseDown`), s == null || s(t);
|
|
16
16
|
}, [s, e]), l = d((t) => {
|
|
17
|
-
t.key ===
|
|
17
|
+
t.key === p.TAB && g(!1), e.debug(`${c}: KeyDown`, {
|
|
18
18
|
key: t.key,
|
|
19
|
-
isTab: t.key ===
|
|
19
|
+
isTab: t.key === p.TAB
|
|
20
20
|
}), r == null || r(t);
|
|
21
21
|
}, [r, e]), h = d((t) => {
|
|
22
22
|
g(!1), e.debug(`${c}: Blur`, {
|
|
23
23
|
value: t.target.value,
|
|
24
24
|
valueLength: t.target.value.length
|
|
25
25
|
}), u == null || u(t);
|
|
26
|
-
}, [u, e]), b = typeof a == "number" && r ?
|
|
26
|
+
}, [u, e]), b = typeof a == "number" && r ? m(l, a) : l, y = typeof a == "number" && f ? m(f, a) : f;
|
|
27
27
|
return {
|
|
28
28
|
handlers: {
|
|
29
29
|
onMouseDown: o,
|
|
@@ -4,9 +4,9 @@ import { forwardRef as x } from "react";
|
|
|
4
4
|
import { COMPONENT_NAME as r } from "./constants.js";
|
|
5
5
|
import { LinkStyled as h } from "./LinkStyled.js";
|
|
6
6
|
import { LinkVariant as T, LinkTarget as y } from "../../../types/link.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Cursors as C } from "../../../types/cursors.js";
|
|
8
|
+
import { TabIndex as P } from "../../../types/accesability.js";
|
|
9
|
+
import { Roles as g } from "../types/roles.types.js";
|
|
10
10
|
import { useTheme as v } from "../../../hooks/useTheme/useTheme.js";
|
|
11
11
|
const z = x((t, o) => {
|
|
12
12
|
const {
|
|
@@ -15,11 +15,11 @@ const z = x((t, o) => {
|
|
|
15
15
|
underline: s,
|
|
16
16
|
disabled: e = !1,
|
|
17
17
|
className: l = "",
|
|
18
|
-
cursor: d =
|
|
18
|
+
cursor: d = C.Pointer,
|
|
19
19
|
target: f = y.Blank,
|
|
20
|
-
tabindex: p =
|
|
20
|
+
tabindex: p = P.Default,
|
|
21
21
|
href: c,
|
|
22
|
-
role: u =
|
|
22
|
+
role: u = g.Link,
|
|
23
23
|
children: b,
|
|
24
24
|
onClick: k,
|
|
25
25
|
ariaLabel: i,
|
|
@@ -3,27 +3,27 @@ import { jsx as o } from "@emotion/react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as N } from "react";
|
|
4
4
|
import { BASE_ANIMATION as P, COMPONENT_NAME as p } from "./constants.js";
|
|
5
5
|
import { LoaderStyled as $ } from "./LoaderStyled.js";
|
|
6
|
-
import
|
|
7
|
-
import A from "
|
|
8
|
-
import { useTheme as M } from "../../../hooks/useTheme/useTheme.js";
|
|
6
|
+
import w from "../Wrapper/Wrapper.js";
|
|
7
|
+
import { useTheme as A } from "../../../hooks/useTheme/useTheme.js";
|
|
9
8
|
import { WrapperVariant as m } from "../../../types/wrapper.js";
|
|
10
|
-
import { get as
|
|
11
|
-
import { SizeVariant as
|
|
9
|
+
import { get as M } from "../../../utils/helpers.js";
|
|
10
|
+
import { SizeVariant as V } from "../../../types/common.js";
|
|
11
|
+
import { Portal as W } from "../../layout/Portal/Portal.js";
|
|
12
12
|
const g = N((d, s) => {
|
|
13
13
|
const {
|
|
14
14
|
theme: t
|
|
15
|
-
} =
|
|
15
|
+
} = A(), {
|
|
16
16
|
name: f = "circle",
|
|
17
17
|
variant: r = m.Inline,
|
|
18
|
-
rounded: l =
|
|
18
|
+
rounded: l = M(t, "loader.attrs.rounded", "none"),
|
|
19
19
|
children: a,
|
|
20
|
-
size: c =
|
|
20
|
+
size: c = V.Md,
|
|
21
21
|
animationProps: u = P,
|
|
22
22
|
withWrapper: i = !0,
|
|
23
23
|
WrapperView: n = "span",
|
|
24
24
|
...h
|
|
25
25
|
} = d, e = () => a || /* @__PURE__ */ o($, { ref: s, theme: t, $name: f, $variant: r, $size: c, $animationProps: u, $rounded: l, "data-testid": p, ...h });
|
|
26
|
-
return r === m.FullPage ? /* @__PURE__ */ o(
|
|
26
|
+
return r === m.FullPage ? /* @__PURE__ */ o(W, { wrapperVariant: r, withWrapper: i, WrapperView: n, children: e() }) : i ? /* @__PURE__ */ o(w, { variant: r, as: n, children: e() }) : e();
|
|
27
27
|
});
|
|
28
28
|
g.displayName = p;
|
|
29
29
|
export {
|
|
@@ -7,10 +7,10 @@ import { Dropdown as Ke } from "../../molecules/Dropdown/Dropdown.js";
|
|
|
7
7
|
import { DEFAULT_SELECTED_VALUE as Fe, COMPONENT_NAME as l } from "./constants.js";
|
|
8
8
|
import { SelectWrapperStyled as Ve, InitiatorWrapperStyled as Ue, DropdownButtonStyled as je, SelectAdornmentStyled as V, ArrowIconWrapperStyled as ze, SelectSearchInputStyled as Ye } from "./SelectStyled.js";
|
|
9
9
|
import { getClosestFocusable as U } from "../../../utils/focus.js";
|
|
10
|
-
import { SelectContext as qe } from "./hooks/useSelectContext.js";
|
|
11
10
|
import { get as le, toNumber as ce } from "../../../utils/helpers.js";
|
|
12
|
-
import { useTheme as
|
|
13
|
-
import { useLogger as
|
|
11
|
+
import { useTheme as qe } from "../../../hooks/useTheme/useTheme.js";
|
|
12
|
+
import { useLogger as Ge } from "../../../hooks/useLogger/useLogger.js";
|
|
13
|
+
import { SelectContext as Je } from "./hooks/useSelectContext.js";
|
|
14
14
|
import { Icon as Qe } from "../Icon/Icon.js";
|
|
15
15
|
import { Portal as Xe } from "../../layout/Portal/Portal.js";
|
|
16
16
|
const Ze = Ie((ue, ae) => {
|
|
@@ -43,7 +43,7 @@ const Ze = Ie((ue, ae) => {
|
|
|
43
43
|
searchPlaceholder: ge = "Search..."
|
|
44
44
|
} = ue, {
|
|
45
45
|
theme: w
|
|
46
|
-
} =
|
|
46
|
+
} = qe(), a = Ge(), d = D(null), B = D(null), x = D(null), Q = D(!0), [p, g] = y(!1), [t, W] = y(v ? Array.isArray(i) ? i : i ? [i] : [] : i ?? null), [H, X] = y(""), Z = D(null), S = L && H ? h == null ? void 0 : h.filter((e) => P(e).toLowerCase().includes(H.toLowerCase())) : h, [ye, he] = y(T), [ve, Ae] = y("bottom"), [be, Ee] = y(I), [Se, De] = y(-9999), [Re, ee] = y(void 0), [$e, re] = y(void 0), Oe = 1;
|
|
47
47
|
C(() => {
|
|
48
48
|
if (p) {
|
|
49
49
|
if (a.debug(`${l}: Open`, {
|
|
@@ -230,7 +230,7 @@ const Ze = Ie((ue, ae) => {
|
|
|
230
230
|
toggle: () => {
|
|
231
231
|
u || g((e) => !e);
|
|
232
232
|
}
|
|
233
|
-
})), /* @__PURE__ */ f(
|
|
233
|
+
})), /* @__PURE__ */ f(Je.Provider, { value: Ce, children: /* @__PURE__ */ F(Ve, { ref: d, theme: w, "data-testid": l, styles: {
|
|
234
234
|
...fe,
|
|
235
235
|
width: T,
|
|
236
236
|
maxWidth: q,
|
|
@@ -4,10 +4,10 @@ import { forwardRef as N, useRef as I, useState as W, useCallback as b, useImper
|
|
|
4
4
|
import { COMPONENT_NAME as t } from "./constants.js";
|
|
5
5
|
import { MainWrapperStyled as B, SidebarWrapperStyled as D, SidebarStyled as E, SidebarHeaderStyled as H, SidebarToggleButtonStyled as $, SidebarContentWrapperStyled as P, SidebarMinifiedStyled as v, BodyStyled as A, MainHeaderStyled as L, ContentStyled as Q } from "./ChatContainerStyled.js";
|
|
6
6
|
import { useMediaQuery as _ } from "../../../hooks/useMediaQuery/useMediaQuery.js";
|
|
7
|
-
import { Icon as g } from "../../atoms/Icon/Icon.js";
|
|
8
7
|
import { useTheme as q } from "../../../hooks/useTheme/useTheme.js";
|
|
9
8
|
import { useLogger as z } from "../../../hooks/useLogger/useLogger.js";
|
|
10
9
|
import { get as p } from "../../../utils/helpers.js";
|
|
10
|
+
import { Icon as g } from "../../atoms/Icon/Icon.js";
|
|
11
11
|
const F = N(({
|
|
12
12
|
sidebarContent: y,
|
|
13
13
|
headerContent: m,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as p } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P } from "react";
|
|
3
3
|
import { getBoxStyles as m, tokensHandler as i, getMediaQuery as S } from "../../../tokens/utils.js";
|
|
4
|
-
import { Button as b } from "../../atoms/Button/Button.js";
|
|
5
4
|
import { get as t } from "../../../utils/helpers.js";
|
|
6
|
-
import { ButtonVariant as
|
|
5
|
+
import { ButtonVariant as b } from "../../../types/button.js";
|
|
6
|
+
import { Button as u } from "../../atoms/Button/Button.js";
|
|
7
7
|
const N = P((n, s) => {
|
|
8
8
|
const {
|
|
9
9
|
theme: {
|
|
@@ -132,13 +132,13 @@ const N = P((n, s) => {
|
|
|
132
132
|
boxStyles: r,
|
|
133
133
|
restProps: d
|
|
134
134
|
} = m(o), a = new Proxy(s || {}, i(e)), l = c ? t(a, "toggleButton.open") : {}, y = t(a, "toggleButton.attrs", {
|
|
135
|
-
variant:
|
|
135
|
+
variant: b.Text
|
|
136
136
|
}), h = {
|
|
137
137
|
...t(a, "toggleButton.default"),
|
|
138
138
|
...l,
|
|
139
139
|
...r
|
|
140
140
|
};
|
|
141
|
-
return /* @__PURE__ */ p(
|
|
141
|
+
return /* @__PURE__ */ p(u, { ...y, ...d, isIcon: !0, styles: h });
|
|
142
142
|
};
|
|
143
143
|
export {
|
|
144
144
|
M as BodyStyled,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AvatarUserProps } from '../../atoms
|
|
1
|
+
import { AvatarUserProps } from '../../atoms';
|
|
2
2
|
export declare const AvatarUser: import('react').ForwardRefExoticComponent<AvatarUserProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as l, jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { forwardRef as N } from "react";
|
|
4
|
-
import { COMPONENT_NAME as m } from "./constants.js";
|
|
5
4
|
import { AvatarUserStyled as V } from "./AvatarUserStyled.js";
|
|
5
|
+
import { COMPONENT_NAME as m } from "./constants.js";
|
|
6
6
|
import { Avatar as $ } from "../../atoms/Avatar/Avatar.js";
|
|
7
7
|
import { useTheme as x } from "../../../hooks/useTheme/useTheme.js";
|
|
8
8
|
import { get as i } from "../../../utils/helpers.js";
|
|
@@ -3,12 +3,12 @@ import { jsxs as E, jsx as i } from "@emotion/react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as k, useState as N, useRef as A, useEffect as R } from "react";
|
|
4
4
|
import { INITIAL_QTY as B, COMPONENT_NAME as e, MAX_INITIAL_QTY as L, MIN_INITIAL_QTY as Q, REGEX_NUMBER as D } from "./constants.js";
|
|
5
5
|
import { CounterStyled as Y, NavButtonStyled as $ } from "./CounterStyled.js";
|
|
6
|
+
import { Icon as C } from "../../atoms/Icon/Icon.js";
|
|
6
7
|
import { Input as j } from "../../atoms/Input/Input.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { InputVariantType as x } from "../../../types/input.js";
|
|
9
|
+
import { useTheme as O } from "../../../hooks/useTheme/useTheme.js";
|
|
10
|
+
import { useLogger as X } from "../../../hooks/useLogger/useLogger.js";
|
|
9
11
|
import { get as s } from "../../../utils/helpers.js";
|
|
10
|
-
import { Icon as C } from "../../atoms/Icon/Icon.js";
|
|
11
|
-
import { InputVariantType as X } from "../../../types/input.js";
|
|
12
12
|
const G = k(({
|
|
13
13
|
min: u = Q,
|
|
14
14
|
max: o = L,
|
|
@@ -19,7 +19,7 @@ const G = k(({
|
|
|
19
19
|
}, S) => {
|
|
20
20
|
const {
|
|
21
21
|
theme: l
|
|
22
|
-
} =
|
|
22
|
+
} = O(), r = X(), v = s(l, "counter.icons", {}), [t, p] = N(g), [d, c] = N(String(g)), f = A(h);
|
|
23
23
|
f.current = h;
|
|
24
24
|
const V = t >= o, b = t <= u, w = () => {
|
|
25
25
|
if (V) {
|
|
@@ -90,7 +90,7 @@ const G = k(({
|
|
|
90
90
|
/* @__PURE__ */ i($, { theme: l, disabled: b || m, onClick: M, "aria-label": "Decrement counter", "data-testid": `${e}-button-decrease`, children: /* @__PURE__ */ i(C, { ...s(v, "minus", {
|
|
91
91
|
name: "minus"
|
|
92
92
|
}) }) }),
|
|
93
|
-
/* @__PURE__ */ i(j, { variant:
|
|
93
|
+
/* @__PURE__ */ i(j, { variant: x.Number, onChange: y, onBlur: _, value: d, disabled: m, role: "spinbutton", "aria-valuemin": u, ...o !== 1 / 0 ? {
|
|
94
94
|
"aria-valuemax": o
|
|
95
95
|
} : {}, "data-testid": `${e}-input`, "aria-label": "Quantity value" }),
|
|
96
96
|
/* @__PURE__ */ i($, { theme: l, disabled: V || m, onClick: w, "data-testid": `${e}-button-increase`, "aria-label": "Increment counter", children: /* @__PURE__ */ i(C, { ...s(v, "plus", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as u } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as a } from "react";
|
|
3
3
|
import { tokensHandler as f } from "../../../tokens/utils.js";
|
|
4
|
-
import { get as c } from "../../../utils/helpers.js";
|
|
5
4
|
import { Button as d } from "../../atoms/Button/Button.js";
|
|
5
|
+
import { get as c } from "../../../utils/helpers.js";
|
|
6
6
|
const x = a((o, e) => {
|
|
7
7
|
const {
|
|
8
8
|
theme: {
|
|
@@ -5,8 +5,8 @@ import { KEYBOARD_KEYS as K } from "../../../constants/keyboard.js";
|
|
|
5
5
|
import { COMPONENT_NAME as D } from "./constants.js";
|
|
6
6
|
import { DropdownItemStyled as N } from "./DropdownItemStyled.js";
|
|
7
7
|
import { useSelectContext as T } from "../../atoms/Select/hooks/useSelectContext.js";
|
|
8
|
-
import { useTheme as k } from "../../../hooks/useTheme/useTheme.js";
|
|
9
8
|
import { TabIndex as y } from "../../../types/accesability.js";
|
|
9
|
+
import { useTheme as k } from "../../../hooks/useTheme/useTheme.js";
|
|
10
10
|
const I = x((S, v) => {
|
|
11
11
|
const {
|
|
12
12
|
children: A,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { ButtonTypes as i } from "../../../types/button.js";
|
|
1
2
|
import { get as s, set as n } from "../../../utils/helpers.js";
|
|
2
|
-
import { InputVariantType as
|
|
3
|
-
import { ButtonTypes as f } from "../../../types/button.js";
|
|
3
|
+
import { InputVariantType as f } from "../../../types/input.js";
|
|
4
4
|
const u = (o) => Array.from(s(o, "elements", [])).reduce((t, e) => h(e, t), {}), h = (o, r = {}) => {
|
|
5
5
|
const t = s(o, "tagName", "").toLowerCase(), e = s(o, "name"), m = s(o, "type"), a = s(o, "checked"), c = s(o, "value");
|
|
6
|
-
if (!(t ===
|
|
6
|
+
if (!(t === i.Button || m === i.Submit || !e))
|
|
7
7
|
switch (m) {
|
|
8
|
-
case
|
|
8
|
+
case f.Checkbox:
|
|
9
9
|
n(r, e, {
|
|
10
10
|
value: c,
|
|
11
11
|
isChecked: a
|
|
12
12
|
});
|
|
13
13
|
break;
|
|
14
|
-
case
|
|
14
|
+
case f.Radio:
|
|
15
15
|
a && n(r, e, {
|
|
16
16
|
value: c,
|
|
17
17
|
isChecked: a
|