@womp/kookie-ui 0.28.1 → 0.29.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/components.css +198 -0
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/segmented-control.js.map +3 -3
- package/dist/cjs/components/segmented-control.props.d.ts +6 -0
- package/dist/cjs/components/segmented-control.props.d.ts.map +1 -1
- package/dist/cjs/components/segmented-control.props.js +1 -1
- package/dist/cjs/components/segmented-control.props.js.map +3 -3
- package/dist/cjs/components/text-field.d.ts +11 -3
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +3 -3
- package/dist/cjs/components/text-field.props.d.ts +30 -1
- package/dist/cjs/components/text-field.props.d.ts.map +1 -1
- package/dist/cjs/components/text-field.props.js +1 -1
- package/dist/cjs/components/text-field.props.js.map +3 -3
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +3 -3
- package/dist/esm/chunk-A252TSYI.js +2 -0
- package/dist/esm/chunk-A252TSYI.js.map +7 -0
- package/dist/esm/chunk-FIMFM25N.js +2 -0
- package/dist/esm/chunk-FIMFM25N.js.map +7 -0
- package/dist/esm/chunk-GPZHRZBE.js +6 -0
- package/dist/esm/chunk-GPZHRZBE.js.map +7 -0
- package/dist/esm/chunk-TSS4K2U5.js +3 -0
- package/dist/esm/{chunk-W4Z6ORYO.js.map → chunk-TSS4K2U5.js.map} +3 -3
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/segmented-control.props.d.ts +6 -0
- package/dist/esm/components/segmented-control.props.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.props.js +1 -1
- package/dist/esm/components/text-field.d.ts +11 -3
- package/dist/esm/components/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text-field.props.d.ts +30 -1
- package/dist/esm/components/text-field.props.d.ts.map +1 -1
- package/dist/esm/components/text-field.props.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +1 -1
- package/src/components/segmented-control.css +43 -0
- package/src/components/segmented-control.props.tsx +5 -0
- package/src/components/text-field.css +138 -0
- package/src/components/text-field.props.tsx +16 -1
- package/src/components/text-field.tsx +48 -4
- package/styles.css +198 -0
- package/dist/esm/chunk-2ZLMWYJ6.js +0 -2
- package/dist/esm/chunk-2ZLMWYJ6.js.map +0 -7
- package/dist/esm/chunk-BP64M73W.js +0 -2
- package/dist/esm/chunk-BP64M73W.js.map +0 -7
- package/dist/esm/chunk-W4Z6ORYO.js +0 -3
- package/dist/esm/chunk-ZOUIIO4C.js +0 -6
- package/dist/esm/chunk-ZOUIIO4C.js.map +0 -7
|
@@ -738,3 +738,141 @@
|
|
|
738
738
|
filter: none;
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
+
|
|
742
|
+
/***************************************************************************************************
|
|
743
|
+
* *
|
|
744
|
+
* GROUP *
|
|
745
|
+
* *
|
|
746
|
+
***************************************************************************************************/
|
|
747
|
+
|
|
748
|
+
/*
|
|
749
|
+
* TextField.Group joins its fields into one control, such as X, Y and Z. The group draws the
|
|
750
|
+
* variant's edge once, over the fields, so a field's fill never covers it. Each field keeps its
|
|
751
|
+
* fill, hover and focus ring; its own edge goes, its inner corners are square, and a hairline
|
|
752
|
+
* divides it from the one before.
|
|
753
|
+
*/
|
|
754
|
+
|
|
755
|
+
/* stylelint-disable selector-max-specificity */
|
|
756
|
+
|
|
757
|
+
.kui-TextFieldGroup {
|
|
758
|
+
display: grid;
|
|
759
|
+
grid-auto-flow: column;
|
|
760
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
761
|
+
position: relative;
|
|
762
|
+
isolation: isolate;
|
|
763
|
+
border-radius: var(--text-field-border-radius);
|
|
764
|
+
|
|
765
|
+
&::after {
|
|
766
|
+
content: '';
|
|
767
|
+
position: absolute;
|
|
768
|
+
inset: 0;
|
|
769
|
+
z-index: 2;
|
|
770
|
+
border-radius: inherit;
|
|
771
|
+
box-shadow: var(--text-field-group-edge);
|
|
772
|
+
pointer-events: none;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
@breakpoints {
|
|
777
|
+
.kui-TextFieldGroup {
|
|
778
|
+
&:where(.kui-r-size-1) {
|
|
779
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
780
|
+
}
|
|
781
|
+
&:where(.kui-r-size-2) {
|
|
782
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
783
|
+
}
|
|
784
|
+
&:where(.kui-r-size-3) {
|
|
785
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
786
|
+
}
|
|
787
|
+
&:where(.kui-r-size-4) {
|
|
788
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/* Each variant's edge and divider are the ones its single field draws. */
|
|
794
|
+
.kui-TextFieldGroup:where(.kui-variant-raised) {
|
|
795
|
+
--text-field-group-edge: var(--control-chrome);
|
|
796
|
+
--text-field-group-divider: var(--neutral-a4);
|
|
797
|
+
|
|
798
|
+
&:where([data-disabled]) {
|
|
799
|
+
--text-field-group-edge: inset 0 0 0 1px var(--field-edge-disabled);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.kui-TextFieldGroup:where(.kui-variant-outline, .kui-variant-surface) {
|
|
804
|
+
--text-field-group-edge: inset 0 0 0 1px var(--accent-6);
|
|
805
|
+
--text-field-group-divider: var(--accent-6);
|
|
806
|
+
|
|
807
|
+
&:where([data-disabled]) {
|
|
808
|
+
--text-field-group-edge: inset 0 0 0 1px var(--neutral-a6);
|
|
809
|
+
--text-field-group-divider: var(--neutral-a6);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.kui-TextFieldGroup:where(.kui-variant-soft) {
|
|
814
|
+
--text-field-group-edge: none;
|
|
815
|
+
--text-field-group-divider: var(--accent-a5);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/* ghost: the dividers alone. Each field keeps its ghost hover and focus fill. */
|
|
819
|
+
.kui-TextFieldGroup:where(.kui-variant-ghost) {
|
|
820
|
+
--text-field-group-edge: none;
|
|
821
|
+
--text-field-group-divider: var(--neutral-a5);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot {
|
|
825
|
+
position: relative;
|
|
826
|
+
border-radius: 0;
|
|
827
|
+
box-shadow: none;
|
|
828
|
+
|
|
829
|
+
/* The focus ring and an invalid edge draw above the group's edge. */
|
|
830
|
+
&:focus-within {
|
|
831
|
+
z-index: 3;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper:first-child > .kui-TextFieldRoot {
|
|
836
|
+
border-start-start-radius: var(--text-field-border-radius);
|
|
837
|
+
border-end-start-radius: var(--text-field-border-radius);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper:last-child > .kui-TextFieldRoot {
|
|
841
|
+
border-start-end-radius: var(--text-field-border-radius);
|
|
842
|
+
border-end-end-radius: var(--text-field-border-radius);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper + .kui-TextFieldWrapper > .kui-TextFieldRoot::before {
|
|
846
|
+
content: '';
|
|
847
|
+
position: absolute;
|
|
848
|
+
z-index: 1;
|
|
849
|
+
inset-block: 0;
|
|
850
|
+
inset-inline-start: 0;
|
|
851
|
+
width: 1px;
|
|
852
|
+
background-color: var(--text-field-group-divider);
|
|
853
|
+
pointer-events: none;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/* A focused field's ring is its edge, so the hairlines on either side of it step back. */
|
|
857
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot:focus-within::before,
|
|
858
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper:has(> .kui-TextFieldRoot:focus-within) + .kui-TextFieldWrapper > .kui-TextFieldRoot::before {
|
|
859
|
+
opacity: 0;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/* An invalid field keeps its red edge, on its own segment only. */
|
|
863
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot:has(> .kui-TextFieldInput[aria-invalid='true']) {
|
|
864
|
+
z-index: 3;
|
|
865
|
+
box-shadow: inset 0 0 0 1px var(--red-6);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
@media (forced-colors: active) {
|
|
870
|
+
.kui-TextFieldGroup {
|
|
871
|
+
border: 1px solid CanvasText;
|
|
872
|
+
}
|
|
873
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot {
|
|
874
|
+
border: none;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/* stylelint-enable selector-max-specificity */
|
|
@@ -30,6 +30,21 @@ const textFieldRootPropDefs = {
|
|
|
30
30
|
'aria-labelledby': PropDef<string | undefined>;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
// Ghost is the dividers alone: no fill, no edge.
|
|
34
|
+
const groupVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;
|
|
35
|
+
|
|
36
|
+
const textFieldGroupPropDefs = {
|
|
37
|
+
size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },
|
|
38
|
+
variant: { type: 'enum', className: 'kui-variant', values: groupVariants, default: 'raised' },
|
|
39
|
+
disabled: { type: 'boolean', default: false },
|
|
40
|
+
...colorPropDef,
|
|
41
|
+
...radiusPropDef,
|
|
42
|
+
} satisfies {
|
|
43
|
+
size: PropDef<(typeof sizes)[number]>;
|
|
44
|
+
variant: PropDef<(typeof groupVariants)[number]>;
|
|
45
|
+
disabled: PropDef<boolean>;
|
|
46
|
+
};
|
|
47
|
+
|
|
33
48
|
const sides = ['left', 'right'] as const;
|
|
34
49
|
|
|
35
50
|
const textFieldSlotPropDefs = {
|
|
@@ -75,4 +90,4 @@ interface TextFieldSlotScrubProps {
|
|
|
75
90
|
|
|
76
91
|
export type { TextFieldSlotScrubProps };
|
|
77
92
|
|
|
78
|
-
export { textFieldRootPropDefs, textFieldSlotPropDefs };
|
|
93
|
+
export { textFieldRootPropDefs, textFieldGroupPropDefs, textFieldSlotPropDefs };
|
|
@@ -5,7 +5,7 @@ import * as ReactDOM from 'react-dom';
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { composeEventHandlers, composeRefs, useLayoutEffect } from 'radix-ui/internal';
|
|
7
7
|
|
|
8
|
-
import { textFieldRootPropDefs, textFieldSlotPropDefs, type TextFieldSlotScrubProps } from './text-field.props.js';
|
|
8
|
+
import { textFieldRootPropDefs, textFieldGroupPropDefs, textFieldSlotPropDefs, type TextFieldSlotScrubProps } from './text-field.props.js';
|
|
9
9
|
import { extractProps } from '../helpers/extract-props.js';
|
|
10
10
|
import { mergeStyles } from '../helpers/merge-styles.js';
|
|
11
11
|
import { useThemeSizeProps } from '../hooks/theme-size.js';
|
|
@@ -31,7 +31,23 @@ const TextFieldContext = React.createContext<TextFieldContextValue | null>(null)
|
|
|
31
31
|
// list, not a tag list. `[tabindex]` catches role-based widgets; `label` already redirects a click.
|
|
32
32
|
const FOCUSABLE_IN_SLOT = 'button, a, input, select, textarea, label, [tabindex], [contenteditable]';
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
// A Group decides the look of its fields: their size, variant and radius come from it. A field
|
|
35
|
+
// can still take its own color, and is disabled when either it or the group is.
|
|
36
|
+
type TextFieldGroupContextValue = Pick<TextFieldGroupOwnProps, 'size' | 'variant' | 'radius' | 'color' | 'disabled'>;
|
|
37
|
+
const TextFieldGroupContext = React.createContext<TextFieldGroupContextValue | null>(null);
|
|
38
|
+
|
|
39
|
+
const TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>((fieldProps, forwardedRef) => {
|
|
40
|
+
const group = React.useContext(TextFieldGroupContext);
|
|
41
|
+
const ownProps = group
|
|
42
|
+
? {
|
|
43
|
+
...fieldProps,
|
|
44
|
+
size: group.size,
|
|
45
|
+
variant: group.variant,
|
|
46
|
+
radius: group.radius,
|
|
47
|
+
color: fieldProps.color ?? group.color,
|
|
48
|
+
disabled: Boolean(group.disabled || fieldProps.disabled),
|
|
49
|
+
}
|
|
50
|
+
: fieldProps;
|
|
35
51
|
// The caller's className and style are kept apart from the size and variant classes: with an
|
|
36
52
|
// error message they go on the wrapper, which is then the one box the parent lays out.
|
|
37
53
|
const { className: ownClassName, style: ownStyle, ...themedProps } = useThemeSizeProps(ownProps, textFieldRootPropDefs.size);
|
|
@@ -137,6 +153,34 @@ const TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>
|
|
|
137
153
|
});
|
|
138
154
|
TextFieldRoot.displayName = 'TextField.Root';
|
|
139
155
|
|
|
156
|
+
type TextFieldGroupOwnProps = GetPropDefTypes<typeof textFieldGroupPropDefs>;
|
|
157
|
+
interface TextFieldGroupProps extends ComponentPropsWithout<'div', RemovedProps>, TextFieldGroupOwnProps {}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Joins two or more fields into one, such as X, Y and Z: one edge, square inner corners and a
|
|
161
|
+
* hairline between the fields. The group draws the edge, so each field keeps only its fill.
|
|
162
|
+
*/
|
|
163
|
+
const TextFieldGroup = React.forwardRef<HTMLDivElement, TextFieldGroupProps>((ownProps, forwardedRef) => {
|
|
164
|
+
const props = useThemeSizeProps(ownProps, textFieldGroupPropDefs.size);
|
|
165
|
+
const { size, variant, radius, color, disabled } = props;
|
|
166
|
+
const { className, children, radius: _radius, color: _color, disabled: _disabled, ...domProps } = extractProps(props, textFieldGroupPropDefs);
|
|
167
|
+
const contextValue = React.useMemo(() => ({ size, variant, radius, color, disabled }), [size, variant, radius, color, disabled]);
|
|
168
|
+
return (
|
|
169
|
+
<div
|
|
170
|
+
role="group"
|
|
171
|
+
data-accent-color={color}
|
|
172
|
+
data-radius={radius}
|
|
173
|
+
data-disabled={disabled || undefined}
|
|
174
|
+
{...domProps}
|
|
175
|
+
ref={forwardedRef}
|
|
176
|
+
className={classNames('kui-TextFieldGroup', className)}
|
|
177
|
+
>
|
|
178
|
+
<TextFieldGroupContext.Provider value={contextValue}>{children}</TextFieldGroupContext.Provider>
|
|
179
|
+
</div>
|
|
180
|
+
);
|
|
181
|
+
});
|
|
182
|
+
TextFieldGroup.displayName = 'TextField.Group';
|
|
183
|
+
|
|
140
184
|
type TextFieldSlotElement = React.ElementRef<'div'>;
|
|
141
185
|
type TextFieldSlotOwnProps = GetPropDefTypes<typeof textFieldSlotPropDefs> & TextFieldSlotScrubProps;
|
|
142
186
|
interface TextFieldSlotProps extends ComponentPropsWithout<'div', RemovedProps>, TextFieldSlotOwnProps {}
|
|
@@ -478,5 +522,5 @@ const TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>
|
|
|
478
522
|
});
|
|
479
523
|
TextFieldSlot.displayName = 'TextField.Slot';
|
|
480
524
|
|
|
481
|
-
export { TextFieldRoot as Root, TextFieldSlot as Slot };
|
|
482
|
-
export type { TextFieldRootProps as RootProps, TextFieldSlotProps as SlotProps };
|
|
525
|
+
export { TextFieldRoot as Root, TextFieldGroup as Group, TextFieldSlot as Slot };
|
|
526
|
+
export type { TextFieldRootProps as RootProps, TextFieldGroupProps as GroupProps, TextFieldSlotProps as SlotProps };
|
package/styles.css
CHANGED
|
@@ -11420,6 +11420,173 @@
|
|
|
11420
11420
|
filter: none;
|
|
11421
11421
|
}
|
|
11422
11422
|
}
|
|
11423
|
+
.kui-TextFieldGroup {
|
|
11424
|
+
display: grid;
|
|
11425
|
+
grid-auto-flow: column;
|
|
11426
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
11427
|
+
position: relative;
|
|
11428
|
+
isolation: isolate;
|
|
11429
|
+
border-radius: var(--text-field-border-radius);
|
|
11430
|
+
}
|
|
11431
|
+
.kui-TextFieldGroup::after {
|
|
11432
|
+
content: '';
|
|
11433
|
+
position: absolute;
|
|
11434
|
+
inset: 0;
|
|
11435
|
+
z-index: 2;
|
|
11436
|
+
border-radius: inherit;
|
|
11437
|
+
-webkit-box-shadow: var(--text-field-group-edge);
|
|
11438
|
+
box-shadow: var(--text-field-group-edge);
|
|
11439
|
+
pointer-events: none;
|
|
11440
|
+
}
|
|
11441
|
+
.kui-TextFieldGroup:where(.kui-r-size-1) {
|
|
11442
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
11443
|
+
}
|
|
11444
|
+
.kui-TextFieldGroup:where(.kui-r-size-2) {
|
|
11445
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
11446
|
+
}
|
|
11447
|
+
.kui-TextFieldGroup:where(.kui-r-size-3) {
|
|
11448
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
11449
|
+
}
|
|
11450
|
+
.kui-TextFieldGroup:where(.kui-r-size-4) {
|
|
11451
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
11452
|
+
}
|
|
11453
|
+
@media (min-width: 520px) {
|
|
11454
|
+
.kui-TextFieldGroup:where(.xs\:kui-r-size-1) {
|
|
11455
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
11456
|
+
}
|
|
11457
|
+
.kui-TextFieldGroup:where(.xs\:kui-r-size-2) {
|
|
11458
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
11459
|
+
}
|
|
11460
|
+
.kui-TextFieldGroup:where(.xs\:kui-r-size-3) {
|
|
11461
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
11462
|
+
}
|
|
11463
|
+
.kui-TextFieldGroup:where(.xs\:kui-r-size-4) {
|
|
11464
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
11465
|
+
}
|
|
11466
|
+
}
|
|
11467
|
+
@media (min-width: 768px) {
|
|
11468
|
+
.kui-TextFieldGroup:where(.sm\:kui-r-size-1) {
|
|
11469
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
11470
|
+
}
|
|
11471
|
+
.kui-TextFieldGroup:where(.sm\:kui-r-size-2) {
|
|
11472
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
11473
|
+
}
|
|
11474
|
+
.kui-TextFieldGroup:where(.sm\:kui-r-size-3) {
|
|
11475
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
11476
|
+
}
|
|
11477
|
+
.kui-TextFieldGroup:where(.sm\:kui-r-size-4) {
|
|
11478
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
11479
|
+
}
|
|
11480
|
+
}
|
|
11481
|
+
@media (min-width: 1024px) {
|
|
11482
|
+
.kui-TextFieldGroup:where(.md\:kui-r-size-1) {
|
|
11483
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
11484
|
+
}
|
|
11485
|
+
.kui-TextFieldGroup:where(.md\:kui-r-size-2) {
|
|
11486
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
11487
|
+
}
|
|
11488
|
+
.kui-TextFieldGroup:where(.md\:kui-r-size-3) {
|
|
11489
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
11490
|
+
}
|
|
11491
|
+
.kui-TextFieldGroup:where(.md\:kui-r-size-4) {
|
|
11492
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
11493
|
+
}
|
|
11494
|
+
}
|
|
11495
|
+
@media (min-width: 1280px) {
|
|
11496
|
+
.kui-TextFieldGroup:where(.lg\:kui-r-size-1) {
|
|
11497
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
11498
|
+
}
|
|
11499
|
+
.kui-TextFieldGroup:where(.lg\:kui-r-size-2) {
|
|
11500
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
11501
|
+
}
|
|
11502
|
+
.kui-TextFieldGroup:where(.lg\:kui-r-size-3) {
|
|
11503
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
11504
|
+
}
|
|
11505
|
+
.kui-TextFieldGroup:where(.lg\:kui-r-size-4) {
|
|
11506
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
11507
|
+
}
|
|
11508
|
+
}
|
|
11509
|
+
@media (min-width: 1640px) {
|
|
11510
|
+
.kui-TextFieldGroup:where(.xl\:kui-r-size-1) {
|
|
11511
|
+
--text-field-border-radius: var(--radius-control-1);
|
|
11512
|
+
}
|
|
11513
|
+
.kui-TextFieldGroup:where(.xl\:kui-r-size-2) {
|
|
11514
|
+
--text-field-border-radius: var(--radius-control-2);
|
|
11515
|
+
}
|
|
11516
|
+
.kui-TextFieldGroup:where(.xl\:kui-r-size-3) {
|
|
11517
|
+
--text-field-border-radius: var(--radius-control-3);
|
|
11518
|
+
}
|
|
11519
|
+
.kui-TextFieldGroup:where(.xl\:kui-r-size-4) {
|
|
11520
|
+
--text-field-border-radius: var(--radius-control-4);
|
|
11521
|
+
}
|
|
11522
|
+
}
|
|
11523
|
+
.kui-TextFieldGroup:where(.kui-variant-raised) {
|
|
11524
|
+
--text-field-group-edge: var(--control-chrome);
|
|
11525
|
+
--text-field-group-divider: var(--neutral-a4);
|
|
11526
|
+
}
|
|
11527
|
+
.kui-TextFieldGroup:where(.kui-variant-raised):where([data-disabled]) {
|
|
11528
|
+
--text-field-group-edge: inset 0 0 0 1px var(--field-edge-disabled);
|
|
11529
|
+
}
|
|
11530
|
+
.kui-TextFieldGroup:where(.kui-variant-outline, .kui-variant-surface) {
|
|
11531
|
+
--text-field-group-edge: inset 0 0 0 1px var(--accent-6);
|
|
11532
|
+
--text-field-group-divider: var(--accent-6);
|
|
11533
|
+
}
|
|
11534
|
+
.kui-TextFieldGroup:where(.kui-variant-outline,.kui-variant-surface):where([data-disabled]) {
|
|
11535
|
+
--text-field-group-edge: inset 0 0 0 1px var(--neutral-a6);
|
|
11536
|
+
--text-field-group-divider: var(--neutral-a6);
|
|
11537
|
+
}
|
|
11538
|
+
.kui-TextFieldGroup:where(.kui-variant-soft) {
|
|
11539
|
+
--text-field-group-edge: none;
|
|
11540
|
+
--text-field-group-divider: var(--accent-a5);
|
|
11541
|
+
}
|
|
11542
|
+
.kui-TextFieldGroup:where(.kui-variant-ghost) {
|
|
11543
|
+
--text-field-group-edge: none;
|
|
11544
|
+
--text-field-group-divider: var(--neutral-a5);
|
|
11545
|
+
}
|
|
11546
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot {
|
|
11547
|
+
position: relative;
|
|
11548
|
+
border-radius: 0;
|
|
11549
|
+
-webkit-box-shadow: none;
|
|
11550
|
+
box-shadow: none;
|
|
11551
|
+
}
|
|
11552
|
+
:is(.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot):focus-within {
|
|
11553
|
+
z-index: 3;
|
|
11554
|
+
}
|
|
11555
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper:first-child > .kui-TextFieldRoot {
|
|
11556
|
+
border-start-start-radius: var(--text-field-border-radius);
|
|
11557
|
+
border-end-start-radius: var(--text-field-border-radius);
|
|
11558
|
+
}
|
|
11559
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper:last-child > .kui-TextFieldRoot {
|
|
11560
|
+
border-start-end-radius: var(--text-field-border-radius);
|
|
11561
|
+
border-end-end-radius: var(--text-field-border-radius);
|
|
11562
|
+
}
|
|
11563
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper + .kui-TextFieldWrapper > .kui-TextFieldRoot::before {
|
|
11564
|
+
content: '';
|
|
11565
|
+
position: absolute;
|
|
11566
|
+
z-index: 1;
|
|
11567
|
+
inset-block: 0;
|
|
11568
|
+
inset-inline-start: 0;
|
|
11569
|
+
width: 1px;
|
|
11570
|
+
background-color: var(--text-field-group-divider);
|
|
11571
|
+
pointer-events: none;
|
|
11572
|
+
}
|
|
11573
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot:focus-within::before,
|
|
11574
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper:has(> .kui-TextFieldRoot:focus-within) + .kui-TextFieldWrapper > .kui-TextFieldRoot::before {
|
|
11575
|
+
opacity: 0;
|
|
11576
|
+
}
|
|
11577
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot:has(> .kui-TextFieldInput[aria-invalid='true']) {
|
|
11578
|
+
z-index: 3;
|
|
11579
|
+
-webkit-box-shadow: inset 0 0 0 1px var(--red-6);
|
|
11580
|
+
box-shadow: inset 0 0 0 1px var(--red-6);
|
|
11581
|
+
}
|
|
11582
|
+
@media (forced-colors: active) {
|
|
11583
|
+
.kui-TextFieldGroup {
|
|
11584
|
+
border: 1px solid CanvasText;
|
|
11585
|
+
}
|
|
11586
|
+
.kui-TextFieldGroup > .kui-TextFieldWrapper > .kui-TextFieldRoot {
|
|
11587
|
+
border: none;
|
|
11588
|
+
}
|
|
11589
|
+
}
|
|
11423
11590
|
.kui-ComboboxContent {
|
|
11424
11591
|
--combobox-list-max-height: calc(300px * var(--scale));
|
|
11425
11592
|
-ms-scroll-chaining: none;
|
|
@@ -13779,6 +13946,37 @@
|
|
|
13779
13946
|
height: var(--icon-size-4);
|
|
13780
13947
|
}
|
|
13781
13948
|
}
|
|
13949
|
+
.kui-SegmentedControlRoot:where(.kui-variant-raised, .kui-variant-outline) {
|
|
13950
|
+
--segmented-control-indicator-background-color: var(--neutral-a4);
|
|
13951
|
+
}
|
|
13952
|
+
.kui-SegmentedControlRoot:where(.kui-variant-raised,.kui-variant-outline) :where(.kui-SegmentedControlIndicator)::before {
|
|
13953
|
+
inset: var(--segmented-control-indicator-inset);
|
|
13954
|
+
border-radius: max(var(--border-width-standard), calc(var(--segmented-control-border-radius) - var(--segmented-control-indicator-inset)));
|
|
13955
|
+
-webkit-box-shadow: none;
|
|
13956
|
+
box-shadow: none;
|
|
13957
|
+
}
|
|
13958
|
+
.kui-SegmentedControlRoot:where(.kui-variant-raised) {
|
|
13959
|
+
--segmented-control-indicator-inset: 2px;
|
|
13960
|
+
background-color: var(--field-fill);
|
|
13961
|
+
-webkit-box-shadow: var(--control-chrome);
|
|
13962
|
+
box-shadow: var(--control-chrome);
|
|
13963
|
+
}
|
|
13964
|
+
.kui-SegmentedControlRoot:where(.kui-variant-raised):where([data-disabled]) {
|
|
13965
|
+
background-color: var(--field-fill-disabled);
|
|
13966
|
+
-webkit-box-shadow: inset 0 0 0 1px var(--field-edge-disabled);
|
|
13967
|
+
box-shadow: inset 0 0 0 1px var(--field-edge-disabled);
|
|
13968
|
+
}
|
|
13969
|
+
.kui-SegmentedControlRoot:where(.kui-variant-outline) {
|
|
13970
|
+
--segmented-control-indicator-inset: 2px;
|
|
13971
|
+
background-color: transparent;
|
|
13972
|
+
-webkit-box-shadow: inset 0 0 0 1px var(--neutral-6);
|
|
13973
|
+
box-shadow: inset 0 0 0 1px var(--neutral-6);
|
|
13974
|
+
}
|
|
13975
|
+
.kui-SegmentedControlRoot:where(.kui-variant-outline):where([data-disabled]) {
|
|
13976
|
+
background-color: transparent;
|
|
13977
|
+
-webkit-box-shadow: inset 0 0 0 1px var(--neutral-a6);
|
|
13978
|
+
box-shadow: inset 0 0 0 1px var(--neutral-a6);
|
|
13979
|
+
}
|
|
13782
13980
|
.kui-SegmentedControlItem:where([data-icon-only]) {
|
|
13783
13981
|
min-width: var(--segmented-control-height);
|
|
13784
13982
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-KRJTW535.js";var o=["1","2","3","4"],s=["horizontal","vertical"],r={disabled:{type:"boolean",default:!1},size:{type:"enum",className:"kui-r-size",values:o,default:"2",responsive:!0},orientation:{type:"enum",className:"kui-r-orientation",values:s,default:"horizontal",responsive:!0},...e};export{r as a};
|
|
2
|
-
//# sourceMappingURL=chunk-2ZLMWYJ6.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/segmented-control.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n\nconst segmentedControlRootPropDefs = {\n disabled: { type: 'boolean', default: false },\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n orientation: {\n type: 'enum',\n className: 'kui-r-orientation',\n values: orientations,\n default: 'horizontal',\n responsive: true,\n },\n ...radiusPropDef,\n} satisfies {\n disabled?: PropDef<boolean>;\n size: PropDef<(typeof sizes)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { segmentedControlRootPropDefs };\n"],
|
|
5
|
-
"mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAe,CAAC,aAAc,UAAU,EAExCC,EAA+B,CACnC,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAC5C,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,YAAa,CACX,KAAM,OACN,UAAW,oBACX,OAAQC,EACR,QAAS,aACT,WAAY,EACd,EACA,GAAGE,CACL",
|
|
6
|
-
"names": ["sizes", "orientations", "segmentedControlRootPropDefs", "radiusPropDef"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-P7VSZYG3.js";import{a as o}from"./chunk-UMYPLUG3.js";import{b as s}from"./chunk-KRJTW535.js";import{c as r}from"./chunk-CUNKWFKA.js";var t=["1","2","3","4"],p=["raised","surface","soft","ghost","outline"],d={size:{type:"enum",className:"kui-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:p,default:"raised"},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...r,...s},i=["left","right"],l={side:{type:"enum",values:i},...r,gap:o.gap,px:e.px,pl:e.pl,pr:e.pr};export{d as a,l as b};
|
|
2
|
-
//# sourceMappingURL=chunk-BP64M73W.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/text-field.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\nimport { paddingPropDefs } from '../props/padding.props.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'surface', 'soft', 'ghost', 'outline'] as const;\n\nconst textFieldRootPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n // Error and validation props\n error: { type: 'boolean', default: false },\n errorMessage: { type: 'string', default: undefined },\n required: { type: 'boolean', default: false },\n // Accessibility props\n 'aria-describedby': { type: 'string', default: undefined },\n 'aria-labelledby': { type: 'string', default: undefined },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n error: PropDef<boolean>;\n errorMessage: PropDef<string | undefined>;\n required: PropDef<boolean>;\n 'aria-describedby': PropDef<string | undefined>;\n 'aria-labelledby': PropDef<string | undefined>;\n};\n\nconst sides = ['left', 'right'] as const;\n\nconst textFieldSlotPropDefs = {\n side: { type: 'enum', values: sides },\n ...colorPropDef,\n gap: flexPropDefs.gap,\n px: paddingPropDefs.px,\n pl: paddingPropDefs.pl,\n pr: paddingPropDefs.pr,\n} satisfies {\n side: PropDef<(typeof sides)[number]>;\n gap: typeof flexPropDefs.gap;\n px: typeof paddingPropDefs.px;\n pl: typeof paddingPropDefs.pl;\n pr: typeof paddingPropDefs.pr;\n};\n\n/** Scrubbing props for TextField.Slot - handled separately from PropDef system */\ninterface TextFieldSlotScrubProps {\n /** Enable scrubbing behavior on this slot */\n scrub?: boolean;\n /** Current value (required for min/max clamping to work correctly) */\n scrubValue?: number;\n /** Base value change per movement unit (default: 1) */\n scrubStep?: number;\n /** Pixels of movement per step - higher = less sensitive (default: 1) */\n scrubSensitivity?: number;\n /** Minimum allowed value */\n scrubMin?: number;\n /** Maximum allowed value */\n scrubMax?: number;\n /** Step multiplier when Shift is held (default: 10) */\n scrubShiftMultiplier?: number;\n /** Step multiplier when Alt/Option is held (default: 0.1) */\n scrubAltMultiplier?: number;\n /**\n * Callback fired during scrubbing with the value delta\n * @param delta - The change in value\n * @param isChanging - true while dragging, false when released\n */\n onScrub?: (delta: number, isChanging: boolean) => void;\n}\n\nexport type { TextFieldSlotScrubProps };\n\nexport { textFieldRootPropDefs, textFieldSlotPropDefs };\n"],
|
|
5
|
-
"mappings": "gKAOA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,SAAU,UAAW,OAAQ,QAAS,SAAS,EAE3DC,EAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,QAAS,EAEvF,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,EACzC,aAAc,CAAE,KAAM,SAAU,QAAS,MAAU,EACnD,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAE5C,mBAAoB,CAAE,KAAM,SAAU,QAAS,MAAU,EACzD,kBAAmB,CAAE,KAAM,SAAU,QAAS,MAAU,EACxD,GAAGE,EACH,GAAGC,CACL,EAUMC,EAAQ,CAAC,OAAQ,OAAO,EAExBC,EAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,OAAQD,CAAM,EACpC,GAAGF,EACH,IAAKI,EAAa,IAClB,GAAIC,EAAgB,GACpB,GAAIA,EAAgB,GACpB,GAAIA,EAAgB,EACtB",
|
|
6
|
-
"names": ["sizes", "variants", "textFieldRootPropDefs", "colorPropDef", "radiusPropDef", "sides", "textFieldSlotPropDefs", "flexPropDefs", "paddingPropDefs"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{c as y}from"./chunk-OKQAVYW4.js";import{c as v}from"./chunk-5ON3XLRD.js";import{b as R}from"./chunk-XU74PNM2.js";import{a as K}from"./chunk-VQPANPMI.js";var q={};K(q,{Item:()=>x,Root:()=>b});import*as e from"react";import S from"classnames";import{ToggleGroup as I}from"radix-ui";import{useComposedRefs as F,useControllableState as H,useLayoutEffect as j}from"radix-ui/internal";var M=["1","2","3","4"],O=["horizontal","vertical"],u={disabled:{type:"boolean",default:!1},size:{type:"enum",className:"kui-r-size",values:M,default:"2",responsive:!0},orientation:{type:"enum",className:"kui-r-orientation",values:O,default:"horizontal",responsive:!0},...R};var h=e.createContext(null),W=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"]),b=e.forwardRef((n,s)=>{let a=v(n,u.size),{className:l,children:t,radius:i,value:m,defaultValue:p,onValueChange:w,style:D,disabled:c,onKeyDown:N,onPointerDown:k,...T}=y(a,u),[f,d]=H({prop:m,onChange:w,defaultProp:p??""}),r=e.useRef(!1),A=e.useMemo(()=>({selectFromKeyboard(o){r.current&&(r.current=!1,d(o))}}),[d]),g=e.useRef(null),V=F(s,g),C=e.Children.toArray(t).filter(e.isValidElement),z=C.length,G=Math.max(0,C.findIndex(o=>o.props.value===f));return j(()=>{let o=g.current;if(!o)return;let P=Array.from(o.querySelectorAll(":scope > .kui-SegmentedControlItem")),L=P.findIndex(E=>E.getAttribute("data-state")==="on");o.style.setProperty("--segmented-control-count",String(P.length||1)),o.style.setProperty("--segmented-control-index",String(Math.max(0,L)))}),e.createElement(h.Provider,{value:A},e.createElement(I.Root,{"data-disabled":c||void 0,"data-radius":i,ref:V,style:{"--segmented-control-count":z||1,"--segmented-control-index":G,...D},className:S("kui-SegmentedControlRoot",l),onValueChange:o=>{o&&d(o)},onKeyDown:o=>{N?.(o),r.current=W.has(o.key)},onPointerDown:o=>{k?.(o),r.current=!1},...T,type:"single",value:f,asChild:!1,disabled:!!c},t,e.createElement("div",{className:"kui-SegmentedControlIndicator"})))});b.displayName="SegmentedControl.Root";var x=e.forwardRef(({children:n,className:s,iconOnly:a,onFocus:l,...t},i)=>{let m=e.useContext(h);return e.createElement(I.Item,{ref:i,className:S("kui-reset","kui-SegmentedControlItem",s),"data-icon-only":a||void 0,onFocus:p=>{l?.(p),m?.selectFromKeyboard(t.value)},...t,asChild:!1},e.createElement("span",{className:"kui-SegmentedControlItemSeparator"}),e.createElement("span",{className:"kui-SegmentedControlItemLabel"},e.createElement("span",{className:"kui-SegmentedControlItemLabelActive"},n),e.createElement("span",{className:"kui-SegmentedControlItemLabelInactive","aria-hidden":!0},n)))});x.displayName="SegmentedControl.Item";export{b as a,x as b,q as c};
|
|
3
|
-
//# sourceMappingURL=chunk-W4Z6ORYO.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as pe}from"./chunk-YCLPURTD.js";import{a as j}from"./chunk-OAJ5DARR.js";import{b as de,c as oe}from"./chunk-OKQAVYW4.js";import{c as fe}from"./chunk-5ON3XLRD.js";import{c as re}from"./chunk-HBWBPBSA.js";import{b as ce}from"./chunk-XU74PNM2.js";import{a as Ce}from"./chunk-VQPANPMI.js";var Le={};Ce(Le,{Root:()=>Re,Slot:()=>Pe});import*as e from"react";import*as be from"react-dom";import se from"classnames";import{composeEventHandlers as U,composeRefs as xe,useLayoutEffect as ke}from"radix-ui/internal";var De=["1","2","3","4"],Ee=["raised","surface","soft","ghost","outline"],ne={size:{type:"enum",className:"kui-r-size",values:De,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Ee,default:"raised"},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...re,...ce},we=["left","right"],me={side:{type:"enum",values:we},...re,gap:pe.gap,px:j.px,pl:j.pl,pr:j.pr};var ye=e.createContext(null),ie="button, a, input, select, textarea, label, [tabindex], [contenteditable]",Re=e.forwardRef((P,v)=>{let{className:s,style:b,...k}=fe(P,ne.size),M=e.useRef(null),{children:L,className:I,color:N,radius:V,style:T,...d}=oe(k,ne),p=!!d.errorMessage,F=e.useId(),[z,C]=e.useState([]),D=e.useCallback(r=>(C(n=>n.includes(r)?n:[...n,r]),()=>C(n=>n.filter(i=>i!==r))),[]),H=e.useMemo(()=>({registerSlot:D}),[D]),{"aria-describedby":g,"aria-labelledby":h,"aria-invalid":S}=d,x=!!d.error||S===!0||S==="true",E=e.useMemo(()=>{let r=[];return d.errorMessage&&r.push(F),g&&r.push(g),r.push(...z),r.length>0?r.join(" "):void 0},[d.errorMessage,g,F,z]),y=e.useMemo(()=>({"aria-invalid":x?!0:S,"aria-describedby":E,"aria-labelledby":h}),[x,S,E,h]),{error:K,errorMessage:ae,required:a,"aria-describedby":O,"aria-labelledby":_,...G}=d,X=e.useCallback(r=>{let n=r.target;if(n.closest(ie))return;let i=M.current;if(!i)return;let f=n.closest(`
|
|
3
|
-
.kui-TextFieldSlot[data-side='right'],
|
|
4
|
-
.kui-TextFieldSlot:not([data-side='right']) ~ .kui-TextFieldSlot:not([data-side='left'])
|
|
5
|
-
`)?i.value.length:0;r.preventDefault(),i.focus();try{i.setSelectionRange(f,f)}catch{}},[]),w=e.createElement("div",{"data-accent-color":N,"data-radius":V,style:p?T:de(T,b),className:se("kui-TextFieldRoot",I,!p&&s,{"kui-error":x}),onMouseDown:X},e.createElement("input",{...G,required:a||void 0,...y,ref:xe(M,v),className:"kui-reset kui-TextFieldInput"}),e.createElement(ye.Provider,{value:H},L));return e.createElement("div",{className:se("kui-TextFieldWrapper",p&&s),style:p?b:void 0,"data-message":p||void 0},w,p?e.createElement("div",{id:F,className:"kui-TextFieldErrorMessage",role:"alert"},d.errorMessage):null)});Re.displayName="TextField.Root";var R=(()=>{if(typeof navigator>"u")return!1;let P=navigator.userAgent,v=/^((?!chrome|android).)*safari/i.test(P),s=/firefox/i.test(P);return v||s})(),Pe=e.forwardRef((P,v)=>{let{scrub:s,scrubValue:b,scrubStep:k=1,scrubSensitivity:M=1,scrubMin:L,scrubMax:I,scrubShiftMultiplier:N=10,scrubAltMultiplier:V=.1,onScrub:T,...d}=P,{className:p,color:F,side:z,onPointerDown:C,onPointerMove:D,onPointerUp:H,onLostPointerCapture:g,...h}=oe(d,me),S=e.useId(),x=h.id??S,E=e.useContext(ye)?.registerSlot,y=e.useRef(null),[K,ae]=e.useState(null);ke(()=>{let t=!!y.current?.querySelector(ie);ae(o=>o===t?o:t)}),e.useEffect(()=>K===!1?E?.(x):void 0,[E,x,K]);let[a,O]=e.useState(!1),[_,G]=e.useState({x:0,y:0}),X=e.useRef(null),w=e.useRef(0),r=e.useRef(!1),n=e.useRef(0),i=e.useRef(0),l=e.useRef(0),f=e.useRef(null),$=e.useRef(0),A=e.useRef({scrubValue:b,scrubStep:k,scrubSensitivity:M,scrubMin:L,scrubMax:I,scrubShiftMultiplier:N,scrubAltMultiplier:V,onScrub:T});A.current={scrubValue:b,scrubStep:k,scrubSensitivity:M,scrubMin:L,scrubMax:I,scrubShiftMultiplier:N,scrubAltMultiplier:V,onScrub:T};let ge=e.useCallback(t=>{if(!s||t.target.closest(ie))return;t.preventDefault(),n.current=0,i.current=b??0,l.current=t.clientX,w.current=t.clientY,G({x:t.clientX,y:t.clientY});let u=y.current;u&&(R?(f.current=t.pointerId,$.current=t.clientX,u.setPointerCapture(t.pointerId),O(!0)):(r.current=!0,u.requestPointerLock()))},[s,b]);e.useEffect(()=>{if(R||!s)return;let t=()=>{if(!r.current)return;let o=document.pointerLockElement===y.current;O(o),o||(r.current=!1,A.current.onScrub?.(0,!1),n.current=0,i.current=0)};return document.addEventListener("pointerlockchange",t),()=>{document.removeEventListener("pointerlockchange",t)}},[s]);let B=e.useCallback((t,o,u,Te)=>{let c=A.current,W=window.innerWidth,Y=window.innerHeight;l.current+=t,l.current>W?l.current=l.current%W:l.current<0&&(l.current=W+l.current%W);let m=w.current+o;m>Y?m=m%Y:m<0&&(m=Y+m%Y),w.current=m;let Z=X.current;Z&&(Z.style.left=`${l.current}px`,Z.style.top=`${m}px`),n.current+=t;let J=n.current/c.scrubSensitivity;if(Math.abs(J)>=1){let Q=1;u?Q=c.scrubShiftMultiplier:Te&&(Q=c.scrubAltMultiplier);let le=Math.trunc(J),ee=le*c.scrubStep*Q,te=ee;if(c.scrubMin!==void 0||c.scrubMax!==void 0){let Fe=i.current+ee,ue=Math.max(c.scrubMin??-1/0,Math.min(c.scrubMax??1/0,Fe));te=ue-i.current,i.current=ue}else i.current+=ee;te!==0&&c.onScrub?.(te,!0),n.current=(J-le)*c.scrubSensitivity}},[]),q=e.useCallback(()=>{A.current.onScrub?.(0,!1),n.current=0,i.current=0,f.current=null,O(!1)},[]),he=e.useCallback(t=>{if(!a||!R)return;let o=t.clientX-$.current;$.current=t.clientX,B(o,t.movementY,t.shiftKey,t.altKey)},[a,B]),Se=e.useCallback(t=>{if(!R||f.current!==t.pointerId)return;let o=y.current;o&&f.current!==null&&o.releasePointerCapture(f.current),q()},[q]),ve=e.useCallback(()=>{R&&a&&q()},[a,q]);e.useEffect(()=>{if(!a||R)return;let t=u=>{B(u.movementX,u.movementY,u.shiftKey,u.altKey)},o=()=>{document.exitPointerLock()};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",o),document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",o),document.body.style.userSelect=""}},[a,B]),e.useEffect(()=>{if(!a||!R)return;let t=document.createElement("style");return t.textContent="* { cursor: none !important; user-select: none !important; }",document.head.appendChild(t),()=>{document.head.removeChild(t)}},[a]);let Me=a?be.createPortal(e.createElement("img",{ref:X,className:"kui-TextFieldSlotScrubCursor",src:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E",alt:"",style:{position:"fixed",left:_.x,top:_.y,transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:99999,width:24,height:24},"aria-hidden":"true"}),document.body):null;return e.createElement("div",{"data-accent-color":F,"data-side":z,"data-scrub":s||void 0,"data-scrubbing":a||void 0,...h,id:x,ref:xe(y,v),className:se("kui-TextFieldSlot",p),onPointerDown:s?U(C,ge):C,onPointerMove:s?U(D,he):D,onPointerUp:s?U(H,Se):H,onLostPointerCapture:s?U(g,ve):g},h.children,Me)});Pe.displayName="TextField.Slot";export{Re as a,Pe as b,Le as c};
|
|
6
|
-
//# sourceMappingURL=chunk-ZOUIIO4C.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/text-field.tsx", "../../src/components/text-field.props.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { composeEventHandlers, composeRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { textFieldRootPropDefs, textFieldSlotPropDefs, type TextFieldSlotScrubProps } from './text-field.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { NotInputTextualAttributes } from '../helpers/input-attributes.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldRootElement = React.ElementRef<'input'>;\ntype TextFieldRootOwnProps = GetPropDefTypes<typeof textFieldRootPropDefs> & {\n defaultValue?: string | number;\n value?: string | number;\n type?: 'date' | 'datetime-local' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';\n};\ntype TextFieldInputProps = ComponentPropsWithout<'input', NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'>;\ninterface TextFieldRootProps extends TextFieldInputProps, TextFieldRootOwnProps {}\n\n// Each Slot registers its id here, so the input can list slot content in aria-describedby.\ntype TextFieldContextValue = { registerSlot: (id: string) => () => void };\nconst TextFieldContext = React.createContext<TextFieldContextValue | null>(null);\n\n// Clicking anything a person could mean to press keeps its own press: the guard is a focusability\n// list, not a tag list. `[tabindex]` catches role-based widgets; `label` already redirects a click.\nconst FOCUSABLE_IN_SLOT = 'button, a, input, select, textarea, label, [tabindex], [contenteditable]';\n\nconst TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>((ownProps, forwardedRef) => {\n // The caller's className and style are kept apart from the size and variant classes: with an\n // error message they go on the wrapper, which is then the one box the parent lays out.\n const { className: ownClassName, style: ownStyle, ...themedProps } = useThemeSizeProps(ownProps, textFieldRootPropDefs.size);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { children, className, color, radius, style, ...inputProps } = extractProps(themedProps, textFieldRootPropDefs);\n const wrapped = Boolean(inputProps.errorMessage);\n\n // Generate unique IDs for accessibility\n const errorId = React.useId();\n\n // Slot content qualifies the value, so it describes the input (as in v2), in mount order.\n const [slotIds, setSlotIds] = React.useState<string[]>([]);\n const registerSlot = React.useCallback((id: string) => {\n setSlotIds((prev) => (prev.includes(id) ? prev : [...prev, id]));\n return () => setSlotIds((prev) => prev.filter((slotId) => slotId !== id));\n }, []);\n const contextValue = React.useMemo(() => ({ registerSlot }), [registerSlot]);\n\n const { 'aria-describedby': ariaDescribedby, 'aria-labelledby': ariaLabelledby, 'aria-invalid': ariaInvalid } = inputProps;\n\n // Invalid when `error` is set or the caller passes aria-invalid; the CSS keys on aria-invalid only.\n const isInvalid = Boolean(inputProps.error) || ariaInvalid === true || ariaInvalid === 'true';\n\n // Build aria-describedby string. The caller's ids stay; ours are appended.\n const describedBy = React.useMemo(() => {\n const parts = [];\n if (inputProps.errorMessage) parts.push(errorId);\n if (ariaDescribedby) parts.push(ariaDescribedby);\n parts.push(...slotIds);\n return parts.length > 0 ? parts.join(' ') : undefined;\n }, [inputProps.errorMessage, ariaDescribedby, errorId, slotIds]);\n\n // Build aria attributes\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n 'aria-describedby': describedBy,\n 'aria-labelledby': ariaLabelledby,\n }),\n [isInvalid, ariaInvalid, describedBy, ariaLabelledby],\n );\n\n // Filter out our custom props to avoid DOM warnings\n const { error, errorMessage, required, 'aria-describedby': _ariaDescribedby, 'aria-labelledby': _ariaLabelledby, ...nativeInputProps } = inputProps;\n\n // Clicking the padding or a passive slot focuses the input. preventDefault stops the browser\n // from moving focus to the root first, so the input is focused once, synchronously.\n const handleMouseDown = React.useCallback((event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n if (target.closest(FOCUSABLE_IN_SLOT)) return;\n\n const input = inputRef.current;\n if (!input) return;\n\n // Same selector as in the CSS to find the right slot\n const isRightSlot = target.closest(`\n .kui-TextFieldSlot[data-side='right'],\n .kui-TextFieldSlot:not([data-side='right']) ~ .kui-TextFieldSlot:not([data-side='left'])\n `);\n\n const cursorPosition = isRightSlot ? input.value.length : 0;\n\n event.preventDefault();\n input.focus();\n // Only some input types support this, browsers will throw an error if not supported\n // See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange#:~:text=Note%20that%20according,not%20support%20selection%22.\n try {\n input.setSelectionRange(cursorPosition, cursorPosition);\n } catch {}\n }, []);\n\n // A pointer-only hit-target redirect to the input; keyboard users reach the input directly.\n const field = (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n data-accent-color={color}\n data-radius={radius}\n style={wrapped ? style : mergeStyles(style, ownStyle)}\n className={classNames('kui-TextFieldRoot', className, !wrapped && ownClassName, {\n // Not used by the library's CSS (invalid styling keys on aria-invalid); kept as a hook for app styles.\n 'kui-error': isInvalid,\n })}\n onMouseDown={handleMouseDown}\n >\n <input {...nativeInputProps} required={required || undefined} {...ariaProps} ref={composeRefs(inputRef, forwardedRef)} className=\"kui-reset kui-TextFieldInput\" />\n <TextFieldContext.Provider value={contextValue}>{children}</TextFieldContext.Provider>\n </div>\n );\n // The wrapper is always there, so a message coming or going never moves the field in the tree:\n // moving it would remount the input, dropping focus, the caret and an uncontrolled value. With\n // no message it is `display: contents` and the field is the box the parent lays out; with one\n // it holds the field and the message below it, and the caller's className and style size the pair.\n return (\n <div className={classNames('kui-TextFieldWrapper', wrapped && ownClassName)} style={wrapped ? ownStyle : undefined} data-message={wrapped || undefined}>\n {field}\n {wrapped ? (\n <div id={errorId} className=\"kui-TextFieldErrorMessage\" role=\"alert\">\n {inputProps.errorMessage}\n </div>\n ) : null}\n </div>\n );\n});\nTextFieldRoot.displayName = 'TextField.Root';\n\ntype TextFieldSlotElement = React.ElementRef<'div'>;\ntype TextFieldSlotOwnProps = GetPropDefTypes<typeof textFieldSlotPropDefs> & TextFieldSlotScrubProps;\ninterface TextFieldSlotProps extends ComponentPropsWithout<'div', RemovedProps>, TextFieldSlotOwnProps {}\n\n// Detect if we should use pointer capture instead of pointer lock\n// Safari and Firefox show intrusive browser warnings with pointer lock\nconst usePointerCapture = (() => {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent;\n const isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n const isFirefox = /firefox/i.test(ua);\n return isSafari || isFirefox;\n})();\n\nconst TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>((props, forwardedRef) => {\n // Extract scrub props first (not part of PropDef system)\n const { scrub, scrubValue, scrubStep = 1, scrubSensitivity = 1, scrubMin, scrubMax, scrubShiftMultiplier = 10, scrubAltMultiplier = 0.1, onScrub, ...restProps } = props;\n\n // Then extract styling props\n const { className, color, side, onPointerDown, onPointerMove, onPointerUp, onLostPointerCapture, ...slotProps } = extractProps(\n restProps,\n textFieldSlotPropDefs,\n );\n\n // A slot of text describes the input (see TextFieldRoot); a caller's own id is kept. A slot\n // holding a control, such as a show-password button, does not: the input would be described\n // by the button's name.\n const generatedId = React.useId();\n const slotId = slotProps.id ?? generatedId;\n const registerSlot = React.useContext(TextFieldContext)?.registerSlot;\n const slotRef = React.useRef<HTMLDivElement>(null);\n // Unknown until the slot has rendered; it registers once it is known to hold only text.\n const [holdsControl, setHoldsControl] = React.useState<boolean | null>(null);\n useLayoutEffect(() => {\n const next = Boolean(slotRef.current?.querySelector(FOCUSABLE_IN_SLOT));\n setHoldsControl((prev) => (prev === next ? prev : next));\n });\n React.useEffect(() => (holdsControl === false ? registerSlot?.(slotId) : undefined), [registerSlot, slotId, holdsControl]);\n\n const [isScrubbing, setIsScrubbing] = React.useState(false);\n // Where the virtual cursor starts. Movement is written straight to the cursor element, so a\n // scrub does not re-render the slot on every mouse move.\n const [cursorStart, setCursorStart] = React.useState({ x: 0, y: 0 });\n const cursorRef = React.useRef<HTMLImageElement>(null);\n // Virtual cursor Y, tracked beside virtualX\n const virtualY = React.useRef(0);\n // Whether this slot asked for the pointer lock, so a lock change elsewhere is not ours\n const lockedByMe = React.useRef(false);\n\n // Track accumulated sub-step movement for precision\n const accumulatedMovement = React.useRef(0);\n // Track current value for clamping (initialized to scrubValue when scrubbing starts)\n const currentValue = React.useRef(0);\n // Track virtual X position for wrap-around (separate from rendered position)\n const virtualX = React.useRef(0);\n // Track pointer ID for capture mode\n const pointerIdRef = React.useRef<number | null>(null);\n // Track last X position for capture mode (movementX calculation)\n const lastXRef = React.useRef(0);\n\n // Store scrub config in refs so document handlers can access latest values\n const scrubConfigRef = React.useRef({\n scrubValue,\n scrubStep,\n scrubSensitivity,\n scrubMin,\n scrubMax,\n scrubShiftMultiplier,\n scrubAltMultiplier,\n onScrub,\n });\n scrubConfigRef.current = {\n scrubValue,\n scrubStep,\n scrubSensitivity,\n scrubMin,\n scrubMax,\n scrubShiftMultiplier,\n scrubAltMultiplier,\n onScrub,\n };\n\n const handlePointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (!scrub) return;\n\n // Don't start scrubbing if clicking on interactive elements\n const target = event.target as HTMLElement;\n if (target.closest(FOCUSABLE_IN_SLOT)) return;\n\n event.preventDefault();\n accumulatedMovement.current = 0;\n // Initialize to current value so min/max clamping works correctly\n currentValue.current = scrubValue ?? 0;\n\n // Initialize virtual cursor at actual mouse position\n virtualX.current = event.clientX;\n virtualY.current = event.clientY;\n setCursorStart({ x: event.clientX, y: event.clientY });\n\n const slot = slotRef.current;\n if (!slot) return;\n\n if (usePointerCapture) {\n // Safari/Firefox: Use pointer capture (no browser warning)\n pointerIdRef.current = event.pointerId;\n lastXRef.current = event.clientX;\n slot.setPointerCapture(event.pointerId);\n setIsScrubbing(true);\n } else {\n // Chrome: Use pointer lock for infinite movement\n lockedByMe.current = true;\n slot.requestPointerLock();\n }\n },\n [scrub, scrubValue],\n );\n\n // Handle pointer lock state changes (Chrome only). Only a scrub slot listens, and only a lock\n // this slot asked for starts or ends its scrub.\n React.useEffect(() => {\n if (usePointerCapture || !scrub) return;\n\n const handlePointerLockChange = () => {\n if (!lockedByMe.current) return;\n const isLocked = document.pointerLockElement === slotRef.current;\n setIsScrubbing(isLocked);\n if (!isLocked) {\n lockedByMe.current = false;\n // Fire callback with isChanging = false when scrubbing ends\n scrubConfigRef.current.onScrub?.(0, false);\n accumulatedMovement.current = 0;\n currentValue.current = 0;\n }\n };\n\n document.addEventListener('pointerlockchange', handlePointerLockChange);\n return () => {\n document.removeEventListener('pointerlockchange', handlePointerLockChange);\n };\n }, [scrub]);\n\n // Shared scrub calculation logic\n const processScrubMovement = React.useCallback((movementX: number, movementY: number, shiftKey: boolean, altKey: boolean) => {\n const config = scrubConfigRef.current;\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n // Update virtual position with wrap-around at viewport edges\n virtualX.current += movementX;\n if (virtualX.current > viewportWidth) {\n virtualX.current = virtualX.current % viewportWidth;\n } else if (virtualX.current < 0) {\n virtualX.current = viewportWidth + (virtualX.current % viewportWidth);\n }\n\n // Also track Y with wrap-around\n let newY = virtualY.current + movementY;\n if (newY > viewportHeight) {\n newY = newY % viewportHeight;\n } else if (newY < 0) {\n newY = viewportHeight + (newY % viewportHeight);\n }\n virtualY.current = newY;\n\n const cursor = cursorRef.current;\n if (cursor) {\n cursor.style.left = `${virtualX.current}px`;\n cursor.style.top = `${newY}px`;\n }\n\n // Accumulate movement for sensitivity calculation\n accumulatedMovement.current += movementX;\n\n // Calculate how many steps we've moved\n const stepsFromMovement = accumulatedMovement.current / config.scrubSensitivity;\n\n if (Math.abs(stepsFromMovement) >= 1) {\n // Determine modifier multiplier\n let multiplier = 1;\n if (shiftKey) {\n multiplier = config.scrubShiftMultiplier;\n } else if (altKey) {\n multiplier = config.scrubAltMultiplier;\n }\n\n // Calculate delta\n const wholeSteps = Math.trunc(stepsFromMovement);\n const delta = wholeSteps * config.scrubStep * multiplier;\n\n // Apply min/max clamping if bounds are set\n let clampedDelta = delta;\n if (config.scrubMin !== undefined || config.scrubMax !== undefined) {\n const newValue = currentValue.current + delta;\n const clampedValue = Math.max(config.scrubMin ?? -Infinity, Math.min(config.scrubMax ?? Infinity, newValue));\n clampedDelta = clampedValue - currentValue.current;\n currentValue.current = clampedValue;\n } else {\n currentValue.current += delta;\n }\n\n // Fire callback with clamped delta (isChanging = true during drag)\n if (clampedDelta !== 0) {\n config.onScrub?.(clampedDelta, true);\n }\n\n // Keep the fractional remainder for smooth sub-pixel accumulation\n accumulatedMovement.current = (stepsFromMovement - wholeSteps) * config.scrubSensitivity;\n }\n }, []);\n\n // End scrubbing helper\n const endScrubbing = React.useCallback(() => {\n scrubConfigRef.current.onScrub?.(0, false);\n accumulatedMovement.current = 0;\n currentValue.current = 0;\n pointerIdRef.current = null;\n setIsScrubbing(false);\n }, []);\n\n // Handle pointer capture mode events (Safari/Firefox)\n const handlePointerMove = React.useCallback(\n (event: React.PointerEvent) => {\n if (!isScrubbing || !usePointerCapture) return;\n\n const movementX = event.clientX - lastXRef.current;\n lastXRef.current = event.clientX;\n\n processScrubMovement(movementX, event.movementY, event.shiftKey, event.altKey);\n },\n [isScrubbing, processScrubMovement],\n );\n\n const handlePointerUp = React.useCallback(\n (event: React.PointerEvent) => {\n if (!usePointerCapture || pointerIdRef.current !== event.pointerId) return;\n\n const slot = slotRef.current;\n if (slot && pointerIdRef.current !== null) {\n slot.releasePointerCapture(pointerIdRef.current);\n }\n endScrubbing();\n },\n [endScrubbing],\n );\n\n const handleLostPointerCapture = React.useCallback(() => {\n if (usePointerCapture && isScrubbing) {\n endScrubbing();\n }\n }, [isScrubbing, endScrubbing]);\n\n // Attach document-level listeners for pointer lock mode (Chrome)\n React.useEffect(() => {\n if (!isScrubbing || usePointerCapture) return;\n\n const handleMouseMove = (event: MouseEvent) => {\n processScrubMovement(event.movementX, event.movementY, event.shiftKey, event.altKey);\n };\n\n const handleMouseUp = () => {\n // Exit pointer lock to end scrubbing\n document.exitPointerLock();\n };\n\n // Use mousemove for pointer lock (pointermove doesn't work well with pointer lock)\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n\n // Disable text selection during scrubbing\n document.body.style.userSelect = 'none';\n\n return () => {\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n document.body.style.userSelect = '';\n };\n }, [isScrubbing, processScrubMovement]);\n\n // Hide native cursor and disable text selection during pointer capture scrubbing\n React.useEffect(() => {\n if (!isScrubbing || !usePointerCapture) return;\n\n // Create a style element to hide cursor globally during scrub\n const style = document.createElement('style');\n style.textContent = '* { cursor: none !important; user-select: none !important; }';\n document.head.appendChild(style);\n\n return () => {\n document.head.removeChild(style);\n };\n }, [isScrubbing]);\n\n // Render virtual cursor via portal to body so it's not clipped\n // Using a data URI of ew-resize cursor for a native look\n const virtualCursor = isScrubbing\n ? ReactDOM.createPortal(\n <img\n ref={cursorRef}\n className=\"kui-TextFieldSlotScrubCursor\"\n src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E\"\n alt=\"\"\n style={{\n position: 'fixed',\n left: cursorStart.x,\n top: cursorStart.y,\n transform: 'translate(-50%, -50%)',\n pointerEvents: 'none',\n zIndex: 99999,\n width: 24,\n height: 24,\n }}\n aria-hidden=\"true\"\n />,\n document.body,\n )\n : null;\n\n return (\n <div\n data-accent-color={color}\n data-side={side}\n data-scrub={scrub || undefined}\n data-scrubbing={isScrubbing || undefined}\n {...slotProps}\n id={slotId}\n ref={composeRefs(slotRef, forwardedRef)}\n className={classNames('kui-TextFieldSlot', className)}\n // The caller's handlers run first; the scrub handlers only when `scrub` is set.\n onPointerDown={scrub ? composeEventHandlers(onPointerDown, handlePointerDown) : onPointerDown}\n onPointerMove={scrub ? composeEventHandlers(onPointerMove, handlePointerMove) : onPointerMove}\n onPointerUp={scrub ? composeEventHandlers(onPointerUp, handlePointerUp) : onPointerUp}\n onLostPointerCapture={scrub ? composeEventHandlers(onLostPointerCapture, handleLostPointerCapture) : onLostPointerCapture}\n >\n {slotProps.children}\n {virtualCursor}\n </div>\n );\n});\nTextFieldSlot.displayName = 'TextField.Slot';\n\nexport { TextFieldRoot as Root, TextFieldSlot as Slot };\nexport type { TextFieldRootProps as RootProps, TextFieldSlotProps as SlotProps };\n", "import { colorPropDef } from '../props/color.prop.js';\nimport { paddingPropDefs } from '../props/padding.props.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'surface', 'soft', 'ghost', 'outline'] as const;\n\nconst textFieldRootPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n // Error and validation props\n error: { type: 'boolean', default: false },\n errorMessage: { type: 'string', default: undefined },\n required: { type: 'boolean', default: false },\n // Accessibility props\n 'aria-describedby': { type: 'string', default: undefined },\n 'aria-labelledby': { type: 'string', default: undefined },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n error: PropDef<boolean>;\n errorMessage: PropDef<string | undefined>;\n required: PropDef<boolean>;\n 'aria-describedby': PropDef<string | undefined>;\n 'aria-labelledby': PropDef<string | undefined>;\n};\n\nconst sides = ['left', 'right'] as const;\n\nconst textFieldSlotPropDefs = {\n side: { type: 'enum', values: sides },\n ...colorPropDef,\n gap: flexPropDefs.gap,\n px: paddingPropDefs.px,\n pl: paddingPropDefs.pl,\n pr: paddingPropDefs.pr,\n} satisfies {\n side: PropDef<(typeof sides)[number]>;\n gap: typeof flexPropDefs.gap;\n px: typeof paddingPropDefs.px;\n pl: typeof paddingPropDefs.pl;\n pr: typeof paddingPropDefs.pr;\n};\n\n/** Scrubbing props for TextField.Slot - handled separately from PropDef system */\ninterface TextFieldSlotScrubProps {\n /** Enable scrubbing behavior on this slot */\n scrub?: boolean;\n /** Current value (required for min/max clamping to work correctly) */\n scrubValue?: number;\n /** Base value change per movement unit (default: 1) */\n scrubStep?: number;\n /** Pixels of movement per step - higher = less sensitive (default: 1) */\n scrubSensitivity?: number;\n /** Minimum allowed value */\n scrubMin?: number;\n /** Maximum allowed value */\n scrubMax?: number;\n /** Step multiplier when Shift is held (default: 10) */\n scrubShiftMultiplier?: number;\n /** Step multiplier when Alt/Option is held (default: 0.1) */\n scrubAltMultiplier?: number;\n /**\n * Callback fired during scrubbing with the value delta\n * @param delta - The change in value\n * @param isChanging - true while dragging, false when released\n */\n onScrub?: (delta: number, isChanging: boolean) => void;\n}\n\nexport type { TextFieldSlotScrubProps };\n\nexport { textFieldRootPropDefs, textFieldSlotPropDefs };\n"],
|
|
5
|
-
"mappings": ";sSAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,UAAAE,GAAA,SAAAC,KAEA,UAAYC,MAAW,QACvB,UAAYC,OAAc,YAC1B,OAAOC,OAAgB,aACvB,OAAS,wBAAAC,EAAsB,eAAAC,GAAa,mBAAAC,OAAuB,oBCEnE,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,GAAW,CAAC,SAAU,UAAW,OAAQ,QAAS,SAAS,EAE3DC,GAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQF,GAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,GAAU,QAAS,QAAS,EAEvF,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,EACzC,aAAc,CAAE,KAAM,SAAU,QAAS,MAAU,EACnD,SAAU,CAAE,KAAM,UAAW,QAAS,EAAM,EAE5C,mBAAoB,CAAE,KAAM,SAAU,QAAS,MAAU,EACzD,kBAAmB,CAAE,KAAM,SAAU,QAAS,MAAU,EACxD,GAAGE,GACH,GAAGC,EACL,EAUMC,GAAQ,CAAC,OAAQ,OAAO,EAExBC,GAAwB,CAC5B,KAAM,CAAE,KAAM,OAAQ,OAAQD,EAAM,EACpC,GAAGF,GACH,IAAKI,GAAa,IAClB,GAAIC,EAAgB,GACpB,GAAIA,EAAgB,GACpB,GAAIA,EAAgB,EACtB,EDdA,IAAMC,GAAyB,gBAA4C,IAAI,EAIz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KAAK,YAAYA,CAAK,EAExB,IAAM,CACX,SAAS,KAAK,YAAYA,CAAK,CACjC,CACF,EAAG,CAAC+D,CAAW,CAAC,EAIhB,IAAMwC,GAAgBxC,EACT,gBACP,gBAAC,OACC,IAAKI,EACL,UAAU,+BACV,IAAI,oPACJ,IAAI,GACJ,MAAO,CACL,SAAU,QACV,KAAMF,EAAY,EAClB,IAAKA,EAAY,EACjB,UAAW,wBACX,cAAe,OACf,OAAQ,MACR,MAAO,GACP,OAAQ,EACV,EACA,cAAY,OACd,EACA,SAAS,IACX,EACA,KAEJ,OACE,gBAAC,OACC,oBAAmBnE,EACnB,YAAWoD,EACX,aAAYV,GAAS,OACrB,iBAAgBuB,GAAe,OAC9B,GAAGR,EACJ,GAAI7C,EACJ,IAAKuB,GAAYyB,EAASrE,CAAY,EACtC,UAAW2C,GAAW,oBAAqBnC,CAAS,EAEpD,cAAe2C,EAAQgE,EAAqBrD,EAAeyB,EAAiB,EAAIzB,EAChF,cAAeX,EAAQgE,EAAqBpD,EAAe8C,EAAiB,EAAI9C,EAChF,YAAaZ,EAAQgE,EAAqBnD,EAAa8C,EAAe,EAAI9C,EAC1E,qBAAsBb,EAAQgE,EAAqBlD,EAAsB8C,EAAwB,EAAI9C,GAEpGC,EAAU,SACVgD,EACH,CAEJ,CAAC,EACDjE,GAAc,YAAc",
|
|
6
|
-
"names": ["text_field_exports", "__export", "TextFieldRoot", "TextFieldSlot", "React", "ReactDOM", "classNames", "composeEventHandlers", "composeRefs", "useLayoutEffect", "sizes", "variants", "textFieldRootPropDefs", "colorPropDef", "radiusPropDef", "sides", "textFieldSlotPropDefs", "flexPropDefs", "paddingPropDefs", "TextFieldContext", "FOCUSABLE_IN_SLOT", "TextFieldRoot", "ownProps", "forwardedRef", "ownClassName", "ownStyle", "themedProps", "useThemeSizeProps", "textFieldRootPropDefs", "inputRef", "children", "className", "color", "radius", "style", "inputProps", "extractProps", "wrapped", "errorId", "slotIds", "setSlotIds", "registerSlot", "id", "prev", "slotId", "contextValue", "ariaDescribedby", "ariaLabelledby", "ariaInvalid", "isInvalid", "describedBy", "parts", "ariaProps", "error", "errorMessage", "required", "_ariaDescribedby", "_ariaLabelledby", "nativeInputProps", "handleMouseDown", "event", "target", "input", "cursorPosition", "field", "mergeStyles", "classNames", "composeRefs", "usePointerCapture", "ua", "isSafari", "isFirefox", "TextFieldSlot", "props", "scrub", "scrubValue", "scrubStep", "scrubSensitivity", "scrubMin", "scrubMax", "scrubShiftMultiplier", "scrubAltMultiplier", "onScrub", "restProps", "side", "onPointerDown", "onPointerMove", "onPointerUp", "onLostPointerCapture", "slotProps", "textFieldSlotPropDefs", "generatedId", "slotRef", "holdsControl", "setHoldsControl", "useLayoutEffect", "next", "isScrubbing", "setIsScrubbing", "cursorStart", "setCursorStart", "cursorRef", "virtualY", "lockedByMe", "accumulatedMovement", "currentValue", "virtualX", "pointerIdRef", "lastXRef", "scrubConfigRef", "handlePointerDown", "slot", "handlePointerLockChange", "isLocked", "processScrubMovement", "movementX", "movementY", "shiftKey", "altKey", "config", "viewportWidth", "viewportHeight", "newY", "cursor", "stepsFromMovement", "multiplier", "wholeSteps", "delta", "clampedDelta", "newValue", "clampedValue", "endScrubbing", "handlePointerMove", "handlePointerUp", "handleLostPointerCapture", "handleMouseMove", "handleMouseUp", "virtualCursor", "composeEventHandlers"]
|
|
7
|
-
}
|