gd-design-library 1.0.2 → 1.2.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.
- package/README.md +2 -2
- package/ai/README.md +210 -16
- package/ai/schemas/components/Accordion.d.ts +84 -0
- package/ai/schemas/components/Button.d.ts +12 -0
- package/ai/schemas/components/ChatContainer.d.ts +0 -8
- package/ai/schemas/components/Column.d.ts +5 -5
- package/ai/schemas/components/InputFile.d.ts +17 -5
- package/ai/schemas/components/Menu.d.ts +37 -0
- package/ai/schemas/components/Row.d.ts +6 -6
- package/ai/schemas/components/Scroll.d.ts +7 -0
- package/ai/schemas/components/Typography.d.ts +0 -21
- package/assets/icons/account_circle.d.ts +1 -3
- package/assets/icons/account_circle.js +7 -14
- package/assets/icons/arrow-down.d.ts +2 -3
- package/assets/icons/arrow-down.js +6 -11
- package/assets/icons/arrow-forward.d.ts +1 -3
- package/assets/icons/arrow-forward.js +6 -13
- package/assets/icons/attachment.d.ts +1 -3
- package/assets/icons/attachment.js +7 -14
- package/assets/icons/check.d.ts +1 -3
- package/assets/icons/check.js +5 -11
- package/assets/icons/chevron-left.d.ts +1 -3
- package/assets/icons/chevron-left.js +7 -14
- package/assets/icons/chevron-right.d.ts +1 -3
- package/assets/icons/chevron-right.js +6 -13
- package/assets/icons/content-copy.d.ts +1 -3
- package/assets/icons/content-copy.js +7 -14
- package/assets/icons/delete_outlined.d.ts +1 -3
- package/assets/icons/delete_outlined.js +5 -12
- package/assets/icons/dot.d.ts +1 -3
- package/assets/icons/dot.js +5 -11
- package/assets/icons/error_outline.d.ts +1 -4
- package/assets/icons/error_outline.js +6 -18
- package/assets/icons/eye.d.ts +1 -3
- package/assets/icons/eye.js +7 -14
- package/assets/icons/file-copy.d.ts +1 -3
- package/assets/icons/file-copy.js +7 -13
- package/assets/icons/filter.d.ts +1 -3
- package/assets/icons/filter.js +6 -13
- package/assets/icons/folder.d.ts +1 -3
- package/assets/icons/folder.js +6 -13
- package/assets/icons/folderOpen.d.ts +1 -3
- package/assets/icons/folderOpen.js +7 -14
- package/assets/icons/home.d.ts +1 -3
- package/assets/icons/home.js +6 -13
- package/assets/icons/local_shipping.d.ts +1 -3
- package/assets/icons/local_shipping.js +4 -11
- package/assets/icons/minus.d.ts +1 -3
- package/assets/icons/minus.js +7 -13
- package/assets/icons/mobile_menu_button.d.ts +1 -3
- package/assets/icons/mobile_menu_button.js +7 -14
- package/assets/icons/paymentCard.d.ts +1 -3
- package/assets/icons/paymentCard.js +6 -13
- package/assets/icons/plus.d.ts +1 -3
- package/assets/icons/plus.js +5 -11
- package/assets/icons/portrait.d.ts +1 -3
- package/assets/icons/portrait.js +5 -12
- package/assets/icons/processing.d.ts +1 -3
- package/assets/icons/processing.js +6 -13
- package/assets/icons/ruler.d.ts +1 -3
- package/assets/icons/ruler.js +6 -13
- package/assets/icons/search.d.ts +1 -3
- package/assets/icons/search.js +6 -13
- package/assets/icons/shopping_bag.d.ts +1 -3
- package/assets/icons/shopping_bag.js +7 -14
- package/assets/icons/slash.d.ts +1 -3
- package/assets/icons/slash.js +6 -13
- package/assets/icons/star.d.ts +1 -3
- package/assets/icons/star.js +6 -12
- package/assets/icons/starOutlined.d.ts +1 -3
- package/assets/icons/starOutlined.js +5 -11
- package/assets/icons/toast_error.d.ts +1 -3
- package/assets/icons/toast_error.js +9 -15
- package/assets/icons/toast_info.d.ts +1 -3
- package/assets/icons/toast_info.js +7 -13
- package/assets/icons/toast_warning.d.ts +1 -3
- package/assets/icons/toast_warning.js +7 -13
- package/assets/icons/upload.d.ts +1 -3
- package/assets/icons/upload.js +6 -13
- package/assets/icons/volume-up.d.ts +1 -3
- package/assets/icons/volume-up.js +6 -13
- package/assets/icons/wifiTethering.d.ts +1 -3
- package/assets/icons/wifiTethering.js +4 -11
- package/components/core/Button/Button.js +30 -27
- package/components/core/Button/Button.types.d.ts +2 -2
- package/components/core/Button/ButtonStyled.js +40 -39
- package/components/core/Dropdown/Dropdown.d.ts +1 -1
- package/components/core/Dropdown/Dropdown.js +16 -16
- package/components/core/Dropdown/Dropdown.types.d.ts +3 -3
- package/components/core/Dropdown/DropdownStyled.js +13 -14
- package/components/core/Icon/Icon.js +41 -33
- package/components/core/Icon/Icon.types.d.ts +2 -1
- package/components/core/Icon/constants.d.ts +37 -109
- package/components/core/Input/Input.d.ts +1 -1
- package/components/core/InputFile/InputFile.d.ts +0 -32
- package/components/core/InputFile/InputFile.js +47 -33
- package/components/core/InputFile/InputFileStyled.js +24 -22
- package/components/core/Loader/Loader.js +19 -17
- package/components/core/Loader/Loader.types.d.ts +3 -1
- package/components/core/Loader/LoaderStyled.js +34 -30
- package/components/core/Menu/Menu.d.ts +2 -2
- package/components/core/Menu/Menu.js +113 -93
- package/components/core/Menu/Menu.types.d.ts +16 -11
- package/components/core/Menu/MenuStyled.d.ts +1 -1
- package/components/core/Menu/constants.js +4 -12
- package/components/core/Modal/Modal.js +60 -36
- package/components/core/Modal/ModalStyled.js +21 -22
- package/components/core/Scroll/Scroll.d.ts +6 -0
- package/components/core/Scroll/Scroll.js +53 -31
- package/components/core/Scroll/Scroll.types.d.ts +5 -0
- package/components/core/Scroll/ScrollBar.js +45 -43
- package/components/core/Scroll/ScrollStyled.js +46 -42
- package/components/core/Scroll/constants.d.ts +2 -0
- package/components/core/Scroll/constants.js +6 -4
- package/components/core/Select/Select.js +162 -134
- package/components/core/Select/Select.types.d.ts +2 -4
- package/components/core/Snackbar/Snackbar.js +60 -37
- package/components/core/Snackbar/Snackbar.types.d.ts +1 -2
- package/components/core/Snackbar/SnackbarManager.js +45 -30
- package/components/core/Snackbar/SnackbarStyled.d.ts +5 -5
- package/components/core/Snackbar/SnackbarStyled.js +111 -101
- package/components/core/Textarea/Textarea.d.ts +4 -0
- package/components/core/Tooltip/Tooltip.js +68 -44
- package/components/core/Tooltip/TooltipStyled.js +26 -27
- package/components/core/Tooltip/utils.js +47 -45
- package/components/core/Typography/Typography.js +18 -18
- package/components/core/Typography/Typography.types.d.ts +3 -3
- package/components/core/Typography/TypographyStyled.js +28 -29
- package/components/domainSpecific/Accordion/Accordion.d.ts +1 -1
- package/components/domainSpecific/Accordion/Accordion.js +19 -17
- package/components/domainSpecific/Accordion/Accordion.types.d.ts +7 -4
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +13 -12
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +15 -14
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +18 -16
- package/components/domainSpecific/Accordion/AccordionStyled.js +44 -35
- package/components/domainSpecific/Card/Card.js +31 -27
- package/components/domainSpecific/Card/CardTitle/constants.js +4 -4
- package/components/domainSpecific/Header/Header.js +4 -4
- package/components/domainSpecific/SearchModal/SearchModal.js +0 -1
- package/components/domainSpecific/SearchModal/SearchModal.types.d.ts +1 -1
- package/components/index.types.d.ts +1 -0
- package/components/layout/ChatContainer/ChatContainer.d.ts +1 -1
- package/components/layout/ChatContainer/ChatContainer.js +58 -41
- package/components/layout/ChatContainer/ChatContainer.types.d.ts +8 -5
- package/components/layout/ChatContainer/ChatContainerStyled.d.ts +2 -0
- package/components/layout/ChatContainer/ChatContainerStyled.js +105 -84
- package/components/layout/Column/Column.types.d.ts +3 -1
- package/components/layout/Column/ColumnStyled.js +23 -23
- package/components/layout/FlexContainer/FlexContainerStyled.js +7 -8
- package/components/layout/Row/Row.d.ts +1 -1
- package/components/layout/Row/Row.js +20 -20
- package/components/layout/Row/Row.types.d.ts +3 -1
- package/components/layout/Row/RowStyled.js +26 -26
- package/constants/index.d.ts +0 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useLogger/NoOpLogger.d.ts +11 -0
- package/hooks/useLogger/NoOpLogger.js +15 -0
- package/hooks/useLogger/index.d.ts +2 -0
- package/hooks/useLogger/useLogger.d.ts +4 -0
- package/hooks/useLogger/useLogger.js +27 -0
- package/hooks/useLogger/useLogger.types.d.ts +30 -0
- package/hooks/useTheme/NoOpTheme.d.ts +4050 -0
- package/hooks/useTheme/NoOpTheme.js +15 -0
- package/hooks/useTheme/useTheme.d.ts +3 -4
- package/hooks/useTheme/useTheme.js +62 -41
- package/hooks/useTheme/useTheme.types.d.ts +3 -2
- package/index.d.ts +4 -0
- package/index.js +354 -350
- package/llms.txt +39 -19
- package/package.json +1 -1
- package/tokens/accordion.d.ts +9 -3
- package/tokens/accordion.js +14 -11
- package/tokens/button.d.ts +17 -19
- package/tokens/button.js +54 -56
- package/tokens/card.d.ts +2 -3
- package/tokens/card.js +50 -53
- package/tokens/carousel.d.ts +2 -2
- package/tokens/carousel.js +8 -9
- package/tokens/chat.d.ts +69 -48
- package/tokens/chat.js +86 -68
- package/tokens/constants.d.ts +0 -1
- package/tokens/constants.js +1 -1
- package/tokens/defaultTheme.d.ts +199 -112
- package/tokens/defaultTheme.js +27 -25
- package/tokens/header.d.ts +1 -1
- package/tokens/header.js +3 -4
- package/tokens/index.d.ts +175 -104
- package/tokens/index.js +102 -101
- package/tokens/input.d.ts +2 -2
- package/tokens/input.js +25 -26
- package/tokens/inputfile.d.ts +1 -1
- package/tokens/inputfile.js +4 -4
- package/tokens/link.d.ts +5 -0
- package/tokens/loader.d.ts +3 -0
- package/tokens/loader.js +3 -0
- package/tokens/menu.d.ts +1 -0
- package/tokens/menu.js +1 -0
- package/tokens/modal.d.ts +6 -4
- package/tokens/modal.js +42 -60
- package/tokens/scroll.d.ts +19 -2
- package/tokens/scroll.js +23 -7
- package/tokens/select.d.ts +9 -7
- package/tokens/select.js +30 -29
- package/tokens/snackbar.d.ts +36 -20
- package/tokens/snackbar.js +92 -93
- package/tokens/stepper.d.ts +1 -1
- package/tokens/stepper.js +3 -3
- package/tokens/tabs.d.ts +1 -1
- package/tokens/tabs.js +1 -1
- package/tokens/textarea.d.ts +4 -0
- package/tokens/tooltip.d.ts +5 -1
- package/tokens/tooltip.js +23 -21
- package/tokens/typography.js +114 -116
- package/tokens/values.d.ts +5 -1
- package/tokens/values.js +12 -8
- package/tokens/wrapper.d.ts +2 -2
- package/tokens/wrapper.js +7 -7
- package/tokens/zIndex.d.ts +9 -0
- package/tokens/zIndex.js +12 -0
- package/types/index.d.ts +0 -1
- package/types/styles.d.ts +1 -0
- package/utils/helpers.js +14 -15
- package/CHANGELOG.md +0 -177
- package/constants/positioning.d.ts +0 -9
- package/constants/positioning.js +0 -11
- package/types/chat.d.ts +0 -5
- package/types/chat.js +0 -4
package/tokens/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { separator as r } from "./separator.js";
|
|
|
2
2
|
import { draganddrop as o } from "./draganddrop.js";
|
|
3
3
|
import { avatar as m } from "./avatar.js";
|
|
4
4
|
import { chatbubble as t } from "./chatbubble.js";
|
|
5
|
-
import { radiogroup as
|
|
6
|
-
import { draganddropfiles as
|
|
5
|
+
import { radiogroup as i } from "./radiogroup.js";
|
|
6
|
+
import { draganddropfiles as p } from "./draganddropfiles.js";
|
|
7
7
|
import { inputfile as f } from "./inputfile.js";
|
|
8
8
|
import { searchModal as a } from "./searchModal.js";
|
|
9
9
|
import { carousel as e } from "./carousel.js";
|
|
@@ -15,46 +15,46 @@ import { font as d } from "./font.js";
|
|
|
15
15
|
import { colors as b } from "./colors.js";
|
|
16
16
|
import { breakpoints as u } from "./breakpoints.js";
|
|
17
17
|
import { scale as g, space as h, spacing as k } from "./spacing.js";
|
|
18
|
-
import { radius as
|
|
19
|
-
import { typography as
|
|
20
|
-
import { borders as
|
|
21
|
-
import { button as
|
|
22
|
-
import { input as
|
|
23
|
-
import { label as
|
|
24
|
-
import { textarea as
|
|
25
|
-
import { link as
|
|
26
|
-
import { form as
|
|
27
|
-
import { wrapper as
|
|
28
|
-
import { loader as
|
|
29
|
-
import { switchToggle as
|
|
30
|
-
import { skeleton as
|
|
31
|
-
import { animations as
|
|
32
|
-
import { snackbar as
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
const
|
|
50
|
-
button:
|
|
18
|
+
import { radius as x } from "./radius.js";
|
|
19
|
+
import { typography as w } from "./typography.js";
|
|
20
|
+
import { borders as T } from "./borders.js";
|
|
21
|
+
import { button as y } from "./button.js";
|
|
22
|
+
import { input as v } from "./input.js";
|
|
23
|
+
import { label as z } from "./label.js";
|
|
24
|
+
import { textarea as I } from "./textarea.js";
|
|
25
|
+
import { link as M } from "./link.js";
|
|
26
|
+
import { form as j } from "./form.js";
|
|
27
|
+
import { wrapper as q } from "./wrapper.js";
|
|
28
|
+
import { loader as A } from "./loader.js";
|
|
29
|
+
import { switchToggle as B } from "./toggle.js";
|
|
30
|
+
import { skeleton as C } from "./skeleton.js";
|
|
31
|
+
import { animations as D } from "./animations.js";
|
|
32
|
+
import { snackbar as E } from "./snackbar.js";
|
|
33
|
+
import { list as F } from "./list.js";
|
|
34
|
+
import { select as G } from "./select.js";
|
|
35
|
+
import { search as H } from "./search.js";
|
|
36
|
+
import { breadcrumbs as J } from "./breadcrumbs.js";
|
|
37
|
+
import { icon as K } from "./icon.js";
|
|
38
|
+
import { reset as L } from "./reset.js";
|
|
39
|
+
import { tabs as N } from "./tabs.js";
|
|
40
|
+
import { stepper as O } from "./stepper.js";
|
|
41
|
+
import { rating as P } from "./rating.js";
|
|
42
|
+
import { header as Q } from "./header.js";
|
|
43
|
+
import { switchToken as R } from "./switch.js";
|
|
44
|
+
import { chat as S } from "./chat.js";
|
|
45
|
+
import { slider as U } from "./slider.js";
|
|
46
|
+
import { menu as V } from "./menu.js";
|
|
47
|
+
import { scroll as W } from "./scroll.js";
|
|
48
|
+
import { zIndex as X } from "./zIndex.js";
|
|
49
|
+
const Rr = {
|
|
50
|
+
button: y,
|
|
51
51
|
breakpoints: u,
|
|
52
52
|
separator: r,
|
|
53
53
|
draganddrop: o,
|
|
54
54
|
avatar: m,
|
|
55
55
|
chatbubble: t,
|
|
56
|
-
radiogroup:
|
|
57
|
-
draganddropfiles:
|
|
56
|
+
radiogroup: i,
|
|
57
|
+
draganddropfiles: p,
|
|
58
58
|
inputfile: f,
|
|
59
59
|
carousel: e,
|
|
60
60
|
searchModal: a,
|
|
@@ -64,89 +64,90 @@ const qr = {
|
|
|
64
64
|
counter: l,
|
|
65
65
|
font: d,
|
|
66
66
|
colors: b,
|
|
67
|
-
borders:
|
|
68
|
-
scroll:
|
|
69
|
-
radius:
|
|
70
|
-
input:
|
|
71
|
-
label:
|
|
72
|
-
link:
|
|
73
|
-
form:
|
|
74
|
-
typography:
|
|
75
|
-
textarea:
|
|
76
|
-
wrapper:
|
|
77
|
-
loader:
|
|
78
|
-
switchToggle:
|
|
79
|
-
skeleton:
|
|
80
|
-
animations:
|
|
81
|
-
snackbar:
|
|
82
|
-
list:
|
|
83
|
-
select:
|
|
84
|
-
search:
|
|
85
|
-
breadcrumbs:
|
|
86
|
-
icon:
|
|
87
|
-
reset:
|
|
88
|
-
tabs:
|
|
89
|
-
stepper:
|
|
90
|
-
rating:
|
|
91
|
-
header:
|
|
92
|
-
switchToken:
|
|
93
|
-
chat:
|
|
94
|
-
slider:
|
|
95
|
-
menu:
|
|
67
|
+
borders: T,
|
|
68
|
+
scroll: W,
|
|
69
|
+
radius: x,
|
|
70
|
+
input: v,
|
|
71
|
+
label: z,
|
|
72
|
+
link: M,
|
|
73
|
+
form: j,
|
|
74
|
+
typography: w,
|
|
75
|
+
textarea: I,
|
|
76
|
+
wrapper: q,
|
|
77
|
+
loader: A,
|
|
78
|
+
switchToggle: B,
|
|
79
|
+
skeleton: C,
|
|
80
|
+
animations: D,
|
|
81
|
+
snackbar: E,
|
|
82
|
+
list: F,
|
|
83
|
+
select: G,
|
|
84
|
+
search: H,
|
|
85
|
+
breadcrumbs: J,
|
|
86
|
+
icon: K,
|
|
87
|
+
reset: L,
|
|
88
|
+
tabs: N,
|
|
89
|
+
stepper: O,
|
|
90
|
+
rating: P,
|
|
91
|
+
header: Q,
|
|
92
|
+
switchToken: R,
|
|
93
|
+
chat: S,
|
|
94
|
+
slider: U,
|
|
95
|
+
menu: V,
|
|
96
96
|
spacing: k,
|
|
97
97
|
space: h,
|
|
98
|
-
scale: g
|
|
98
|
+
scale: g,
|
|
99
|
+
zIndex: X
|
|
99
100
|
};
|
|
100
101
|
export {
|
|
101
|
-
|
|
102
|
-
I as animations,
|
|
102
|
+
D as animations,
|
|
103
103
|
m as avatar,
|
|
104
|
-
|
|
104
|
+
T as borders,
|
|
105
105
|
c as box,
|
|
106
|
-
|
|
106
|
+
J as breadcrumbs,
|
|
107
107
|
u as breakpoints,
|
|
108
|
-
|
|
108
|
+
y as button,
|
|
109
109
|
n as card,
|
|
110
110
|
e as carousel,
|
|
111
|
-
|
|
111
|
+
S as chat,
|
|
112
112
|
t as chatbubble,
|
|
113
113
|
b as colors,
|
|
114
114
|
l as counter,
|
|
115
|
-
|
|
115
|
+
Rr as defaultTokens,
|
|
116
116
|
o as draganddrop,
|
|
117
|
-
|
|
117
|
+
p as draganddropfiles,
|
|
118
118
|
d as font,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
j as form,
|
|
120
|
+
Q as header,
|
|
121
|
+
K as icon,
|
|
122
|
+
v as input,
|
|
123
123
|
f as inputfile,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
z as label,
|
|
125
|
+
M as link,
|
|
126
|
+
F as list,
|
|
127
|
+
A as loader,
|
|
128
|
+
V as menu,
|
|
129
129
|
s as progressbar,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
i as radiogroup,
|
|
131
|
+
x as radius,
|
|
132
|
+
P as rating,
|
|
133
|
+
L as reset,
|
|
134
134
|
g as scale,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
W as scroll,
|
|
136
|
+
H as search,
|
|
137
137
|
a as searchModal,
|
|
138
|
-
|
|
138
|
+
G as select,
|
|
139
139
|
r as separator,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
C as skeleton,
|
|
141
|
+
U as slider,
|
|
142
|
+
E as snackbar,
|
|
143
143
|
h as space,
|
|
144
144
|
k as spacing,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
145
|
+
O as stepper,
|
|
146
|
+
B as switchToggle,
|
|
147
|
+
R as switchToken,
|
|
148
|
+
N as tabs,
|
|
149
|
+
I as textarea,
|
|
150
|
+
w as typography,
|
|
151
|
+
q as wrapper,
|
|
152
|
+
X as zIndex
|
|
152
153
|
};
|
package/tokens/input.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const input: {
|
|
|
30
30
|
'&:not([type="radio"], [type="checkbox"], [type="range"])': {
|
|
31
31
|
height: string;
|
|
32
32
|
width: string;
|
|
33
|
-
zIndex:
|
|
33
|
+
zIndex: (theme: Record<symbol, unknown>) => string;
|
|
34
34
|
};
|
|
35
35
|
'&[type="number"]': {
|
|
36
36
|
appearance: string;
|
|
@@ -206,7 +206,7 @@ export declare const input: {
|
|
|
206
206
|
display: string;
|
|
207
207
|
alignItems: string;
|
|
208
208
|
position: string;
|
|
209
|
-
zIndex:
|
|
209
|
+
zIndex: (theme: Record<symbol, unknown>) => string;
|
|
210
210
|
};
|
|
211
211
|
};
|
|
212
212
|
};
|
package/tokens/input.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import p from "../assets/svg/checkbox_border.svg.js";
|
|
2
|
+
import m from "../assets/svg/checkbox_bg_checked.svg.js";
|
|
3
|
+
import h from "../assets/svg/checkbox_disabled_bg_checked.svg.js";
|
|
4
|
+
import b from "../assets/svg/radio_bg.svg.js";
|
|
5
|
+
import u from "../assets/svg/radio_bg_checked.svg.js";
|
|
6
6
|
import { borders as t } from "./borders.js";
|
|
7
|
-
import { flexAlignItems as l, display as
|
|
7
|
+
import { flexAlignItems as l, display as g } from "./display.js";
|
|
8
8
|
import { cursors as n } from "./cursors.js";
|
|
9
9
|
import { getImgSrc as i, getFocusStyles as c } from "./utils.js";
|
|
10
10
|
import { InputColorVariant as r } from "../types/input.js";
|
|
11
|
-
import { Z_INDEX as d } from "../constants/positioning.js";
|
|
12
11
|
import { get as o } from "../utils/helpers.js";
|
|
13
|
-
import { FlexDirection as
|
|
14
|
-
import { TypographyVariant as
|
|
15
|
-
const
|
|
12
|
+
import { FlexDirection as f } from "../types/layout.js";
|
|
13
|
+
import { TypographyVariant as s } from "../types/typography.js";
|
|
14
|
+
const a = (e, d) => ({
|
|
16
15
|
position: "absolute",
|
|
17
16
|
top: 0,
|
|
18
17
|
left: 0,
|
|
19
18
|
width: "100%",
|
|
20
19
|
height: "100%",
|
|
21
20
|
border: t.generic({
|
|
22
|
-
width:
|
|
21
|
+
width: d,
|
|
23
22
|
color: e
|
|
24
23
|
})
|
|
25
24
|
}), W = {
|
|
@@ -33,7 +32,7 @@ const s = (e, p) => ({
|
|
|
33
32
|
position: "relative"
|
|
34
33
|
},
|
|
35
34
|
withGap: {
|
|
36
|
-
flexDirection:
|
|
35
|
+
flexDirection: f.Column,
|
|
37
36
|
alignItems: l.start,
|
|
38
37
|
gap: (e) => o(e, "spacing.xs", "theme.spacing.xs")
|
|
39
38
|
}
|
|
@@ -53,7 +52,7 @@ const s = (e, p) => ({
|
|
|
53
52
|
'&:not([type="radio"], [type="checkbox"], [type="range"])': {
|
|
54
53
|
height: "40px",
|
|
55
54
|
width: "100%",
|
|
56
|
-
zIndex:
|
|
55
|
+
zIndex: (e) => o(e, "zIndex.first", "theme.zIndex.first")
|
|
57
56
|
},
|
|
58
57
|
'&[type="number"]': {
|
|
59
58
|
appearance: "textfield",
|
|
@@ -74,7 +73,7 @@ const s = (e, p) => ({
|
|
|
74
73
|
width: "18px",
|
|
75
74
|
backgroundColor: "transparent",
|
|
76
75
|
border: "none",
|
|
77
|
-
backgroundImage: i(
|
|
76
|
+
backgroundImage: i(p),
|
|
78
77
|
"&:focus-visible": (e) => c({
|
|
79
78
|
inset: "-4px",
|
|
80
79
|
borderRadius: "3px",
|
|
@@ -95,9 +94,9 @@ const s = (e, p) => ({
|
|
|
95
94
|
backgroundSize: "18px",
|
|
96
95
|
backgroundColor: (e) => o(e, "colors.neutral.white", "theme.colors.neutral.white"),
|
|
97
96
|
border: "none",
|
|
98
|
-
backgroundImage: i(
|
|
97
|
+
backgroundImage: i(m),
|
|
99
98
|
"&[readonly], &:disabled": {
|
|
100
|
-
backgroundImage: i(
|
|
99
|
+
backgroundImage: i(h)
|
|
101
100
|
}
|
|
102
101
|
},
|
|
103
102
|
// RADIO
|
|
@@ -107,7 +106,7 @@ const s = (e, p) => ({
|
|
|
107
106
|
height: "20px",
|
|
108
107
|
width: "20px",
|
|
109
108
|
border: "none",
|
|
110
|
-
backgroundImage: i(
|
|
109
|
+
backgroundImage: i(b),
|
|
111
110
|
"&:focus-visible": c({
|
|
112
111
|
inset: "-4px",
|
|
113
112
|
borderRadius: "50%"
|
|
@@ -117,7 +116,7 @@ const s = (e, p) => ({
|
|
|
117
116
|
}
|
|
118
117
|
},
|
|
119
118
|
'&[type="radio"]:checked': {
|
|
120
|
-
backgroundImage: i(
|
|
119
|
+
backgroundImage: i(u)
|
|
121
120
|
}
|
|
122
121
|
},
|
|
123
122
|
defaultInteraction: {
|
|
@@ -133,24 +132,24 @@ const s = (e, p) => ({
|
|
|
133
132
|
},
|
|
134
133
|
mouseInteraction: {},
|
|
135
134
|
[r.Primary]: {
|
|
136
|
-
"& + .Input__border": (e) =>
|
|
135
|
+
"& + .Input__border": (e) => a(o(e, "colors.border.default", "theme.colors.border.default"), o(e, "values.borderThin", "theme.values.borderThin"))
|
|
137
136
|
},
|
|
138
137
|
[r.Success]: {
|
|
139
|
-
"& + .Input__border": (e) =>
|
|
138
|
+
"& + .Input__border": (e) => a(o(e, "colors.border.success", "theme.colors.border.success"), o(e, "values.borderThin", "theme.values.borderThin"))
|
|
140
139
|
},
|
|
141
140
|
[r.Warning]: {
|
|
142
|
-
"& + .Input__border": (e) =>
|
|
141
|
+
"& + .Input__border": (e) => a(o(e, "colors.primary.default", "theme.colors.primary.default"), o(e, "values.borderThin", "theme.values.borderThin"))
|
|
143
142
|
},
|
|
144
143
|
[r.Error]: {
|
|
145
|
-
"& + .Input__border": (e) =>
|
|
144
|
+
"& + .Input__border": (e) => a(o(e, "colors.border.error", "theme.colors.border.error"), o(e, "values.borderThin", "theme.values.borderThin"))
|
|
146
145
|
}
|
|
147
146
|
},
|
|
148
147
|
helper: {
|
|
149
148
|
default: {
|
|
150
149
|
sm: {
|
|
151
|
-
fontSize: (e) => o(e, `font.size.${
|
|
150
|
+
fontSize: (e) => o(e, `font.size.${s.Caption}`, `font.size.${s.Caption}`),
|
|
152
151
|
fontWeight: (e) => o(e, "font.weight.normal", "theme.font.weight.normal"),
|
|
153
|
-
lineHeight: (e) => o(e, `font.line.height.${
|
|
152
|
+
lineHeight: (e) => o(e, `font.line.height.${s.Caption}`, `theme.font.line.height.${s.Caption}`)
|
|
154
153
|
},
|
|
155
154
|
md: {
|
|
156
155
|
color: (e) => o(e, "colors.text.disabled", "theme.colors.text.disabled"),
|
|
@@ -186,10 +185,10 @@ const s = (e, p) => ({
|
|
|
186
185
|
},
|
|
187
186
|
adornment: {
|
|
188
187
|
default: {
|
|
189
|
-
display:
|
|
188
|
+
display: g.flex,
|
|
190
189
|
alignItems: l.center,
|
|
191
190
|
position: "relative",
|
|
192
|
-
zIndex:
|
|
191
|
+
zIndex: (e) => o(e, "zIndex.first", "theme.zIndex.first")
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
194
|
};
|
package/tokens/inputfile.d.ts
CHANGED
package/tokens/inputfile.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { get as t } from "../utils/helpers.js";
|
|
2
|
+
const n = {
|
|
3
3
|
default: {
|
|
4
4
|
overflow: "hidden",
|
|
5
5
|
position: "relative"
|
|
@@ -10,9 +10,9 @@ const o = {
|
|
|
10
10
|
width: "100%",
|
|
11
11
|
height: "100%",
|
|
12
12
|
position: "absolute",
|
|
13
|
-
zIndex:
|
|
13
|
+
zIndex: (e) => t(e, "zIndex.negative", "theme.zIndex.negative")
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
n as inputfile
|
|
18
18
|
};
|
package/tokens/link.d.ts
CHANGED
package/tokens/loader.d.ts
CHANGED
package/tokens/loader.js
CHANGED
package/tokens/menu.d.ts
CHANGED
package/tokens/menu.js
CHANGED
package/tokens/modal.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ export declare const modal: {
|
|
|
5
5
|
alignItems: string;
|
|
6
6
|
justifyContent: string;
|
|
7
7
|
padding: string;
|
|
8
|
-
fontSize: (theme: Record<symbol, unknown>) => string;
|
|
9
|
-
fontWeight: string;
|
|
10
8
|
borderBottom: (theme: Record<symbol, unknown>) => string;
|
|
11
9
|
};
|
|
12
10
|
withTitle: {
|
|
@@ -17,6 +15,9 @@ export declare const modal: {
|
|
|
17
15
|
default: {
|
|
18
16
|
display: string;
|
|
19
17
|
alignItems: string;
|
|
18
|
+
fontSize: (theme: Record<symbol, unknown>) => string;
|
|
19
|
+
fontWeight: (theme: Record<symbol, unknown>) => string;
|
|
20
|
+
color: (theme: Record<symbol, unknown>) => string;
|
|
20
21
|
padding: (theme: Record<symbol, unknown>) => string;
|
|
21
22
|
margin: (theme: Record<symbol, unknown>) => string;
|
|
22
23
|
};
|
|
@@ -60,7 +61,7 @@ export declare const modal: {
|
|
|
60
61
|
closeButton: {
|
|
61
62
|
default: {
|
|
62
63
|
background: (theme: Record<symbol, unknown>) => string;
|
|
63
|
-
border:
|
|
64
|
+
border: string;
|
|
64
65
|
cursor: string;
|
|
65
66
|
padding: (theme: Record<symbol, unknown>) => string;
|
|
66
67
|
};
|
|
@@ -76,12 +77,13 @@ export declare const modal: {
|
|
|
76
77
|
display: string;
|
|
77
78
|
alignItems: string;
|
|
78
79
|
justifyContent: string;
|
|
79
|
-
zIndex:
|
|
80
|
+
zIndex: (theme: Record<symbol, unknown>) => string;
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
83
|
icons: {
|
|
83
84
|
close: {
|
|
84
85
|
name: string;
|
|
86
|
+
fill: string;
|
|
85
87
|
width: number;
|
|
86
88
|
height: number;
|
|
87
89
|
};
|