@stamcat/craftsman 0.0.27-alpha.5 → 0.0.27-alpha.8

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 (42) hide show
  1. package/Components.esm.js +10 -6
  2. package/Styles.esm.js +5 -5
  3. package/package.json +9 -1
  4. package/src/components/{Button.d.ts → Button/Button.d.ts} +1 -1
  5. package/src/components/{Button.esm.js → Button/Button.esm.js} +4 -4
  6. package/src/components/Input/Input.esm.js +9 -8
  7. package/src/components/Input/Input.module.css +1 -1
  8. package/src/components/Input/Input.module.esm.js +1 -1
  9. package/src/components/Input/InputPassword.esm.js +1 -1
  10. package/src/components/Input/InputWrapper.d.ts +1 -2
  11. package/src/components/Input/InputWrapper.esm.js +14 -20
  12. package/src/components/Input/Textarea.esm.js +2 -2
  13. package/src/components/{Loader.d.ts → Loader/Loader.d.ts} +1 -2
  14. package/src/components/Loader/Loader.esm.js +19 -0
  15. package/src/{styles/global/components → components/Loader}/loaders.module.esm.js +1 -1
  16. package/src/components/{Modal.d.ts → Modal/Modal.d.ts} +0 -1
  17. package/src/components/Modal/Modal.esm.js +53 -0
  18. package/src/components/Modal/Modal.module.css +1 -0
  19. package/src/components/Modal/Modal.module.esm.js +16 -0
  20. package/src/components/{Modal.module.scss → Modal/Modal.module.scss} +2 -2
  21. package/src/components/Select/Select.d.ts +14 -0
  22. package/src/components/Select/Select.esm.js +26 -0
  23. package/src/components/Text/Text.css +1 -0
  24. package/src/components/Text/Text.d.ts +10 -0
  25. package/src/components/Text/Text.scss +80 -0
  26. package/src/components/Text/Text2.esm.js +23 -0
  27. package/src/components/index.d.ts +5 -3
  28. package/src/styles/global/components/_select.scss +56 -0
  29. package/src/styles/global/components/_typography.scss +85 -54
  30. package/src/styles/global/globalStyles.scss +60 -59
  31. package/src/styles/theme/components.esm.js +0 -1
  32. package/src/styles/utilities/_functions.scss +3 -3
  33. package/src/utilities/types.d.ts +27 -0
  34. package/src/utilities/types.esm.js +22 -1
  35. package/src/components/Loader.esm.js +0 -21
  36. package/src/components/Modal.esm.js +0 -54
  37. package/src/components/Modal.module.css +0 -1
  38. package/src/components/Modal.module.esm.js +0 -16
  39. /package/src/{styles/global/components → components/Loader}/loaders.module.css +0 -0
  40. /package/src/{styles/global/components → components/Loader}/loaders.module.scss +0 -0
  41. /package/src/{styles/global/components/loaders.d.ts → components/Loader/types.d.ts} +0 -0
  42. /package/src/{styles/global/components/loaders.esm.js → components/Loader/types.esm.js} +0 -0
package/Components.esm.js CHANGED
@@ -1,22 +1,26 @@
1
1
  import { __exportAll as e } from "./_virtual/_rolldown/runtime.esm.js";
2
- import { Button as t } from "./src/components/Button.esm.js";
2
+ import { Button as t } from "./src/components/Button/Button.esm.js";
3
3
  import { Input as n } from "./src/components/Input/Input.esm.js";
4
4
  import { InputPassword as r } from "./src/components/Input/InputPassword.esm.js";
5
- import { Loader as i } from "./src/components/Loader.esm.js";
5
+ import { Loader as i } from "./src/components/Loader/Loader.esm.js";
6
6
  import { RadioButton as a } from "./src/components/Input/RadioButton.esm.js";
7
7
  import { Checkbox as o } from "./src/components/Input/Checkbox.esm.js";
8
8
  import { Textarea as s } from "./src/components/Input/Textarea.esm.js";
9
- import { Modal as c } from "./src/components/Modal.esm.js";
9
+ import { Text as c } from "./src/components/Text/Text2.esm.js";
10
+ import { Modal as l } from "./src/components/Modal/Modal.esm.js";
11
+ import { Select as u } from "./src/components/Select/Select.esm.js";
10
12
  //#region src/components/index.ts
11
- var l = /* @__PURE__ */ e({
13
+ var d = /* @__PURE__ */ e({
12
14
  Button: () => t,
13
15
  Checkbox: () => o,
14
16
  Input: () => n,
15
17
  InputPassword: () => r,
16
18
  Loader: () => i,
17
- Modal: () => c,
19
+ Modal: () => l,
18
20
  RadioButton: () => a,
21
+ Select: () => u,
22
+ Text: () => c,
19
23
  Textarea: () => s
20
24
  });
21
25
  //#endregion
22
- export { t as Button, o as Checkbox, n as Input, r as InputPassword, i as Loader, c as Modal, a as RadioButton, s as Textarea, l as components_exports };
26
+ export { t as Button, o as Checkbox, n as Input, r as InputPassword, i as Loader, l as Modal, a as RadioButton, u as Select, c as Text, s as Textarea, d as components_exports };
package/Styles.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defaultColors as e, defaultWidths as t } from "./src/styles/utilities/constants.esm.js";
2
2
  import { color as n, colors as r, hexToRgba as i } from "./src/styles/utilities/color.esm.js";
3
- import { BaseWidthSchema as a, BreakpointSchema as o, ButtonType as s, LayoutWidthsSchema as c, MaxScreenWidthSchema as l, ScreenWidthSchema as u, zLabelPosition as d, zTextInputExclusions as f, zTextInputType as p, zTextInputTypes as m } from "./src/utilities/types.esm.js";
4
- import { breakpoint as h, media as g, width as _, widths as v } from "./src/styles/utilities/layout.esm.js";
5
- import { themeBuilder as y } from "./src/styles/theme/theme.esm.js";
6
- import { ThemeProvider as b } from "./src/styles/components/ThemeProvider.esm.js";
7
- export { a as BaseWidthSchema, o as BreakpointSchema, s as ButtonType, c as LayoutWidthsSchema, l as MaxScreenWidthSchema, u as ScreenWidthSchema, b as ThemeProvider, h as breakpoint, n as color, r as colors, e as defaultColors, t as defaultWidths, i as hexToRgba, g as media, y as themeBuilder, _ as width, v as widths, d as zLabelPosition, f as zTextInputExclusions, p as zTextInputType, m as zTextInputTypes };
3
+ import { BaseWidthSchema as a, BreakpointSchema as o, ButtonType as s, LayoutWidthsSchema as c, MaxScreenWidthSchema as l, ScreenWidthSchema as u, TextSize as d, TextTags as f, TextType as p, zLabelPosition as m, zTextInputExclusions as h, zTextInputType as g, zTextInputTypes as _ } from "./src/utilities/types.esm.js";
4
+ import { breakpoint as v, media as y, width as b, widths as x } from "./src/styles/utilities/layout.esm.js";
5
+ import { themeBuilder as S } from "./src/styles/theme/theme.esm.js";
6
+ import { ThemeProvider as C } from "./src/styles/components/ThemeProvider.esm.js";
7
+ export { a as BaseWidthSchema, o as BreakpointSchema, s as ButtonType, c as LayoutWidthsSchema, l as MaxScreenWidthSchema, u as ScreenWidthSchema, d as TextSize, f as TextTags, p as TextType, C as ThemeProvider, v as breakpoint, n as color, r as colors, e as defaultColors, t as defaultWidths, i as hexToRgba, y as media, S as themeBuilder, b as width, x as widths, m as zLabelPosition, h as zTextInputExclusions, g as zTextInputType, _ as zTextInputTypes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.27-alpha.5",
3
+ "version": "0.0.27-alpha.8",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -88,9 +88,17 @@
88
88
  "types": "./src/components/Textarea.d.ts",
89
89
  "default": "./src/components/Textarea.esm.js"
90
90
  },
91
+ "./Text": {
92
+ "types": "./src/components/Text.d.ts",
93
+ "default": "./src/components/Text.esm.js"
94
+ },
91
95
  "./Modal": {
92
96
  "types": "./src/components/Modal.d.ts",
93
97
  "default": "./src/components/Modal.esm.js"
98
+ },
99
+ "./Select": {
100
+ "types": "./src/components/Select.d.ts",
101
+ "default": "./src/components/Select.esm.js"
94
102
  }
95
103
  }
