@stamcat/craftsman 0.0.23-alpha.1 → 0.0.23-alpha.11

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 (57) hide show
  1. package/AGENTS.md +251 -0
  2. package/Components.esm.js +5 -0
  3. package/README.md +5 -0
  4. package/components/Button.d.ts +7 -1
  5. package/components/Loader.d.ts +9 -0
  6. package/components/Modal.d.ts +23 -0
  7. package/components/Progress.d.ts +1 -0
  8. package/components/index.d.ts +2 -0
  9. package/package.json +19 -8
  10. package/src/components/Button.esm.js +27 -0
  11. package/src/components/Input.esm.js +5 -0
  12. package/src/components/Loader.esm.js +19 -0
  13. package/src/components/Modal.esm.js +154 -0
  14. package/src/styles/global/components/loaders.esm.js +65 -0
  15. package/src/styles/global/components/loaders.module.css +1 -0
  16. package/src/styles/global/components/loaders.module.esm.js +25 -0
  17. package/src/styles/global/components/loaders.module.scss +240 -0
  18. package/src/styles/utilities/color.esm.js +19 -0
  19. package/src/styles/utilities/config.esm.js +25 -0
  20. package/src/styles/utilities/constants.esm.js +79 -0
  21. package/src/styles/utilities/layout.esm.js +48 -0
  22. package/src/utilities/validations.esm.js +7 -0
  23. package/stories/Button.stories.d.ts +10 -0
  24. package/stories/Colors.stories.d.ts +5 -0
  25. package/stories/Icons.stories.d.ts +36 -0
  26. package/stories/Loaders.stories.d.ts +6 -0
  27. package/stories/Modal.stories.d.ts +8 -0
  28. package/stories/Toastify.stories.d.ts +7 -0
  29. package/stories/Typography.stories.d.ts +6 -0
  30. package/styles/global/components/button.d.ts +7 -0
  31. package/styles/global/components/code.d.ts +1 -0
  32. package/styles/global/components/loaders.d.ts +17 -0
  33. package/styles/global/components/typography.d.ts +11 -0
  34. package/styles/global/variables.d.ts +2 -0
  35. package/styles/theme/components.d.ts +1 -1
  36. package/styles/theme/constants.d.ts +1 -2
  37. package/styles/theme/types.d.ts +1 -1
  38. package/styles/theme/utilities.d.ts +2 -0
  39. package/styles/utilities/color.d.ts +2 -66
  40. package/styles/utilities/config.d.ts +7 -0
  41. package/styles/utilities/constants.d.ts +77 -0
  42. package/styles/utilities/layout.d.ts +15 -0
  43. package/styles/utilities/types.d.ts +17 -0
  44. package/Button.es.js +0 -5
  45. package/Components.es.js +0 -6
  46. package/Input.es.js +0 -5
  47. package/icons/IconCalendar.d.ts +0 -3
  48. package/icons/IconChevronRight.d.ts +0 -2
  49. package/icons/IconCircleAlert.d.ts +0 -2
  50. package/icons/IconCircleCheck.d.ts +0 -2
  51. package/icons/IconCircleHelp.d.ts +0 -2
  52. package/icons/IconCircleInfo.d.ts +0 -2
  53. package/icons/IconEye.d.ts +0 -2
  54. package/icons/IconEyeClosed.d.ts +0 -2
  55. package/icons/IconX.d.ts +0 -2
  56. package/styles/global/colors.d.ts +0 -1
  57. package/styles/theme/components/button.d.ts +0 -1
