@dimaan/ui 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +219 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -6
- package/dist/index.d.ts +16 -6
- package/dist/index.js +219 -180
- package/dist/index.js.map +1 -1
- package/dist/preset.css +29 -5
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -386,8 +386,9 @@ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
386
386
|
variant?: BadgeVariant;
|
|
387
387
|
size?: BadgeSize;
|
|
388
388
|
/**
|
|
389
|
-
* Visual tone. `'
|
|
390
|
-
*
|
|
389
|
+
* Visual tone. `'soft'` (default) is a calmer, modern tinted fill — great for
|
|
390
|
+
* status columns and category labels; `'solid'` is a full-color fill for
|
|
391
|
+
* stronger emphasis.
|
|
391
392
|
*/
|
|
392
393
|
tone?: BadgeTone;
|
|
393
394
|
/** Render a small dot before the label (useful for online/status indicators). */
|
|
@@ -534,7 +535,7 @@ declare const datePickerTriggerVariantClass: Record<DatePickerVariant, string>;
|
|
|
534
535
|
* Logical properties keep RTL working free.
|
|
535
536
|
*/
|
|
536
537
|
declare const datePickerTriggerSizeClass: Record<DatePickerSize, string>;
|
|
537
|
-
declare const datePickerTriggerBaseClass = "group/datepicker relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer";
|
|
538
|
+
declare const datePickerTriggerBaseClass = "group/datepicker relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:border-destructive aria-[invalid=true]:focus-visible:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer";
|
|
538
539
|
/** Empty-state trigger text (placeholder color). */
|
|
539
540
|
declare const datePickerPlaceholderClass = "truncate text-muted-foreground";
|
|
540
541
|
/** Filled-state trigger text. */
|
|
@@ -1373,7 +1374,7 @@ type InputVariant = 'default' | 'filled' | 'ghost';
|
|
|
1373
1374
|
type InputSize = 'sm' | 'md' | 'lg';
|
|
1374
1375
|
declare const inputVariantClass: Record<InputVariant, string>;
|
|
1375
1376
|
declare const inputSizeClass: Record<InputSize, string>;
|
|
1376
|
-
declare const inputBaseClass = "group/input relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[input:disabled]:pointer-events-none has-[input:disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
1377
|
+
declare const inputBaseClass = "group/input relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:border-primary focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[input:disabled]:pointer-events-none has-[input:disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
1377
1378
|
|
|
1378
1379
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
1379
1380
|
variant?: InputVariant;
|
|
@@ -1568,6 +1569,15 @@ interface TableProps<T> {
|
|
|
1568
1569
|
striped?: boolean;
|
|
1569
1570
|
/** Optional row click handler. */
|
|
1570
1571
|
onRowClick?: (row: T, rowIndex: number) => void;
|
|
1572
|
+
/**
|
|
1573
|
+
* Optional per-row accent colour. When it returns a colour string, Table draws a
|
|
1574
|
+
* thin rounded bar at the row's leading (inline-start) edge — e.g. to colour-code
|
|
1575
|
+
* rows by category/department. Return `undefined` for no accent. Off by default,
|
|
1576
|
+
* so existing consumers are unaffected.
|
|
1577
|
+
*
|
|
1578
|
+
* @example getRowAccent={(row) => DEPARTMENT_COLOR[row.department]}
|
|
1579
|
+
*/
|
|
1580
|
+
getRowAccent?: (row: T, index: number) => string | undefined;
|
|
1571
1581
|
/** Optional ref to the underlying <table> element. */
|
|
1572
1582
|
tableRef?: Ref<HTMLTableElement>;
|
|
1573
1583
|
'aria-label'?: string;
|
|
@@ -1592,7 +1602,7 @@ declare const selectVariantClass: Record<SelectVariant, string>;
|
|
|
1592
1602
|
* properties keep RTL working free.
|
|
1593
1603
|
*/
|
|
1594
1604
|
declare const selectSizeClass: Record<SelectSize, string>;
|
|
1595
|
-
declare const selectBaseClass = "group/select relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus:ring-[3px] focus:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer data-[placeholder]:text-muted-foreground";
|
|
1605
|
+
declare const selectBaseClass = "group/select relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus:border-primary focus:ring-[3px] focus:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:border-destructive aria-[invalid=true]:focus:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer data-[placeholder]:text-muted-foreground";
|
|
1596
1606
|
|
|
1597
1607
|
interface SelectOption {
|
|
1598
1608
|
value: string;
|
|
@@ -2421,7 +2431,7 @@ type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
|
2421
2431
|
declare const textareaVariantClass: Record<TextareaVariant, string>;
|
|
2422
2432
|
declare const textareaSizeClass: Record<TextareaSize, string>;
|
|
2423
2433
|
declare const textareaResizeClass: Record<TextareaResize, string>;
|
|
2424
|
-
declare const textareaBaseClass = "group/textarea relative flex w-full text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[textarea:disabled]:pointer-events-none has-[textarea:disabled]:opacity-50";
|
|
2434
|
+
declare const textareaBaseClass = "group/textarea relative flex w-full text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:border-primary focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[textarea:disabled]:pointer-events-none has-[textarea:disabled]:opacity-50";
|
|
2425
2435
|
|
|
2426
2436
|
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
2427
2437
|
variant?: TextareaVariant;
|
package/dist/index.d.ts
CHANGED
|
@@ -386,8 +386,9 @@ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
386
386
|
variant?: BadgeVariant;
|
|
387
387
|
size?: BadgeSize;
|
|
388
388
|
/**
|
|
389
|
-
* Visual tone. `'
|
|
390
|
-
*
|
|
389
|
+
* Visual tone. `'soft'` (default) is a calmer, modern tinted fill — great for
|
|
390
|
+
* status columns and category labels; `'solid'` is a full-color fill for
|
|
391
|
+
* stronger emphasis.
|
|
391
392
|
*/
|
|
392
393
|
tone?: BadgeTone;
|
|
393
394
|
/** Render a small dot before the label (useful for online/status indicators). */
|
|
@@ -534,7 +535,7 @@ declare const datePickerTriggerVariantClass: Record<DatePickerVariant, string>;
|
|
|
534
535
|
* Logical properties keep RTL working free.
|
|
535
536
|
*/
|
|
536
537
|
declare const datePickerTriggerSizeClass: Record<DatePickerSize, string>;
|
|
537
|
-
declare const datePickerTriggerBaseClass = "group/datepicker relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer";
|
|
538
|
+
declare const datePickerTriggerBaseClass = "group/datepicker relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:border-destructive aria-[invalid=true]:focus-visible:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer";
|
|
538
539
|
/** Empty-state trigger text (placeholder color). */
|
|
539
540
|
declare const datePickerPlaceholderClass = "truncate text-muted-foreground";
|
|
540
541
|
/** Filled-state trigger text. */
|
|
@@ -1373,7 +1374,7 @@ type InputVariant = 'default' | 'filled' | 'ghost';
|
|
|
1373
1374
|
type InputSize = 'sm' | 'md' | 'lg';
|
|
1374
1375
|
declare const inputVariantClass: Record<InputVariant, string>;
|
|
1375
1376
|
declare const inputSizeClass: Record<InputSize, string>;
|
|
1376
|
-
declare const inputBaseClass = "group/input relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[input:disabled]:pointer-events-none has-[input:disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
1377
|
+
declare const inputBaseClass = "group/input relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:border-primary focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[input:disabled]:pointer-events-none has-[input:disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
1377
1378
|
|
|
1378
1379
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
1379
1380
|
variant?: InputVariant;
|
|
@@ -1568,6 +1569,15 @@ interface TableProps<T> {
|
|
|
1568
1569
|
striped?: boolean;
|
|
1569
1570
|
/** Optional row click handler. */
|
|
1570
1571
|
onRowClick?: (row: T, rowIndex: number) => void;
|
|
1572
|
+
/**
|
|
1573
|
+
* Optional per-row accent colour. When it returns a colour string, Table draws a
|
|
1574
|
+
* thin rounded bar at the row's leading (inline-start) edge — e.g. to colour-code
|
|
1575
|
+
* rows by category/department. Return `undefined` for no accent. Off by default,
|
|
1576
|
+
* so existing consumers are unaffected.
|
|
1577
|
+
*
|
|
1578
|
+
* @example getRowAccent={(row) => DEPARTMENT_COLOR[row.department]}
|
|
1579
|
+
*/
|
|
1580
|
+
getRowAccent?: (row: T, index: number) => string | undefined;
|
|
1571
1581
|
/** Optional ref to the underlying <table> element. */
|
|
1572
1582
|
tableRef?: Ref<HTMLTableElement>;
|
|
1573
1583
|
'aria-label'?: string;
|
|
@@ -1592,7 +1602,7 @@ declare const selectVariantClass: Record<SelectVariant, string>;
|
|
|
1592
1602
|
* properties keep RTL working free.
|
|
1593
1603
|
*/
|
|
1594
1604
|
declare const selectSizeClass: Record<SelectSize, string>;
|
|
1595
|
-
declare const selectBaseClass = "group/select relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus:ring-[3px] focus:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer data-[placeholder]:text-muted-foreground";
|
|
1605
|
+
declare const selectBaseClass = "group/select relative inline-flex w-full items-center text-foreground outline-none transition-[background-color,border-color,box-shadow] focus:border-primary focus:ring-[3px] focus:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:border-destructive aria-[invalid=true]:focus:ring-destructive/40 disabled:pointer-events-none disabled:opacity-50 cursor-pointer data-[placeholder]:text-muted-foreground";
|
|
1596
1606
|
|
|
1597
1607
|
interface SelectOption {
|
|
1598
1608
|
value: string;
|
|
@@ -2421,7 +2431,7 @@ type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
|
2421
2431
|
declare const textareaVariantClass: Record<TextareaVariant, string>;
|
|
2422
2432
|
declare const textareaSizeClass: Record<TextareaSize, string>;
|
|
2423
2433
|
declare const textareaResizeClass: Record<TextareaResize, string>;
|
|
2424
|
-
declare const textareaBaseClass = "group/textarea relative flex w-full text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[textarea:disabled]:pointer-events-none has-[textarea:disabled]:opacity-50";
|
|
2434
|
+
declare const textareaBaseClass = "group/textarea relative flex w-full text-foreground outline-none transition-[background-color,border-color,box-shadow] focus-within:border-primary focus-within:ring-[3px] focus-within:ring-primary-glow aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:border-destructive aria-[invalid=true]:focus-within:ring-destructive/40 has-[textarea:disabled]:pointer-events-none has-[textarea:disabled]:opacity-50";
|
|
2425
2435
|
|
|
2426
2436
|
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
|
|
2427
2437
|
variant?: TextareaVariant;
|