@hivcd-printshop/design-system 1.2.1 → 1.2.2

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/dist/index.mjs CHANGED
@@ -175,6 +175,89 @@ var IconCompass = ({ className, fill }) => {
175
175
  }
176
176
  );
177
177
  };
178
+ var IconRadioSelected = ({
179
+ className,
180
+ stroke,
181
+ fill
182
+ }) => {
183
+ return /* @__PURE__ */ jsxs(
184
+ "svg",
185
+ {
186
+ className,
187
+ width: "16",
188
+ height: "16",
189
+ viewBox: "0 0 16 16",
190
+ fill: "none",
191
+ xmlns: "http://www.w3.org/2000/svg",
192
+ children: [
193
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: stroke || "#121212" }),
194
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "4", fill: fill || "#121212" })
195
+ ]
196
+ }
197
+ );
198
+ };
199
+ var IconRadioUnselected = ({
200
+ className,
201
+ stroke
202
+ }) => {
203
+ return /* @__PURE__ */ jsx(
204
+ "svg",
205
+ {
206
+ className,
207
+ width: "16",
208
+ height: "16",
209
+ viewBox: "0 0 16 16",
210
+ fill: "none",
211
+ xmlns: "http://www.w3.org/2000/svg",
212
+ children: /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "7", stroke: stroke || "#B4B9C2" })
213
+ }
214
+ );
215
+ };
216
+ var IconExclamation = ({ className, fill }) => {
217
+ return /* @__PURE__ */ jsxs(
218
+ "svg",
219
+ {
220
+ className,
221
+ width: "12",
222
+ height: "12",
223
+ viewBox: "0 0 12 12",
224
+ fill: "none",
225
+ xmlns: "http://www.w3.org/2000/svg",
226
+ children: [
227
+ /* @__PURE__ */ jsx(
228
+ "path",
229
+ {
230
+ d: "M6.41438 7.18735H5.57954L5.50175 3.10938H6.49218L6.41438 7.18735ZM5.40001 8.3313C5.39801 8.23061 5.42395 8.13738 5.47781 8.05161C5.53167 7.96583 5.60448 7.89777 5.69624 7.84743C5.79 7.79708 5.89174 7.77191 6.00145 7.77191C6.10718 7.77191 6.20592 7.79708 6.29768 7.84743C6.38945 7.89777 6.46226 7.96583 6.51612 8.05161C6.57197 8.13738 6.5999 8.23061 6.5999 8.3313C6.5999 8.43199 6.57197 8.52522 6.51612 8.611C6.46226 8.69677 6.38945 8.76483 6.29768 8.81518C6.20592 8.86552 6.10718 8.89069 6.00145 8.89069C5.89174 8.89069 5.79 8.86552 5.69624 8.81518C5.60448 8.76483 5.53167 8.69677 5.47781 8.611C5.42395 8.52522 5.39801 8.43199 5.40001 8.3313Z",
231
+ fill: fill || "#505865"
232
+ }
233
+ ),
234
+ /* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "4.5", stroke: fill || "#505865" })
235
+ ]
236
+ }
237
+ );
238
+ };
239
+ var IconClose = ({ className, stroke }) => {
240
+ return /* @__PURE__ */ jsx(
241
+ "svg",
242
+ {
243
+ className,
244
+ width: "16",
245
+ height: "16",
246
+ viewBox: "0 0 16 16",
247
+ fill: "none",
248
+ xmlns: "http://www.w3.org/2000/svg",
249
+ children: /* @__PURE__ */ jsx(
250
+ "path",
251
+ {
252
+ d: "M4 4L12 12M12 4L4 12",
253
+ stroke: stroke || "#6d7683",
254
+ strokeWidth: "1.5",
255
+ strokeLinecap: "round"
256
+ }
257
+ )
258
+ }
259
+ );
260
+ };
178
261
 
179
262
  // src/components/BackButton/BackButton.tsx
180
263
  import { jsx as jsx2 } from "react/jsx-runtime";
@@ -862,30 +945,49 @@ function List({
862
945
 
863
946
  // src/components/Modal/Modal.tsx
864
947
  import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
865
- var ModalBase = ({ isVisible, header, children, className }) => {
948
+ var ModalBase = ({ isVisible, header, children, className, onClose }) => {
866
949
  if (!isVisible) return null;
867
- return /* @__PURE__ */ jsx25("div", { className: cn("fixed inset-0 z-50 pointer-events-auto"), children: /* @__PURE__ */ jsx25(
868
- "div",
869
- {
870
- className: cn("fixed inset-0 z-1001 flex items-center justify-center pointer-events-auto"),
871
- children: /* @__PURE__ */ jsxs14(
872
- "main",
873
- {
874
- className: cn(
875
- "w-110 pt-8 h-fit",
876
- "flex flex-col items-center",
877
- "border border-gray02",
878
- "bg-white shadow-[0 0 30px 0 rgba(0, 0, 0, 0.08);]",
879
- className
950
+ return /* @__PURE__ */ jsxs14("div", { className: cn("fixed inset-0 z-50"), children: [
951
+ /* @__PURE__ */ jsx25(
952
+ "div",
953
+ {
954
+ "aria-hidden": true,
955
+ onClick: onClose,
956
+ className: cn("fixed inset-0 z-1000 bg-black/10", onClose && "cursor-pointer")
957
+ }
958
+ ),
959
+ /* @__PURE__ */ jsx25("div", { className: "fixed inset-0 z-1001 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxs14(
960
+ "main",
961
+ {
962
+ role: "dialog",
963
+ "aria-modal": "true",
964
+ className: cn(
965
+ "relative w-110 pt-8 h-fit pointer-events-auto",
966
+ "flex flex-col items-center",
967
+ "border border-gray02",
968
+ "bg-white shadow-[0px_0px_30px_0px_rgba(0,0,0,0.08)]",
969
+ className
970
+ ),
971
+ children: [
972
+ onClose && /* @__PURE__ */ jsx25(
973
+ "button",
974
+ {
975
+ type: "button",
976
+ onClick: onClose,
977
+ "aria-label": "\uB2EB\uAE30",
978
+ className: cn(
979
+ "absolute right-3 top-3 flex size-8 items-center justify-center",
980
+ "text-tertiary transition-colors hover:bg-gray00 active:bg-gray01 cursor-pointer"
981
+ ),
982
+ children: /* @__PURE__ */ jsx25(IconClose, {})
983
+ }
880
984
  ),
881
- children: [
882
- /* @__PURE__ */ jsx25("h1", { className: cn("text-strong font-[500] text-[24px] leading-[32px]"), children: header }),
883
- children
884
- ]
885
- }
886
- )
887
- }
888
- ) });
985
+ /* @__PURE__ */ jsx25("h1", { className: cn("text-strong font-[500] text-[24px] leading-[32px]"), children: header }),
986
+ children
987
+ ]
988
+ }
989
+ ) })
990
+ ] });
889
991
  };
890
992
  var Contents = ({ children, className }) => {
891
993
  return /* @__PURE__ */ jsx25(
@@ -1137,18 +1239,6 @@ function useControllableState(controlled, defaultValue) {
1137
1239
  return [value, setValue, isControlled];
1138
1240
  }
1139
1241
 
1140
- // src/components/SideRadioAccordion/Exclamation.svg
1141
- var Exclamation_default = "./Exclamation-IUYZYYC4.svg";
1142
-
1143
- // src/components/SideRadioAccordion/ChevronDown.svg
1144
- var ChevronDown_default = "./ChevronDown-XSALXCW4.svg";
1145
-
1146
- // src/components/SideRadioAccordion/RadioSelected.svg
1147
- var RadioSelected_default = "./RadioSelected-DOLVV7ZM.svg";
1148
-
1149
- // src/components/SideRadioAccordion/RadioUnselected.svg
1150
- var RadioUnselected_default = "./RadioUnselected-QN74EU46.svg";
1151
-
1152
1242
  // src/components/SideRadioAccordion/SideRadioAccordion.tsx
1153
1243
  import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
1154
1244
  var printColorBgClass = {
@@ -1239,14 +1329,7 @@ var Stepper = ({ step, title, isOpen, collapsible, onClick, className }) => {
1239
1329
  className: cn(base, "cursor-pointer hover:bg-gray00 active:bg-gray01", className),
1240
1330
  children: [
1241
1331
  label,
1242
- /* @__PURE__ */ jsx33(
1243
- "img",
1244
- {
1245
- src: ChevronDown_default,
1246
- alt: "",
1247
- className: cn("transition-transform", isOpen && "rotate-180")
1248
- }
1249
- )
1332
+ /* @__PURE__ */ jsx33(IconChevronDownXS, { className: cn("transition-transform", isOpen && "rotate-180") })
1250
1333
  ]
1251
1334
  }
1252
1335
  );
@@ -1286,7 +1369,7 @@ var RadioToggleItem = ({
1286
1369
  ),
1287
1370
  open && /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-2 px-3 py-3 bg-white", children: [
1288
1371
  /* @__PURE__ */ jsx33("p", { className: "text-caption-regular text-secondary", children: content }),
1289
- badges && badges.length > 0 && /* @__PURE__ */ jsx33("div", { className: "flex gap-1", children: badges.map((badge) => /* @__PURE__ */ jsx33(Badge, { label: badge }, badge)) }),
1372
+ badges && badges.length > 0 && /* @__PURE__ */ jsx33("div", { className: "flex flex-wrap gap-1", children: badges.map((badge) => /* @__PURE__ */ jsx33(Badge, { label: badge }, badge)) }),
1290
1373
  labelTextButton && /* @__PURE__ */ jsx33(
1291
1374
  TextButton2,
1292
1375
  {
@@ -1300,14 +1383,8 @@ var RadioToggleItem = ({
1300
1383
  ] });
1301
1384
  };
1302
1385
  var Radio = ({ selected = false, className }) => {
1303
- return /* @__PURE__ */ jsx33(
1304
- "img",
1305
- {
1306
- src: selected ? RadioSelected_default : RadioUnselected_default,
1307
- alt: "",
1308
- className: cn("w-6 h-6", className)
1309
- }
1310
- );
1386
+ const Icon = selected ? IconRadioSelected : IconRadioUnselected;
1387
+ return /* @__PURE__ */ jsx33(Icon, { className: cn("w-6 h-6", className) });
1311
1388
  };
1312
1389
  var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
1313
1390
  return /* @__PURE__ */ jsxs18(
@@ -1323,7 +1400,7 @@ var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
1323
1400
  className
1324
1401
  ),
1325
1402
  children: [
1326
- showIcon && /* @__PURE__ */ jsx33("img", { src: Exclamation_default, alt: "" }),
1403
+ showIcon && /* @__PURE__ */ jsx33(IconExclamation, {}),
1327
1404
  label
1328
1405
  ]
1329
1406
  }
@@ -1334,7 +1411,7 @@ var Badge = ({ label, className }) => {
1334
1411
  "div",
1335
1412
  {
1336
1413
  className: cn(
1337
- "w-fit h-fit px-2 py-0.5 border border-gray02",
1414
+ "w-fit h-fit px-2 py-0.5 border border-gray02 shrink-0 whitespace-nowrap",
1338
1415
  "text-tertiary text-caption-book",
1339
1416
  className
1340
1417
  ),
@@ -1964,8 +2041,12 @@ export {
1964
2041
  FormTextArea,
1965
2042
  IconCheck,
1966
2043
  IconChevronDownXS,
2044
+ IconClose,
1967
2045
  IconCompass,
2046
+ IconExclamation,
1968
2047
  IconInfo,
2048
+ IconRadioSelected,
2049
+ IconRadioUnselected,
1969
2050
  List,
1970
2051
  Modal,
1971
2052
  ModalText,