package/AGENTS.md ADDED
@@ -0,0 +1,251 @@
1
+ # AI Agent Integration Guide for @stamcat/craftsman
2
+
3
+ This document explains how code-generation agents should use this library safely and correctly.
4
+
5
+ ## What This Package Currently Exports
6
+
7
+ The package is currently built with component-level entry points only.
8
+
9
+ Use these imports:
10
+
11
+ ```tsx
12
+ import { Button } from "@stamcat/craftsman/Button";
13
+ import { Input } from "@stamcat/craftsman/Input";
14
+ import { Loader } from "@stamcat/craftsman/Loader";
15
+ import { Modal } from "@stamcat/craftsman/Modal";
16
+ ```
17
+
18
+ Do not assume a root export like `@stamcat/craftsman` unless that export is explicitly added to package `exports`.
19
+
20
+ ## Hard Rules for Agents
21
+
22
+ 1. Never deep-import from package internals (for example `@stamcat/craftsman/src/...`).
23
+ 2. Only use documented component entry points.
24
+ 3. Do not import storybook files or internal style utilities from consuming applications.
25
+ 4. Prefer standard React props first; use custom props only when required.
26
+
27
+ ## Component Contracts
28
+
29
+ ### Button
30
+
31
+ Import:
32
+
33
+ ```tsx
34
+ import { Button } from "@stamcat/craftsman/Button";
35
+ ```
36
+
37
+ Props:
38
+
39
+ - Inherits all native `<button>` props.
40
+ - `variant?: "primary" | "default" | "text"` (default: `"default"`)
41
+ - `size?: number` (default visual scale is `1`)
42
+ - `styles?: SerializedStyles` (Emotion override)
43
+
44
+ Behavior notes:
45
+
46
+ - `type` defaults to `"button"`.
47
+ - For `variant !== "default"`, variant is appended to `className` (for example `"primary"`).
48
+ - Theme class merge: if `theme.components.button` is a string, it is appended to the class list.
49
+ - `className` is preserved and merged after variant/theme classes.
50
+ - If `children` is empty (per `isEmpty`), the component renders nothing.
51
+ - `size` is clamped to `[0.1, 10]` before styling is applied.
52
+ - When `size` is provided, Button scales:
53
+ - `border-radius: calc(var(--btn-border-radius) * size)`
54
+ - `padding: calc(var(--btn-pad-y) * size) calc(var(--btn-pad-x) * size)`
55
+ - `font-size: max(10px, calc(var(--w-text) * size))`
56
+ - There is no dedicated icon/loading prop. Icons, loaders, and mixed content are passed as `children`.
57
+ - Supports both real disable (`disabled={true}`) and style-only disable (`className="disabled"`).
58
+ - Native button modes are supported (`type="button" | "submit" | "reset"`).
59
+ - Accessibility props such as `aria-label` pass through unchanged.
60
+
61
+ Example:
62
+
63
+ ```tsx
64
+ <Button variant="primary" onClick={onSave}>Save</Button>
65
+ ```
66
+
67
+ Story-aligned usage examples:
68
+
69
+ ```tsx
70
+ // Scaled compact button (size is clamped to [0.1, 10])
71
+ <Button variant="primary" size={0.5}>Mini Action</Button>
72
+
73
+ // Icon content
74
+ <Button variant="primary">
75
+ <TruckIcon size={20} /> <span>Ship</span>
76
+ </Button>
77
+
78
+ // Loading content
79
+ <Button aria-label="Saving">
80
+ <Loader type="boxy" width={32} color="#de13ca" />
81
+ </Button>
82
+
83
+ // Style-only disabled appearance while still allowing click handlers
84
+ <Button className="disabled" onClick={onClick}>Disabled Look</Button>
85
+
86
+ // Native submit behavior
87
+ <Button type="submit" aria-label="Save form">Save</Button>
88
+ ```
89
+
90
+ Implementation caution:
91
+
92
+ - Size scaling depends on CSS variables provided by the package global styles (`--btn-border-radius`, `--btn-pad-y`, `--btn-pad-x`, `--w-text`).
93
+
94
+ ### Input
95
+
96
+ Import:
97
+
98
+ ```tsx
99
+ import { Input } from "@stamcat/craftsman/Input";
100
+ ```
101
+
102
+ Props:
103
+
104
+ - Pure passthrough of native `<input>` props.
105
+
106
+ Example:
107
+
108
+ ```tsx
109
+ <Input type="email" placeholder="you@company.com" required />
110
+ ```
111
+
112
+ ### Modal
113
+
114
+ Import:
115
+
116
+ ```tsx
117
+ import { Modal } from "@stamcat/craftsman/Modal";
118
+ ```
119
+
120
+ Props:
121
+
122
+ - Inherits all native `<div>` props.
123
+ - `visible?: boolean` (when falsy, component renders nothing)
124
+ - `onDismiss?: () => void`
125
+ - `type?: "dialog" | "panel"` (default: `"dialog"`)
126
+ - `header?: string | React.ReactNode`
127
+ - `backgroundDismiss?: boolean` (default behavior: `true`)
128
+ - `hideDismissIcon?: boolean` (default behavior: close icon is shown)
129
+ - `footer?: React.ReactNode`
130
+ - `styles?: SerializedStyles` (applies to outer modal wrapper)
131
+
132
+ Behavior notes:
133
+
134
+ - Modal is controlled; parent owns open/close state via `visible` and `onDismiss`.
135
+ - Close icon and background click both dismiss through `onDismiss`.
136
+ - Background dismiss only runs when `backgroundDismiss` is `true` or `undefined`.
137
+ - Dismiss uses a short close animation before calling `onDismiss` (~280ms timeout).
138
+ - `type="dialog"` renders centered responsive dialog sizing; `type="panel"` renders a right-side panel.
139
+ - `footer` is rendered in an action row container below modal content.
140
+
141
+ Example:
142
+
143
+ ```tsx
144
+ const [open, setOpen] = useState(false);
145
+
146
+ <>
147
+ <Button variant="primary" onClick={() => setOpen(true)}>Open</Button>
148
+ <Modal
149
+ visible={open}
150
+ onDismiss={() => setOpen(false)}
151
+ type="dialog"
152
+ header="Confirm Action"
153
+ footer={<><Button onClick={() => setOpen(false)}>Cancel</Button><Button variant="primary">Confirm</Button></>}
154
+ >
155
+ <p>Are you sure?</p>
156
+ </Modal>
157
+ </>
158
+ ```
159
+
160
+ ### Loader
161
+
162
+ Import:
163
+
164
+ ```tsx
165
+ import { Loader } from "@stamcat/craftsman/Loader";
166
+ ```
167
+
168
+ Props:
169
+
170
+ - Inherits all native `<div>` props.
171
+ - `type` is required and must be one of:
172
+ - `"dots"`
173
+ - `"dots-trace"`
174
+ - `"dots-bounce"`
175
+ - `"dots-orbit"`
176
+ - `"dashes"`
177
+ - `"spinner"`
178
+ - `"swirl"`
179
+ - `"ball"`
180
+ - `"boxy"`
181
+ - `"factory"`
182
+ - `color?: string` (default: `"black"`)
183
+ - `width?: number` (optional, variant-dependent default behavior)
184
+ - `styles?: SerializedStyles` (Emotion override)
185
+
186
+ Example:
187
+
188
+ ```tsx
189
+ <Loader type="spinner" color="var(--blue500)" width={40} aria-label="Loading" />
190
+ ```
191
+
192
+ ## Styling Expectations
193
+
194
+ - Components are built with Emotion and class-based variant hooks.
195
+ - If your app does not include this package's global CSS variable setup, visual output may differ.
196
+ - Agents should avoid hard-coding assumptions about token names beyond what the consumer app already defines.
197
+
198
+ ## Utility Functions
199
+
200
+ ### `isEmpty`
201
+
202
+ The package exports an `isEmpty` utility. **Always use it instead of writing inline empty checks.**
203
+
204
+ Import:
205
+
206
+ ```ts
207
+ import { isEmpty } from "@stamcat/craftsman/utilities/validations";
208
+ ```
209
+
210
+ It returns `true` for:
211
+
212
+ - `undefined`
213
+ - `null`
214
+ - empty objects — `{}`
215
+ - strings that are empty or whitespace-only — `""`, `" "`
216
+ - arrays with no elements — `[]`
217
+
218
+ Examples:
219
+
220
+ ```ts
221
+ // DO — use isEmpty
222
+ if (isEmpty(value)) { ... }
223
+ if (!isEmpty(items)) { ... }
224
+
225
+ // DO NOT — write these manually
226
+ if (value === undefined || value === null) { ... }
227
+ if (typeof value === "string" && value.trim().length === 0) { ... }
228
+ if (Object.keys(obj).length === 0) { ... }
229
+ if (arr.length === 0) { ... }
230
+ ```
231
+
232
+ ## Code Generation Patterns to Prefer
233
+
234
+ 1. Generate fully typed React usage examples.
235
+ 2. Keep accessibility props in place (`aria-label`, `disabled`, semantic `type`).
236
+ 3. Use `variant="primary"` for main actions and `variant="text"` for low-emphasis actions.
237
+ 4. For loading states, pair `Loader` with accessible status text where needed.
238
+
239
+ ## Known Limitations (Current Package State)
240
+
241
+ 1. README is minimal; treat this guide as the source of truth for agent usage.
242
+ 2. Theme utilities exist in source but are not guaranteed public package exports.
243
+ 3. `Progress` exists in source but is incomplete and intentionally omitted from this guide for now.
244
+
245
+ ## Safe Fallback Strategy for Agents
246
+
247
+ If uncertain about available exports:
248
+
249
+ 1. Use only `Button`, `Input`, `Loader`, and `Modal` from their component entry points.
250
+ 2. Do not invent package APIs.
251
+ 3. Prefer native HTML elements for anything not explicitly exported.
@@ -0,0 +1,5 @@
1
+ import { Button as e } from "./src/components/Button.esm.js";
2
+ import { Input as t } from "./src/components/Input.esm.js";
3
+ import { Loader as n } from "./src/components/Loader.esm.js";
4
+ import { Modal as r } from "./src/components/Modal.esm.js";
5
+ export { e as Button, t as Input, n as Loader, r as Modal };
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @stamcat/craftsman
2
+
3
+ # Craftsman Design System Framework
4
+
5
+ trivial commit to test ci publish
@@ -1,2 +1,8 @@
1
- export type ButtonProps = React.ComponentProps<"button">;
1
+ import { SerializedStyles } from '@emotion/react';
2
+ import { ButtonType } from '../styles/global/components/button';
3
+ export type ButtonProps = React.ComponentProps<"button"> & {
4
+ variant?: ButtonType;
5
+ size?: number;
6
+ styles?: SerializedStyles;
7
+ };
2
8
  export declare const Button: React.FC<ButtonProps>;
