@ultraviolet/ui 1.0.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.
Files changed (115) hide show
  1. package/LICENSE +189 -0
  2. package/README.md +64 -0
  3. package/dist/index.d.ts +2427 -0
  4. package/dist/react-datepicker/dist/react-datepicker.min.css.js +3 -0
  5. package/dist/react-toastify/dist/ReactToastify.min.css.js +3 -0
  6. package/dist/src/components/ActionBar/index.js +55 -0
  7. package/dist/src/components/Alert/index.js +144 -0
  8. package/dist/src/components/Avatar/index.js +90 -0
  9. package/dist/src/components/Badge/index.js +143 -0
  10. package/dist/src/components/Banner/index.js +117 -0
  11. package/dist/src/components/BarChart/Tooltip.js +63 -0
  12. package/dist/src/components/BarChart/index.js +94 -0
  13. package/dist/src/components/BarStack/index.js +223 -0
  14. package/dist/src/components/Breadcrumbs/index.js +89 -0
  15. package/dist/src/components/Bullet/index.js +137 -0
  16. package/dist/src/components/Button/index.js +303 -0
  17. package/dist/src/components/Card/index.js +81 -0
  18. package/dist/src/components/Carousel/index.js +162 -0
  19. package/dist/src/components/Checkbox/index.js +338 -0
  20. package/dist/src/components/CopyButton/index.js +92 -0
  21. package/dist/src/components/DateInput/index.js +250 -0
  22. package/dist/src/components/EmptyState/index.js +124 -0
  23. package/dist/src/components/Expandable/index.js +84 -0
  24. package/dist/src/components/Icon/index.js +350 -0
  25. package/dist/src/components/LineChart/CustomLegend.js +147 -0
  26. package/dist/src/components/LineChart/Tooltip.js +58 -0
  27. package/dist/src/components/LineChart/helpers.js +75 -0
  28. package/dist/src/components/LineChart/index.js +139 -0
  29. package/dist/src/components/Link/index.js +159 -0
  30. package/dist/src/components/List/Body.js +22 -0
  31. package/dist/src/components/List/Cell.js +38 -0
  32. package/dist/src/components/List/HeaderCell.js +118 -0
  33. package/dist/src/components/List/HeaderRow.js +47 -0
  34. package/dist/src/components/List/ListContext.js +120 -0
  35. package/dist/src/components/List/Row.js +211 -0
  36. package/dist/src/components/List/SelectBar.js +52 -0
  37. package/dist/src/components/List/SkeletonRows.js +54 -0
  38. package/dist/src/components/List/constants.js +3 -0
  39. package/dist/src/components/List/index.js +77 -0
  40. package/dist/src/components/Loader/index.js +87 -0
  41. package/dist/src/components/Menu/Item.js +122 -0
  42. package/dist/src/components/Menu/index.js +143 -0
  43. package/dist/src/components/Modal/index.js +279 -0
  44. package/dist/src/components/Notice/index.js +33 -0
  45. package/dist/src/components/NumberInput/helpers.js +6 -0
  46. package/dist/src/components/NumberInput/index.js +366 -0
  47. package/dist/src/components/Pagination/getPageNumbers.js +32 -0
  48. package/dist/src/components/Pagination/index.js +118 -0
  49. package/dist/src/components/PasswordCheck/index.js +42 -0
  50. package/dist/src/components/PasswordStrengthMeter/index.js +116 -0
  51. package/dist/src/components/PieChart/Legends.js +183 -0
  52. package/dist/src/components/PieChart/Tooltip.js +64 -0
  53. package/dist/src/components/PieChart/index.js +133 -0
  54. package/dist/src/components/PieChart/patterns.js +9 -0
  55. package/dist/src/components/Popover/index.js +131 -0
  56. package/dist/src/components/ProgressBar/index.js +72 -0
  57. package/dist/src/components/Radio/index.js +231 -0
  58. package/dist/src/components/Row/index.js +43 -0
  59. package/dist/src/components/SelectInput/index.js +662 -0
  60. package/dist/src/components/SelectableCard/index.js +154 -0
  61. package/dist/src/components/Separator/index.js +91 -0
  62. package/dist/src/components/Skeleton/Block.js +53 -0
  63. package/dist/src/components/Skeleton/Blocks.js +52 -0
  64. package/dist/src/components/Skeleton/BoxWithIcon.js +47 -0
  65. package/dist/src/components/Skeleton/Donut.js +58 -0
  66. package/dist/src/components/Skeleton/IconSkeleton.js +37 -0
  67. package/dist/src/components/Skeleton/Line.js +19 -0
  68. package/dist/src/components/Skeleton/List.js +60 -0
  69. package/dist/src/components/Skeleton/Slider.js +57 -0
  70. package/dist/src/components/Skeleton/index.js +85 -0
  71. package/dist/src/components/Snippet/index.js +250 -0
  72. package/dist/src/components/Stack/index.js +24 -0
  73. package/dist/src/components/Status/index.js +101 -0
  74. package/dist/src/components/StepList/index.js +81 -0
  75. package/dist/src/components/Stepper/index.js +217 -0
  76. package/dist/src/components/SwitchButton/FocusOverlay.js +47 -0
  77. package/dist/src/components/SwitchButton/index.js +131 -0
  78. package/dist/src/components/Table/Body.js +12 -0
  79. package/dist/src/components/Table/Cell.js +27 -0
  80. package/dist/src/components/Table/Header.js +21 -0
  81. package/dist/src/components/Table/HeaderCell.js +119 -0
  82. package/dist/src/components/Table/HeaderRow.js +35 -0
  83. package/dist/src/components/Table/Row.js +70 -0
  84. package/dist/src/components/Table/SelectBar.js +52 -0
  85. package/dist/src/components/Table/SkeletonRows.js +52 -0
  86. package/dist/src/components/Table/TableContext.js +91 -0
  87. package/dist/src/components/Table/index.js +84 -0
  88. package/dist/src/components/Tabs/Tab.js +165 -0
  89. package/dist/src/components/Tabs/TabMenu.js +46 -0
  90. package/dist/src/components/Tabs/TabMenuItem.js +40 -0
  91. package/dist/src/components/Tabs/TabsContext.js +6 -0
  92. package/dist/src/components/Tabs/index.js +117 -0
  93. package/dist/src/components/Tag/index.js +177 -0
  94. package/dist/src/components/TagInput/index.js +277 -0
  95. package/dist/src/components/TagList/index.js +110 -0
  96. package/dist/src/components/Text/index.js +106 -0
  97. package/dist/src/components/TextInput/index.js +529 -0
  98. package/dist/src/components/TimeInput/index.js +38 -0
  99. package/dist/src/components/Toaster/index.js +116 -0
  100. package/dist/src/components/Toggle/index.js +192 -0
  101. package/dist/src/components/Tooltip/helpers.js +131 -0
  102. package/dist/src/components/Tooltip/index.js +275 -0
  103. package/dist/src/components/VerificationCode/index.js +203 -0
  104. package/dist/src/helpers/isJSON.js +11 -0
  105. package/dist/src/helpers/legend.js +13 -0
  106. package/dist/src/helpers/recursivelyGetChildrenString.js +12 -0
  107. package/dist/src/index.js +63 -0
  108. package/dist/src/theme/index.js +25 -0
  109. package/dist/src/utils/animations.js +250 -0
  110. package/dist/src/utils/capitalize.js +4 -0
  111. package/dist/src/utils/ids.js +12 -0
  112. package/dist/src/utils/normalize.js +36 -0
  113. package/dist/src/utils/responsive/Breakpoint.js +12 -0
  114. package/dist/src/utils/responsive/utilities.js +12 -0
  115. package/package.json +70 -0
