@liujip0/components 0.0.2 → 0.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.
Files changed (60) hide show
  1. package/README.md +35 -0
  2. package/dist/Input.module-C7oR_KDs.js +13 -0
  3. package/dist/assets/Backdrop.css +1 -0
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/Counter.css +1 -0
  6. package/dist/assets/Dialog.css +1 -0
  7. package/dist/assets/Divider.css +1 -0
  8. package/dist/assets/IconButton.css +1 -1
  9. package/dist/assets/Input.css +1 -0
  10. package/dist/assets/Radio.css +1 -0
  11. package/dist/assets/RadioGroup.css +1 -0
  12. package/dist/assets/Select.css +1 -0
  13. package/dist/assets/Snackbar.css +1 -0
  14. package/dist/assets/Tab.css +1 -0
  15. package/dist/assets/TabBar.css +1 -0
  16. package/dist/assets/Table.css +1 -0
  17. package/dist/assets/Tabs.css +1 -0
  18. package/dist/assets/ToggleButton.css +1 -1
  19. package/dist/assets/ToggleButtonGroup.css +1 -1
  20. package/dist/assets/Tooltip.css +1 -0
  21. package/dist/assets/main.css +1 -0
  22. package/dist/components/Backdrop/Backdrop.d.ts +6 -0
  23. package/dist/components/Backdrop/Backdrop.js +18 -0
  24. package/dist/components/Button/Button.js +3 -3
  25. package/dist/components/Button/IconButton/IconButton.js +7 -7
  26. package/dist/components/Button/ToggleButton/ToggleButton.js +16 -16
  27. package/dist/components/Button/ToggleButton/ToggleButtonGroup.js +15 -15
  28. package/dist/components/Dialog/Dialog.d.ts +19 -0
  29. package/dist/components/Dialog/Dialog.js +44 -0
  30. package/dist/components/Divider/Divider.d.ts +5 -0
  31. package/dist/components/Divider/Divider.js +17 -0
  32. package/dist/components/Input/Checkbox/Checkbox.d.ts +9 -0
  33. package/dist/components/Input/Checkbox/Checkbox.js +51 -0
  34. package/dist/components/Input/Counter/Counter.d.ts +11 -0
  35. package/dist/components/Input/Counter/Counter.js +57 -0
  36. package/dist/components/Input/Input.d.ts +17 -0
  37. package/dist/components/Input/Input.js +63 -0
  38. package/dist/components/Input/Radio/Radio.d.ts +10 -0
  39. package/dist/components/Input/Radio/Radio.js +53 -0
  40. package/dist/components/Input/Radio/RadioGroup.d.ts +13 -0
  41. package/dist/components/Input/Radio/RadioGroup.js +41 -0
  42. package/dist/components/Input/Select/Select.d.ts +14 -0
  43. package/dist/components/Input/Select/Select.js +63 -0
  44. package/dist/components/Input/TextArea.d.ts +15 -0
  45. package/dist/components/Input/TextArea.js +56 -0
  46. package/dist/components/Snackbar/Snackbar.d.ts +9 -0
  47. package/dist/components/Snackbar/Snackbar.js +28 -0
  48. package/dist/components/Table/Table.d.ts +18 -0
  49. package/dist/components/Table/Table.js +25 -0
  50. package/dist/components/Tabs/Tab.d.ts +9 -0
  51. package/dist/components/Tabs/Tab.js +25 -0
  52. package/dist/components/Tabs/TabBar.d.ts +8 -0
  53. package/dist/components/Tabs/TabBar.js +17 -0
  54. package/dist/components/Tabs/Tabs.d.ts +5 -0
  55. package/dist/components/Tabs/Tabs.js +34 -0
  56. package/dist/components/Tooltip/Tooltip.d.ts +7 -0
  57. package/dist/components/Tooltip/Tooltip.js +42 -0
  58. package/dist/main.d.ts +15 -0
  59. package/dist/main.js +45 -9
  60. package/package.json +5 -3
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
1
  # @liujip0/components
2
2
 
3
3
  Just a simple components library for my own personal use!