@@ -0,0 +1,9 @@
1
+ import { LoaderStyle } from '../styles/global/components/loaders';
2
+ import { SerializedStyles } from '@emotion/react';
3
+ export type LoaderProps = React.ComponentProps<"div"> & {
4
+ type: LoaderStyle;
5
+ color?: string;
6
+ width?: number;
7
+ styles?: SerializedStyles;
8
+ };
9
+ export declare const Loader: React.FC<LoaderProps>;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { SerializedStyles } from '@emotion/react';
3
+ export type ModalType = "dialog" | "panel";
4
+ export interface ModalProps extends React.ComponentPropsWithoutRef<"div"> {
5
+ visible?: boolean;
6
+ onDismiss?: () => void;
7
+ type?: ModalType;
8
+ header?: string | React.ReactNode;
9
+ backgroundDismiss?: boolean;
10
+ hideDismissIcon?: boolean;
11
+ footer?: React.ReactNode;
12
+ styles?: SerializedStyles;
13
+ }
14
+ type ModalState = {
15
+ isClosing: boolean;
16
+ };
17
+ export declare class Modal extends React.PureComponent<ModalProps, ModalState> {
18
+ readonly state: ModalState;
19
+ onDismiss: () => void;
20
+ onClickBackground: () => void;
21
+ render(): React.JSX.Element;
22
+ }
23
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,4 @@
1
1
  export { Button } from './Button';
