@maxsteinwender/sort-ui 1.0.8 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ <p align="center">
2
+ <img src="public/visuals/Key Visual.png" alt="Hero Image" width="100%" />
3
+ </p>
4
+
1
5
  # Sort UI Design System
2
6
 
3
7
  A coded design system based on the [Sort UI Kit](https://sortui.company) — Figma components translated into production-ready Next.js components, documented in Storybook.
package/dist/index.d.mts CHANGED
@@ -417,6 +417,22 @@ declare const cardVariants: (props?: ({
417
417
  variant?: "default" | "flat" | null | undefined;
418
418
  } & class_variance_authority_types.ClassProp) | undefined) => string;
419
419
  interface CardProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
420
+ /**
421
+ * Renders the card as a clickable surface — adds focus ring, subtle
422
+ * scale-press, and `cursor-pointer`. Use with an `onClick` handler or
423
+ * pair with `asChild` to render the card as `<a>` / `<button>`.
424
+ *
425
+ * Web Interface Guidelines #24 — press scale ~0.97, never 0.8.
426
+ * WIG #28 — hover effects gated behind `[@media(hover:hover)]`.
427
+ */
428
+ interactive?: boolean;
429
+ /**
430
+ * Render the card via Radix Slot, passing all props/styles to the child
431
+ * element. Use when the card itself should be an `<a>` or `<button>` for
432
+ * navigation/action semantics. Mutually exclusive with rendering as a
433
+ * non-interactive `<div>` — pair with `interactive` for full effect.
434
+ */
435
+ asChild?: boolean;
420
436
  }
421
437
  declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
422
438
  declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
@@ -495,7 +511,19 @@ declare const ChartLegendContent: React$1.ForwardRefExoticComponent<Omit<React$1
495
511
  declare const checkboxVariants: (props?: ({
496
512
  variant?: "default" | "shadow" | null | undefined;
497
513
  } & class_variance_authority_types.ClassProp) | undefined) => string;
498
- interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
514
+ interface CheckboxProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "checked">, VariantProps<typeof checkboxVariants> {
515
+ /**
516
+ * Standard Radix `checked` value. Pass `"indeterminate"` for the
517
+ * indeterminate state, OR pass the boolean `indeterminate` prop below
518
+ * which is more ergonomic for parent/child "Select All" patterns.
519
+ */
520
+ checked?: boolean | "indeterminate";
521
+ /**
522
+ * Boolean shorthand for the indeterminate state. When `true`, takes
523
+ * precedence over `checked` and renders `aria-checked="mixed"` via Radix.
524
+ * Useful for "Select All" rows when only some children are checked.
525
+ */
526
+ indeterminate?: boolean;
499
527
  }
500
528
  declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
501
529
 
@@ -1154,6 +1182,14 @@ interface InlineTipsProps extends React$1.HTMLAttributes<HTMLDivElement>, Varian
1154
1182
  }
1155
1183
  declare const InlineTips: React$1.ForwardRefExoticComponent<InlineTipsProps & React$1.RefAttributes<HTMLDivElement>>;
1156
1184
 
1185
+ /**
1186
+ * Sort UI Input — restyled shadcn primitive.
1187
+ *
1188
+ * Web Interface Guideline defaults (override per-instance if needed):
1189
+ * - #4 spellCheck={false}, autoComplete="off"
1190
+ * - #29 16px font on touch (text-base), shrinks to 14px (text-sm) on md+ to prevent iOS zoom on focus
1191
+ * - #42 Focus ring uses box-shadow (ring), not outline — respects border-radius
1192
+ */
1157
1193
  declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
1158
1194
 
