@powerhousedao/document-engineering 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/scalars/components/amount-field/amount-field-validations.d.ts.map +1 -1
- package/dist/src/scalars/components/amount-field/amount-field-validations.js +27 -25
- package/dist/src/scalars/components/amount-field/amount-field-validations.js.map +1 -1
- package/dist/src/scalars/components/email-field/email-field.d.ts +7 -0
- package/dist/src/scalars/components/email-field/email-field.d.ts.map +1 -0
- package/dist/src/scalars/components/email-field/email-field.js +20 -0
- package/dist/src/scalars/components/email-field/email-field.js.map +1 -0
- package/dist/src/scalars/components/email-field/utils.d.ts +15 -0
- package/dist/src/scalars/components/email-field/utils.d.ts.map +1 -0
- package/dist/src/scalars/components/email-field/utils.js +29 -0
- package/dist/src/scalars/components/email-field/utils.js.map +1 -0
- package/dist/src/scalars/lib/utils.d.ts +1 -0
- package/dist/src/scalars/lib/utils.d.ts.map +1 -1
- package/dist/src/scalars/lib/utils.js +4 -0
- package/dist/src/scalars/lib/utils.js.map +1 -1
- package/dist/src/scalars/lib/value-cast.js +4 -4
- package/dist/src/scalars/lib/value-cast.js.map +1 -1
- package/dist/src/ui/components/confirm/alert-dialog.d.ts +11 -12
- package/dist/src/ui/components/confirm/alert-dialog.d.ts.map +1 -1
- package/dist/src/ui/components/confirm/alert-dialog.js +37 -27
- package/dist/src/ui/components/confirm/alert-dialog.js.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/amount-input.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/amount-input.js +1 -1
- package/dist/src/ui/components/data-entry/amount-input/amount-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/subcomponents/fake-amount-diff.js +2 -2
- package/dist/src/ui/components/data-entry/amount-input/subcomponents/fake-amount-diff.js.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/types.d.ts +4 -4
- package/dist/src/ui/components/data-entry/amount-input/types.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/use-amount-input.d.ts +1 -1
- package/dist/src/ui/components/data-entry/amount-input/use-amount-input.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/use-amount-input.js +63 -38
- package/dist/src/ui/components/data-entry/amount-input/use-amount-input.js.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/utils.d.ts +16 -1
- package/dist/src/ui/components/data-entry/amount-input/utils.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/amount-input/utils.js +14 -5
- package/dist/src/ui/components/data-entry/amount-input/utils.js.map +1 -1
- package/dist/src/ui/components/data-entry/checkbox/subcomponents/checkbox-diff.js +1 -1
- package/dist/src/ui/components/data-entry/checkbox/subcomponents/checkbox-diff.js.map +1 -1
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.js +1 -0
- package/dist/src/ui/components/data-entry/currency-code-picker/currency-code-picker.js.map +1 -1
- package/dist/src/ui/components/data-entry/email-input/email-input.d.ts +5 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.js +25 -0
- package/dist/src/ui/components/data-entry/email-input/email-input.js.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/index.d.ts +3 -0
- package/dist/src/ui/components/data-entry/email-input/index.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/index.js +2 -0
- package/dist/src/ui/components/data-entry/email-input/index.js.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/types.d.ts +7 -0
- package/dist/src/ui/components/data-entry/email-input/types.d.ts.map +1 -0
- package/dist/src/ui/components/data-entry/email-input/types.js +2 -0
- package/dist/src/ui/components/data-entry/email-input/types.js.map +1 -0
- package/dist/src/ui/components/data-entry/toggle/subcomponents/toogle-diff.d.ts +1 -1
- package/dist/src/ui/components/data-entry/toggle/subcomponents/toogle-diff.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/toggle/subcomponents/toogle-diff.js +2 -2
- package/dist/src/ui/components/data-entry/toggle/subcomponents/toogle-diff.js.map +1 -1
- package/dist/src/ui/components/data-entry/toggle/toggle.d.ts.map +1 -1
- package/dist/src/ui/components/data-entry/toggle/toggle.js +1 -1
- package/dist/src/ui/components/data-entry/toggle/toggle.js.map +1 -1
- package/dist/src/ui/components/dropdown-menu/dropdown-menu.d.ts +25 -0
- package/dist/src/ui/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/src/ui/components/dropdown-menu/dropdown-menu.js +52 -0
- package/dist/src/ui/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/src/ui/components/dropdown-menu/index.d.ts +2 -0
- package/dist/src/ui/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/src/ui/components/dropdown-menu/index.js +2 -0
- package/dist/src/ui/components/dropdown-menu/index.js.map +1 -0
- package/dist/src/ui/components/object-set-table/examples/table-editing/table-editing.d.ts.map +1 -1
- package/dist/src/ui/components/object-set-table/examples/table-editing/table-editing.js +43 -2
- package/dist/src/ui/components/object-set-table/examples/table-editing/table-editing.js.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/body.js +2 -2
- package/dist/src/ui/components/object-set-table/subcomponents/body.js.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/boolean-render.d.ts +2 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/boolean-render.d.ts.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/boolean-render.js +7 -2
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/boolean-render.js.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/number-render.d.ts +2 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/number-render.d.ts.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/number-render.js +7 -2
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/number-render.js.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/text-render.d.ts +2 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/text-render.d.ts.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/text-render.js +7 -2
- package/dist/src/ui/components/object-set-table/subcomponents/default-cell-renderers/text-render.js.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/rows/render-row.d.ts +2 -2
- package/dist/src/ui/components/object-set-table/subcomponents/rows/render-row.d.ts.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/rows/render-row.js +29 -12
- package/dist/src/ui/components/object-set-table/subcomponents/rows/render-row.js.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/rows/row-actions.d.ts +15 -0
- package/dist/src/ui/components/object-set-table/subcomponents/rows/row-actions.d.ts.map +1 -0
- package/dist/src/ui/components/object-set-table/subcomponents/rows/row-actions.js +41 -0
- package/dist/src/ui/components/object-set-table/subcomponents/rows/row-actions.js.map +1 -0
- package/dist/src/ui/components/object-set-table/subcomponents/rows/table-row.d.ts +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/rows/table-row.d.ts.map +1 -1
- package/dist/src/ui/components/object-set-table/subcomponents/rows/table-row.js +5 -3
- package/dist/src/ui/components/object-set-table/subcomponents/rows/table-row.js.map +1 -1
- package/dist/src/ui/components/object-set-table/types.d.ts +41 -0
- package/dist/src/ui/components/object-set-table/types.d.ts.map +1 -1
- package/dist/src/ui/hooks/use-controllable-state.d.ts +8 -0
- package/dist/src/ui/hooks/use-controllable-state.d.ts.map +1 -0
- package/dist/src/ui/hooks/use-controllable-state.js +13 -0
- package/dist/src/ui/hooks/use-controllable-state.js.map +1 -0
- package/dist/style.css +114 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -46,6 +46,47 @@ export interface ObjectSetTableConfig<T> {
|
|
|
46
46
|
* @param data The data of the new row.
|
|
47
47
|
*/
|
|
48
48
|
onAdd?: (data: Record<string, unknown>) => Promise<void> | void;
|
|
49
|
+
/**
|
|
50
|
+
* The actions to display in the table when the rows are hovered.
|
|
51
|
+
*/
|
|
52
|
+
actions?: {
|
|
53
|
+
/**
|
|
54
|
+
* The primary action to display in the table when the rows are hovered.
|
|
55
|
+
*/
|
|
56
|
+
primary?: RowAction<T>;
|
|
57
|
+
/**
|
|
58
|
+
* The secondary actions to display in the table when the rows are hovered.
|
|
59
|
+
*/
|
|
60
|
+
secondary?: Array<Omit<RowAction<T>, 'icon'>>;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface RowContext<T> {
|
|
64
|
+
/**
|
|
65
|
+
* The row object.
|
|
66
|
+
*/
|
|
67
|
+
row: T;
|
|
68
|
+
/**
|
|
69
|
+
* The index of the row.
|
|
70
|
+
*/
|
|
71
|
+
rowIndex: number;
|
|
72
|
+
/**
|
|
73
|
+
* The table configuration.
|
|
74
|
+
*/
|
|
75
|
+
tableConfig: ObjectSetTableConfig<T>;
|
|
76
|
+
}
|
|
77
|
+
export interface RowAction<T> {
|
|
78
|
+
/**
|
|
79
|
+
* The label of the action.
|
|
80
|
+
*/
|
|
81
|
+
label: string;
|
|
82
|
+
/**
|
|
83
|
+
* The callback to call when the action is clicked.
|
|
84
|
+
*/
|
|
85
|
+
callback: (context: RowContext<T>) => Promise<void> | void;
|
|
86
|
+
/**
|
|
87
|
+
* The icon to display in the action. Recommended to be 16x16px.
|
|
88
|
+
*/
|
|
89
|
+
icon?: React.ReactNode;
|
|
49
90
|
}
|
|
50
91
|
export type ColumnType = 'text' | 'number' | 'boolean';
|
|
51
92
|
export interface CellContext<T = any> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/object-set-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,M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;;;;;OAeG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;IAEjC;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;IAEjD;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IAE1C;;;;OAIG;IACH,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEzD,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAA;AAE1B,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface UseControllableStateProps<T> {
|
|
2
|
+
value?: T;
|
|
3
|
+
defaultValue?: T;
|
|
4
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
}
|
|
6
|
+
declare function useControllableState<T>({ value, defaultValue, onChange }: UseControllableStateProps<T>): readonly [T | undefined, (event: React.ChangeEvent<HTMLInputElement>) => void];
|
|
7
|
+
export default useControllableState;
|
|
8
|
+
//# sourceMappingURL=use-controllable-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-controllable-state.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/use-controllable-state.ts"],"names":[],"mappings":"AAEA,UAAU,yBAAyB,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,CAAC,CAAA;IACT,YAAY,CAAC,EAAE,CAAC,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAChE;AAED,iBAAS,oBAAoB,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAAC,oCAKpF,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,WAQ9C;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
function useControllableState({ value, defaultValue, onChange }) {
|
|
3
|
+
const [internal, setInternal] = useState(defaultValue);
|
|
4
|
+
const isControlled = value !== undefined;
|
|
5
|
+
const handleChange = useCallback((event) => {
|
|
6
|
+
if (!isControlled)
|
|
7
|
+
setInternal(event.target.value);
|
|
8
|
+
onChange?.(event);
|
|
9
|
+
}, [isControlled, onChange]);
|
|
10
|
+
return [isControlled ? value : internal, handleChange];
|
|
11
|
+
}
|
|
12
|
+
export default useControllableState;
|
|
13
|
+
//# sourceMappingURL=use-controllable-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-controllable-state.js","sourceRoot":"","sources":["../../../../src/ui/hooks/use-controllable-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAQ7C,SAAS,oBAAoB,CAAI,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAgC;IAC9F,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAgB,YAAY,CAAC,CAAA;IACrE,MAAM,YAAY,GAAG,KAAK,KAAK,SAAS,CAAA;IAExC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAA0C,EAAE,EAAE;QAC7C,IAAI,CAAC,YAAY;YAAE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAU,CAAC,CAAA;QACvD,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAA;IACnB,CAAC,EACD,CAAC,YAAY,EAAE,QAAQ,CAAC,CACzB,CAAA;IAED,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAU,CAAA;AACjE,CAAC;AAED,eAAe,oBAAoB,CAAA"}
|
package/dist/style.css
CHANGED
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
--color-accent: oklch(0.97 0 0);
|
|
102
102
|
--color-accent-foreground: oklch(0.205 0 0);
|
|
103
103
|
--color-destructive: oklch(0.577 0.245 27.325);
|
|
104
|
+
--color-popover: oklch(1 0 0);
|
|
105
|
+
--color-popover-foreground: oklch(0.145 0 0);
|
|
104
106
|
--color-charcoal-300: hsl(221 17% 67%);
|
|
105
107
|
--color-charcoal-700: hsl(219 17% 34%);
|
|
106
108
|
--color-charcoal-800: hsl(221 17% 26%);
|
|
@@ -348,6 +350,9 @@
|
|
|
348
350
|
.z-1 {
|
|
349
351
|
z-index: 1;
|
|
350
352
|
}
|
|
353
|
+
.z-5 {
|
|
354
|
+
z-index: 5;
|
|
355
|
+
}
|
|
351
356
|
.z-10 {
|
|
352
357
|
z-index: 10;
|
|
353
358
|
}
|
|
@@ -375,6 +380,9 @@
|
|
|
375
380
|
.-m-2 {
|
|
376
381
|
margin: calc(var(--spacing) * -2);
|
|
377
382
|
}
|
|
383
|
+
.-mx-1 {
|
|
384
|
+
margin-inline: calc(var(--spacing) * -1);
|
|
385
|
+
}
|
|
378
386
|
.mx-10 {
|
|
379
387
|
margin-inline: calc(var(--spacing) * 10);
|
|
380
388
|
}
|
|
@@ -601,12 +609,18 @@
|
|
|
601
609
|
.h-full {
|
|
602
610
|
height: 100%;
|
|
603
611
|
}
|
|
612
|
+
.h-px {
|
|
613
|
+
height: 1px;
|
|
614
|
+
}
|
|
604
615
|
.h-screen {
|
|
605
616
|
height: 100vh;
|
|
606
617
|
}
|
|
607
618
|
.h-svh {
|
|
608
619
|
height: 100svh;
|
|
609
620
|
}
|
|
621
|
+
.max-h-\(--radix-dropdown-menu-content-available-height\) {
|
|
622
|
+
max-height: var(--radix-dropdown-menu-content-available-height);
|
|
623
|
+
}
|
|
610
624
|
.max-h-\[300px\] {
|
|
611
625
|
max-height: 300px;
|
|
612
626
|
}
|
|
@@ -715,6 +729,9 @@
|
|
|
715
729
|
.min-w-4 {
|
|
716
730
|
min-width: calc(var(--spacing) * 4);
|
|
717
731
|
}
|
|
732
|
+
.min-w-\[8rem\] {
|
|
733
|
+
min-width: 8rem;
|
|
734
|
+
}
|
|
718
735
|
.min-w-\[40px\] {
|
|
719
736
|
min-width: 40px;
|
|
720
737
|
}
|
|
@@ -727,6 +744,9 @@
|
|
|
727
744
|
.grow {
|
|
728
745
|
flex-grow: 1;
|
|
729
746
|
}
|
|
747
|
+
.origin-\(--radix-dropdown-menu-content-transform-origin\) {
|
|
748
|
+
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
749
|
+
}
|
|
730
750
|
.-translate-x-1\/2 {
|
|
731
751
|
--tw-translate-x: calc(calc(1/2 * 100%) * -1);
|
|
732
752
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -1129,6 +1149,9 @@
|
|
|
1129
1149
|
.bg-muted {
|
|
1130
1150
|
background-color: var(--color-muted);
|
|
1131
1151
|
}
|
|
1152
|
+
.bg-popover {
|
|
1153
|
+
background-color: var(--color-popover);
|
|
1154
|
+
}
|
|
1132
1155
|
.bg-primary {
|
|
1133
1156
|
background-color: var(--color-primary);
|
|
1134
1157
|
}
|
|
@@ -1183,6 +1206,9 @@
|
|
|
1183
1206
|
.p-8 {
|
|
1184
1207
|
padding: calc(var(--spacing) * 8);
|
|
1185
1208
|
}
|
|
1209
|
+
.p-\[3px\] {
|
|
1210
|
+
padding: 3px;
|
|
1211
|
+
}
|
|
1186
1212
|
.px-0\.5 {
|
|
1187
1213
|
padding-inline: calc(var(--spacing) * 0.5);
|
|
1188
1214
|
}
|
|
@@ -1489,6 +1515,9 @@
|
|
|
1489
1515
|
.text-muted-foreground {
|
|
1490
1516
|
color: var(--color-muted-foreground);
|
|
1491
1517
|
}
|
|
1518
|
+
.text-popover-foreground {
|
|
1519
|
+
color: var(--color-popover-foreground);
|
|
1520
|
+
}
|
|
1492
1521
|
.text-primary {
|
|
1493
1522
|
color: var(--color-primary);
|
|
1494
1523
|
}
|
|
@@ -1555,6 +1584,9 @@
|
|
|
1555
1584
|
.opacity-80 {
|
|
1556
1585
|
opacity: 80%;
|
|
1557
1586
|
}
|
|
1587
|
+
.opacity-100 {
|
|
1588
|
+
opacity: 100%;
|
|
1589
|
+
}
|
|
1558
1590
|
.shadow-\[0px_2px_4px_0px_rgba\(0\,0\,0\,0\.08\)\,0px_3px_10px_0px_rgba\(0\,0\,0\,0\.10\)\] {
|
|
1559
1591
|
--tw-shadow: 0px 2px 4px 0px var(--tw-shadow-color, rgba(0,0,0,0.08)), 0px 3px 10px 0px var(--tw-shadow-color, rgba(0,0,0,0.10));
|
|
1560
1592
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -1563,6 +1595,10 @@
|
|
|
1563
1595
|
--tw-shadow: 1px 4px 15px 0px var(--tw-shadow-color, rgba(74,88,115,0.25));
|
|
1564
1596
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1565
1597
|
}
|
|
1598
|
+
.shadow-\[2px_4px_7px_0px_rgba\(107\,122\,150\,0\.25\)\] {
|
|
1599
|
+
--tw-shadow: 2px 4px 7px 0px var(--tw-shadow-color, rgba(107,122,150,0.25));
|
|
1600
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1601
|
+
}
|
|
1566
1602
|
.shadow-lg {
|
|
1567
1603
|
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1568
1604
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -1595,6 +1631,14 @@
|
|
|
1595
1631
|
.ring-offset-background {
|
|
1596
1632
|
--tw-ring-offset-color: var(--color-background);
|
|
1597
1633
|
}
|
|
1634
|
+
.outline-hidden {
|
|
1635
|
+
--tw-outline-style: none;
|
|
1636
|
+
outline-style: none;
|
|
1637
|
+
@media (forced-colors: active) {
|
|
1638
|
+
outline: 2px solid transparent;
|
|
1639
|
+
outline-offset: 2px;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1598
1642
|
.outline {
|
|
1599
1643
|
outline-style: var(--tw-outline-style);
|
|
1600
1644
|
outline-width: 1px;
|
|
@@ -2169,6 +2213,13 @@
|
|
|
2169
2213
|
}
|
|
2170
2214
|
}
|
|
2171
2215
|
}
|
|
2216
|
+
.hover\:text-gray-600 {
|
|
2217
|
+
&:hover {
|
|
2218
|
+
@media (hover: hover) {
|
|
2219
|
+
color: var(--color-gray-600);
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2172
2223
|
.hover\:text-gray-700 {
|
|
2173
2224
|
&:hover {
|
|
2174
2225
|
@media (hover: hover) {
|
|
@@ -2500,6 +2551,11 @@
|
|
|
2500
2551
|
pointer-events: none;
|
|
2501
2552
|
}
|
|
2502
2553
|
}
|
|
2554
|
+
.data-\[inset\]\:pl-8 {
|
|
2555
|
+
&[data-inset] {
|
|
2556
|
+
padding-left: calc(var(--spacing) * 8);
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2503
2559
|
.data-\[invalid\=true\]\:group-hover\:\!border-red-900 {
|
|
2504
2560
|
&[data-invalid="true"] {
|
|
2505
2561
|
&:is(:where(.group):hover *) {
|
|
@@ -2690,6 +2746,16 @@
|
|
|
2690
2746
|
animation: var(--animate-zoom-in);
|
|
2691
2747
|
}
|
|
2692
2748
|
}
|
|
2749
|
+
.data-\[state\=open\]\:bg-accent {
|
|
2750
|
+
&[data-state="open"] {
|
|
2751
|
+
background-color: var(--color-accent);
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
.data-\[state\=open\]\:text-accent-foreground {
|
|
2755
|
+
&[data-state="open"] {
|
|
2756
|
+
color: var(--color-accent-foreground);
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2693
2759
|
.data-\[state\=unchecked\]\:translate-x-0 {
|
|
2694
2760
|
&[data-state="unchecked"] {
|
|
2695
2761
|
--tw-translate-x: calc(var(--spacing) * 0);
|
|
@@ -2706,6 +2772,28 @@
|
|
|
2706
2772
|
background-color: #EFEFEF;
|
|
2707
2773
|
}
|
|
2708
2774
|
}
|
|
2775
|
+
.data-\[variant\=destructive\]\:text-destructive {
|
|
2776
|
+
&[data-variant="destructive"] {
|
|
2777
|
+
color: var(--color-destructive);
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
.data-\[variant\=destructive\]\:focus\:bg-destructive\/10 {
|
|
2781
|
+
&[data-variant="destructive"] {
|
|
2782
|
+
&:focus {
|
|
2783
|
+
background-color: color-mix(in srgb, oklch(0.577 0.245 27.325) 10%, transparent);
|
|
2784
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2785
|
+
background-color: color-mix(in oklab, var(--color-destructive) 10%, transparent);
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
.data-\[variant\=destructive\]\:focus\:text-destructive {
|
|
2791
|
+
&[data-variant="destructive"] {
|
|
2792
|
+
&:focus {
|
|
2793
|
+
color: var(--color-destructive);
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2709
2797
|
.sm\:max-w-lg {
|
|
2710
2798
|
@media (width >= 40rem) {
|
|
2711
2799
|
max-width: var(--container-lg);
|
|
@@ -3586,6 +3674,18 @@
|
|
|
3586
3674
|
}
|
|
3587
3675
|
}
|
|
3588
3676
|
}
|
|
3677
|
+
.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20 {
|
|
3678
|
+
&:where(.dark, .dark *) {
|
|
3679
|
+
&[data-variant="destructive"] {
|
|
3680
|
+
&:focus {
|
|
3681
|
+
background-color: color-mix(in srgb, oklch(0.577 0.245 27.325) 20%, transparent);
|
|
3682
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3683
|
+
background-color: color-mix(in oklab, var(--color-destructive) 20%, transparent);
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3589
3689
|
.\[\&\]\:\!w-\[120px\] {
|
|
3590
3690
|
width: 120px !important;
|
|
3591
3691
|
}
|
|
@@ -4954,6 +5054,11 @@
|
|
|
4954
5054
|
height: calc(var(--spacing) * 4);
|
|
4955
5055
|
}
|
|
4956
5056
|
}
|
|
5057
|
+
.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground {
|
|
5058
|
+
& svg:not([class*='text-']) {
|
|
5059
|
+
color: var(--color-muted-foreground);
|
|
5060
|
+
}
|
|
5061
|
+
}
|
|
4957
5062
|
.\[\&\.base-picker\\\\_\\\\_input\]\:w-\[275px\] {
|
|
4958
5063
|
&.base-picker\_\_input {
|
|
4959
5064
|
width: 275px;
|
|
@@ -5064,6 +5169,15 @@
|
|
|
5064
5169
|
display: none;
|
|
5065
5170
|
}
|
|
5066
5171
|
}
|
|
5172
|
+
.data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive {
|
|
5173
|
+
&[data-variant="destructive"] {
|
|
5174
|
+
:is(& > *) {
|
|
5175
|
+
&:is(svg) {
|
|
5176
|
+
color: var(--color-destructive) !important;
|
|
5177
|
+
}
|
|
5178
|
+
}
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5067
5181
|
.\[\&\>button\]\:bg-accent {
|
|
5068
5182
|
&>button {
|
|
5069
5183
|
background-color: var(--color-accent);
|