2
2
  export { Input } from './Input';
3
+ export { Loader } from './Loader';
4
+ export { Modal } from './Modal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.23-alpha.1",
3
+ "version": "0.0.23-alpha.11",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -25,14 +25,17 @@
25
25
  "dependencies": {
26
26
  "@emotion/react": "11.14.0",
27
27
  "@emotion/styled": "11.14.1",
28
- "dompurify": "3.2.6",
28
+ "dompurify": "3.4.11",
29
29
  "emotion": "11.0.0",
30
- "react": "19.1.1",
31
- "react-date-picker": "12.0.1",
32
- "react-datetime-picker": "7.0.1",
33
- "react-dom": "19.1.1",
34
- "react-international-phone": "4.6.0",
35
- "zod": "4.1.9"
30
+ "react": "19.2.7",
31
+ "react-date-picker": "12.0.2",
32
+ "react-datetime-picker": "7.0.2",
33
+ "react-dom": "19.2.7",
34
+ "react-icons": "5.7.0",
35
+ "react-international-phone": "4.8.0",
36
+ "react-toastify": "11.1.0",
37
+ "sass-embedded": "1.100.0",
38
+ "zod": "4.4.3"
36
39
  },
37
40
  "devDependencies": {},
38
41
  "exports": {
@@ -43,6 +46,14 @@
43
46
  "./Input": {
44
47
  "types": "./Input.d.ts",
45
48
  "default": "./Input.es.js"
49
+ },
50
+ "./Loader": {
51
+ "types": "./Loader.d.ts",
52
+ "default": "./Loader.es.js"
53
+ },
54
+ "./Modal": {
55
+ "types": "./Modal.d.ts",
56
+ "default": "./Modal.es.js"
46
57
  }
47
58
  }
48
59
  }
