aplance-ui 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +29 -0
  3. package/dist/api.d.ts +175 -0
  4. package/dist/api.js +1954 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/frameworks/astro/astro.config.snippet.md +23 -0
  7. package/dist/frameworks/astro/postcss.config.mjs.template +20 -0
  8. package/dist/frameworks/astro/vite-inline.snippet.md +22 -0
  9. package/dist/frameworks/electron-vite/vite.config.snippet.md +44 -0
  10. package/dist/frameworks/next/layout-import.snippet.md +19 -0
  11. package/dist/frameworks/next/next.config.snippet.md +15 -0
  12. package/dist/frameworks/next/postcss.config.js.template +16 -0
  13. package/dist/frameworks/tanstack-start/postcss.config.ts.template +17 -0
  14. package/dist/frameworks/tanstack-start/vite-inline.snippet.md +22 -0
  15. package/dist/frameworks/vite-react/postcss.config.ts.template +16 -0
  16. package/dist/frameworks/vite-react/vite-inline.snippet.md +20 -0
  17. package/dist/frameworks/vite-react/vite.config.ts.template +48 -0
  18. package/dist/index.js +2047 -0
  19. package/dist/index.js.map +1 -0
  20. package/package.json +63 -0
  21. package/registry/components/primitives/icon/icon.module.css +63 -0
  22. package/registry/components/primitives/icon/icon.tsx +53 -0
  23. package/registry/components/primitives/modal/modal-context.ts +19 -0
  24. package/registry/components/primitives/modal/modal.module.css +415 -0
  25. package/registry/components/primitives/modal/modal.tsx +550 -0
  26. package/registry/components/primitives/popover/popover-context.ts +28 -0
  27. package/registry/components/primitives/popover/popover.module.css +28 -0
  28. package/registry/components/primitives/popover/popover.tsx +465 -0
  29. package/registry/components/ui/accordion/accordion.module.css +208 -0
  30. package/registry/components/ui/accordion/accordion.tsx +327 -0
  31. package/registry/components/ui/avatar/avatar.module.css +32 -0
  32. package/registry/components/ui/avatar/avatar.tsx +37 -0
  33. package/registry/components/ui/badge/badge.module.css +103 -0
  34. package/registry/components/ui/badge/badge.tsx +29 -0
  35. package/registry/components/ui/button/button.module.css +216 -0
  36. package/registry/components/ui/button/button.tsx +133 -0
  37. package/registry/components/ui/chart/chart.module.css +168 -0
  38. package/registry/components/ui/chart/chart.tsx +1293 -0
  39. package/registry/components/ui/chart/types.ts +210 -0
  40. package/registry/components/ui/chart/utils.ts +59 -0
  41. package/registry/components/ui/copy-button/copy-button.module.css +21 -0
  42. package/registry/components/ui/copy-button/copy-button.tsx +123 -0
  43. package/registry/components/ui/countdown/countdown.module.css +5 -0
  44. package/registry/components/ui/countdown/countdown.tsx +152 -0
  45. package/registry/components/ui/data-table/checkbox-column.tsx +59 -0
  46. package/registry/components/ui/data-table/data-table.module.css +594 -0
  47. package/registry/components/ui/data-table/data-table.tsx +1109 -0
  48. package/registry/components/ui/data-table/filter-bar.tsx +33 -0
  49. package/registry/components/ui/data-table/pagination-bar.tsx +125 -0
  50. package/registry/components/ui/data-table/types.ts +594 -0
  51. package/registry/components/ui/data-table/useDataTable.tsx +573 -0
  52. package/registry/components/ui/data-table/utils.ts +445 -0
  53. package/registry/components/ui/empty-state/empty-state.module.css +26 -0
  54. package/registry/components/ui/empty-state/empty-state.tsx +32 -0
  55. package/registry/components/ui/input-fields/color-picker/color-palette.module.css +102 -0
  56. package/registry/components/ui/input-fields/color-picker/color-palette.tsx +92 -0
  57. package/registry/components/ui/input-fields/color-picker/color-picker.module.css +29 -0
  58. package/registry/components/ui/input-fields/color-picker/color-picker.tsx +168 -0
  59. package/registry/components/ui/input-fields/common/field-message/field-message.module.css +28 -0
  60. package/registry/components/ui/input-fields/common/field-message/field-message.tsx +39 -0
  61. package/registry/components/ui/input-fields/common/input-field-common.module.css +318 -0
  62. package/registry/components/ui/input-fields/common/input-field-native.module.css +267 -0
  63. package/registry/components/ui/input-fields/common/picker-popover-common.module.css +40 -0
  64. package/registry/components/ui/input-fields/common/select-button/select-button.module.css +9 -0
  65. package/registry/components/ui/input-fields/common/select-button/select-button.tsx +171 -0
  66. package/registry/components/ui/input-fields/common/types.ts +38 -0
  67. package/registry/components/ui/input-fields/custom-select/custom-select.module.css +56 -0
  68. package/registry/components/ui/input-fields/custom-select/custom-select.tsx +403 -0
  69. package/registry/components/ui/input-fields/date-picker/calendar.module.css +311 -0
  70. package/registry/components/ui/input-fields/date-picker/calendar.tsx +186 -0
  71. package/registry/components/ui/input-fields/date-picker/date-picker.module.css +57 -0
  72. package/registry/components/ui/input-fields/date-picker/date-picker.tsx +945 -0
  73. package/registry/components/ui/input-fields/date-picker/types.ts +102 -0
  74. package/registry/components/ui/input-fields/date-picker/utils.ts +236 -0
  75. package/registry/components/ui/input-fields/emoji-picker/emoji-palette.module.css +90 -0
  76. package/registry/components/ui/input-fields/emoji-picker/emoji-palette.tsx +168 -0
  77. package/registry/components/ui/input-fields/emoji-picker/emoji-picker.module.css +8 -0
  78. package/registry/components/ui/input-fields/emoji-picker/emoji-picker.tsx +102 -0
  79. package/registry/components/ui/input-fields/emoji-picker/utils.ts +505 -0
  80. package/registry/components/ui/input-fields/field-group/field-group.module.css +86 -0
  81. package/registry/components/ui/input-fields/field-group/field-group.tsx +86 -0
  82. package/registry/components/ui/input-fields/input/input.tsx +319 -0
  83. package/registry/components/ui/input-fields/media-input/kind-icons.tsx +62 -0
  84. package/registry/components/ui/input-fields/media-input/media-input.module.css +294 -0
  85. package/registry/components/ui/input-fields/media-input/media-input.tsx +327 -0
  86. package/registry/components/ui/input-fields/media-input/media-preview.tsx +101 -0
  87. package/registry/components/ui/input-fields/media-input/types.ts +129 -0
  88. package/registry/components/ui/input-fields/media-input/useMediaUpload.tsx +302 -0
  89. package/registry/components/ui/input-fields/media-input/utils.ts +325 -0
  90. package/registry/components/ui/input-fields/otp-input/otp-input.module.css +24 -0
  91. package/registry/components/ui/input-fields/otp-input/otp-input.tsx +291 -0
  92. package/registry/components/ui/input-fields/select/select.tsx +118 -0
  93. package/registry/components/ui/input-fields/switch/switch.module.css +70 -0
  94. package/registry/components/ui/input-fields/switch/switch.tsx +59 -0
  95. package/registry/components/ui/input-fields/textarea/textarea.tsx +133 -0
  96. package/registry/components/ui/input-fields/time-picker/time-picker.module.css +57 -0
  97. package/registry/components/ui/input-fields/time-picker/time-picker.tsx +437 -0
  98. package/registry/components/ui/loader/loader.module.css +156 -0
  99. package/registry/components/ui/loader/loader.tsx +102 -0
  100. package/registry/components/ui/stepper/stepper.module.css +294 -0
  101. package/registry/components/ui/stepper/stepper.tsx +197 -0
  102. package/registry/components/ui/tabs/tabs.module.css +150 -0
  103. package/registry/components/ui/tabs/tabs.tsx +134 -0
  104. package/registry/components/ui/toast/toast.module.css +159 -0
  105. package/registry/components/ui/toast/toast.tsx +104 -0
  106. package/registry/components/ui/tooltip/tooltip.module.css +82 -0
  107. package/registry/components/ui/tooltip/tooltip.tsx +72 -0
  108. package/registry/global.d.ts +4 -0
  109. package/registry/hooks/useFocusOutside.tsx +33 -0
  110. package/registry/hooks/useResizeObserver.tsx +32 -0
  111. package/registry/lib/dom.ts +25 -0
  112. package/registry/lib/string.ts +23 -0
  113. package/registry/registry.json +719 -0
  114. package/registry/styles/app.css +240 -0
  115. package/registry/styles/components.css +78 -0
  116. package/registry/styles/fonts/geist-regular.woff2 +0 -0
  117. package/registry/styles/globals.css +7 -0
  118. package/registry/styles/media.css +25 -0
  119. package/registry/styles/utilities.css +90 -0
  120. package/registry/themes/colors/blue.css +37 -0
  121. package/registry/themes/colors/green.css +37 -0
  122. package/registry/themes/colors/rose.css +37 -0
  123. package/registry/themes/colors/slate.css +37 -0
  124. package/registry/themes/colors/stone.css +37 -0
  125. package/registry/themes/colors/violet.css +37 -0
  126. package/registry/themes/colors/zinc.css +37 -0
  127. package/registry/themes/radius/pill.css +8 -0
  128. package/registry/themes/radius/rounded.css +8 -0
  129. package/registry/themes/radius/sharp.css +8 -0
  130. package/registry/themes/spacing/compact.css +17 -0
  131. package/registry/themes/spacing/spacious.css +17 -0
  132. package/registry/tsconfig.json +25 -0