96
104
  }
@@ -1,4 +1,4 @@
1
- import { ButtonType } from '../styles';
1
+ import { ButtonType } from '../../styles';
2
2
  export type ButtonProps = React.ComponentProps<"button"> & {
3
3
  variant?: ButtonType;
4
4
  size?: number;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { isEmpty as e } from "../utilities/validations.esm.js";
3
- import { width as t } from "../styles/utilities/layout.esm.js";
4
- import "../../Styles.esm.js";
2
+ import { isEmpty as e } from "../../utilities/validations.esm.js";
3
+ import { width as t } from "../../styles/utilities/layout.esm.js";
4
+ import "../../../Styles.esm.js";
5
5
  import n from "clsx";
6
6
  import { Fragment as r, jsx as i } from "react/jsx-runtime";
7
- //#region src/components/Button.tsx
7
+ //#region src/components/Button/Button.tsx
8
8
  var a = (a) => {
9
9
  let { type: o = "button", variant: s = "default", size: c, styles: l, className: u, style: d, ...f } = a, p = typeof c == "number" ? Math.min(10, Math.max(.1, c)) : void 0, m = e(l) ? void 0 : l, h = p ? {
10
10
  borderRadius: `calc(var(--btn-border-radius) * ${p})`,
@@ -6,25 +6,26 @@ import r from "clsx";
6
6
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  import { useId as o } from "react";
8
8
  //#region src/components/Input/Input.tsx
9
- var s = ({ label: s, id: c, labelPosition: l = "top", required: u = !1, type: d = "text", error: f, styles: p, endAdornment: m, ...h }) => {
10
- let g = o(), _ = c || g;
9
+ var s = ({ label: s, id: c, labelPosition: l = "top", required: u = !1, type: d = "text", error: f, endAdornment: p, style: m, className: h, ...g }) => {
10
+ let _ = o(), v = c || _;
11
11
  return /* @__PURE__ */ i(n, {
12
+ className: h,
12
13
  label: s,
13
14
  labelPosition: l,
14
15
  error: f,
15
16
  required: u,
16
- styles: p,
17
+ style: m,
17
18
  children: /* @__PURE__ */ a("span", {
18
19
  className: t.inputField,
19
- "data-has-end-adornment": !e(m),
20
+ "data-has-end-adornment": !e(p),
20
21
  children: [/* @__PURE__ */ i("input", {
21
- id: _,
22
+ id: v,
22
23
  type: d,
23
24
  className: r(t.input, d),
24
- ...h
25
- }), !e(m) && /* @__PURE__ */ i("span", {
25
+ ...g
26
+ }), !e(p) && /* @__PURE__ */ i("span", {
26
27
  className: t.inputAdornment,
27
- children: m
28
+ children: p
28
29
  })]
29
30
  })
30
31
  });
@@ -1 +1 @@
1
- @layer craftsman-base{._wrapper_txz19_2[data-label-position=inside]{--react-international-phone-height:50px;--react-international-phone-border-radius:8px;--react-international-phone-border-color:silver;position:relative}}._wrapper_txz19_2 label ._inputLabel_txz19_9{margin-bottom:calc(var(--w-gutter,16px) * .25)}._wrapper_txz19_2[data-required=true] label ._inputLabel_txz19_9:after{content:"*";color:var(--red700)}._wrapper_txz19_2[data-label-position=left] label{align-items:center;display:inline-flex}._wrapper_txz19_2[data-label-position=left] label ._inputLabel_txz19_9{width:fit-content;margin-right:calc(var(--w-gutter,16px) * .75)}._wrapper_txz19_2[data-label-position=left]._textarea_txz19_24 label{align-items:flex-start}._wrapper_txz19_2[data-label-position=bottom] label{flex-direction:column-reverse;align-items:flex-start;display:inline-flex}._wrapper_txz19_2[data-label-position=bottom] label ._inputLabel_txz19_9{margin-bottom:0;margin-top:calc(var(--w-gutter,16px) * .25)}._wrapper_txz19_2[data-label-position=right] label{flex-direction:row-reverse;align-items:baseline;display:inline-flex}._wrapper_txz19_2[data-label-position=right] label ._inputLabel_txz19_9{margin-left:calc(var(--w-gutter,16px) * .25);margin-bottom:0}._wrapper_txz19_2[data-label-position=inside] ._inputLabel_txz19_9{background-color:var(--white);z-index:1;width:fit-content;top:calc(var(--w-gutter,16px) * .25);left:calc(var(--w-gutter,16px) * .25);pointer-events:none;padding:0 5px;transition:top .15s,left .15s,font-size .15s,color .15s;position:absolute}._wrapper_txz19_2[data-label-position=inside]>label>._inputField_txz19_56>._input_txz19_9,._wrapper_txz19_2[data-label-position=inside]>._input_txz19_9{transition:border-color .2s}._wrapper_txz19_2[data-label-position=inside]:focus-within ._inputLabel_txz19_9{top:-.5rem;left:calc(var(--w-gutter,16px) * .125);font-size:calc(var(--w-text,14px) * .75);color:var(--blue500)}._wrapper_txz19_2[data-label-position=inside]:focus-within ._input_txz19_9{border-color:var(--blue500)}._wrapper_txz19_2[data-label-position=inside]:focus-within ._input_txz19_9::placeholder{opacity:1}._wrapper_txz19_2[data-label-position=inside][data-has-input=true] ._inputLabel_txz19_9{top:-.5rem;left:calc(var(--w-gutter,16px) * .125);font-size:calc(var(--w-text,14px) * .75)}._wrapper_txz19_2[data-label-position=inside]:has(._input_txz19_9:not(:placeholder-shown)) ._inputLabel_txz19_9{top:-.5rem;left:calc(var(--w-gutter,16px) * .125);font-size:calc(var(--w-text,14px) * .75)}._wrapper_txz19_2[data-label-position=inside]:has(._input_txz19_9:-webkit-autofill) ._inputLabel_txz19_9{top:-.5rem;left:calc(var(--w-gutter,16px) * .125);font-size:calc(var(--w-text,14px) * .75)}._wrapper_txz19_2[data-label-position=inside] ._input_txz19_9[type=tel]{width:100%}._wrapper_txz19_2[data-label-position=inside] ._input_txz19_9::placeholder{opacity:0;transition:opacity .2s}._inputField_txz19_56{align-items:center;display:inline-flex;position:relative}._inputField_txz19_56[data-has-end-adornment=true]>._input_txz19_9{width:100%;padding-right:calc(var(--w-gutter,16px) * 1.5)}._inputAdornment_txz19_95{right:calc(var(--w-gutter,16px) * .5);z-index:1;align-items:center;margin-top:0;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}._error_txz19_106{margin-top:calc(var(--w-gutter,16px) * .25);font-size:calc(var(--w-text,14px) * .75);color:var(--red600)}._inputViewToggle_txz19_112{align-items:"center";padding:0;line-height:1;display:inline-flex}
1
+ @layer craftsman-base{._wrapper_1xyh8_2[data-label-position=inside]{--react-international-phone-height:50px;--react-international-phone-border-radius:8px;--react-international-phone-border-color:silver;position:relative}}._wrapper_1xyh8_2 label ._inputLabel_1xyh8_9{margin-bottom:calc(var(--w-gutter) * .25)}._wrapper_1xyh8_2[data-required=true] label ._inputLabel_1xyh8_9:after{content:"*";color:var(--red700)}._wrapper_1xyh8_2[data-label-position=left] label{align-items:center;display:inline-flex}._wrapper_1xyh8_2[data-label-position=left] label ._inputLabel_1xyh8_9{width:fit-content;margin-right:calc(var(--w-gutter) * .75)}._wrapper_1xyh8_2[data-label-position=left]._textarea_1xyh8_24 label{align-items:flex-start}._wrapper_1xyh8_2[data-label-position=bottom] label{flex-direction:column-reverse;align-items:flex-start;display:inline-flex}._wrapper_1xyh8_2[data-label-position=bottom] label ._inputLabel_1xyh8_9{margin-bottom:0;margin-top:calc(var(--w-gutter) * .25)}._wrapper_1xyh8_2[data-label-position=right] label{flex-direction:row-reverse;align-items:baseline;display:inline-flex}._wrapper_1xyh8_2[data-label-position=right] label ._inputLabel_1xyh8_9{margin-left:calc(var(--w-gutter) * .25);margin-bottom:0}._wrapper_1xyh8_2[data-label-position=inside] ._inputLabel_1xyh8_9{background-color:var(--white);z-index:1;width:fit-content;top:calc(var(--w-gutter) * .25);left:calc(var(--w-gutter) * .25);pointer-events:none;padding:0 5px;transition:top .15s,left .15s,font-size .15s,color .15s;position:absolute}._wrapper_1xyh8_2[data-label-position=inside]>label>._inputField_1xyh8_56>._input_1xyh8_9,._wrapper_1xyh8_2[data-label-position=inside]>._input_1xyh8_9{transition:border-color .2s}._wrapper_1xyh8_2[data-label-position=inside]:focus-within ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75);color:var(--blue500)}._wrapper_1xyh8_2[data-label-position=inside]:focus-within ._input_1xyh8_9{border-color:var(--blue500)}._wrapper_1xyh8_2[data-label-position=inside]:focus-within ._input_1xyh8_9::placeholder{opacity:1}._wrapper_1xyh8_2[data-label-position=inside][data-has-input=true] ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}._wrapper_1xyh8_2[data-label-position=inside]:has(._input_1xyh8_9:not(:placeholder-shown)) ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}._wrapper_1xyh8_2[data-label-position=inside]:has(._input_1xyh8_9:-webkit-autofill) ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}._wrapper_1xyh8_2[data-label-position=inside] ._input_1xyh8_9[type=tel]{width:100%}._wrapper_1xyh8_2[data-label-position=inside] ._input_1xyh8_9::placeholder{opacity:0;transition:opacity .2s}._inputField_1xyh8_56{align-items:center;display:inline-flex;position:relative}._inputField_1xyh8_56[data-has-end-adornment=true]>._input_1xyh8_9{width:100%;padding-right:calc(var(--w-gutter) * 1.5)}._inputAdornment_1xyh8_95{right:calc(var(--w-gutter) * .5);z-index:1;align-items:center;margin-top:0;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}._error_1xyh8_106{margin-top:calc(var(--w-gutter) * .25);font-size:calc(var(--w-text) * .75);color:var(--red600)}._inputViewToggle_1xyh8_112{align-items:"center";padding:0;line-height:1;display:inline-flex}
@@ -1,5 +1,5 @@
1
1
  import './Input.module.css';//#region src/components/Input/Input.module.scss