@@ -0,0 +1,231 @@
1
+ import _styled from '@emotion/styled/base';
2
+ import { forwardRef, useId } from 'react';
3
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
4
+
5
+ const InnerCircleRing = /*#__PURE__*/_styled("circle", {
6
+ target: "ehkrmld4"
7
+ })("fill:", _ref => {
8
+ let {
9
+ theme
10
+ } = _ref;
11
+ return theme.colors.neutral.backgroundWeak;
12
+ }, ";");
13
+ const RadioMark = /*#__PURE__*/_styled("circle", {
14
+ target: "ehkrmld3"
15
+ })();
16
+ const RadioMarkedIcon = () => jsxs("g", {
17
+ children: [jsx("circle", {
18
+ cx: "12",
19
+ cy: "12",
20
+ r: "8",
21
+ strokeWidth: "2"
22
+ }), jsx(InnerCircleRing, {
23
+ cx: "12",
24
+ cy: "12",
25
+ r: "6"
26
+ }), jsx(RadioMark, {
27
+ cx: "12",
28
+ cy: "12",
29
+ r: "4"
30
+ })]
31
+ });
32
+ const StyledIcon = /*#__PURE__*/_styled("svg", {
33
+ target: "ehkrmld2"
34
+ })("height:", _ref2 => {
35
+ let {
36
+ size
37
+ } = _ref2;
38
+ return size;
39
+ }, "px;width:", _ref3 => {
40
+ let {
41
+ size
42
+ } = _ref3;
43
+ return size;
44
+ }, "px;min-width:", _ref4 => {
45
+ let {
46
+ size
47
+ } = _ref4;
48
+ return size;
49
+ }, "px;min-height:", _ref5 => {
50
+ let {
51
+ size
52
+ } = _ref5;
53
+ return size;
54
+ }, "px;border-radius:", _ref6 => {
55
+ let {
56
+ theme
57
+ } = _ref6;
58
+ return theme.radii.circle;
59
+ }, ";fill:", _ref7 => {
60
+ let {
61
+ theme
62
+ } = _ref7;
63
+ return theme.colors.neutral.textWeak;
64
+ }, ";", InnerCircleRing, "{fill:", _ref8 => {
65
+ let {
66
+ theme
67
+ } = _ref8;
68
+ return theme.colors.neutral.backgroundWeak;
69
+ }, ";}");
70
+ const RadioInput = /*#__PURE__*/_styled('input', {
71
+ shouldForwardProp: prop => !['size'].includes(prop),
72
+ target: "ehkrmld1"
73
+ })("cursor:pointer;position:absolute;height:", _ref9 => {
74
+ let {
75
+ size
76
+ } = _ref9;
77
+ return size;
78
+ }, "px;width:", _ref10 => {
79
+ let {
80
+ size
81
+ } = _ref10;
82
+ return size;
83
+ }, "px;opacity:0;white-space:nowrap;border-width:0;&+", StyledIcon, "{", RadioMark, "{transform-origin:center;transition:200ms transform ease-in-out;transform:scale(0);}}&:checked+svg{", RadioMark, "{transform:scale(1);}}&:checked[aria-disabled='false'][aria-invalid='false']+", StyledIcon, "{fill:", _ref11 => {
84
+ let {
85
+ theme
86
+ } = _ref11;
87
+ return theme.colors.primary.backgroundStrong;
88
+ }, ";}&[aria-invalid='true']:not([aria-disabled='true'])+", StyledIcon, "{fill:", _ref12 => {
89
+ let {
90
+ theme
91
+ } = _ref12;
92
+ return theme.colors.danger.text;
93
+ }, ";}&:focus+", StyledIcon, "{background-color:", _ref13 => {
94
+ let {
95
+ theme
96
+ } = _ref13;
97
+ return theme.colors.primary.background;
98
+ }, ";fill:", _ref14 => {
99
+ let {
100
+ theme
101
+ } = _ref14;
102
+ return theme.colors.primary.backgroundStrong;
103
+ }, ";", InnerCircleRing, "{fill:", _ref15 => {
104
+ let {
105
+ theme
106
+ } = _ref15;
107
+ return theme.colors.primary.background;
108
+ }, ";}}&[aria-invalid='true']:focus+", StyledIcon, "{background-color:", _ref16 => {
109
+ let {
110
+ theme
111
+ } = _ref16;
112
+ return theme.colors.danger.background;
113
+ }, ";fill:", _ref17 => {
114
+ let {
115
+ theme
116
+ } = _ref17;
117
+ return theme.colors.danger.text;
118
+ }, ";", InnerCircleRing, "{fill:", _ref18 => {
119
+ let {
120
+ theme
121
+ } = _ref18;
122
+ return theme.colors.danger.background;
123
+ }, ";}}");
124
+ const RadioContainer = /*#__PURE__*/_styled("div", {
125
+ target: "ehkrmld0"
126
+ })("position:relative;display:flex;align-items:flex-start;gap:", _ref19 => {
127
+ let {
128
+ theme
129
+ } = _ref19;
130
+ return theme.space['1'];
131
+ }, ";&[aria-disabled='false'],&[aria-disabled='false']>label{cursor:pointer;}:hover[aria-disabled='false']{", RadioInput, "+", StyledIcon, "{background-color:", _ref20 => {
132
+ let {
133
+ theme
134
+ } = _ref20;
135
+ return theme.colors.primary.background;
136
+ }, ";fill:", _ref21 => {
137
+ let {
138
+ theme
139
+ } = _ref21;
140
+ return theme.colors.primary.backgroundStrong;
141
+ }, ";", InnerCircleRing, "{fill:", _ref22 => {
142
+ let {
143
+ theme
144
+ } = _ref22;
145
+ return theme.colors.primary.background;
146
+ }, ";}}", RadioInput, "[aria-invalid='true']+", StyledIcon, "{background-color:", _ref23 => {
147
+ let {
148
+ theme
149
+ } = _ref23;
150
+ return theme.colors.danger.background;
151
+ }, ";fill:", _ref24 => {
152
+ let {
153
+ theme
154
+ } = _ref24;
155
+ return theme.colors.danger.text;
156
+ }, ";", InnerCircleRing, "{fill:", _ref25 => {
157
+ let {
158
+ theme
159
+ } = _ref25;
160
+ return theme.colors.danger.background;
161
+ }, ";}}}&[aria-disabled='true']{cursor:not-allowed;color:", _ref26 => {
162
+ let {
163
+ theme
164
+ } = _ref26;
165
+ return theme.colors.neutral.textDisabled;
166
+ }, ";&>label{cursor:not-allowed;}", StyledIcon, "{fill:", _ref27 => {
167
+ let {
168
+ theme
169
+ } = _ref27;
170
+ return theme.colors.neutral.textDisabled;
171
+ }, ";", InnerCircleRing, "{fill:", _ref28 => {
172
+ let {
173
+ theme
174
+ } = _ref28;
175
+ return theme.colors.neutral.backgroundStrong;
176
+ }, ";}}}");
177
+ const Radio = /*#__PURE__*/forwardRef((_ref29, ref) => {
178
+ let {
179
+ checked = false,
180
+ onChange,
181
+ onFocus,
182
+ onBlur,
183
+ disabled = false,
184
+ error,
185
+ name,
186
+ value,
187
+ size = 24,
188
+ children,
189
+ className,
190
+ autoFocus,
191
+ onKeyDown,
192
+ 'aria-label': ariaLabel,
193
+ 'data-testid': dataTestId
194
+ } = _ref29;
195
+ const id = useId();
196
+ const computedName = name ?? id;
197
+ return jsxs(RadioContainer, {
198
+ "aria-disabled": disabled,
199
+ className: className,
200
+ "data-checked": checked,
201
+ "data-error": error,
202
+ "data-testid": dataTestId,
203
+ children: [jsx(RadioInput, {
204
+ type: "radio",
205
+ "aria-invalid": !!error,
206
+ "aria-disabled": disabled,
207
+ "aria-label": ariaLabel,
208
+ checked: checked,
209
+ id: `${computedName}-${value}`,
210
+ onChange: onChange,
211
+ onFocus: onFocus,
212
+ onKeyDown: onKeyDown,
213
+ onBlur: onBlur,
214
+ value: value,
215
+ disabled: disabled,
216
+ name: computedName,
217
+ autoFocus: autoFocus,
218
+ ref: ref,
219
+ size: size
220
+ }), jsx(StyledIcon, {
221
+ size: size,
222
+ viewBox: "0 0 24 24",
223
+ children: jsx(RadioMarkedIcon, {})
224
+ }), children ? jsx("label", {
225
+ htmlFor: `${computedName}-${value}`,
226
+ children: children
227
+ }) : null]
228
+ });
229
+ });
230
+
231
+ export { Radio };
@@ -0,0 +1,43 @@
1
+ import _styled from '@emotion/styled/base';
2
+ import { jsx } from '@emotion/react/jsx-runtime';
3
+
4
+ const StyledRow = /*#__PURE__*/_styled('div', {
5
+ shouldForwardProp: prop => !['templateColumns', 'gap', 'alignItems', 'justifyContent'].includes(prop),
6
+ target: "e3f5lzv0"
7
+ })("display:grid;", _ref => {
8
+ let {
9
+ theme,
10
+ gap,
11
+ alignItems = 'normal',
12
+ templateColumns,
13
+ justifyContent = 'normal'
14
+ } = _ref;
15
+ return `
16
+ grid-template-columns: ${templateColumns};
17
+ ${gap ? `gap: ${theme.space[gap]};` : ''}
18
+ align-items: ${alignItems};
19
+ justify-content: ${justifyContent};
20
+ `;
21
+ }, ";");
22
+ const Row = _ref2 => {
23
+ let {
24
+ className,
25
+ 'data-testid': dataTestId,
26
+ children,
27
+ templateColumns,
28
+ alignItems,
29
+ justifyContent,
30
+ gap
31
+ } = _ref2;
32
+ return jsx(StyledRow, {
33
+ className: className,
34
+ "data-testid": dataTestId,
35
+ gap: gap,
36
+ templateColumns: templateColumns,
37
+ alignItems: alignItems,
38
+ justifyContent: justifyContent,
39
+ children: children
40
+ });
41
+ };
42
+
43
+ export { Row, StyledRow };