4
+
5
+ CSS variables to customize:
6
+
7
+ | Variable | Description | Default |
8
+ | --------------------------------- | -------------------------------------------------------------------------------- | -------------------- |
9
+ | `--text-font-family` | Text font family | `sans-serif` |
10
+ | `--text-body-size` | Size of body text | `1em` |
11
+ | `--text-h1-size` | Size of h1 text | `2em` |
12
+ | `--text-h2-size` | Size of h2 text | `1.5em` |
13
+ | `--text-label-size` | Size of labels for input components | `0.9em` |
14
+ | `--text-helperText-size` | Size of helper text for input components | `0.75em` |
15
+ | | | |
16
+ | `--color-primary` | Primary theme color | `blue` |
17
+ | `--color-primary-contrastText` | Text color when background color is `--color-primary` | `white` |
18
+ | `--color-secondary` | Secondary theme color | `orange` |
19
+ | `--color-secondary-contrastText` | Text color when background color is `--color-secondary` | `white` |
20
+ | `--color-background` | Background color | `white` |
21
+ | `--color-background-contrastText` | Text color when background color is `--color-background` | `black` |
22
+ | `--color-paper` | Background color for modals, dialogs, popups, snackbars, etc. | `gray` |
23
+ | `--color-paper-contrastText` | Text color when background color is `--color-paper` | `black` |
24
+ | `--color-error` | Color to indicate errors | `red` |
25
+ | | | |
26
+ | `--z-index-backdrop` | z-index of backdrops or overlays | `99` |
27
+ | `--z-index-snackbar` | z-index of snackbars | `100` |
28
+ | `--z-index-modal` | z-index of modals, dialogs, popups, etc. | `101` |
29
+ | `--z-index-tooltip` | z-index of tooltips | `102` |
30
+ | | | |
31
+ | `--border-radius` | Border radius for buttons, input components, etc. | `0` |
32
+ | `--border-width` | Border width for buttons, input components, etc. | `1px` |
33
+ | `--input-height` | [Only used in the `Counter` component] Calculated height of an `Input` component | `calc(37.6px + 8px)` |
34
+ | `--hover-dim` | Filter effect to apply to buttons, etc. on hover | `brightness(0.8)` |
35
+ | | | |
36
+ | `--table-cell-padding` | Padding for table cells | `8px` |
37
+ | `--table-border-width` | Border width for tables | `3px` |
38
+ | `--table-cell-border-width` | Border width for cells within tables | `2px` |
@@ -0,0 +1,13 @@
1
+ import './assets/Input.css';const e = "_container_1dgl9_1", t = "_outline_1dgl9_6", l = "_errorOutline_1dgl9_18", r = "_input_1dgl9_22", n = "_inputDisabled_1dgl9_41", _ = "_helperText_1dgl9_53", o = "_helperTextError_1dgl9_60", i = "_label_1dgl9_64", s = {
2
+ container: e,
3
+ outline: t,
4
+ errorOutline: l,
5
+ input: r,
6
+ inputDisabled: n,
7
+ helperText: _,
8
+ helperTextError: o,
9
+ label: i
10
+ };
11
+ export {
12
+ s
13
+ };
@@ -0,0 +1 @@
1
+ ._backdrop_qbjym_1{position:absolute;top:0;left:0;width:100%;height:100%;z-index:var(--z-index-backdrop, var(--z-index-backdrop-fallback));background-color:#00000080;pointer-events:none}
@@ -1 +1 @@
1
- ._button_7qhy4_1{min-width:64px;padding:6px 16px;border:none;border-radius:var(--border-radius);display:flex;align-items:center;justify-content:center;gap:4px;font-size:1.25rem;font-family:var(--text-font-family);text-transform:uppercase;font-weight:500;line-height:1.75;letter-spacing:.02857em;cursor:pointer}._button_7qhy4_1:hover{filter:var(--hover-dim)}
1
+ ._button_y7o2r_1{min-width:64px;padding:6px 16px;border:none;border-radius:var(--border-radius, var(--border-radius-fallback));display:flex;align-items:center;justify-content:center;gap:4px;font-size:1.25rem;font-family:var(--text-font-family, var(--text-font-family-fallback));text-transform:uppercase;font-weight:500;line-height:1.75;letter-spacing:.02857em;cursor:pointer}._button_y7o2r_1:hover{filter:var(--hover-dim, var(--hover-dim-fallback))}
@@ -0,0 +1 @@
1
+ ._container_12kgw_1{display:flex;align-items:flex-end}._button_12kgw_6{height:var(--input-height, var(--input-height-fallback));width:var(--input-height, var(--input-height-fallback));min-width:0;min-height:0;background-color:var(--color-primary, var(--color-primary-fallback));color:var( --color-primary-contrastText, var(--color-primary-contrastText-fallback) );border:none}._buttonDisabled_12kgw_19{background-color:color-mix(in srgb,var(--color-primary, var(--color-primary-fallback)) 50%,#888);cursor:default}._buttonDisabled_12kgw_19:hover{filter:none}._input_12kgw_31{flex:1}
@@ -0,0 +1 @@
1
+ ._screenDarken_9wfqy_1{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background-color:#00000080;z-index:var(--z-index-modal, var(--z-index-modal-fallback))}._dialog_9wfqy_16{max-width:80vw;max-height:80vh;display:flex;flex-direction:column;padding:24px;background-color:var(--color-paper, var(--color-paper-fallback));border-radius:var(--border-radius, var(--border-radius-fallback));border:var(--border-width, var(--border-width-fallback)) solid var(--color-primary, var(--color-primary-fallback))}._dialogTitle_9wfqy_29{margin-bottom:16px;font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-h2-size, var(--text-h2-size-fallback))}._dialogContent_9wfqy_36{flex:1;overflow-y:auto}._dialogActions_9wfqy_41{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
@@ -0,0 +1 @@
1
+ ._divider_rubc3_1{border-width:.5px;border-style:solid;border-color:var(--color-primary, var(--color-primary-fallback));margin:8px}._horizontalDivider_rubc3_8{width:100%;height:0}._verticalDivider_rubc3_13{height:100%;width:0}
@@ -1 +1 @@
1
- ._button_rs8jj_1{display:flex;align-items:center;justify-content:center;padding:6px;border:none;color:var(--color-primary);background-color:var(--color-background);cursor:pointer;clip-path:circle(50%)}._button_rs8jj_1:hover{filter:var(--hover-dim)}
1
+ ._button_180ek_1{display:flex;align-items:center;justify-content:center;padding:6px;border:none;color:var(--color-primary, var(--color-primary-fallback));background-color:var(--color-background, var(--color-background-fallback));cursor:pointer;clip-path:circle(50%)}._button_180ek_1:hover{filter:var(--hover-dim, var(--hover-dim-fallback))}
@@ -0,0 +1 @@
1
+ ._container_1dgl9_1{display:flex;flex-direction:column}._outline_1dgl9_6{display:flex;padding:4px 8px;gap:4px;align-items:center;width:100%;border-width:var(--border-width, var(--border-width-fallback));border-style:solid;border-color:var(--color-primary, var(--color-primary-fallback));border-radius:var(--border-radius, var(--border-radius-fallback))}._errorOutline_1dgl9_18{border-color:var(--color-error, var(--color-error-fallback))}._input_1dgl9_22{min-width:1em;flex:1;padding:6px;width:100%;height:100%;border:none;background-color:transparent;color:var( --color-background-contrastText, var(--color-background-contrastText-fallback) );font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-body-size, var(--text-body-size-fallback))}._input_1dgl9_22:focus{outline:none}._inputDisabled_1dgl9_41{color:color-mix(in srgb,var( --color-background-contrastText, var(--color-background-contrastText-fallback) ) 50%,#888)}._helperText_1dgl9_53{margin:4px 8px;font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-helperText-size, var(--text-helperText-size-fallback));color:var(--color-primary, var(--color-primary-fallback))}._helperTextError_1dgl9_60{color:var(--color-error, var(--color-error-fallback))}._label_1dgl9_64{font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-label-size, var(--text-label-size-fallback))}
@@ -0,0 +1 @@
1
+ ._container_12u6r_1{display:flex;align-items:center;gap:8px}._label_12u6r_7{font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-body-size, var(--text-body-size-fallback));cursor:pointer}
@@ -0,0 +1 @@
1
+ ._container_1ygqk_1{display:flex;flex-direction:column}._outline_1ygqk_6{display:flex;flex-direction:column;gap:4px}._label_1ygqk_12{font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-label-size, var(--text-label-size-fallback))}._helperText_1ygqk_17{margin:4px 8px;font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-helperText-size, var(--text-helperText-size-fallback));color:var(--color-primary, var(--color-primary-fallback))}._helperTextError_1ygqk_24{color:var(--color-error, var(--color-error-fallback))}
@@ -0,0 +1 @@
1
+ ._container_14cji_1{display:flex;flex-direction:column}._outline_14cji_6{display:flex;padding:4px 8px;gap:4px;align-items:center;width:100%;border-width:1px;border-style:solid;border-color:var(--color-primary, var(--color-primary-fallback));border-radius:var(--border-radius, var(--border-radius-fallback))}._errorOutline_14cji_18{border-color:var(--color-error, var(--color-error-fallback))}._select_14cji_22{min-width:1em;flex:1;padding:6px;border:none;background-color:transparent;color:var( --color-background-contrastText, var(--color-background-contrastText-fallback) );font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-body-size, var(--text-body-size-fallback))}._select_14cji_22:focus{outline:none}._selectDisabled_14cji_39{color:color-mix(in srgb,var( --color-background-contrastText, var(--color-background-contrastText-fallback) ) 50%,#888)}._helperText_14cji_51{margin:4px 8px;font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-helperText-size, var(--text-helperText-size-fallback));color:var(--color-primary, var(--color-primary-fallback))}._helperTextError_14cji_58{color:var(--color-error, var(--color-error-fallback))}._label_14cji_62{font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-label-size, var(--text-label-size-fallback))}
@@ -0,0 +1 @@
1
+ ._snackbar_tl00m_1{position:fixed;bottom:16px;left:16px;display:flex;gap:16px;padding:8px 16px;align-items:center;max-width:500px;z-index:var(--z-index-snackbar, var(--z-index-snackbar-fallback));background-color:var(--color-paper, var(--color-paper-fallback));border:var(--border-width, var(--border-width-fallback)) solid var(--color-primary, var(--color-primary-fallback));border-radius:var(--border-radius, var(--border-radius-fallback))}._message_tl00m_18{font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-label-size, var(--text-label-size-fallback));color:var( --color-paper-contrastText, var(--color-paper-contrastText-fallback) )}
@@ -0,0 +1 @@
1
+ ._tab_1m0oo_1{padding:.5em;cursor:pointer;color:var(--color-primary, var(--color-primary-fallback));font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-body-size, var(--text-body-size-fallback));text-transform:uppercase;font-weight:500;background-color:var(--color-background, var(--color-background-fallback))}._tab_1m0oo_1:hover{filter:var(--hover-dim, var(--hover-dim-fallback))}._activeTab_1m0oo_15{font-weight:700;border-bottom:4px solid var(--color-primary, var(--color-primary-fallback))}
@@ -0,0 +1 @@
1
+ ._tabBar_1oym3_1{display:flex;width:100%}
@@ -0,0 +1 @@
1
+ ._table_10gvy_1{border-collapse:separate;border:var(--table-border-width, var(--table-border-width-fallback)) solid var(--color-primary, var(--color-primary-fallback));border-spacing:0}._tableHead_10gvy_8{position:sticky;top:var(--table-cell-border-width, var(--table-cell-border-width-fallback));z-index:1;background-color:var(--color-background, var(--color-background-fallback));outline:var( --table-cell-border-width, var(--table-cell-border-width-fallback) ) solid var(--color-primary, var(--color-primary-fallback))}._th_10gvy_21{padding:var(--table-cell-padding, var(--table-cell-padding-fallback));font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-body-size, var(--text-body-size-fallback));font-weight:700;border-style:solid;border-color:var(--color-primary, var(--color-primary-fallback));border-width:var(--table-border-width, var(--table-border-width-fallback)) var(--table-cell-border-width, var(--table-cell-border-width-fallback))}._td_10gvy_33{padding:var(--table-cell-padding, var(--table-cell-padding-fallback));font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-body-size, var(--text-body-size-fallback));border:var( --table-cell-border-width, var(--table-cell-border-width-fallback) ) solid var(--color-primary, var(--color-primary-fallback))}
@@ -0,0 +1 @@
1
+ ._container_1q694_1{display:flex;flex-direction:column}._contentContainer_1q694_6{flex-grow:1}
@@ -1 +1 @@
1
- ._buttonFalse_1ssvl_1{color:var(--color-primary);border:var(--button-border-width) solid var(--color-primary);background-color:var(--color-background)}._buttonTrue_1ssvl_7{color:var(--color-primary-contrastText);border:none;background-color:var(--color-primary)}
1
+ ._buttonFalse_1ed44_1{color:var(--color-primary, var(--color-primary-fallback));border:var(--border-width, var(--border-width-fallback)) solid var(--color-primary, var(--color-primary-fallback));background-color:var(--color-background, var(--color-background-fallback))}._buttonTrue_1ed44_8{color:var( --color-primary-contrastText, var(--color-primary-contrastText-fallback) );border:none;background-color:var(--color-primary, var(--color-primary-fallback))}
@@ -1 +1 @@
1
- ._container_12l5n_1{display:flex;flex-direction:column}._outline_12l5n_6{display:flex;gap:4px}._label_12l5n_11{font-family:var(--text-font-family);font-size:var(--text-label-size)}._helperText_12l5n_16{margin:4px 8px;font-family:var(--text-font-family);font-size:.75em;color:var(--color-primary)}._helperTextError_12l5n_23{color:var(--color-error)}
1
+ ._container_1ngm3_1{display:flex;flex-direction:column}._outline_1ngm3_6{display:flex;gap:4px}._label_1ngm3_11{font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-label-size, var(--text-label-size-fallback))}._helperText_1ngm3_16{margin:4px 8px;font-family:var(--text-font-family, var(--text-font-family-fallback));font-size:var(--text-helperText-size, var(--text-helperText-size-fallback));color:var(--color-primary, var(--color-primary-fallback))}._helperTextError_1ngm3_23{color:var(--color-error)}
@@ -0,0 +1 @@
1
+ ._container_147qb_1{display:inline;position:static}._tooltipContainer_147qb_7{position:fixed;transform:translate(-50%)}._tooltip_147qb_7{position:absolute;padding:4px;left:-50%;background-color:#000;opacity:.8;z-index:var(--z-index-tooltip, var(--z-index-tooltip-fallback));border-radius:var(--border-radius, var(--border-radius-fallback));font-size:var(--text-label-size)}._tooltip_147qb_7:after{content:"";position:absolute}
@@ -0,0 +1 @@
1
+ :root{--text-font-family-fallback: sans-serif;--text-body-size-fallback: 1em;--text-h1-size-fallback: 2em;--text-h2-size-fallback: 1.5em;--text-label-size-fallback: .9em;--text-helperText-size-fallback: .75em;--color-primary-fallback: blue;--color-primary-contrastText-fallback: white;--color-secondary-fallback: orange;--color-secondary-contrastText-fallback: white;--color-background-fallback: white;--color-background-contrastText-fallback: black;--color-paper-fallback: gray;--color-paper-contrastText-fallback: black;--color-error-fallback: red;--z-index-backdrop-fallback: 99;--z-index-snackbar-fallback: 100;--z-index-modal-fallback: 101;--z-index-tooltip-fallback: 102;--border-radius-fallback: 0;--border-width-fallback: 1px;--input-height-fallback: 45.6px ;--hover-dim-fallback: brightness(.8);--table-cell-padding-fallback: 8px;--table-border-width-fallback: 3px;--table-cell-border-width-fallback: 2px}.material-symbols-outlined{font-variation-settings:"FILL" 1}
@@ -0,0 +1,6 @@
1
+ type BackdropProps = {
2
+ open: boolean;
3
+ onClose?: () => void;
4
+ };
5
+ export declare function Backdrop({ open, onClose }: BackdropProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,18 @@
1
+ import { jsx as c, Fragment as a } from "react/jsx-runtime";
2
+ import '../../assets/Backdrop.css';const t = "_backdrop_qbjym_1", p = {
3
+ backdrop: t
4
+ };
5
+ function k({ open: o, onClose: r }) {
6
+ return o ? /* @__PURE__ */ c(
7
+ "div",
8
+ {
9
+ onClick: () => {
10
+ r && r();
11
+ },
12
+ className: p.backdrop
13
+ }
14
+ ) : /* @__PURE__ */ c(a, {});
15
+ }
16
+ export {
17
+ k as Backdrop
18
+ };
@@ -1,13 +1,13 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import '../../assets/Button.css';const b = "_button_7qhy4_1", r = {
3
- button: b
2
+ import '../../assets/Button.css';const r = "_button_y7o2r_1", b = {
3
+ button: r
4
4
  };
5
5
  function e({ children: t, className: o, ref: n, ...u }) {
6
6
  return /* @__PURE__ */ s(
7
7
  "button",
8
8
  {
9
9
  ref: n,
10
- className: r.button + " " + (o || ""),
10
+ className: b.button + " " + (o || ""),
11
11
  ...u,
12
12
  children: t
13
13
  }
@@ -1,17 +1,17 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import '../../../assets/IconButton.css';const u = "_button_rs8jj_1", r = {
3
- button: u
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import '../../../assets/IconButton.css';const s = "_button_180ek_1", b = {
3
+ button: s
4
4
  };
5
- function c({ children: t, className: o, ...n }) {
6
- return /* @__PURE__ */ s(
5
+ function e({ children: t, className: o, ...n }) {
6
+ return /* @__PURE__ */ u(
7
7
  "button",
8
8
  {
9
- className: r.button + " " + (o || ""),
9
+ className: b.button + " " + (o || ""),
10
10
  ...n,
11
11
  children: t
12
12
  }
13
13
  );
14
14
  }
15
15
  export {
16
- c as IconButton
16
+ e as IconButton
17
17
  };
@@ -1,32 +1,32 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { Button as b } from "../Button.js";
3
- import '../../../assets/ToggleButton.css';const C = "_buttonFalse_1ssvl_1", _ = "_buttonTrue_1ssvl_7", e = {
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { Button as s } from "../Button.js";
3
+ import '../../../assets/ToggleButton.css';const C = "_buttonFalse_1ed44_1", d = "_buttonTrue_1ed44_8", e = {
4
4
  buttonFalse: C,
5
- buttonTrue: _
5
+ buttonTrue: d
6
6
  };
7
- function m({
7
+ function g({
8
8
  value: n,
9
9
  children: o,
10
- className: l,
11
- classNameTrue: u,
12
- classNameFalse: i,
13
- disabled: s,
14
- ref: c,
10
+ className: u,
11
+ classNameTrue: i,
12
+ classNameFalse: l,
13
+ disabled: c,
14
+ ref: a,
15
15
  ...t
16
16
  }) {
17
- return /* @__PURE__ */ a(
18
- b,
17
+ return /* @__PURE__ */ b(
18
+ s,
19
19
  {
20
- ref: c,
21
- className: (("selected" in t ? t.selected : n) ? e.buttonTrue + " " + (u || "") : e.buttonFalse + " " + (i || "")) + " " + (l || ""),
20
+ ref: a,
21
+ className: (("selected" in t ? t.selected : n) ? e.buttonTrue + " " + (i || "") : e.buttonFalse + " " + (l || "")) + " " + (u || ""),
22
22
  onClick: () => {
23
23
  "onChange" in t && t.onChange !== void 0 ? t.onChange(!n) : "onClick" in t && t.onClick !== void 0 && t.onClick();
24
24
  },
25
- disabled: s,
25
+ disabled: c,
26
26
  children: o
27
27
  }
28
28
  );
29
29
  }
30
30
  export {
31
- m as ToggleButton
31
+ g as ToggleButton
32
32
  };
@@ -1,14 +1,14 @@
1
- import { jsxs as u, jsx as l } from "react/jsx-runtime";
2
- import n from "react";
3
- import '../../../assets/ToggleButtonGroup.css';const m = "_container_12l5n_1", x = "_outline_12l5n_6", h = "_label_12l5n_11", T = "_helperText_12l5n_16", E = "_helperTextError_12l5n_23", r = {
4
- container: m,
1
+ import { jsxs as _, jsx as n } from "react/jsx-runtime";
2
+ import t from "react";
3
+ import '../../../assets/ToggleButtonGroup.css';const u = "_container_1ngm3_1", x = "_outline_1ngm3_6", h = "_label_1ngm3_11", T = "_helperText_1ngm3_16", g = "_helperTextError_1ngm3_23", r = {
4
+ container: u,
5
5
  outline: x,
6
6
  label: h,
7
7
  helperText: T,
8
- helperTextError: E
8
+ helperTextError: g
9
9
  };
10
- function v({
11
- value: t,
10
+ function f({
11
+ value: l,
12
12
  onChange: o,
13
13
  children: c,
14
14
  label: s,
@@ -16,16 +16,16 @@ function v({
16
16
  helperText: p,
17
17
  className: a
18
18
  }) {
19
- const _ = n.Children.map(c, (e) => n.isValidElement(e) ? n.cloneElement(e, {
20
- selected: t === e.props.value,
19
+ const m = t.Children.map(c, (e) => t.isValidElement(e) ? t.cloneElement(e, {
20
+ selected: l === e.props.value,
21
21
  onClick: () => {
22
- t === e.props.value ? o("") : o(e.props.value);
22
+ l === e.props.value ? o("") : o(e.props.value);
23
23
  }
24
24
  }) : e);
25
- return /* @__PURE__ */ u("div", { className: r.container + " " + (a || ""), children: [
26
- s && /* @__PURE__ */ l("p", { className: r.label, children: s }),
27
- /* @__PURE__ */ l("div", { className: r.outline, children: _ }),
28
- p && /* @__PURE__ */ l(
25
+ return /* @__PURE__ */ _("div", { className: r.container + " " + (a || ""), children: [
26
+ s && /* @__PURE__ */ n("p", { className: r.label, children: s }),
27
+ /* @__PURE__ */ n("div", { className: r.outline, children: m }),
28
+ p && /* @__PURE__ */ n(
29
29
  "p",
30
30
  {
31
31
  className: r.helperText + " " + (i ? r.helperTextError : ""),
@@ -35,5 +35,5 @@ function v({
35
35
  ] });
36
36
  }
37
37
  export {
38
- v as ToggleButtonGroup
38
+ f as ToggleButtonGroup
39
39
  };
@@ -0,0 +1,19 @@
1
+ type DialogProps = {
2
+ open: boolean;
3
+ onClose?: () => void;
4
+ children?: React.ReactNode;
5
+ };
6
+ export declare function Dialog({ open, onClose, children }: DialogProps): import("react/jsx-runtime").JSX.Element;
7
+ type DialogTitleProps = {
8
+ children: React.ReactNode;
9
+ };
10
+ export declare function DialogTitle({ children }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
11
+ type DialogContentProps = {
12
+ children: React.ReactNode;
13
+ };
14
+ export declare function DialogContent({ children }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
15
+ type DialogActionsProps = {
16
+ children: React.ReactNode;
17
+ };
18
+ export declare function DialogActions({ children }: DialogActionsProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,44 @@
1
+ import { jsx as n, Fragment as l } from "react/jsx-runtime";
2
+ import '../../assets/Dialog.css';const s = "_screenDarken_9wfqy_1", c = "_dialog_9wfqy_16", g = "_dialogTitle_9wfqy_29", r = "_dialogContent_9wfqy_36", d = "_dialogActions_9wfqy_41", i = {
3
+ screenDarken: s,
4
+ dialog: c,
5
+ dialogTitle: g,
6
+ dialogContent: r,
7
+ dialogActions: d
8
+ };
9
+ function f({ open: o, onClose: t, children: a }) {
10
+ return o ? /* @__PURE__ */ n(
11
+ "div",
12
+ {
13
+ className: i.screenDarken,
14
+ onClick: () => {
15
+ t && t();
16
+ },
17
+ children: /* @__PURE__ */ n(
18
+ "div",
19
+ {
20
+ className: i.dialog,
21
+ onClick: (e) => {
22
+ e.stopPropagation();
23
+ },
24
+ children: a
25
+ }
26
+ )
27
+ }
28
+ ) : /* @__PURE__ */ n(l, {});
29
+ }
30
+ function m({ children: o }) {
31
+ return /* @__PURE__ */ n("h2", { className: i.dialogTitle, children: o });
32
+ }
33
+ function u({ children: o }) {
34
+ return /* @__PURE__ */ n("div", { className: i.dialogContent, children: o });
35
+ }
36
+ function D({ children: o }) {
37
+ return /* @__PURE__ */ n("div", { className: i.dialogActions, children: o });
38
+ }
39
+ export {
40
+ f as Dialog,
41
+ D as DialogActions,
42
+ u as DialogContent,
43
+ m as DialogTitle
44
+ };
@@ -0,0 +1,5 @@
1
+ type DividerProps = {
2
+ orientation: "horizontal" | "vertical";
3
+ };
4
+ export declare function Divider({ orientation }: DividerProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,17 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import '../../assets/Divider.css';const d = "_divider_rubc3_1", v = "_horizontalDivider_rubc3_8", t = "_verticalDivider_rubc3_13", i = {
3
+ divider: d,
4
+ horizontalDivider: v,
5
+ verticalDivider: t
6
+ };
7
+ function c({ orientation: r }) {
8
+ return /* @__PURE__ */ e(
9
+ "div",
10
+ {
11
+ className: i.divider + " " + (i[r] + "Divider")
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ c as Divider
17
+ };
@@ -0,0 +1,9 @@
1
+ type CheckboxProps = {
2
+ value: boolean;
3
+ onChange: (value: boolean) => void;
4
+ id: string;
5
+ label?: string | React.ReactNode;
6
+ className?: string;
7
+ };
8
+ export declare function Checkbox({ value, onChange, id, label, className, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,51 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { IconButton as i } from "../../Button/IconButton/IconButton.js";
3
+ import '../../../assets/Radio.css';const h = "_container_12u6r_1", m = "_label_12u6r_7", r = {
4
+ container: h,
5
+ label: m
6
+ };
7
+ function _({
8
+ value: c,
9
+ onChange: n,
10
+ id: l,
11
+ label: o,
12
+ className: a
13
+ }) {
14
+ return /* @__PURE__ */ t("div", { className: r.container, children: [
15
+ /* @__PURE__ */ t(
16
+ i,
17
+ {
18
+ className: a,
19
+ onClick: () => {
20
+ n(!c);
21
+ },
22
+ children: [
23
+ c ? /* @__PURE__ */ e("span", { className: "material-symbols-outlined", children: "check_box" }) : /* @__PURE__ */ e("span", { className: "material-symbols-outlined", children: "check_box_outline_blank" }),
24
+ /* @__PURE__ */ e(
25
+ "input",
26
+ {
27
+ type: "checkbox",
28
+ id: l,
29
+ checked: c,
30
+ onChange: (s) => {
31
+ n(s.currentTarget.checked);
32
+ },
33
+ hidden: !0
34
+ }
35
+ )
36
+ ]
37
+ }
38
+ ),
39
+ o && /* @__PURE__ */ e(
40
+ "label",
41
+ {
42
+ htmlFor: l,
43
+ className: r.label,
44
+ children: o
45
+ }
46
+ )
47
+ ] });
48
+ }
49
+ export {
50
+ _ as Checkbox
51
+ };
@@ -0,0 +1,11 @@
1
+ type CounterProps = {
2
+ value: number;
3
+ id: string;
4
+ increment: () => void;
5
+ decrement: () => void;
6
+ label: string;
7
+ max?: number;
8
+ disabled?: boolean;
9
+ };
10
+ export declare function Counter({ value, id, increment, decrement, label, max, disabled, }: CounterProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,57 @@
1
+ import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
+ import { Button as e } from "../../Button/Button.js";
3
+ import { Input as m } from "../Input.js";
4
+ import '../../../assets/Counter.css';const b = "_container_12kgw_1", p = "_button_12kgw_6", _ = "_buttonDisabled_12kgw_19", d = "_input_12kgw_31", t = {
5
+ container: b,
6
+ button: p,
7
+ buttonDisabled: _,
8
+ input: d
9
+ };
10
+ function h({
11
+ value: s,
12
+ id: c,
13
+ increment: r,
14
+ decrement: a,
15
+ label: l,
16
+ max: i,
17
+ disabled: n = !1
18
+ }) {
19
+ return /* @__PURE__ */ u("div", { className: t.container, children: [
20
+ /* @__PURE__ */ o(
21
+ e,
22
+ {
23
+ className: t.button + " " + (n ? t.buttonDisabled : ""),
24
+ onClick: () => {
25
+ s > 0 && a();
26
+ },
27
+ disabled: n,
28
+ children: /* @__PURE__ */ o("span", { className: "material-symbols-outlined", children: "remove" })
29
+ }
30
+ ),
31
+ /* @__PURE__ */ o(
32
+ m,
33
+ {
34
+ id: c,
35
+ value: s,
36
+ label: l,
37
+ disabled: n,
38
+ className: t.input,
39
+ type: "number"
40
+ }
41
+ ),
42
+ /* @__PURE__ */ o(
43
+ e,
44
+ {
45
+ className: t.button + " " + (n ? t.buttonDisabled : ""),
46
+ onClick: () => {
47
+ (i === void 0 || s < i) && r();
48
+ },
49
+ disabled: n,
50
+ children: /* @__PURE__ */ o("span", { className: "material-symbols-outlined", children: "add" })
51
+ }
52
+ )
53
+ ] });
54
+ }
55
+ export {
56
+ h as Counter
57
+ };
@@ -0,0 +1,17 @@
1
+ type InputProps = {
2
+ value: string | number;
3
+ onChange?: (event: string) => void;
4
+ type?: "text" | "password" | "email" | "number" | "search";
5
+ id: string;
6
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
7
+ startIcon?: React.ReactNode;
8
+ endIcon?: React.ReactNode;
9
+ placeholder?: string;
10
+ label?: string;
11
+ error?: boolean;
12
+ helperText?: string;
13
+ disabled?: boolean;
14
+ className?: string;
15
+ };
16
+ export declare function Input({ value, onChange, type, id, onKeyDown, startIcon, endIcon, placeholder, label, error, helperText, disabled, className, }: InputProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,63 @@
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { s as e } from "../../Input.module-C7oR_KDs.js";
3
+ function j({
4
+ value: m,
5
+ onChange: t,
6
+ type: o = "text",
7
+ id: l,
8
+ onKeyDown: u,
9
+ startIcon: p,
10
+ endIcon: h,
11
+ placeholder: x,
12
+ label: s,
13
+ error: n,
14
+ helperText: a,
15
+ disabled: i,
16
+ className: N
17
+ }) {
18
+ return /* @__PURE__ */ c("div", { className: e.container + " " + (N || ""), children: [
19
+ s && /* @__PURE__ */ r(
20
+ "label",
21
+ {
22
+ htmlFor: l,
23
+ className: e.label,
24
+ children: s
25
+ }
26
+ ),
27
+ /* @__PURE__ */ c(
28
+ "div",
29
+ {
30
+ className: e.outline + " " + (n ? e.errorOutline : ""),
31
+ children: [
32
+ p,
33
+ /* @__PURE__ */ r(
34
+ "input",
35
+ {
36
+ className: e.input + " " + (i ? e.inputDisabled : ""),
37
+ value: m,
38
+ onChange: (d) => {
39
+ t && t(d.currentTarget.value);
40
+ },
41
+ type: o,
42
+ id: l,
43
+ onKeyDown: u,
44
+ placeholder: x,
45
+ disabled: i
46
+ }
47
+ ),
48
+ h
49
+ ]
50
+ }
51
+ ),
52
+ a && /* @__PURE__ */ r(
53
+ "p",
54
+ {
55
+ className: e.helperText + " " + (n ? e.helperTextError : ""),
56
+ children: a
57
+ }
58
+ )
59
+ ] });
60
+ }
61
+ export {
62
+ j as Input
63
+ };
@@ -0,0 +1,10 @@
1
+ export type RadioProps = {
2
+ selected?: boolean;
3
+ onChange?: (value: boolean) => void;
4
+ id: string;
5
+ value: string;
6
+ name?: string;
7
+ label?: string | React.ReactNode;
8
+ className?: string;
9
+ };
10
+ export declare function Radio({ selected, onChange, name, id, label, className, }: RadioProps): import("react/jsx-runtime").JSX.Element;