2
- var e = "_wrapper_txz19_2", t = "_inputLabel_txz19_9", n = "_textarea_txz19_24", r = "_inputField_txz19_56", i = "_input_txz19_9", a = "_inputAdornment_txz19_95", o = "_error_txz19_106", s = "_inputViewToggle_txz19_112", c = {
2
+ var e = "_wrapper_1xyh8_2", t = "_inputLabel_1xyh8_9", n = "_textarea_1xyh8_24", r = "_inputField_1xyh8_56", i = "_input_1xyh8_9", a = "_inputAdornment_1xyh8_95", o = "_error_1xyh8_106", s = "_inputViewToggle_1xyh8_112", c = {
3
3
  wrapper: e,
4
4
  inputLabel: t,
5
5
  textarea: n,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Button as e } from "../Button.esm.js";
2
+ import { Button as e } from "../Button/Button.esm.js";
3
3
  import t from "./Input.module.esm.js";
4
4
  import { Input as n } from "./Input.esm.js";
5
5
  import { jsx as r } from "react/jsx-runtime";
@@ -4,8 +4,7 @@ export type LabeledInput = {
4
4
  labelPosition?: LabelPosition;
5
5
  error?: string | boolean | React.ReactNode;
6
6
  required?: boolean;
7
- styles?: React.CSSProperties;
8
7
  endAdornment?: React.ReactNode;
9
8
  };
10
- export type InputWrapperProps = React.ComponentProps<"input" | "textarea"> & LabeledInput;
9
+ export type InputWrapperProps = React.ComponentProps<"input" | "textarea" | "select"> & LabeledInput;
11
10
  export declare const InputWrapper: React.FC<InputWrapperProps>;
@@ -4,25 +4,19 @@ import t from "./Input.module.esm.js";
4
4
  import n from "clsx";
5
5
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  //#region src/components/Input/InputWrapper.tsx
7
- var a = ({ label: a, labelPosition: o = "top", required: s = !1, error: c, styles: l, className: u, style: d, children: f, value: p, defaultValue: m }) => {
8
- let h = !e(p) || !e(m), g = e(l) ? void 0 : l;
9
- return /* @__PURE__ */ i("div", {
10
- "data-label-position": o,
11
- "data-required": s,
12
- "data-has-input": h,
13
- className: n(t.wrapper, u),
14
- style: {
15
- ...g,
16
- ...d
17
- },
18
- children: [e(a) ? f : /* @__PURE__ */ i("label", { children: [o !== "hidden" && /* @__PURE__ */ r("div", {
19
- className: t.inputLabel,
20
- children: a
21
- }), f] }), !e(c) && /* @__PURE__ */ r("div", {
22
- className: t.error,
23
- children: c
24
- })]
25
- });
26
- };
7
+ var a = ({ label: a, labelPosition: o = "top", required: s = !1, error: c, className: l, style: u, children: d, value: f, defaultValue: p }) => /* @__PURE__ */ i("div", {
8
+ "data-label-position": o,
9
+ "data-required": s,
10
+ "data-has-input": !e(f) || !e(p),
11
+ className: n(t.wrapper, l),
12
+ style: u,
13
+ children: [e(a) ? d : /* @__PURE__ */ i("label", { children: [o !== "hidden" && /* @__PURE__ */ r("div", {
14
+ className: t.inputLabel,
15
+ children: a
16
+ }), d] }), !e(c) && /* @__PURE__ */ r("div", {
17
+ className: t.error,
18
+ children: c
19
+ })]
20
+ });
27
21
  //#endregion
28
22
  export { a as InputWrapper };
@@ -5,7 +5,7 @@ import n from "clsx";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  import { useId as i } from "react";
7
7
  //#region src/components/Input/Textarea.tsx
8
- var a = ({ labelPosition: a = "top", id: o, label: s, error: c, required: l, className: u, styles: d, ...f }) => {
8
+ var a = ({ labelPosition: a = "top", id: o, label: s, error: c, required: l, className: u, style: d, ...f }) => {
9
9
  let p = i(), m = o || p;
10
10
  return /* @__PURE__ */ r(t, {
11
11
  label: s,
@@ -13,7 +13,7 @@ var a = ({ labelPosition: a = "top", id: o, label: s, error: c, required: l, cla
13
13
  labelPosition: a,
14
14
  error: c,
15
15
  required: l,
16
- styles: d,
16
+ style: d,
17
17
  children: /* @__PURE__ */ r("textarea", {
18
18
  id: m,
19
19
  className: n(e.input),
@@ -1,8 +1,7 @@
1
- import { LoaderStyle } from '../styles/global/components/loaders';
1
+ import { LoaderStyle } from './types';
2
2
  export type LoaderProps = React.ComponentProps<"div"> & {
3
3
  type: LoaderStyle;
4
4
  color?: string;
5
5
  width?: number;
6
- styles?: React.CSSProperties;
7
6
  };
8
7
  export declare const Loader: React.FC<LoaderProps>;
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { loaders as e } from "./types.esm.js";
3
+ import t from "./loaders.module.esm.js";
4
+ import n from "clsx";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ //#region src/components/Loader/Loader.tsx
7
+ var i = (i) => {
8
+ let { type: a, color: o = "black", width: s, className: c, style: l, ...u } = i, d = e[a](o, s);
9
+ return /* @__PURE__ */ r("div", {
10
+ className: n(t[a], c),
11
+ style: {
12
+ ...d,
13
+ ...l
14
+ },
15
+ ...u
16
+ });
17
+ };
18
+ //#endregion
19
+ export { i as Loader };
@@ -1,4 +1,4 @@
1
- import './loaders.module.css';//#region src/styles/global/components/loaders.module.scss
1
+ import './loaders.module.css';//#region src/components/Loader/loaders.module.scss
2
2
  var e = "_dots_mugu5_2", t = "_l5_mugu5_1", n = "_dots-trace_mugu5_41", r = "_l1_mugu5_1", i = "_dots-orbit_mugu5_53", a = "_l22-0_mugu5_1", o = "_l22_mugu5_1", s = "_dashes_mugu5_83", c = "_spinner_mugu5_108", l = "_l2_mugu5_1", u = "_swirl_mugu5_121", d = "_l3_mugu5_1", f = "_ball_mugu5_141", p = "_l9_mugu5_1", m = "_boxy_mugu5_153", h = "_l7_mugu5_1", g = {
3
3
  dots: e,
4
4
  l5: t,
@@ -8,7 +8,6 @@ export interface ModalProps extends React.ComponentPropsWithoutRef<"div"> {
8
8
  backgroundDismiss?: boolean;
9
9
  hideDismissIcon?: boolean;
10
10
  footer?: React.ReactNode;
11
- styles?: React.CSSProperties;
12
11
  }
13
12
  type ModalState = {
14
13
  isClosing: boolean;
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { color as e } from "../../styles/utilities/color.esm.js";
3
+ import { Button as t } from "../Button/Button.esm.js";
4
+ import n from "./Modal.module.esm.js";
5
+ import r from "clsx";
6
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ import s from "react";
8
+ import { LuX as c } from "react-icons/lu";
9
+ //#region src/components/Modal/Modal.tsx
10
+ var l = class extends s.PureComponent {
11
+ state = { isClosing: !1 };
12
+ onDismiss = () => {
13
+ this.props.onDismiss && (this.setState({ isClosing: !0 }), setTimeout(() => {
14
+ this.props.onDismiss && this.props.onDismiss(), this.setState({ isClosing: !1 });
15
+ }, 280));
16
+ };
17
+ onClickBackground = () => {
18
+ (this.props.backgroundDismiss ?? !0) === !0 && this.onDismiss();
19
+ };
20
+ render() {
21
+ let s = this.props.type || "dialog";
22
+ return this.props.visible ? /* @__PURE__ */ o("div", {
23
+ className: r([n.wrapper, this.props.className]),
24
+ style: this.props.style,
25
+ children: [/* @__PURE__ */ o("div", {
26
+ className: r(n.content, n[s]),
27
+ "data-is-closing": this.state.isClosing,
28
+ children: [
29
+ /* @__PURE__ */ o("header", { children: [this.props.header && /* @__PURE__ */ a(i, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ a(t, {
30
+ variant: "primary",
31
+ className: n.closeModal,
32
+ onClick: this.onDismiss,
33
+ children: /* @__PURE__ */ a(c, {
34
+ fill: e("white"),
35
+ size: 18
36
+ })
37
+ })] }),
38
+ /* @__PURE__ */ a("section", { children: this.props.children }),
39
+ this.props.footer && /* @__PURE__ */ a("footer", {
40
+ className: n.actionContainer,
41
+ children: this.props.footer
42
+ })
43
+ ]
44
+ }), /* @__PURE__ */ a("div", {
45
+ className: n.background,
46
+ "data-is-closing": this.state.isClosing,
47
+ onClick: this.onClickBackground
48
+ })]
49
+ }) : /* @__PURE__ */ a(i, {});
50
+ }
51
+ };
52
+ //#endregion
53
+ export { l as Modal };
@@ -0,0 +1 @@
1
+ ._wrapper_3m995_1,._background_3m995_1{width:100%;height:100%;position:fixed;inset:0}@keyframes _fadeIn_3m995_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_3m995_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_3m995_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes _slideOut_3m995_1{0%{transform:translateY(0)}to{transform:translateY(100%)}}._wrapper_3m995_1{z-index:1000;justify-content:center;align-items:center;display:flex}._background_3m995_1{z-index:1001;background-color:#00000080;animation-fill-mode:forwards}._background_3m995_1[data-is-closing=true]{animation:.3s ease-in-out _fadeOut_3m995_1}._background_3m995_1[data-is-closing=false]{animation:.3s ease-in-out _fadeIn_3m995_1}._content_3m995_62{padding:var(--w-gutter);z-index:1002;background-color:var(--white);-webkit-overflow-scrolling:touch;touch-action:pan-y;max-height:80vh;animation-fill-mode:forwards;overflow-y:auto}._content_3m995_62[data-is-closing=true]{animation:.3s ease-in-out _slideOut_3m995_1}._content_3m995_62[data-is-closing=false]{animation:.3s ease-in-out _slideIn_3m995_1}._content_3m995_62._panel_3m995_78{height:100%;position:fixed;top:0;right:0}._content_3m995_62._dialog_3m995_84{border-radius:8px}._content_3m995_62>header{width:100%;margin-bottom:calc(var(--w-gutter) * .5);justify-content:space-between;display:inline-flex}._content_3m995_62>header>button:only-child{margin-left:auto}._actionContainer_3m995_97{margin-top:calc(var(--w-gutter) * 2);background-color:var(--white);gap:var(--w-gutter);height:fit-content;display:flex}._closeModal_3m995_105{border-radius:50%;justify-content:center;width:30px;height:30px;padding:0;text-decoration:none;display:inline-flex}@media (width>=0) and (width<=660px){._content_3m995_62._panel_3m995_78,._content_3m995_62._dialog_3m995_84{width:100%;height:100%}}@media (width>=660px){._content_3m995_62._panel_3m995_78{width:calc((var(--w-column) * 4) + (var(--w-gutter) * 3))}._content_3m995_62._dialog_3m995_84{width:calc((var(--w-column) * 6) + (var(--w-gutter) * 5))}}@media (width>=1040px){._content_3m995_62._dialog_3m995_84{width:calc((var(--w-column) * 8) + (var(--w-gutter) * 7))}}
@@ -0,0 +1,16 @@
1
+ import './Modal.module.css';//#region src/components/Modal/Modal.module.scss
2
+ var e = "_wrapper_3m995_1", t = "_background_3m995_1", n = "_fadeOut_3m995_1", r = "_fadeIn_3m995_1", i = "_content_3m995_62", a = "_slideOut_3m995_1", o = "_slideIn_3m995_1", s = "_panel_3m995_78", c = "_dialog_3m995_84", l = "_actionContainer_3m995_97", u = "_closeModal_3m995_105", d = {
3
+ wrapper: e,
4
+ background: t,
5
+ fadeOut: n,
6
+ fadeIn: r,
7
+ content: i,
8
+ slideOut: a,
9
+ slideIn: o,
10
+ panel: s,
11
+ dialog: c,
12
+ actionContainer: l,
13
+ closeModal: u
14
+ };
15
+ //#endregion
16
+ export { l as actionContainer, t as background, u as closeModal, i as content, d as default, c as dialog, r as fadeIn, n as fadeOut, s as panel, o as slideIn, a as slideOut, e as wrapper };
@@ -1,5 +1,5 @@
1
- @use "../styles/global/components/modal";
2
- @use "../styles/utilities/functions" as u;
1
+ @use "../../styles/global/components/modal";
2
+ @use "../../styles/utilities/functions" as u;
3
3
 
4
4
  @keyframes fadeIn {
5
5
  from {
@@ -0,0 +1,14 @@
1
+ import { LabeledInput } from '../Input/InputWrapper';
2
+ export type SelectOption = {
3
+ value: string;
4
+ selected?: boolean;
5
+ disabled?: boolean;
6
+ label: string;
7
+ };
8
+ export type SelectProps = React.ComponentProps<"select"> & LabeledInput & {
9
+ options?: {
10
+ label: string;
11
+ value: string;
12
+ }[];
13
+ };
14
+ export declare const Select: React.FC<SelectProps>;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { InputWrapper as e } from "../Input/InputWrapper.esm.js";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { useId as n } from "react";
5
+ //#region src/components/Select/Select.tsx
6
+ var r = ({ label: r, id: i, labelPosition: a = "top", required: o = !1, error: s, options: c = [], className: l, style: u, ...d }) => {
7
+ let f = n(), p = i || f;
8
+ return /* @__PURE__ */ t(e, {
9
+ label: r,
10
+ labelPosition: a,
11
+ error: s,
12
+ required: o,
13
+ className: l,
14
+ style: u,
15
+ children: /* @__PURE__ */ t("select", {
16
+ id: p,
17
+ ...d,
18
+ children: c.map((e, n) => /* @__PURE__ */ t("option", {
19
+ value: e.value,
20
+ children: e.label
21
+ }, `${p}-opt-${n}`))
22
+ })
23
+ });
24
+ };
25
+ //#endregion
26
+ export { r as Select };
@@ -0,0 +1 @@
1
+ @layer craftsman-base{h1{font-size:calc(var(--w-text) * 3.125);line-height:1.2}h2{font-size:calc(var(--w-text) * 2.625);font-weight:625;line-height:1.1}h3{font-size:calc(var(--w-text) * 1.625);line-height:1.1}h4{font-size:calc(var(--w-text) * 1.25);margin:calc(var(--w-gutter) * .5) 0;line-height:1.1}h5{font-size:var(--w-text);line-height:1.2}h6{font-size:calc(var(--w-text) * .875);font-weight:600;line-height:1.2}p{font-style:normal;font-size:var(--w-text);margin:0;line-height:1.5}small{font-size:calc(var(--w-text) * .75)}@media (width<=660px){h4{font-size:var(--w-text,14px)}p{font-size:calc(var(--w-text,14px) * .875)}}.text.display{font-size:calc(var(--w-text) * 1.625);line-height:1.1}.text.display.xlarge{font-size:calc(var(--w-text) * 3.125);line-height:1.2}.text.display.large{font-size:calc(var(--w-text) * 2.625);font-weight:625;line-height:1.1}.text.display.small{font-size:calc(var(--w-text) * 1.25);margin:calc(var(--w-gutter) * .5) 0;line-height:1.1}.text.heading{font-size:calc(var(--w-text) * 1.625);line-height:1.1}.text.heading.xlarge{font-size:calc(var(--w-text) * 3.125);line-height:1.2}.text.heading.large,.text.xlarge{font-size:calc(var(--w-text) * 2.625);font-weight:625;line-height:1.1}.text.heading.medium{font-size:calc(var(--w-text) * 1.625);line-height:1.1}.text.heading.small{font-size:calc(var(--w-text) * 1.25);margin:calc(var(--w-gutter) * .5) 0;line-height:1.1}.text.heading.xsmall{font-size:var(--w-text);line-height:1.2}.text.paragraph{font-style:normal;font-size:var(--w-text);margin:0;line-height:1.5}.text.paragraph.xlarge,.text.large{font-size:calc(var(--w-text) * 1.625);line-height:1.1}.text.paragraph.large{font-size:calc(var(--w-text) * 1.25);margin:calc(var(--w-gutter) * .5) 0;line-height:1.1}.text.paragraph.medium,.text.medium{font-style:normal;font-size:var(--w-text);margin:0;line-height:1.5}.text.paragraph.small,.text.small{font-size:calc(var(--w-text) * .75)}.text.paragraph.xsmall,.text.xsmall{font-size:calc(var(--w-text) * .5)}.text.caption{font-size:calc(var(--w-text) * .75)}.text.center{text-align:center}.text.left{text-align:left}.text.right{text-align:right}}
@@ -0,0 +1,10 @@
1
+ import { TextSize } from 'storybook/theming';
2
+ import { TextTags, TextType } from '../../utilities/types';
3
+ export type TextProps = React.HTMLAttributes<HTMLElement> & {
4
+ as?: TextTags;
5
+ richText?: boolean;
6
+ type?: TextType;
7
+ size?: TextSize;
8
+ alignment?: "center" | "left" | "right";
9
+ };
10
+ export declare const Text: React.FC<TextProps>;
@@ -0,0 +1,80 @@
1
+ @use "../../styles/utilities/functions" as u;
2
+ @use "../../styles/global/components/typography" as t;
3
+ @layer craftsman-base {
4
+ .text {
5
+ // --- display ---
6
+ &.display {
7
+ @include t.h3;
8
+ }
9
+ &.display.xlarge {
10
+ @include t.h1;
11
+ }
12
+ &.display.large {
13
+ @include t.h2;
14
+ }
15
+ &.display.small {
16
+ @include t.h4;
17
+ }
18
+
19
+ // --- heading ---
20
+ &.heading {
21
+ @include t.h3;
22
+ }
23
+ &.heading.xlarge {
24
+ @include t.h1;
25
+ }
26
+ &.heading.large,
27
+ &.xlarge {
28
+ @include t.h2;
29
+ }
30
+ &.heading.medium {
31
+ @include t.h3;
32
+ }
33
+ &.heading.small {
34
+ @include t.h4;
35
+ }
36
+ &.heading.xsmall {
37
+ @include t.h5;
38
+ }
39
+
40
+ // --- paragraph ---
41
+ &.paragraph {
42
+ @include t.p;
43
+ }
44
+ &.paragraph.xlarge,
45
+ &.large {
46
+ @include t.h3;
47
+ }
48
+ &.paragraph.large {
49
+ @include t.h4;
50
+ }
51
+ &.paragraph.medium,
52
+ &.medium {
53
+ @include t.p;
54
+ }
55
+ &.paragraph.small,
56
+ &.small {
57
+ @include t.small;
58
+ }
59
+ &.paragraph.xsmall,
60
+ &.xsmall {
61
+ @include t.xsmall;
62
+ }
63
+
64
+ // --- caption ---
65
+ &.caption {
66
+ @include t.small;
67
+ }
68
+
69
+ // --- alignment ---
70
+ &.center {
71
+ text-align: center;
72
+ }
73
+ &.left {
74
+ text-align: left;
75
+ }
76
+ &.right {
77
+ text-align: right;
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,23 @@
1
+ import './Text.css';/* empty css */
2
+ import e from "clsx";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import n from "dompurify";
5
+ //#region src/components/Text/Text.tsx
6
+ var r = ({ as: r = "div", children: i, type: a, size: o, className: s, alignment: c, richText: l, ...u }) => {
7
+ let d = e(a && a, o && o, c && c, "text", s);
8
+ if (l) {
9
+ let e = typeof i == "string" ? n.sanitize(i, { ADD_ATTR: ["target"] }) : i;
10
+ return /* @__PURE__ */ t("div", {
11
+ ...u,
12
+ className: d,
13
+ dangerouslySetInnerHTML: { __html: e || "" }
14
+ });
15
+ }
16
+ return /* @__PURE__ */ t(r, {
17
+ ...u,
18
+ className: d,
19
+ children: i
20
+ });
21
+ };
22
+ //#endregion
23
+ export { r as Text };
@@ -1,8 +1,10 @@
1
- export { Button } from './Button';
1
+ export { Button } from './Button/Button';
2
2
  export { Input } from './Input/Input';
3
3
  export { InputPassword } from './Input/InputPassword';
4
- export { Loader } from './Loader';
4
+ export { Loader } from './Loader/Loader';
5
5
  export { RadioButton } from './Input/RadioButton';
6
6
  export { Checkbox } from './Input/Checkbox';
7
7
  export { Textarea } from './Input/Textarea';
8
- export { Modal } from './Modal';
8
+ export { Text } from './Text/Text';
9
+ export { Modal } from './Modal/Modal';
10
+ export { Select } from './Select/Select';
@@ -0,0 +1,56 @@
1
+ @use "../../utilities/functions" as u;
2
+ @layer craftsman-base {
3
+ select,
4
+ ::picker(select) {
5
+ appearance: base-select;
6
+ background: #{u.color("white")};
7
+ color: #{u.color("text")};
8
+ border: 1px solid #{u.color("gray200")};
9
+ border-radius: 6px;
10
+ }
11
+ select {
12
+ padding: 10px 40px 10px 14px;
13
+ position: relative;
14
+ &:hover,
15
+ &:focus {
16
+ outline: none;
17
+ border-color: #{u.color("gray200")};
18
+ }
19
+ &:focus-visible {
20
+ outline: none;
21
+ }
22
+ &:-moz-focusring {
23
+ color: transparent;
24
+ text-shadow: 0 0 0 #{u.color("text")};
25
+ }
26
+ &::picker-icon {
27
+ color: #999999;
28
+ transition: 0.2s rotate;
29
+ content: "";
30
+ display: inline-block;
31
+ width: 10px;
32
+ height: 10px;
33
+ border-style: solid;
34
+ border-width: 0 2px 2px 0;
35
+ transform: rotate(45deg);
36
+ margin: 0px 2px 0 12px;
37
+ position: absolute;
38
+ right: 16px;
39
+ top: 12px;
40
+ }
41
+ &:open::picker-icon {
42
+ margin-top: 6px;
43
+ rotate: 180deg;
44
+ }
45
+ option {
46
+ padding: #{u.width("gutter", 0.5)};
47
+ &:hover,
48
+ &:focus {
49
+ background: #{u.color("gray100")};
50
+ }
51
+ &::checkmark {
52
+ content: "";
53
+ }
54
+ }
55
+ }
56
+ }
@@ -1,62 +1,93 @@
1
1
  @use "../../utilities/functions" as u;
2
2
 
3
- @layer craftsman-base {
4
- %body-typography {
3
+ @mixin body-typography {
5
4
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
6
5
  color: var(--text);
7
6
  line-height: 1.5;
8
7
  font-weight: 400;
9
8
  font-size: var(--w-text, 14px);
10
- }
11
-
12
- // TODO: These h* declarations need to be moved somewhere not-terrible
13
- :where(h1) {
14
- font-size: calc(var(--w-text, 14px) * 3.125);
15
- line-height: 1.2;
16
- }
17
-
18
- :where(h2) {
19
- font-size: calc(var(--w-text, 14px) * 2.625);
20
- font-weight: 625;
21
- line-height: 1.1;
22
- }
23
-
24
- :where(h3) {
25
- font-size: calc(var(--w-text, 14px) * 1.625);
26
- line-height: 1.1;
27
- }
28
-
29
- :where(h4) {
30
- font-size: calc(var(--w-text, 14px) * 1.25);
31
- line-height: 1.1;
32
- margin: calc(var(--w-gutter, 16px) * 0.5) 0;
33
- }
34
-
35
- :where(h5) {
36
- font-size: var(--w-text, 14px);
37
- line-height: 1.2;
38
- }
39
-
40
- :where(h6) {
41
- font-size: calc(var(--w-text, 14px) * 0.875);
42
- line-height: 1.2;
43
- font-weight: 600;
44
- }
45
-
46
- :where(p) {
47
- font-style: normal;
48
- font-size: var(--w-text, 14px);
49
- line-height: 1.5;
50
- margin: 0;
51
- }
52
-
53
- @include u.breakpoint(mobileMax) {
54
- :where(h4) {
55
- font-size: var(--w-text, 14px);
56
- }
57
-
58
- :where(p) {
59
- font-size: calc(var(--w-text, 14px) * 0.875);
60
- }
61
- }
9
+ }
10
+
11
+ @mixin h1 {
12
+ font-size: #{u.width(text, 3.125)};
13
+ line-height: 1.2;
14
+ }
15
+ @mixin h2 {
16
+ font-size: #{u.width(text, 2.625)};
17
+ font-weight: 625;
18
+ line-height: 1.1;
19
+ }
20
+ @mixin h3 {
21
+ font-size: #{u.width(text, 1.625)};
22
+ line-height: 1.1;
23
+ }
24
+ @mixin h4 {
25
+ font-size: #{u.width(text, 1.25)};
26
+ line-height: 1.1;
27
+ margin: #{u.width(gutter, 0.5)} 0;
28
+ }
29
+ @mixin h5 {
30
+ font-size: var(--w-text);
31
+ line-height: 1.2;
32
+ }
33
+ @mixin h6 {
34
+ font-size: #{u.width(text, 0.875)};
35
+ line-height: 1.2;
36
+ font-weight: 600;
37
+ }
38
+ @mixin p {
39
+ font-style: normal;
40
+ font-size: var(--w-text);
41
+ line-height: 1.5;
42
+ margin: 0;
43
+ }
44
+ @mixin small {
45
+ font-size: #{u.width(text, 0.75)};
46
+ }
47
+ @mixin xsmall {
48
+ font-size: #{u.width(text, 0.5)};
49
+ }
50
+
51
+ @layer craftsman-base {
52
+ // TODO: These h* declarations need to be moved somewhere not-terrible
53
+ h1 {
54
+ @include h1;
55
+ }
56
+
57
+ h2 {
58
+ @include h2;
59
+ }
60
+
61
+ h3 {
62
+ @include h3;
63
+ }
64
+
65
+ h4 {
66
+ @include h4;
67
+ }
68
+
69
+ h5 {
70
+ @include h5;
71
+ }
72
+
73
+ h6 {
74
+ @include h6;
75
+ }
76
+
77
+ p {
78
+ @include p;
79
+ }
80
+ small {
81
+ @include small;
82
+ }
83
+
84
+ @include u.breakpoint(mobileMax) {
85
+ h4 {
86
+ font-size: var(--w-text, 14px);
87
+ }
88
+
89
+ p {
90
+ font-size: calc(var(--w-text, 14px) * 0.875);
91
+ }
92
+ }
62
93
  }
@@ -1,82 +1,83 @@
1
1
  @use "../config";
2
- @use "./components/typography";
2
+ @use "./components/typography" as t;
3
3
  @use "./components/code";
4
4
  @use "./components/checkbox";
5
5
  @use "./components/radioButton";
6
6
  @use "./components/button";
7
7
  @use "./components/input";
8
-
8
+ @use "./components/select";
9
9
  @layer craftsman-base, craftsman-theme;
10
10
 
11
11
  @layer craftsman-base {
12
- :root {
13
- color-scheme: light dark;
14
- font-synthesis: none;
15
- text-rendering: optimizeLegibility;
16
- -webkit-font-smoothing: antialiased;
17
- -moz-osx-font-smoothing: grayscale;
18
- }
12
+ :root {
13
+ color-scheme: light dark;
14
+ font-synthesis: none;
15
+ text-rendering: optimizeLegibility;
16
+ -webkit-font-smoothing: antialiased;
17
+ -moz-osx-font-smoothing: grayscale;
18
+ }
19
19
 
20
- ::-webkit-scrollbar {
21
- width: 4px;
22
- height: 4px;
23
- }
20
+ ::-webkit-scrollbar {
21
+ width: 4px;
22
+ height: 4px;
23
+ }
24
24
 
25
- ::-webkit-scrollbar-track {
26
- background: #ddd;
27
- }
25
+ ::-webkit-scrollbar-track {
26
+ background: #ddd;
27
+ }
28
28
 
29
- ::-webkit-scrollbar-thumb {
30
- background: #000;
31
- border-radius: 6px;
32
- }
29
+ ::-webkit-scrollbar-thumb {
30
+ background: #000;
31
+ border-radius: 6px;
32
+ }
33
33
 
34
- ::-webkit-scrollbar-thumb:hover {
35
- background: #555;
36
- }
37
- body, ul {
38
- margin: 0;
39
- padding: 0;
40
- }
34
+ ::-webkit-scrollbar-thumb:hover {
35
+ background: #555;
36
+ }
37
+ body,
38
+ ul {
39
+ margin: 0;
40
+ padding: 0;
41
+ }
41
42
 
42
- body {
43
- @extend %body-typography;
44
- background-color: #fff;
45
- -webkit-overflow-scrolling: touch;
46
- overscroll-behavior: contain;
47
- }
43
+ body {
44
+ @include t.body-typography;
45
+ background-color: #fff;
46
+ -webkit-overflow-scrolling: touch;
47
+ overscroll-behavior: contain;
48
+ }
48
49
 
49
- fieldset {
50
- padding: 0;
51
- border: 0;
52
- }
50
+ fieldset {
51
+ padding: 0;
52
+ border: 0;
53
+ }
53
54
 
54
- code {
55
- @extend %code;
56
- }
55
+ code {
56
+ @extend %code;
57
+ }
57
58
 
58
- button {
59
- @extend %button-styles;
60
- }
59
+ button {
60
+ @extend %button-styles;
61
+ }
61
62
 
62
- input {
63
- &:not([type="radio"]):not([type="checkbox"]) {
64
- @extend %input-base;
63
+ input {
64
+ &:not([type="radio"]):not([type="checkbox"]) {
65
+ @extend %input-base;
66
+ }
67
+ &[type="checkbox"] {
68
+ @extend %checkbox;
69
+ }
70
+
71
+ &[type="radio"] {
72
+ @extend %radio;
73
+ }
65
74
  }
66
- &[type="checkbox"] {
67
- @extend %checkbox;
75
+ textarea {
76
+ @extend %input-base;
68
77
  }
69
78
 
70
- &[type="radio"] {
71
- @extend %radio;
79
+ a {
80
+ @extend %text-link;
72
81
  }
73
- }
74
- textarea {
75
- @extend %input-base;
76
- }
77
-
78
- a {
79
- @extend %text-link;
80
- }
81
-
82
+
82
83
  }
@@ -2,7 +2,6 @@ import { htmlTagNames as e } from "./constants.esm.js";
2
2
  import { components_exports as t } from "../../../Components.esm.js";
3
3
  //#region src/styles/theme/components.ts
4
4
  var n = {
5
- button: "button",
6
5
  input: "input:not([type='radio']):not([type='checkbox'])",
7
6
  checkbox: "input[type='checkbox']",
8
7
  radioButton: "input[type='radio']"
@@ -26,9 +26,9 @@ $width-defaults: (
26
26
  @if not map.has-key($width-defaults, $name) {
27
27
  @error "Unknown width key `#{$name}`.";
28
28
  }
29
-
30
- $fallback: map.get($width-defaults, $name);
31
- @return string.unquote("var(--w-#{$name}, #{$fallback}px)");
29
+ @return string.unquote("var(--w-#{$name})");
30
+ // $fallback: map.get($width-defaults, $name);
31
+ // @return string.unquote("var(--w-#{$name}, #{$fallback}px)");
32
32
  }
33
33
 
34
34
  @function width($name, $multiplier: 1, $px: true) {
@@ -89,3 +89,30 @@ export declare const ButtonType: z.ZodEnum<{
89
89
  default: "default";
90
90
  }>;
91
91
  export type ButtonType = z.infer<typeof ButtonType>;
92
+ export declare const TextTags: z.ZodEnum<{
93
+ h1: "h1";
94
+ h2: "h2";
95
+ h3: "h3";
96
+ h4: "h4";
97
+ h5: "h5";
98
+ p: "p";
99
+ span: "span";
100
+ div: "div";
101
+ }>;
102
+ export type TextTags = z.infer<typeof TextTags>;
103
+ export declare const TextType: z.ZodEnum<{
104
+ display: "display";
105
+ heading: "heading";
106
+ paragraph: "paragraph";
107
+ caption: "caption";
108
+ "small-title": "small-title";
109
+ }>;
110
+ export type TextType = z.infer<typeof TextType>;
111
+ export declare const TextSize: z.ZodEnum<{
112
+ xlarge: "xlarge";
113
+ large: "large";
114
+ medium: "medium";
115
+ small: "small";
116
+ xsmall: "xsmall";
117
+ }>;
118
+ export type TextSize = z.infer<typeof TextSize>;
@@ -53,6 +53,27 @@ var t = e.enum(["gutter", "column"]), n = e.enum([
53
53
  "primary",
54
54
  "default",
55
55
  "text"
56
+ ]), d = e.enum([
57
+ "h1",
58
+ "h2",
59
+ "h3",
60
+ "h4",
61
+ "h5",
62
+ "p",
63
+ "span",
64
+ "div"
65
+ ]), f = e.enum([
66
+ "display",
67
+ "heading",
68
+ "paragraph",
69
+ "caption",
70
+ "small-title"
71
+ ]), p = e.enum([
72
+ "xlarge",
73
+ "large",
74
+ "medium",
75
+ "small",
76
+ "xsmall"
56
77
  ]);
57
78
  //#endregion
58
- export { t as BaseWidthSchema, i as BreakpointSchema, u as ButtonType, a as LayoutWidthsSchema, r as MaxScreenWidthSchema, n as ScreenWidthSchema, l as zLabelPosition, o as zTextInputExclusions, c as zTextInputType, s as zTextInputTypes };
79
+ export { t as BaseWidthSchema, i as BreakpointSchema, u as ButtonType, a as LayoutWidthsSchema, r as MaxScreenWidthSchema, n as ScreenWidthSchema, p as TextSize, d as TextTags, f as TextType, l as zLabelPosition, o as zTextInputExclusions, c as zTextInputType, s as zTextInputTypes };
@@ -1,21 +0,0 @@
1
- "use client";
2
- import { isEmpty as e } from "../utilities/validations.esm.js";
3
- import { loaders as t } from "../styles/global/components/loaders.esm.js";
4
- import n from "../styles/global/components/loaders.module.esm.js";
5
- import r from "clsx";
6
- import { jsx as i } from "react/jsx-runtime";
7
- //#region src/components/Loader.tsx
8
- var a = (a) => {
9
- let { type: o, color: s = "black", width: c, styles: l, className: u, style: d, ...f } = a, p = e(l) ? void 0 : l, m = t[o](s, c);
10
- return /* @__PURE__ */ i("div", {
11
- className: r(n[o], u),
12
- style: {
13
- ...m,
14
- ...p,
15
- ...d
16
- },
17
- ...f
18
- });
19
- };
20
- //#endregion
21
- export { a as Loader };
@@ -1,54 +0,0 @@
1
- "use client";
2
- import { isEmpty as e } from "../utilities/validations.esm.js";
3
- import { color as t } from "../styles/utilities/color.esm.js";
4
- import { Button as n } from "./Button.esm.js";
5
- import r from "./Modal.module.esm.js";
6
- import i from "clsx";
7
- import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import c from "react";
9
- import { LuX as l } from "react-icons/lu";
10
- //#region src/components/Modal.tsx
11
- var u = class extends c.PureComponent {
12
- state = { isClosing: !1 };
13
- onDismiss = () => {
14
- this.props.onDismiss && (this.setState({ isClosing: !0 }), setTimeout(() => {
15
- this.props.onDismiss && this.props.onDismiss(), this.setState({ isClosing: !1 });
16
- }, 280));
17
- };
18
- onClickBackground = () => {
19
- (this.props.backgroundDismiss ?? !0) === !0 && this.onDismiss();
20
- };
21
- render() {
22
- let c = e(this.props.styles) ? void 0 : this.props.styles, u = this.props.type || "dialog";
23
- return this.props.visible ? /* @__PURE__ */ s("div", {
24
- className: r.wrapper,
25
- style: c,
26
- children: [/* @__PURE__ */ s("div", {
27
- className: i(r.content, r[u]),
28
- "data-is-closing": this.state.isClosing,
29
- children: [
30
- /* @__PURE__ */ s("header", { children: [this.props.header && /* @__PURE__ */ o(a, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ o(n, {
31
- variant: "primary",
32
- className: r.closeModal,
33
- onClick: this.onDismiss,
34
- children: /* @__PURE__ */ o(l, {
35
- fill: t("white"),
36
- size: 18
37
- })
38
- })] }),
39
- /* @__PURE__ */ o("section", { children: this.props.children }),
40
- this.props.footer && /* @__PURE__ */ o("footer", {
41
- className: r.actionContainer,
42
- children: this.props.footer
43
- })
44
- ]
45
- }), /* @__PURE__ */ o("div", {
46
- className: r.background,
47
- "data-is-closing": this.state.isClosing,
48
- onClick: this.onClickBackground
49
- })]
50
- }) : /* @__PURE__ */ o(a, {});
51
- }
52
- };
53
- //#endregion
54
- export { u as Modal };
@@ -1 +0,0 @@
1
- ._wrapper_1fsgx_1,._background_1fsgx_1{width:100%;height:100%;position:fixed;inset:0}@keyframes _fadeIn_1fsgx_1{0%{opacity:0}to{opacity:1}}@keyframes _fadeOut_1fsgx_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_1fsgx_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes _slideOut_1fsgx_1{0%{transform:translateY(0)}to{transform:translateY(100%)}}._wrapper_1fsgx_1{z-index:1000;justify-content:center;align-items:center;display:flex}._background_1fsgx_1{z-index:1001;background-color:#00000080;animation-fill-mode:forwards}._background_1fsgx_1[data-is-closing=true]{animation:.3s ease-in-out _fadeOut_1fsgx_1}._background_1fsgx_1[data-is-closing=false]{animation:.3s ease-in-out _fadeIn_1fsgx_1}._content_1fsgx_62{padding:var(--w-gutter,16px);z-index:1002;background-color:var(--white);-webkit-overflow-scrolling:touch;touch-action:pan-y;max-height:80vh;animation-fill-mode:forwards;overflow-y:auto}._content_1fsgx_62[data-is-closing=true]{animation:.3s ease-in-out _slideOut_1fsgx_1}._content_1fsgx_62[data-is-closing=false]{animation:.3s ease-in-out _slideIn_1fsgx_1}._content_1fsgx_62._panel_1fsgx_78{height:100%;position:fixed;top:0;right:0}._content_1fsgx_62._dialog_1fsgx_84{border-radius:8px}._content_1fsgx_62>header{width:100%;margin-bottom:calc(var(--w-gutter,16px) * .5);justify-content:space-between;display:inline-flex}._content_1fsgx_62>header>button:only-child{margin-left:auto}._actionContainer_1fsgx_97{margin-top:calc(var(--w-gutter,16px) * 2);background-color:var(--white);gap:var(--w-gutter,16px);height:fit-content;display:flex}._closeModal_1fsgx_105{border-radius:50%;justify-content:center;width:30px;height:30px;padding:0;text-decoration:none;display:inline-flex}@media (width>=0) and (width<=660px){._content_1fsgx_62._panel_1fsgx_78,._content_1fsgx_62._dialog_1fsgx_84{width:100%;height:100%}}@media (width>=660px){._content_1fsgx_62._panel_1fsgx_78{width:calc((var(--w-column,60px) * 4) + (var(--w-gutter,16px) * 3))}._content_1fsgx_62._dialog_1fsgx_84{width:calc((var(--w-column,60px) * 6) + (var(--w-gutter,16px) * 5))}}@media (width>=1040px){._content_1fsgx_62._dialog_1fsgx_84{width:calc((var(--w-column,60px) * 8) + (var(--w-gutter,16px) * 7))}}
@@ -1,16 +0,0 @@
1
- import './Modal.module.css';//#region src/components/Modal.module.scss
2
- var e = "_wrapper_1fsgx_1", t = "_background_1fsgx_1", n = "_fadeOut_1fsgx_1", r = "_fadeIn_1fsgx_1", i = "_content_1fsgx_62", a = "_slideOut_1fsgx_1", o = "_slideIn_1fsgx_1", s = "_panel_1fsgx_78", c = "_dialog_1fsgx_84", l = "_actionContainer_1fsgx_97", u = "_closeModal_1fsgx_105", d = {
3
- wrapper: e,
4
- background: t,
5
- fadeOut: n,
6
- fadeIn: r,
7
- content: i,
8
- slideOut: a,
9
- slideIn: o,
10
- panel: s,
11
- dialog: c,
12
- actionContainer: l,
13
- closeModal: u
14
- };
15
- //#endregion
16
- export { l as actionContainer, t as background, u as closeModal, i as content, d as default, c as dialog, r as fadeIn, n as fadeOut, s as panel, o as slideIn, a as slideOut, e as wrapper };