@@ -0,0 +1,29 @@
1
+ /* Color Picker - input-field wrapper around ColorPalette.
2
+ Palette internals live in color-palette.module.css; this module only styles
3
+ the trigger swatch (sized to fit the family's icon column so the
4
+ data-start-actions padding produces a visible label gap). */
5
+
6
+ .menu {
7
+ --picker-popover-menu-width: 17rem;
8
+ padding: 0;
9
+ }
10
+
11
+ /* Trigger swatch - width/height match --action-icon (--spacing-8) so the
12
+ reserved icon column fits exactly, leaving the family's clearance padding
13
+ intact between swatch and label. */
14
+ .swatch {
15
+ display: inline-block;
16
+ width: var(--spacing-8);
17
+ height: var(--spacing-8);
18
+ border-radius: var(--radius-sm);
19
+ border: 1px solid var(--color-border);
20
+ flex-shrink: 0;
21
+
22
+ &[data-empty] {
23
+ background: linear-gradient(
24
+ 45deg,
25
+ var(--color-muted) 0 50%,
26
+ transparent 50% 100%
27
+ );
28
+ }
29
+ }
@@ -0,0 +1,168 @@
1
+ import { useId, useState, type CSSProperties } from "react";
2
+ import clsx from "clsx";
3
+ import {
4
+ Popover,
5
+ PopoverMenu,
6
+ PopoverTrigger,
7
+ } from "../../../primitives/popover/popover";
8
+ import { SelectButton } from "../common/select-button/select-button";
9
+ import { ColorPalette } from "./color-palette";
10
+ import sCommon from "../common/input-field-common.module.css";
11
+ import sPickerCommon from "../common/picker-popover-common.module.css";
12
+ import s from "./color-picker.module.css";
13
+ import { FieldMessage } from "../common/field-message/field-message";
14
+ import type { BaseInputFieldProps } from "../common/types";
15
+ import type {
16
+ Position,
17
+ Align,
18
+ } from "../../../primitives/popover/popover";
19
+ import type { ButtonSize, ButtonVariant } from "../../button/button";
20
+
21
+ const HEX_RE = /^#[0-9a-fA-F]{6}$/;
22
+ const isHex = (s: string) => HEX_RE.test(s);
23
+
24
+ export type ColorPickerProps = Omit<
25
+ BaseInputFieldProps,
26
+ "iconStart" | "iconEnd"
27
+ > & {
28
+ /** Selected color as hex (controlled). Empty string = unset. */
29
+ value?: string;
30
+ /** Initial color (uncontrolled). */
31
+ defaultValue?: string;
32
+ /** Fires with the new hex value (`#rrggbb`) whenever it changes. */
33
+ onChange?: (color: string) => void;
34
+ /** Optional swatches displayed below the picker. Pass `[]` to hide. */
35
+ swatches?: readonly string[];
36
+ /** Placeholder shown when no color is picked. */
37
+ placeholder?: string;
38
+ /** SelectButton passthroughs. */
39
+ buttonVariant?: ButtonVariant | "none";
40
+ buttonSize?: ButtonSize;
41
+ /** Popover placement. */
42
+ popoverPosition?: Position;
43
+ popoverAlign?: Align;
44
+ /** Show clear affordance on the trigger when a value is set. */
45
+ showClear?: boolean;
46
+ popoverClassName?: string;
47
+ popoverStyle?: CSSProperties;
48
+ };
49
+
50
+ export const ColorPicker = ({
51
+ value,
52
+ defaultValue,
53
+ onChange,
54
+ label,
55
+ errors,
56
+ info,
57
+ disabled,
58
+ readOnly,
59
+ required,
60
+ id,
61
+ className,
62
+ style,
63
+ layout = "default",
64
+ layoutDirection = "default",
65
+ buttonStyle,
66
+ swatches,
67
+ placeholder = "Pick a color",
68
+ buttonVariant,
69
+ buttonSize,
70
+ popoverPosition = "bottom",
71
+ popoverAlign = "start",
72
+ showClear = true,
73
+ popoverClassName,
74
+ popoverStyle,
75
+ }: ColorPickerProps) => {
76
+ const isControlled = value !== undefined;
77
+ const [internal, setInternal] = useState(defaultValue ?? "");
78
+ const [isOpen, setIsOpen] = useState(false);
79
+
80
+ const current = isControlled ? value : internal;
81
+ const generatedId = useId();
82
+ const inputId = id ?? generatedId;
83
+ const hasValue = !!current && isHex(current);
84
+ const resolvedButtonVariant = buttonVariant ?? buttonStyle ?? "bordered";
85
+
86
+ const commit = (next: string) => {
87
+ if (!isControlled) setInternal(next);
88
+ onChange?.(next);
89
+ };
90
+
91
+ return (
92
+ <div className={clsx(sCommon.container, className)} style={style}>
93
+ {label && (
94
+ <div
95
+ className={clsx(
96
+ sCommon.field_container,
97
+ layout !== "default" && sCommon[layout],
98
+ layout !== "default" &&
99
+ layoutDirection !== "default" &&
100
+ sCommon[layoutDirection],
101
+ )}
102
+ >
103
+ <label className={sCommon.label} htmlFor={inputId}>
104
+ {label}
105
+ </label>
106
+ </div>
107
+ )}
108
+
109
+ <Popover
110
+ position={popoverPosition}
111
+ align={popoverAlign}
112
+ isOpen={isOpen}
113
+ setIsOpen={setIsOpen}
114
+ className={clsx(sPickerCommon.picker_popover, popoverClassName)}
115
+ closeOnClickOutside
116
+ >
117
+ <PopoverTrigger
118
+ asChild
119
+ className={sPickerCommon.picker_popover_trigger}
120
+ disabled={disabled || readOnly}
121
+ >
122
+ <SelectButton
123
+ id={inputId}
124
+ disabled={disabled || readOnly}
125
+ required={required}
126
+ buttonVariant={resolvedButtonVariant}
127
+ buttonSize={buttonSize}
128
+ showChevron={false}
129
+ showClear={hasValue && showClear && !disabled && !readOnly}
130
+ onClear={(e) => {
131
+ e.stopPropagation();
132
+ e.preventDefault();
133
+ commit("");
134
+ }}
135
+ iconStart={
136
+ <span
137
+ className={s.swatch}
138
+ style={{
139
+ backgroundColor: hasValue ? current : "transparent",
140
+ }}
141
+ data-empty={!hasValue || undefined}
142
+ aria-hidden="true"
143
+ />
144
+ }
145
+ className={clsx(!hasValue && sPickerCommon.picker_value_placeholder)}
146
+ >
147
+ {hasValue ? current?.toUpperCase() : placeholder}
148
+ </SelectButton>
149
+ </PopoverTrigger>
150
+
151
+ {!disabled && !readOnly && (
152
+ <PopoverMenu
153
+ className={clsx(sPickerCommon.picker_popover_menu_base, s.menu)}
154
+ style={popoverStyle}
155
+ >
156
+ <ColorPalette
157
+ value={hasValue ? current : ""}
158
+ onChange={commit}
159
+ swatches={swatches}
160
+ />
161
+ </PopoverMenu>
162
+ )}
163
+ </Popover>
164
+
165
+ <FieldMessage errors={errors} info={info} />
166
+ </div>
167
+ );
168
+ };
@@ -0,0 +1,28 @@
1
+ .container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--spacing-1);
5
+ /* margin-inline: var(--spacing-2); */
6
+
7
+ .wrapper {
8
+ width: 100%;
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ gap: var(--spacing-2) var(--spacing-4);
12
+ padding: var(--spacing-1) 0;
13
+ /* border: 1px solid var(--color-border);
14
+ border-radius: var(--radius-xl); */
15
+
16
+ > .info {
17
+ font-size: var(--font-size-xs);
18
+ color: var(--color-muted-foreground);
19
+ font-family: var(--font-family-1);
20
+ }
21
+
22
+ > .error {
23
+ font-size: var(--font-size-xs);
24
+ color: var(--color-error-foreground);
25
+ font-family: var(--font-family-1);
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import s from "./field-message.module.css";
3
+ import clsx from "clsx";
4
+
5
+ export type FieldMessageProps = {
6
+ info?: readonly string[];
7
+ errors?: readonly string[];
8
+ };
9
+
10
+ export const FieldMessage: React.FC<FieldMessageProps> = ({ info, errors }) => {
11
+ const hasInfo = Array.isArray(info) && info.length > 0;
12
+ const hasErrors = Array.isArray(errors) && errors.length > 0;
13
+
14
+ if (!hasInfo && !hasErrors) return null;
15
+
16
+ return (
17
+ <div className={s.container}>
18
+ {!hasErrors && hasInfo && (
19
+ <div className={clsx(s.wrapper, s.info_wrapper)}>
20
+ {info!.map((inf, idx) => (
21
+ <small key={idx} className={s.info}>
22
+ {inf}
23
+ </small>
24
+ ))}
25
+ </div>
26
+ )}
27
+
28
+ {hasErrors && (
29
+ <div className={s.wrapper}>
30
+ {errors!.map((err, idx) => (
31
+ <small key={idx} className={s.error}>
32
+ {err}
33
+ </small>
34
+ ))}
35
+ </div>
36
+ )}
37
+ </div>
38
+ );
39
+ };
@@ -0,0 +1,318 @@
1
+ /* This file contains basic / common heirarchy for all input fields */
2
+
3
+ /* contains form field (with label) and field message (errors info etc.) */
4
+ .container {
5
+ width: 100%;
6
+ min-width: fit-content;
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: var(--spacing-2);
10
+
11
+ /* When .field_container has the centered layout, propagate horizontal
12
+ centering to the outer container so the FieldMessage block centers too.
13
+ Avoids requiring every variant to also apply the layout class up here. */
14
+ &:has(.field_container.centered) {
15
+ align-items: center;
16
+ text-align: center;
17
+ }
18
+ }
19
+
20
+ /* contains form field elements like label etc... */
21
+ .field_container {
22
+ width: 100%;
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: var(--spacing-2);
26
+
27
+ .label {
28
+ font-family: var(--font-family-1);
29
+ color: var(--color-secondary-foreground);
30
+ font-size: var(--font-size-sm);
31
+ text-wrap: nowrap;
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: flex-start;
35
+ gap: var(--spacing-2);
36
+ }
37
+
38
+ /* layout */
39
+ &.inline {
40
+ flex-direction: row;
41
+ align-items: center;
42
+ gap: var(--spacing-3);
43
+ justify-content: flex-start;
44
+
45
+ .label {
46
+ flex-direction: column;
47
+ /* margin-inline: unset; */
48
+ }
49
+
50
+ /* direction */
51
+ &.rev {
52
+ flex-direction: row-reverse;
53
+
54
+ /* due to reverse direction it will become flex-end */
55
+ justify-content: flex-end;
56
+ }
57
+ }
58
+
59
+ /* layout: centered - column-stacked with horizontally centered control + label. */
60
+ &.centered {
61
+ align-items: center;
62
+
63
+ .label {
64
+ justify-content: center;
65
+ text-align: center;
66
+ }
67
+ }
68
+
69
+ /* layout */
70
+ &.inline_justify {
71
+ flex-direction: row;
72
+ align-items: center;
73
+ gap: var(--spacing-3);
74
+ justify-content: space-between;
75
+
76
+ .field_wrapper {
77
+ width: fit-content;
78
+ justify-self: flex-start;
79
+ }
80
+
81
+ .label {
82
+ flex-direction: column;
83
+ /* margin-inline: unset; */
84
+ }
85
+
86
+ /* direction */
87
+ &.rev {
88
+ flex-direction: row-reverse;
89
+
90
+ .field_wrapper {
91
+ justify-self: flex-end;
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ /* Shared row for label + action pairs (e.g. char count, clear-all). */
98
+ .label_row {
99
+ width: 100%;
100
+ display: flex;
101
+ justify-content: space-between;
102
+ text-wrap: wrap;
103
+ flex-wrap: wrap;
104
+ align-items: flex-start;
105
+ gap: var(--spacing-5);
106
+ row-gap: var(--spacing-1);
107
+ }
108
+
109
+ /* Secondary text (e.g. textarea char counter) sitting beside the label
110
+ inside a .label_row wrapper. */
111
+ .label_meta {
112
+ font-family: var(--font-family-1);
113
+ font-size: var(--font-size-xs);
114
+ color: var(--color-muted-foreground);
115
+ align-self: center;
116
+ }
117
+
118
+ /* mostly for positining to set icons inside input fields */
119
+ .field_wrapper {
120
+ --field-content-color: var(--color-foreground);
121
+ --field-placeholder-color: var(--color-muted-foreground);
122
+ --field-icon-color: var(--color-secondary-foreground);
123
+
124
+ width: 100%;
125
+ position: relative;
126
+ display: inline-flex;
127
+
128
+ /* Action Padding Mathematics Metrics */
129
+ --action-inset: var(--spacing-5); /* Exact match for right: var(--spacing-5) */
130
+ --action-icon: var(--spacing-8); /* Safe optical width for 24px SVGs */
131
+ --action-gap: var(--spacing-2); /* Exact match for flex gap */
132
+ --action-clearance: var(--spacing-3); /* Crisp 6px optical breathing room */
133
+ }
134
+
135
+ .field_wrapper_variant {
136
+ --field-content-color: var(--button-fg, var(--color-foreground));
137
+ --field-placeholder-color: var(
138
+ --button-placeholder,
139
+ var(--field-content-color)
140
+ );
141
+ --field-icon-color: var(--button-icon, var(--field-content-color));
142
+ }
143
+
144
+ /* icons wrapped in span at start like search etc... */
145
+ .icon_start {
146
+ width: fit-content;
147
+ position: absolute;
148
+ top: 50%;
149
+ left: var(--spacing-5);
150
+ transform: translateY(-50%);
151
+ flex-shrink: 0;
152
+ display: flex;
153
+ align-items: center;
154
+ justify-content: center;
155
+ --icon-color: var(--field-icon-color);
156
+ color: var(--field-icon-color);
157
+ }
158
+
159
+ /* action buttons at end like cross password eyes etc... */
160
+ .action_end_wrapper {
161
+ width: fit-content;
162
+ display: flex;
163
+ align-items: center;
164
+ gap: var(--spacing-2);
165
+ position: absolute;
166
+ right: var(--spacing-5);
167
+ top: 50%;
168
+ transform: translateY(-50%);
169
+ flex-shrink: 0;
170
+ --icon-color: var(--field-icon-color);
171
+ color: var(--field-icon-color);
172
+
173
+ /* icons */
174
+ }
175
+
176
+ /* default style */
177
+ .field_default {
178
+ /* layout */
179
+ width: 100%;
180
+ min-height: var(--spacing-11);
181
+
182
+ /* typography */
183
+ font-family: var(--font-family-1);
184
+ font-size: var(--font-size-sm);
185
+ color: var(--field-content-color);
186
+ text-align: start;
187
+ vertical-align: middle;
188
+
189
+ /* necessary */
190
+ line-height: 1.125;
191
+
192
+ /* visual */
193
+ padding-top: var(--spacing-3);
194
+ padding-bottom: var(--spacing-3);
195
+ padding-left: var(--spacing-6);
196
+ padding-right: var(--spacing-6);
197
+
198
+ /* display */
199
+ display: flex;
200
+ align-items: center;
201
+ justify-content: flex-start;
202
+ gap: var(--spacing-4);
203
+
204
+ border: 1px solid var(--color-border) !important;
205
+ border-radius: var(--radius-md);
206
+ outline: none;
207
+ background-color: var(--color-muted);
208
+
209
+ /* interaction */
210
+ transition:
211
+ border-color var(--transition-base),
212
+ box-shadow var(--transition-base),
213
+ background-color var(--transition-base);
214
+
215
+ &::placeholder {
216
+ color: var(--field-placeholder-color);
217
+ opacity: 1;
218
+ }
219
+
220
+ &:hover:not(:disabled):not(:focus) {
221
+ background-color: var(--color-muted);
222
+ }
223
+
224
+ &:focus,
225
+ &[data-active="true"] {
226
+ border-color: var(--color-ring);
227
+ box-shadow: var(--shadow-ring);
228
+ }
229
+
230
+ &:disabled {
231
+ cursor: not-allowed;
232
+ opacity: 0.5;
233
+ }
234
+
235
+ /* we need to adjust paddings of input or select fields inline dynamically due to icons at start and ends */
236
+ }
237
+
238
+ .field_button_variant {
239
+ color: var(--field-content-color);
240
+ caret-color: var(--field-content-color);
241
+
242
+ &::placeholder {
243
+ color: var(--field-placeholder-color);
244
+ opacity: 1;
245
+ }
246
+ }
247
+
248
+ /* Dynamic Action Padding via Data Attributes */
249
+ .field_wrapper[data-start-actions="1"] > :is(input, select, textarea, button) {
250
+ padding-left: calc(
251
+ var(--action-inset) + var(--action-icon) + var(--action-clearance)
252
+ ) !important;
253
+ }
254
+
255
+ .field_wrapper[data-end-actions="1"] > :is(input, select, textarea, button) {
256
+ padding-right: calc(
257
+ var(--action-inset) + var(--action-icon) + var(--action-clearance)
258
+ ) !important;
259
+ }
260
+
261
+ .field_wrapper[data-end-actions="2"] > :is(input, select, textarea, button) {
262
+ padding-right: calc(
263
+ var(--action-inset) + calc(var(--action-icon) * 2) + var(--action-gap) + var(--action-clearance)
264
+ ) !important;
265
+ }
266
+
267
+ .field_wrapper[data-end-actions="3"] > :is(input, select, textarea, button) {
268
+ padding-right: calc(
269
+ var(--action-inset) + calc(var(--action-icon) * 3) + calc(var(--action-gap) * 2) + var(--action-clearance)
270
+ ) !important;
271
+ }
272
+
273
+ /* Reusable micro-classes for the input-fields family.
274
+ Keep these after .field_default so they reliably override base paddings. */
275
+ .field_full_width {
276
+ width: 100% !important;
277
+ }
278
+
279
+ .field_wrapper_fit {
280
+ width: fit-content;
281
+ }
282
+
283
+ .field_cursor_text {
284
+ cursor: text !important;
285
+ }
286
+
287
+ .field_cursor_default {
288
+ cursor: default !important;
289
+ }
290
+
291
+ .field_justify_start {
292
+ justify-content: flex-start !important;
293
+ }
294
+
295
+ .field_justify_end {
296
+ justify-content: flex-end !important;
297
+ }
298
+
299
+ .textarea_padding_y {
300
+ padding-top: var(--spacing-5);
301
+ padding-bottom: var(--spacing-5);
302
+ }
303
+
304
+ .textarea_button_variant_padding {
305
+ padding-top: var(--spacing-5) !important;
306
+ padding-bottom: var(--spacing-5) !important;
307
+ }
308
+
309
+ .truncate_text {
310
+ overflow: hidden;
311
+ text-overflow: ellipsis;
312
+ white-space: nowrap;
313
+ }
314
+
315
+ .option_checkbox {
316
+ width: fit-content;
317
+ }
318
+