1159
1195
  declare const inputButtonVariants: (props?: ({
@@ -1245,6 +1281,16 @@ interface InputFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElem
1245
1281
  /** Additional className applied to the inner <input> element */
1246
1282
  inputClassName?: string;
1247
1283
  }
1284
+ /**
1285
+ * Sort UI InputField — labelled input with optional lead/tail/prefix/suffix slots.
1286
+ *
1287
+ * Web Interface Guideline defaults (override per-instance if needed):
1288
+ * - #1 Label htmlFor wires label clicks to focus the input
1289
+ * - #4 spellCheck={false}, autoComplete="off" by default on inner <input>
1290
+ * - #5 Pass-through `required` attribute for HTML form validation
1291
+ * - #6 Clicks anywhere inside the container (prefix/suffix/icons) focus the input
1292
+ * - #29 Inner input uses 16px on touch (text-base) → 14px on md+ (md:text-sm) to prevent iOS zoom on focus
1293
+ */
1248
1294
  declare const InputField: React$1.ForwardRefExoticComponent<InputFieldProps & React$1.RefAttributes<HTMLInputElement>>;
1249
1295
 
1250
1296
  interface InputStepperProps {
@@ -2081,8 +2127,24 @@ interface TextAreaFieldProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTex
2081
2127
  /** Wrapper className */
2082
2128
  className?: string;
2083
2129
  }
2130
+ /**
2131
+ * Sort UI TextAreaField — labelled multi-line input with optional toolbar/action bar.
2132
+ *
2133
+ * Web Interface Guideline defaults:
2134
+ * - #1 Label htmlFor wires label clicks to focus the textarea
2135
+ * - #4 spellCheck={false}, autoComplete="off" by default — pass spellCheck explicitly for prose fields
2136
+ * - #5 Pass-through `required` attribute
2137
+ * - #6 Clicks anywhere inside the container (lead/tail action gutter, padding) focus the textarea
2138
+ * - #29 Inner textarea uses 16px on touch (text-base) → 14px on md+ to prevent iOS zoom
2139
+ */
2084
2140
  declare const TextAreaField: React$1.ForwardRefExoticComponent<TextAreaFieldProps & React$1.RefAttributes<HTMLTextAreaElement>>;
2085
2141
 
2142
+ /**
2143
+ * Sort UI Textarea — restyled shadcn primitive.
2144
+ * Web Interface Guideline defaults:
2145
+ * - #4 spellCheck={false} default (textareas often want spellcheck — pass spellCheck explicitly to opt in)
2146
+ * - #29 16px on touch (text-base) → 14px on md+ to prevent iOS zoom on focus
2147
+ */
2086
2148
  declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
2087
2149
 
2088
2150
  declare const toggleVariants: (props?: ({
package/dist/index.d.ts CHANGED
@@ -417,6 +417,22 @@ declare const cardVariants: (props?: ({
417
417
  variant?: "default" | "flat" | null | undefined;
418
418
  } & class_variance_authority_types.ClassProp) | undefined) => string;
419
419
  interface CardProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
420
+ /**
421
+ * Renders the card as a clickable surface — adds focus ring, subtle
422
+ * scale-press, and `cursor-pointer`. Use with an `onClick` handler or
423
+ * pair with `asChild` to render the card as `<a>` / `<button>`.
424
+ *
425
+ * Web Interface Guidelines #24 — press scale ~0.97, never 0.8.
426
+ * WIG #28 — hover effects gated behind `[@media(hover:hover)]`.
427
+ */
428
+ interactive?: boolean;
429
+ /**
430
+ * Render the card via Radix Slot, passing all props/styles to the child
431
+ * element. Use when the card itself should be an `<a>` or `<button>` for
432
+ * navigation/action semantics. Mutually exclusive with rendering as a
433
+ * non-interactive `<div>` — pair with `interactive` for full effect.
434
+ */
435
+ asChild?: boolean;
420
436
  }
421
437
  declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
422
438
  declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
@@ -495,7 +511,19 @@ declare const ChartLegendContent: React$1.ForwardRefExoticComponent<Omit<React$1
495
511
  declare const checkboxVariants: (props?: ({
496
512
  variant?: "default" | "shadow" | null | undefined;
497
513
  } & class_variance_authority_types.ClassProp) | undefined) => string;
498
- interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
514
+ interface CheckboxProps extends Omit<React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "checked">, VariantProps<typeof checkboxVariants> {
515
+ /**
516
+ * Standard Radix `checked` value. Pass `"indeterminate"` for the
517
+ * indeterminate state, OR pass the boolean `indeterminate` prop below
518
+ * which is more ergonomic for parent/child "Select All" patterns.
519
+ */
520
+ checked?: boolean | "indeterminate";
521
+ /**
522
+ * Boolean shorthand for the indeterminate state. When `true`, takes
523
+ * precedence over `checked` and renders `aria-checked="mixed"` via Radix.
524
+ * Useful for "Select All" rows when only some children are checked.
525
+ */
526
+ indeterminate?: boolean;
499
527
  }
500
528
  declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
501
529
 
@@ -1154,6 +1182,14 @@ interface InlineTipsProps extends React$1.HTMLAttributes<HTMLDivElement>, Varian
1154
1182
  }
1155
1183
  declare const InlineTips: React$1.ForwardRefExoticComponent<InlineTipsProps & React$1.RefAttributes<HTMLDivElement>>;
1156
1184
 
1185
+ /**
1186
+ * Sort UI Input — restyled shadcn primitive.
1187
+ *
1188
+ * Web Interface Guideline defaults (override per-instance if needed):
1189
+ * - #4 spellCheck={false}, autoComplete="off"
1190
+ * - #29 16px font on touch (text-base), shrinks to 14px (text-sm) on md+ to prevent iOS zoom on focus
1191
+ * - #42 Focus ring uses box-shadow (ring), not outline — respects border-radius
1192
+ */
1157
1193
  declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
1158
1194
 
1159
1195
  declare const inputButtonVariants: (props?: ({
@@ -1245,6 +1281,16 @@ interface InputFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElem
1245
1281
  /** Additional className applied to the inner <input> element */
1246
1282
  inputClassName?: string;
1247
1283
  }
1284
+ /**
1285
+ * Sort UI InputField — labelled input with optional lead/tail/prefix/suffix slots.
1286
+ *
1287
+ * Web Interface Guideline defaults (override per-instance if needed):
1288
+ * - #1 Label htmlFor wires label clicks to focus the input
1289
+ * - #4 spellCheck={false}, autoComplete="off" by default on inner <input>
1290
+ * - #5 Pass-through `required` attribute for HTML form validation
1291
+ * - #6 Clicks anywhere inside the container (prefix/suffix/icons) focus the input
1292
+ * - #29 Inner input uses 16px on touch (text-base) → 14px on md+ (md:text-sm) to prevent iOS zoom on focus
1293
+ */
1248
1294
  declare const InputField: React$1.ForwardRefExoticComponent<InputFieldProps & React$1.RefAttributes<HTMLInputElement>>;
1249
1295
 
1250
1296
  interface InputStepperProps {
@@ -2081,8 +2127,24 @@ interface TextAreaFieldProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTex
2081
2127
  /** Wrapper className */
2082
2128
  className?: string;
2083
2129
  }
2130
+ /**
2131
+ * Sort UI TextAreaField — labelled multi-line input with optional toolbar/action bar.
2132
+ *
2133
+ * Web Interface Guideline defaults:
2134
+ * - #1 Label htmlFor wires label clicks to focus the textarea
2135
+ * - #4 spellCheck={false}, autoComplete="off" by default — pass spellCheck explicitly for prose fields
2136
+ * - #5 Pass-through `required` attribute
2137
+ * - #6 Clicks anywhere inside the container (lead/tail action gutter, padding) focus the textarea
2138
+ * - #29 Inner textarea uses 16px on touch (text-base) → 14px on md+ to prevent iOS zoom
2139
+ */
2084
2140
  declare const TextAreaField: React$1.ForwardRefExoticComponent<TextAreaFieldProps & React$1.RefAttributes<HTMLTextAreaElement>>;
2085
2141
 
2142
+ /**
2143
+ * Sort UI Textarea — restyled shadcn primitive.
2144
+ * Web Interface Guideline defaults:
2145
+ * - #4 spellCheck={false} default (textareas often want spellcheck — pass spellCheck explicitly to opt in)
2146
+ * - #29 16px on touch (text-base) → 14px on md+ to prevent iOS zoom on focus
2147
+ */
2086
2148
  declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
2087
2149
 
2088
2150
  declare const toggleVariants: (props?: ({