@@ -0,0 +1,27 @@
1
+ import { isEmpty as e } from "../utilities/validations.esm.js";
2
+ import { css as t, useTheme as n } from "@emotion/react";
3
+ import r from "@emotion/styled";
4
+ import { Fragment as i, jsx as a } from "react/jsx-runtime";
5
+ //#region src/components/Button.tsx
6
+ var o = r.button`
7
+ ${(e) => e.styles}
8
+ ${((e) => e.size && t`
9
+ border-radius: calc(var(--btn-border-radius) * ${e.size});
10
+ padding: calc(var(--btn-pad-y) * ${e.size}) calc(var(--btn-pad-x) * ${e.size});
11
+ font-size: max(10px, calc(var(--w-text) * ${e.size}));
12
+ `)}
13
+ `, s = (t) => {
14
+ let { type: r = "button", variant: s = "default", className: c, size: l, ...u } = t, d = typeof l == "number" ? Math.min(10, Math.max(.1, l)) : void 0, f = n(), p = typeof f?.components?.button == "string" ? f.components.button : void 0, m = [
15
+ s === "default" ? void 0 : s,
16
+ p,
17
+ c
18
+ ].filter(Boolean).join(" ") || void 0;
19
+ return e(t.children) ? /* @__PURE__ */ a(i, {}) : /* @__PURE__ */ a(o, {
20
+ type: r,
21
+ size: d,
22
+ className: m,
23
+ ...u
24
+ });
25
+ };
26
+ //#endregion
27
+ export { s as Button };
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/components/Input.tsx
3
+ var t = (t) => /* @__PURE__ */ e("input", { ...t });
4
+ //#endregion
5
+ export { t as Input };
@@ -0,0 +1,19 @@
1
+ import { loaders as e } from "../styles/global/components/loaders.esm.js";
2
+ import t from "../styles/global/components/loaders.module.esm.js";
3
+ import n from "@emotion/styled";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ //#region src/components/Loader.tsx
6
+ var i = n.div`
7
+ ${(t) => e[t.type](t.color, t.width)}
8
+ ${(e) => e.styles}
9
+ `, a = (e) => {
10
+ let { type: n, color: a = "black", ...o } = e;
11
+ return /* @__PURE__ */ r(i, {
12
+ className: t[n],
13
+ type: n,
14
+ color: a || "black",
15
+ ...o
16
+ });
17
+ };
18
+ //#endregion
19
+ export { a as Loader };
@@ -0,0 +1,154 @@
1
+ import { Button as e } from "./Button.esm.js";
2
+ import { breakpoint as t } from "../styles/utilities/layout.esm.js";
3
+ import { LuX as n } from "../../node_modules/react-icons/lu/index.esm.js";
4
+ import { color as r } from "../styles/utilities/color.esm.js";
5
+ import { css as i, keyframes as a } from "@emotion/react";
6
+ import o from "@emotion/styled";
7
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import u from "react";
9
+ //#region src/components/Modal.tsx
10
+ var d = a`
11
+ from {
12
+ opacity: 0;
13
+ }
14
+ to {
15
+ opacity: 1;
16
+ }
17
+ `, f = a`
18
+ from {
19
+ opacity: 1;
20
+ }
21
+ to {
22
+ opacity: 0;
23
+ }
24
+ `, p = a`
25
+ from {
26
+ transform: translateY(100%);
27
+ }
28
+ to {
29
+ transform: translateY(0);
30
+ }
31
+ `, m = a`
32
+ from {
33
+ transform: translateY(0);
34
+ }
35
+ to {
36
+ transform: translateY(100%);
37
+ }
38
+ `, h = o.div`
39
+ position: fixed;
40
+ width: 100%;
41
+ height: 100%;
42
+ left: 0;
43
+ top: 0;
44
+ right: 0;
45
+ bottom: 0;
46
+ z-index: 1000;
47
+ display: flex;
48
+ justify-content: center;
49
+ align-items: center;
50
+ ${(e) => e.styles}
51
+ `, g = o.div`
52
+ background-color: rgba(0, 0, 0, 0.5);
53
+ animation: ${(e) => e.isClosing ? f : d} 0.3s ease-in-out;
54
+ animation-fill-mode: forwards;
55
+ position: fixed;
56
+ width: 100%;
57
+ height: 100%;
58
+ left: 0;
59
+ top: 0;
60
+ right: 0;
61
+ bottom: 0;
62
+ z-index: 1001;
63
+ `, _ = i`
64
+ width: 100%;
65
+ height: 100%;
66
+ `, v = i`
67
+ width: calc(var(--w-column) * 4);
68
+ `, y = i`
69
+ width: calc(var(--w-column) * 4);
70
+ ${t("tablet", i`
71
+ width: calc(var(--w-column) * 6);
72
+ `)}
73
+ ${t("desktop", i`
74
+ width: calc(var(--w-column) * 8);
75
+ `)}
76
+ `, b = i`
77
+ position: fixed;
78
+ top: 0;
79
+ right: 0;
80
+ height: 100%;
81
+ ${t("mobileOnly", _)}
82
+ ${t("tablet", v)}
83
+ `, x = i`
84
+ border-radius: 8px;
85
+ ${t("mobileOnly", _)}
86
+ ${t("tablet", y)}
87
+ `, S = o.div`
88
+ padding: calc(var(--w-gutter));
89
+ z-index: 1002;
90
+ background-color: var(--white);
91
+ max-height: 80vh;
92
+ overflow-y: auto;
93
+ -webkit-overflow-scrolling: touch;
94
+ touch-action: pan-y;
95
+ animation: ${(e) => e.isClosing ? m : p} 0.3s ease-in-out;
96
+ animation-fill-mode: forwards;
97
+ ${(e) => e.type === "panel" && b}
98
+ ${(e) => e.type === "dialog" && x}
99
+ header {
100
+ display: inline-flex;
101
+ width: 100%;
102
+ justify-content: space-between;
103
+ margin-bottom: calc(var(--w-gutter) * 0.5);
104
+ }
105
+ `, C = i`
106
+ text-decoration: none;
107
+ height: 36px;
108
+ width: 36px;
109
+ border-radius: 50%;
110
+ `, w = o.footer`
111
+ margin-top: calc(var(--w-gutter) * 2);
112
+ background-color:var(--white);
113
+ height: fit-content;
114
+ display: flex;
115
+ gap: var(--w-gutter);
116
+ `, T = class extends u.PureComponent {
117
+ state = { isClosing: !1 };
118
+ onDismiss = () => {
119
+ this.props.onDismiss && (this.setState({ isClosing: !0 }), setTimeout(() => {
120
+ this.props.onDismiss && this.props.onDismiss(), this.setState({ isClosing: !1 });
121
+ }, 280));
122
+ };
123
+ onClickBackground = () => {
124
+ (this.props.backgroundDismiss || !0) === !0 && this.onDismiss();
125
+ };
126
+ render() {
127
+ return this.props.visible ? /* @__PURE__ */ l(h, {
128
+ styles: this.props.styles,
129
+ children: [/* @__PURE__ */ l(S, {
130
+ type: this.props.type || "dialog",
131
+ isClosing: this.state.isClosing,
132
+ children: [
133
+ /* @__PURE__ */ l("header", { children: [this.props.header && /* @__PURE__ */ c(s, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ c(e, {
134
+ variant: "primary",
135
+ styles: C,
136
+ onClick: this.onDismiss,
137
+ children: /* @__PURE__ */ c(n, {
138
+ fill: r("white"),
139
+ viewBox: "6 8 14 14",
140
+ size: 24
141
+ })
142
+ })] }),
143
+ /* @__PURE__ */ c("section", { children: this.props.children }),
144
+ this.props.footer && /* @__PURE__ */ c(w, { children: this.props.footer })
145
+ ]
146
+ }), /* @__PURE__ */ c(g, {
147
+ isClosing: this.state.isClosing,
148
+ onClick: this.onClickBackground
149
+ })]
150
+ }) : /* @__PURE__ */ c(s, {});
151
+ }
152
+ };
153
+ //#endregion
154
+ export { T as Modal };
@@ -0,0 +1,65 @@
1
+ import { css as e } from "@emotion/react";
2
+ import t from "zod";
3
+ t.enum([
4
+ "dots",
5
+ "dots-trace",
6
+ "dots-bounce",
7
+ "dots-orbit",
8
+ "dashes",
9
+ "spinner",
10
+ "swirl",
11
+ "ball",
12
+ "boxy",
13
+ "factory"
14
+ ]);
15
+ var n = {
16
+ dots: (t, n = 100) => e`
17
+ --_l5c: ${t};
18
+ --_l5w: ${Math.round(n * .125)}px;
19
+ --_l5w2: ${Math.round(n * .16666)}px;
20
+ --_l5w3: ${Math.round(n * -.16666)}px;
21
+ `,
22
+ "dots-bounce": (t, n = 60) => e`
23
+ --_g: no-repeat radial-gradient(circle closest-side, ${t} 90%, #0000);
24
+ --_gw: ${n}px;
25
+ `,
26
+ "dots-trace": (t, n = 60) => e`
27
+ --_dtc: ${t};
28
+ --_dtw: ${n}px;
29
+ `,
30
+ "dots-orbit": (t, n = 17) => e`
31
+ --_doc: ${t};
32
+ --_dow: ${n}px;
33
+ `,
34
+ dashes: (t, n = 40) => e`
35
+ --_dshc: ${t};
36
+ --_dshw: ${n}px;
37
+ --_dshw2: ${Math.round(n / 4)}px;
38
+ `,
39
+ spinner: (t, n = 50) => e`
40
+ --_spnc: ${t};
41
+ --_spnw: ${n}px;
42
+ --_spnw2: ${Math.round(n * .16)}px;
43
+ `,
44
+ swirl: (t, n = 50) => e`
45
+ --_swrlc: ${t};
46
+ --_swrlw: ${n}px;
47
+ --_swrlw2: ${Math.round(n * .16)}px;
48
+ `,
49
+ ball: (t, n = 50) => e`
50
+ --_ballc: ${t};
51
+ --_ballw: ${n}px;
52
+ --_ballw2: ${Math.round(n * .24)}px;
53
+ `,
54
+ boxy: (t, n = 120) => e`
55
+ --_boxc: ${t};
56
+ --_boxw: ${n}px;
57
+ --_boxw2: ${Math.round(n * .16666)}px;
58
+ `,
59
+ factory: (t, n = 0) => e`
60
+ --_ftyc: ${t};
61
+ --_ftyw: ${n};
62
+ `
63
+ };
64
+ //#endregion
65
+ export { n as loaders };
@@ -0,0 +1 @@
1
+ ._dots_1132g_1{aspect-ratio:1;width:var(--_l5w);margin:0 var(--_l5w2);border-radius:50%;animation:1s linear infinite alternate _l5_1132g_1}@keyframes _l5_1132g_1{0%{box-shadow:var(--_l5w2) 0 var(--_l5c), var(--_l5w3) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%);background:var(--_l5c)}33%{box-shadow:var(--_l5w2) 0 var(--_l5c), var(--_l5w3) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%);background:color-mix(in srgb, var(--_l5c) 80%, white 75%)}66%{box-shadow:var(--_l5w2) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%), var(--_l5w3) 0 var(--_l5c);background:color-mix(in srgb, var(--_l5c) 80%, white 75%)}to{box-shadow:var(--_l5w2) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%), var(--_l5w3) 0 var(--_l5c);background:var(--_l5c)}}._dots-bounce_1132g_27{width:var(--_gw);aspect-ratio:2;background:var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;background-size:33.3333% 50%;animation:1s linear infinite _l3_1132g_1}@keyframes _l3_1132g_1{to{transform:rotate(1turn)}}._dots-trace_1132g_49{width:var(--_dtw);aspect-ratio:4;background:radial-gradient(circle closest-side, var(--_dtc) 90%, #0000) 0/33.3333% 100% space;clip-path:inset(0 100% 0 0);animation:1s steps(4,end) infinite _l1_1132g_1}@keyframes _l1_1132g_1{to{clip-path:inset(0 -34% 0 0)}}._dots-orbit_1132g_62{width:var(--_dow);aspect-ratio:1;background:var(--_doc);border-radius:50%;animation:2s linear infinite _l22-0_1132g_1;display:grid}._dots-orbit_1132g_62:before,._dots-orbit_1132g_62:after{content:"";background:inherit;border-radius:50%;grid-area:1/1;margin:15%;animation:1s infinite _l22_1132g_1;transform:rotate(0)translate(150%)}._dots-orbit_1132g_62:after{animation-delay:-.5s}@keyframes _l22-0_1132g_1{to{transform:rotate(1turn)}}@keyframes _l22_1132g_1{to{transform:rotate(1turn)translate(150%)}}._dashes_1132g_93{width:var(--_dshw);height:calc(var(--_dshw) * .3);background:linear-gradient(var(--_dshc) 0 0) left/var(--_dshw2) 4px, linear-gradient(var(--_dshc) 0 0) center/var(--_dshw2) 4px, linear-gradient(var(--_dshc) 0 0) right/var(--_dshw2) 4px;background-repeat:no-repeat;animation:1s linear infinite _dashes_1132g_93}@keyframes _dashes_1132g_93{0%{background-size:var(--_dshw2) 4px, var(--_dshw2) 4px, var(--_dshw2) 4px;opacity:1}33%{background-size:var(--_dshw2) var(--_dshw2), var(--_dshw2) 4px, var(--_dshw2) 4px;opacity:.7}66%{background-size:var(--_dshw2) 4px, var(--_dshw2) var(--_dshw2), var(--_dshw2) 4px;opacity:.7}to{background-size:var(--_dshw2) 4px, var(--_dshw2) 4px, var(--_dshw2) var(--_dshw2);opacity:1}}._spinner_1132g_119{width:var(--_spnw);aspect-ratio:1;border:var(--_spnw2) solid color-mix(in srgb, var(--_spnc) 20%, transparent);border-right-color:var(--_spnc);border-radius:50%;animation:1s linear infinite _l2_1132g_1}@keyframes _l2_1132g_1{to{transform:rotate(1turn)}}._swirl_1132g_133{width:var(--_swrlw);padding:var(--_swrlw2);aspect-ratio:1;background:var(--_swrlc);--_m:conic-gradient(#0000 10%,#000), linear-gradient(#000 0 0) content-box;-webkit-mask:var(--_m);-webkit-mask:var(--_m);mask:var(--_m);-webkit-mask-composite:source-out;border-radius:50%;animation:1s linear infinite _l3_1132g_1;-webkit-mask-composite:source-out;mask-composite:subtract}._ball_1132g_154{width:var(--_ballw);aspect-ratio:1;background:radial-gradient(farthest-side, var(--_ballc) 95%, #0000) 50% 1px/var(--_ballw2) var(--_ballw2) no-repeat, radial-gradient(farthest-side, #0000 calc(100% - var(--_ballw2)), #ccc 0);border-radius:50%;animation:2s linear infinite _l9_1132g_1}@keyframes _l9_1132g_1{to{transform:rotate(1turn)}}._boxy_1132g_167{width:var(--_boxw);height:var(--_boxw2);background:linear-gradient(var(--_boxc) 0 0) left -25% top 0/20% 100% no-repeat #ddd;animation:1s steps(6,end) infinite _l7_1132g_1;-webkit-mask:linear-gradient(90deg,#000 70%,#0000 0) 0/20% 100%}@keyframes _l7_1132g_1{to{background-position:right -25% top 0}}._factory_1132g_180{width:var(--_ftyw);height:var(--_ftyw2);box-shadow:0 3px 0 var(--_ftyc);clip-path:inset(-40px 0 -5px);position:relative}._factory_1132g_180:before{content:"";height:var(--_ftyw3);--g:no-repeat linear-gradient(color-mix(in srgb, var(--_ftyc) 30%, white) 0 0);background:var(--g), var(--g), var(--g), var(--g);background-size:var(--_ftyw4) 14px;animation:2s linear infinite _l7-1_1132g_1,2s linear infinite _l7-2_1132g_1;position:absolute;inset:auto calc(50% - 17px) 0}@keyframes _l7-1_1132g_1{0%,to{background-position:0 -var(--_ftyw3), 100% -var(--_ftyw3)}17.5%{background-position:0 100%, 100% -var(--_ftyw3), 0 -var(--_ftyw3), 100% -var(--_ftyw3)}35%{background-position:0 100%, 100% 100%, 0 -var(--_ftyw3), 100% -var(--_ftyw3)}52.5%{background-position:0 100%, 100% 100%, 0 calc(100% - var(--_ftyw4)), 100% -var(--_ftyw3)}70%,98%{background-position:0 100%, 100% 100%, 0 calc(100% - var(--_ftyw4)), 100% calc(100% - var(--_ftyw4))}}@keyframes _l7-2_1132g_1{0%,70%{transform:translate(0)}to{transform:translate(200%)}}
@@ -0,0 +1,25 @@
1
+ import './loaders.module.css';//#region src/styles/global/components/loaders.module.scss
2
+ var e = "_dots_1132g_1", t = "_l5_1132g_1", n = "_l3_1132g_1", r = "_l1_1132g_1", i = "_l22_1132g_1", a = "_dashes_1132g_93", o = "_spinner_1132g_119", s = "_l2_1132g_1", c = "_swirl_1132g_133", l = "_ball_1132g_154", u = "_l9_1132g_1", d = "_boxy_1132g_167", f = "_l7_1132g_1", p = "_factory_1132g_180", m = {
3
+ dots: e,
4
+ l5: t,
5
+ "dots-bounce": "_dots-bounce_1132g_27",
6
+ l3: n,
7
+ "dots-trace": "_dots-trace_1132g_49",
8
+ l1: r,
9
+ "dots-orbit": "_dots-orbit_1132g_62",
10
+ "l22-0": "_l22-0_1132g_1",
11
+ l22: i,
12
+ dashes: a,
13
+ spinner: o,
14
+ l2: s,
15
+ swirl: c,
16
+ ball: l,
17
+ l9: u,
18
+ boxy: d,
19
+ l7: f,
20
+ factory: p,
21
+ "l7-1": "_l7-1_1132g_1",
22
+ "l7-2": "_l7-2_1132g_1"
23
+ };
24
+ //#endregion
25
+ export { l as ball, d as boxy, a as dashes, m as default, e as dots, p as factory, r as l1, s as l2, i as l22, n as l3, t as l5, f as l7, u as l9, o as spinner, c as swirl };