origam 2.8.1 → 2.10.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.
Files changed (50) hide show
  1. package/dist/src/assets/css/main.css +1 -1
  2. package/dist/src/assets/css/tokens/dark.css +38 -4
  3. package/dist/src/assets/css/tokens/light.css +19 -2
  4. package/dist/src/assets/scss/tokens/_dark.scss +19 -2
  5. package/dist/src/assets/scss/tokens/_light.scss +19 -2
  6. package/dist/src/components/Alert/OrigamAlert.vue +4 -2
  7. package/dist/src/components/App/OrigamApp.vue +7 -6
  8. package/dist/src/components/Avatar/OrigamAvatarGroup.vue +31 -12
  9. package/dist/src/components/Btn/OrigamBtn.vue +11 -2
  10. package/dist/src/components/Btn/OrigamBtnGroup.vue +204 -22
  11. package/dist/src/components/Btn/OrigamBtnToggle.vue +5 -1
  12. package/dist/src/components/Card/OrigamCard.vue +5 -2
  13. package/dist/src/components/Checkbox/OrigamCheckbox.vue +3 -1
  14. package/dist/src/components/Chip/OrigamChip.vue +2 -0
  15. package/dist/src/components/Code/OrigamCode.vue +4 -2
  16. package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -1
  17. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +52 -2
  18. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +32 -2
  19. package/dist/src/components/Dialog/OrigamDialog.vue +1 -1
  20. package/dist/src/components/Field/OrigamField.vue +39 -3
  21. package/dist/src/components/Layout/OrigamLayout.vue +10 -1
  22. package/dist/src/components/Menu/OrigamMenu.vue +3 -1
  23. package/dist/src/components/NumberField/OrigamNumberField.vue +3 -2
  24. package/dist/src/components/Overlay/OrigamOverlayScrim.vue +2 -0
  25. package/dist/src/components/Radio/OrigamRadio.vue +3 -1
  26. package/dist/src/components/Select/OrigamSelect.vue +3 -1
  27. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +2 -0
  28. package/dist/src/components/SliderField/OrigamSliderField.vue +26 -13
  29. package/dist/src/components/Snackbar/OrigamSnackbar.vue +3 -1
  30. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +2 -0
  31. package/dist/src/components/Switch/OrigamSwitch.vue +42 -1
  32. package/dist/src/components/Switch/OrigamSwitchTrack.vue +35 -2
  33. package/dist/src/components/Table/OrigamTable.vue +4 -2
  34. package/dist/src/components/Tabs/OrigamTabs.vue +3 -1
  35. package/dist/src/components/Tooltip/OrigamTooltip.vue +2 -0
  36. package/dist/src/composables/Commons/defaults.composable.cjs +10 -6
  37. package/dist/src/composables/Commons/defaults.composable.d.ts +30 -0
  38. package/dist/src/composables/Commons/defaults.composable.js +9 -6
  39. package/dist/src/composables/Theme/theme.composable.cjs +49 -30
  40. package/dist/src/composables/Theme/theme.composable.js +41 -22
  41. package/dist/src/interfaces/App/app.interface.d.ts +1 -1
  42. package/dist/src/interfaces/Btn/btn-group.interface.d.ts +2 -2
  43. package/dist/src/interfaces/Switch/switch-track.interface.d.ts +23 -6
  44. package/dist/src/themes/origam.theme.cjs +2 -4
  45. package/dist/src/themes/origam.theme.js +2 -2
  46. package/dist/src/types/tokens.type.d.ts +1 -1
  47. package/dist/src/utils/Commons/commons.util.cjs +10 -0
  48. package/dist/src/utils/Commons/commons.util.d.ts +18 -0
  49. package/dist/src/utils/Commons/commons.util.js +9 -0
  50. package/package.json +1 -1
@@ -49,9 +49,10 @@
49
49
 
50
50
  <script lang="ts" setup>
51
51
  import { OrigamAvatar, OrigamDefaultsProvider } from "../../components";
52
- import { useActive, useDensity, useHover, useProps, useRtl, useStateEffect, useStyle } from "../../composables";
52
+ import { useActive, useDensity, useHover, usePassedProps, useProps, useRtl, useStateEffect, useStyle } from "../../composables";
53
53
  import { vClickOutside } from "../../directives";
54
54
  import { DIRECTION } from "../../enums";
55
+ import { omitUndefined } from "../../utils";
55
56
  import { computed, mergeProps, ref } from "vue";
56
57
  const props = defineProps({
57
58
  items: { type: Array, required: false, default: () => [] },
@@ -104,18 +105,19 @@ const props = defineProps({
104
105
  active: { type: [Boolean, Object], required: false },
105
106
  activeClass: { type: String, required: false }
106
107
  });
108
+ const wasPropPassed = usePassedProps(props);
107
109
  const slotDefaults = computed(() => ({
108
- "origam-avatar": {
109
- density: props.density,
110
- size: props.size,
111
- color: props.color,
112
- bgColor: props.bgColor,
113
- rounded: props.rounded,
114
- elevation: props.elevation,
115
- border: props.border,
116
- borderColor: props.borderColor,
117
- borderStyle: props.borderStyle
118
- }
110
+ "origam-avatar": omitUndefined({
111
+ density: wasPropPassed("density") ? props.density : void 0,
112
+ size: wasPropPassed("size") ? props.size : void 0,
113
+ color: wasPropPassed("color") ? props.color : void 0,
114
+ bgColor: wasPropPassed("bgColor") ? props.bgColor : void 0,
115
+ rounded: wasPropPassed("rounded") ? props.rounded : void 0,
116
+ elevation: wasPropPassed("elevation") ? props.elevation : void 0,
117
+ border: wasPropPassed("border") ? props.border : void 0,
118
+ borderColor: wasPropPassed("borderColor") ? props.borderColor : void 0,
119
+ borderStyle: wasPropPassed("borderStyle") ? props.borderStyle : void 0
120
+ })
119
121
  }));
120
122
  defineEmits(["update:active", "update:hover"]);
121
123
  const { filterProps } = useProps(props);
@@ -246,6 +248,23 @@ defineExpose({
246
248
  margin-inline-end: var(--origam-avatar-group__item---margin-inline-end);
247
249
  }
248
250
 
251
+ // Separation ring — a STRUCTURAL concern of the group (overlapping
252
+ // avatars need a visible seam to stay legible), orthogonal to each
253
+ // avatar's own themed `box-shadow` (elevation / cartoon hard-shadow
254
+ // signature / …). `outline` is used on purpose instead of layering
255
+ // a second `box-shadow`: it is a distinct CSS property, so it can
256
+ // never collide with, or need to be comma-combined with, the
257
+ // avatar's own `--origam-avatar---box-shadow` — the two coexist
258
+ // without any specificity/ordering trick. Applies to every stacked
259
+ // avatar (`__item`) AND the "+N" overflow chip (`__rest`), since
260
+ // both participate in the same overlapping stack — see #263.
261
+ &__item,
262
+ &__rest {
263
+ outline-color: var(--origam-avatar-group__item---outline-color);
264
+ outline-style: var(--origam-avatar-group__item---outline-style);
265
+ outline-width: var(--origam-avatar-group__item---outline-width);
266
+ }
267
+
249
268
  &--expand-on-hover,
250
269
  &--expand-on-click {
251
270
  #{$this}__item:not(:first-child),
@@ -649,10 +649,19 @@ defineExpose({
649
649
  // tokens, so it follows color/intent and theme), while the resting
650
650
  // siblings stay outlined. This is what makes a btn-toggle read as
651
651
  // a row of real buttons rather than a flat segmented strip.
652
+ //
653
+ // `-background-color-active` is a DEDICATED token, separate from
654
+ // the plain `-background-color` one: a theme is free to keep
655
+ // outlined buttons unfilled at rest (background-color:
656
+ // transparent, e.g. a print/minimalist identity) without also
657
+ // erasing the active/selected indicator — the two states are
658
+ // no longer forced to share one token. Themes that don't
659
+ // declare it fall straight through to the existing behaviour
660
+ // (their own `-background-color`), so this is additive only.
652
661
  &#{$this}--active {
653
- background-color: var(--origam-btn---background-color) !important;
662
+ background-color: var(--origam-btn---background-color-active, var(--origam-btn---background-color)) !important;
654
663
  color: var(--origam-btn---color);
655
- border-color: var(--origam-btn---background-color);
664
+ border-color: var(--origam-btn---background-color-active, var(--origam-btn---background-color));
656
665
  }
657
666
  }
658
667
 
@@ -28,14 +28,17 @@
28
28
  <script lang="ts" setup>
29
29
  import { OrigamBtn, OrigamDefaultsProvider } from "../../components";
30
30
  import {
31
+ useDefaults,
31
32
  useDensity,
32
33
  useProps,
34
+ useSize,
33
35
  useStateEffect,
34
- useStyle
36
+ useStyle,
37
+ useVariant
35
38
  } from "../../composables";
36
39
  import { DENSITY } from "../../enums";
37
40
  import { computed, StyleValue, useSlots } from "vue";
38
- const props = defineProps({
41
+ const _props = defineProps({
39
42
  divided: { type: Boolean, required: false },
40
43
  items: { type: Array, required: false, default: () => [] },
41
44
  tag: { type: String, required: false, default: "div" },
@@ -80,14 +83,19 @@ const props = defineProps({
80
83
  paddingInline: { type: [Boolean, Number, String], required: false },
81
84
  hover: { type: [Boolean, Object], required: false },
82
85
  active: { type: [Boolean, Object], required: false },
83
- activeClass: { type: String, required: false }
86
+ activeClass: { type: String, required: false },
87
+ variant: { type: null, required: false },
88
+ size: { type: null, required: false }
84
89
  });
90
+ const props = useDefaults(_props);
85
91
  const { filterProps } = useProps(props);
86
92
  const slotDefaults = computed(() => ({
87
93
  "origam-btn": {
94
+ variant: props.variant,
88
95
  density: props.density,
89
96
  color: props.color,
90
97
  bgColor: props.bgColor,
98
+ size: props.size,
91
99
  // New API: `hover` / `active` accept boolean | IHoverState |
92
100
  // IActiveState; pass-through propagates the parent's intent
93
101
  // override to each child OrigamBtn.
@@ -101,6 +109,8 @@ const hasItems = computed(() => {
101
109
  return slots.default || !!items.value;
102
110
  });
103
111
  const { densityClasses } = useDensity(props);
112
+ const { sizeClasses } = useSize(props);
113
+ const { variantClasses } = useVariant(props);
104
114
  const {
105
115
  colorStyles,
106
116
  borderClasses,
@@ -137,6 +147,8 @@ const btnGroupClasses = computed(() => {
137
147
  roundedClasses.value,
138
148
  marginClasses.value,
139
149
  paddingClasses.value,
150
+ variantClasses.value,
151
+ sizeClasses.value,
140
152
  props.class
141
153
  ];
142
154
  });
@@ -155,13 +167,31 @@ defineExpose({
155
167
  .origam-btn-group {
156
168
  display: inline-flex;
157
169
  flex-wrap: nowrap;
158
- align-items: center;
170
+ align-items: stretch;
171
+ // `overflow: hidden` does the whole job of shaping the children:
172
+ // per CSS, the clip follows the PADDING-BOX curvature — the outer
173
+ // radius minus the border width — so square-cornered children are
174
+ // clipped flush against the inside of the border ring, on any
175
+ // border thickness, with the browser computing the inner radius.
159
176
  overflow: hidden;
160
177
  vertical-align: middle;
161
178
 
162
179
  max-width: 100%;
163
180
  min-width: 0;
164
- min-height: calc(var(--origam-btn-group---height, 36px) + var(--origam-btn-group---density, 0));
181
+ // `--origam-btn-group---height` (own custom property, set by the
182
+ // `&--size-*` rules below) — NOT `--origam-btn---height` directly:
183
+ // that token is scoped LOCALLY to each Btn instance by its own
184
+ // size modifier class, it does not cascade from a sibling Split
185
+ // button down to the group. `box-sizing: border-box` makes this a
186
+ // TOTAL height (border included) — matching how Btn's own `height`
187
+ // already works — so the group's border-box height equals a themed
188
+ // btn's border-box height by construction, never taller by the
189
+ // border's own width. Children are `height: auto` + `align-items:
190
+ // stretch` (see :deep below): they fill the content box inside the
191
+ // border, exactly like a btn's own content sits inside its own
192
+ // border.
193
+ box-sizing: border-box;
194
+ height: calc(var(--origam-btn-group---height, 36px) + var(--origam-btn-group---density, 0px));
165
195
 
166
196
  border-width: var(--origam-btn-group---border-width);
167
197
  border-style: var(--origam-btn-group---border-style);
@@ -215,36 +245,177 @@ defineExpose({
215
245
  --origam-btn-group---density: -8px;
216
246
  }
217
247
 
218
- :deep(.origam-btn) {
219
- border-color: inherit;
248
+ // Same height values as `OrigamBtn`'s own `&--size-*` rules, one for
249
+ // one — a themed `<origam-btn-toggle size="small">` must resolve to
250
+ // the exact height a standalone `size="small"` Btn does.
251
+ &--size-x-small {
252
+ --origam-btn-group---height: 20px;
253
+ }
220
254
 
221
- &:not(:last-child) {
222
- border-inline-end: none;
223
- }
255
+ &--size-small {
256
+ --origam-btn-group---height: 28px;
257
+ }
258
+
259
+ &--size-default {
260
+ --origam-btn-group---height: 36px;
261
+ }
262
+
263
+ &--size-large {
264
+ --origam-btn-group---height: 44px;
265
+ }
266
+
267
+ &--size-x-large {
268
+ --origam-btn-group---height: 52px;
269
+ }
270
+
271
+ // Full parity with `OrigamBtn`'s own variant rules — same CSS
272
+ // custom properties, same literal values, one-for-one. A themed
273
+ // `origam-btn: { variant: 'outlined' }` (cartoon/geek/editorial)
274
+ // must produce the SAME border-width/border-color/background/
275
+ // box-shadow on the group as it does on a standalone Btn; the
276
+ // group is not allowed to fall back to a subset. Earlier passes
277
+ // only ported the `background-color` half of each rule (border/
278
+ // shadow were silently dropped), which is exactly what made the
279
+ // toggle read as "thin border, no shadow" next to a themed Btn's
280
+ // thick border + hard shadow under cartoon.
281
+ &--variant-flat {
282
+ box-shadow: none;
283
+ }
224
284
 
225
- &:not(:first-child) {
226
- border-inline-start: none;
285
+ &--variant-text,
286
+ &--variant-plain {
287
+ background-color: transparent !important;
288
+ box-shadow: none;
289
+ }
290
+
291
+ &--variant-elevated {
292
+ box-shadow: var(--origam-btn---box-shadow-elevated, var(--origam-shadow---md));
293
+ }
294
+
295
+ &--variant-tonal {
296
+ background-color: var(
297
+ --origam-btn---background-color-tonal,
298
+ var(--origam-color__surface---overlay)
299
+ ) !important;
300
+ box-shadow: none;
301
+ }
302
+
303
+ &--variant-outlined {
304
+ background-color: transparent !important;
305
+ // Mirror the literal border-width into the SAME custom property
306
+ // `--origam-btn-group---inner-border-radius` calc()s against
307
+ // (see the base rule above) — that calc reads the CUSTOM
308
+ // PROPERTY, which this rule would otherwise never touch (it
309
+ // only ever set the literal `border-width` property directly),
310
+ // leaving the calc's border-width input silently at its
311
+ // pre-variant fallback of 0 regardless of the REAL rendered
312
+ // border. `calc(20px - 0px)` still LOOKS plausible, so this
313
+ // class of bug doesn't throw or visibly break — it just quietly
314
+ // gives the child's fill the wrong inset curve.
315
+ --origam-btn-group---border-width: var(--origam-btn---border-width-outlined, var(--origam-border__width---thin));
316
+ border-width: var(--origam-btn-group---border-width);
317
+ border-style: solid;
318
+ border-color: var(--origam-btn---border-color, currentColor);
319
+ box-shadow: none;
320
+ }
321
+
322
+ &--variant-ghost {
323
+ background-color: var(
324
+ --origam-btn---background-color-ghost,
325
+ color-mix(in srgb, currentColor 12%, transparent)
326
+ ) !important;
327
+ // See the matching comment in `&--variant-outlined` above.
328
+ --origam-btn-group---border-width: var(--origam-btn---border-width-ghost, var(--origam-border__width---thin));
329
+ border-width: var(--origam-btn-group---border-width);
330
+ border-style: solid;
331
+ border-color: var(
332
+ --origam-btn---border-color-ghost,
333
+ color-mix(in srgb, currentColor 24%, transparent)
334
+ );
335
+ box-shadow: var(
336
+ --origam-btn---box-shadow-ghost,
337
+ 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent),
338
+ 0 4px 18px 0 color-mix(in srgb, currentColor 28%, transparent),
339
+ 0 1px 0 0 color-mix(in srgb, white 35%, transparent) inset
340
+ );
341
+
342
+ @supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
343
+ backdrop-filter: var(--origam-btn---backdrop-filter-ghost, blur(8px));
344
+ -webkit-backdrop-filter: var(--origam-btn---backdrop-filter-ghost, blur(8px));
227
345
  }
228
346
  }
229
347
 
230
- // The GROUP owns the rounding (outer corners, via its own
231
- // border-radius + overflow:hidden) and the elevation (a single
232
- // shadow around the whole group). Child buttons are forced flat
233
- // and shadowless so a per-child `rounded` / `elevation` (own prop
234
- // or active/hover state) can't break the unified segmented look —
235
- // e.g. rounded pills with the group surface bleeding through the
236
- // gaps. `!important` is intentional: the group's design wins.
348
+ // A btnGroup/btnToggle reads as ONE button with internal
349
+ // separators — not N bordered buttons glued together. The GROUP
350
+ // owns the ONE visible border, the ONE outer radius and the ONE
351
+ // elevation; every child button is rendered "naked" (zero border
352
+ // of its own, zero radius, zero shadow) regardless of what the
353
+ // theme's OWN `origam-btn` config would normally paint on a
354
+ // standalone button — a themed `origam-btn: { border: true }`
355
+ // would otherwise stack a second border directly on top of the
356
+ // group's, reading as a visibly doubled/thicker line. `!important`
357
+ // is intentional: the group's design wins over the child's own
358
+ // resolved theme props.
359
+ //
360
+ // `overflow: hidden` alone clips the group to its own rounded
361
+ // shape but does NOT round the first/last child's own corners —
362
+ // a fully square button sitting inside a rounded clip leaves a
363
+ // visible gap at each of the 4 corners (the group's background
364
+ // showing through a "square peg in a round hole"). The first and
365
+ // last child must adopt the group's INNER radius — the outer
366
+ // radius minus the border's own width, i.e. the curve of the
367
+ // surface the border ring encloses, not the outer edge of the
368
+ // border itself. Using the outer radius here (as a previous pass
369
+ // did) is off by exactly `border-width`: on a thick border
370
+ // (cartoon's 3px) the active segment's fill corner curved too
371
+ // early, leaving a sliver of the group's own background visible
372
+ // between the fill and the inside of the border ring.
237
373
  :deep(.origam-btn) {
374
+ border-width: 0 !important;
375
+ border-style: none !important;
238
376
  border-radius: 0 !important;
239
377
  box-shadow: none !important;
378
+ // `auto` releases the child's own explicit height so
379
+ // `align-items: stretch` fills the group's content box —
380
+ // the child occupies the inside of the border ring exactly
381
+ // like a standalone btn's content sits inside its own border.
382
+ height: auto !important;
383
+ min-height: 0 !important;
384
+
385
+ // Resting (non-selected) segments stay fully naked — no
386
+ // background of their own — so the group's ONE surface
387
+ // (painted above via `variantClasses`) shows through evenly
388
+ // across the whole strip instead of each child individually
389
+ // re-painting its own themed variant background (that
390
+ // per-child repaint, at varying opacity/tint per button, is
391
+ // what produced the inconsistent/blank-looking group surface
392
+ // bug). The SELECTED segment inside an `OrigamBtnToggle`
393
+ // keeps its own active-state background — that fill is the
394
+ // documented, intentional "reads as a real filled button"
395
+ // affordance for the current selection (see `OrigamBtn`'s
396
+ // `&--variant-outlined &--active` / `&--variant-tonal
397
+ // &--active` rules) and is NOT the bug being fixed here.
398
+ &:not(.origam-btn--active) {
399
+ background-color: transparent !important;
400
+ }
401
+
402
+ // NO per-corner radius overrides: children stay square
403
+ // (`border-radius: 0` above) and the group's `overflow: hidden`
404
+ // clips them to its own inner curvature — the browser derives
405
+ // the inner radius (outer − border-width) natively.
240
406
  }
241
407
 
408
+ // `divided` adds back a THIN, intentional separator between
409
+ // segments — NOT the child's own border reinstated (still zeroed
410
+ // on every other side by the block above). Colour matches the
411
+ // group's own resolved border color so it reads as part of the
412
+ // same single surface, not a second competing border.
242
413
  &--divided {
243
414
  :deep(.origam-btn) {
244
415
  &:not(:last-child) {
245
- border-inline-end-width: thin;
246
- border-inline-end-style: solid;
247
- border-inline-end-color: rgba(var(--v-border-color), var(--v-border-opacity));
416
+ border-inline-end-width: thin !important;
417
+ border-inline-end-style: solid !important;
418
+ border-inline-end-color: var(--origam-btn-group---border-color, currentColor) !important;
248
419
  }
249
420
  }
250
421
  }
@@ -259,6 +430,17 @@ defineExpose({
259
430
  --origam-btn-group---border-width: var(--origam-btn---border-width, 0);
260
431
  --origam-btn-group---border-style: var(--origam-btn---border-style, solid);
261
432
  --origam-btn-group---border-color: var(--origam-btn---border-color, currentColor);
433
+ /* Base surface fallback for the `flat`/`elevated`/unset variants
434
+ * (the ones that DON'T override background via their own
435
+ * `--variant-*` rule above) — mirrors `OrigamBtn`'s own base
436
+ * `background-color: var(--origam-btn---background-color, …)`
437
+ * rule so the group's resting surface always matches the
438
+ * theme's btn, never a hardcoded/transparent default. */
439
+ --origam-btn-group---background-color: var(--origam-btn---background-color, transparent);
440
+ /* Same fallback chain as background-color/border-* above — without
441
+ * it the group's text/currentColor (used by outlined/ghost border
442
+ * fallbacks) drifted from Btn's own default instead of matching. */
443
+ --origam-btn-group---color: var(--origam-btn---color, rgba(30, 30, 30, 0.87));
262
444
 
263
445
  }
264
446
  </style>
@@ -30,6 +30,7 @@
30
30
  <script lang="ts" setup>
31
31
  import { OrigamBtnGroup } from "../../components";
32
32
  import {
33
+ useDefaults,
33
34
  useGroup,
34
35
  useProps,
35
36
  useStyle
@@ -37,7 +38,7 @@ import {
37
38
  import { ORIGAM_BTN_TOGGLE_KEY } from "../../consts";
38
39
  import { DENSITY } from "../../enums";
39
40
  import { computed, ref, StyleValue, useSlots } from "vue";
40
- const props = defineProps({
41
+ const _props = defineProps({
41
42
  divided: { type: Boolean, required: false },
42
43
  items: { type: Array, required: false, default: () => [] },
43
44
  tag: { type: String, required: false, default: "div" },
@@ -83,6 +84,8 @@ const props = defineProps({
83
84
  hover: { type: [Boolean, Object], required: false },
84
85
  active: { type: [Boolean, Object], required: false },
85
86
  activeClass: { type: String, required: false },
87
+ variant: { type: null, required: false },
88
+ size: { type: null, required: false },
86
89
  disabled: { type: Boolean, required: false },
87
90
  modelValue: { type: null, required: false },
88
91
  multiple: { type: Boolean, required: false },
@@ -90,6 +93,7 @@ const props = defineProps({
90
93
  max: { type: Number, required: false },
91
94
  selectedClass: { type: String, required: false }
92
95
  });
96
+ const props = useDefaults(_props);
93
97
  defineEmits(["update:modelValue"]);
94
98
  const { filterProps } = useProps(props);
95
99
  const { isSelected, next, prev, select, selected } = useGroup(props, ORIGAM_BTN_TOGGLE_KEY);
@@ -146,6 +146,7 @@ import { OrigamCardHeader, OrigamCardText, OrigamImg, OrigamProgress, OrigamSkel
146
146
  import {
147
147
  useActive,
148
148
  useAdjacent,
149
+ useDefaults,
149
150
  useDensity,
150
151
  useDimension,
151
152
  useHover,
@@ -160,7 +161,7 @@ import {
160
161
  import { vContrast, vRipple } from "../../directives";
161
162
  import { DENSITY, PROGRESS_TYPE } from "../../enums";
162
163
  import { computed, StyleValue, toRef, useAttrs, useSlots } from "vue";
163
- const props = defineProps({
164
+ const _props = defineProps({
164
165
  disabled: { type: Boolean, required: false },
165
166
  flat: { type: Boolean, required: false },
166
167
  hover: { type: Boolean, required: false },
@@ -236,12 +237,14 @@ const props = defineProps({
236
237
  active: { type: [Boolean, Object], required: false },
237
238
  activeClass: { type: String, required: false }
238
239
  });
240
+ const props = useDefaults(_props);
239
241
  defineEmits(["click:append", "click:prepend", "update:active", "update:hover"]);
240
242
  const { filterProps } = useProps(props);
241
243
  const attrs = useAttrs();
242
244
  const link = useLink(props, attrs);
243
245
  const { isHover, hoverState, hoverClasses, onMouseenter, onMouseleave } = useHover(props);
244
246
  const { isActive, activeState, activeClasses, onActive } = useActive(props);
247
+ const flatForElevation = computed(() => props.elevation != null ? false : props.flat);
245
248
  const {
246
249
  colorClasses,
247
250
  colorStyles,
@@ -262,7 +265,7 @@ const {
262
265
  hoverState,
263
266
  activeState,
264
267
  computed(() => !!props.disabled),
265
- toRef(props, "flat")
268
+ flatForElevation
266
269
  );
267
270
  const {
268
271
  onClickPrepend: handleClickPrepend,
@@ -58,6 +58,7 @@
58
58
  <script lang="ts" setup>
59
59
  import { OrigamCheckboxBtn, OrigamInput } from "../../components";
60
60
  import {
61
+ useDefaults,
61
62
  useFocus,
62
63
  useMargin,
63
64
  usePadding,
@@ -68,7 +69,7 @@ import {
68
69
  import { DENSITY } from "../../enums";
69
70
  import { filterInputAttrs, getUid } from "../../utils";
70
71
  import { computed, ref, StyleValue, useAttrs, useSlots } from "vue";
71
- const props = defineProps({
72
+ const _props = defineProps({
72
73
  id: { type: String, required: false },
73
74
  class: { type: [String, Array, Object], required: false },
74
75
  style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
@@ -162,6 +163,7 @@ const props = defineProps({
162
163
  activeClass: { type: String, required: false },
163
164
  hover: { type: [Boolean, Object], required: false }
164
165
  });
166
+ const props = useDefaults(_props);
165
167
  const emits = defineEmits(["update:modelValue", "update:focused", "click:label"]);
166
168
  defineSlots();
167
169
  const { filterProps } = useProps(props);
@@ -365,6 +365,8 @@ defineExpose({
365
365
 
366
366
  background-color: var(--origam-chip---background-color);
367
367
  color: var(--origam-chip---color);
368
+ backdrop-filter: var(--origam-chip---backdrop-filter, none);
369
+ -webkit-backdrop-filter: var(--origam-chip---backdrop-filter, none);
368
370
 
369
371
  &__content {
370
372
  align-items: center;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <component
3
- :is="tag"
3
+ :is="props.tag"
4
4
  v-contrast
5
5
  :class="codeClasses"
6
6
  :style="codeStyles"
@@ -82,6 +82,7 @@ import {
82
82
  useDimension,
83
83
  useElevation,
84
84
  useLocale,
85
+ useDefaults,
85
86
  useMargin,
86
87
  usePadding,
87
88
  useRounded,
@@ -91,7 +92,7 @@ import { vContrast } from "../../directives";
91
92
  import { CODE_DEFAULTS } from "../../consts";
92
93
  import { CODE_LANG } from "../../enums";
93
94
  import { parseHighlightLines } from "../../utils";
94
- const props = defineProps({
95
+ const _props = defineProps({
95
96
  code: { type: String, required: false, default: void 0 },
96
97
  lang: { type: null, required: false, default: CODE_LANG.PLAINTEXT },
97
98
  lineNumbers: { type: Boolean, required: false, default: false },
@@ -153,6 +154,7 @@ const props = defineProps({
153
154
  lineHeight: { type: String, required: false },
154
155
  letterSpacing: { type: String, required: false }
155
156
  });
157
+ const props = useDefaults(_props);
156
158
  const emit = defineEmits(["copy"]);
157
159
  const slots = useSlots();
158
160
  const { borderClasses, borderStyles } = useBorder(props);
@@ -148,7 +148,7 @@ defineExpose({
148
148
  width: 100%;
149
149
  margin: 0;
150
150
 
151
- :deep(.origam-slider-track__fill) {
151
+ :deep(.origam-slider-field-track__fill) {
152
152
  display: none;
153
153
  }
154
154
  }
@@ -128,12 +128,12 @@
128
128
 
129
129
  <script lang="ts" setup>
130
130
  import { OrigamColorPicker, OrigamMenu, OrigamSheet, OrigamTextField, OrigamTranslateScale } from "../../components";
131
- import { useLocale, useProps, useVModel, useStyle } from "../../composables";
131
+ import { useDefaults, useLocale, useProps, useVModel, useStyle } from "../../composables";
132
132
  import { COLOR_NULL, ORIGAM_FORM_KEY } from "../../consts";
133
133
  import { BLOCK, DENSITY, DIRECTION, TEXT_FIELD_TYPE } from "../../enums";
134
134
  import { forwardRefs, HSVtoCSS, matchesSelector } from "../../utils";
135
135
  import { computed, inject, nextTick, ref, shallowRef, StyleValue, useSlots, watch } from "vue";
136
- const props = defineProps({
136
+ const _props = defineProps({
137
137
  menu: { type: Boolean, required: false },
138
138
  menuProps: { type: Object, required: false },
139
139
  openOnClear: { type: Boolean, required: false },
@@ -251,6 +251,7 @@ const props = defineProps({
251
251
  prependIcon: { type: null, required: false },
252
252
  transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) }
253
253
  });
254
+ const props = useDefaults(_props);
254
255
  const { filterProps } = useProps(props);
255
256
  const { t } = useLocale();
256
257
  const origamTextFieldRef = ref();
@@ -403,6 +404,22 @@ defineExpose(forwardRefs({
403
404
  padding-bottom: 0;
404
405
  padding-inline-start: 0;
405
406
  overflow: hidden;
407
+ border-start-start-radius: var(--origam-field---border-radius, 8px);
408
+ border-end-start-radius: var(--origam-field---border-radius, 8px);
409
+
410
+ // The swatch must sit FLUSH against the field's inline-start edge.
411
+ // `OrigamField` applies `--origam-field---padding-start` to the whole
412
+ // grid (prepend-inner included), so any consumer that raises it pushes
413
+ // the swatch inward and opens a gap between the colour and the left
414
+ // border. The Theme Builder does exactly this — it forces
415
+ // `--origam-field---padding-start: 14px` on prepended control fields to
416
+ // widen the outline's start leg so the left corner rounds — which left
417
+ // a ~14px gap in front of the swatch. Cancel the padding for the
418
+ // prepend cell only (negative margin = -padding-start) so the swatch
419
+ // bleeds back to the edge while the outline keeps its rounded corner.
420
+ // No-op when padding-start resolves to 0 (the component's own default),
421
+ // so there is zero regression for plain consumers.
422
+ margin-inline-start: calc(-1 * var(--origam-field---padding-start, 0px));
406
423
 
407
424
  > .origam-sheet {
408
425
  width: var(--origam-color-picker-field__swatch---width, 24px);
@@ -417,6 +434,39 @@ defineExpose(forwardRefs({
417
434
  font-family: var(--origam-font__family---mono);
418
435
  font-size: 0.875em;
419
436
  letter-spacing: 0.03em;
437
+ overflow: hidden;
438
+ text-overflow: ellipsis;
439
+ white-space: nowrap;
440
+ min-width: 0;
441
+ }
442
+
443
+ // `.origam-field__input` is `display: flex; flex-wrap: wrap` by
444
+ // default (`OrigamField`'s base rule, meant for multi-chip inputs).
445
+ // This field renders BOTH the hex `colorSelection` span AND the
446
+ // underlying native `<input>` in that same row — in a narrow
447
+ // container (e.g. a dense side panel) the two don't fit on one
448
+ // line and wrap onto two, DOUBLING the field's height versus a
449
+ // plain text-field of the same density (confirmed: 55px vs 26px
450
+ // at compact density, identical width). The native input's own
451
+ // text is not meant to be visible here (the formatted
452
+ // `colorSelection` span is the real display value) — forcing
453
+ // `nowrap` lets the invisible native input shrink instead of
454
+ // pushing a wrap, with zero visual loss.
455
+ // Same single-line fix as OrigamSelect: the underlying native
456
+ // `<input>` is taken OUT of flow (`position: absolute`, `flex: 0 0`)
457
+ // so it can't sit beside the formatted hex `colorSelection` span and
458
+ // push the field onto a second line. The span is the real display
459
+ // value; the input only carries focus / the editable value. `nowrap`
460
+ // alone was insufficient — the in-flow input still forced a wrap in a
461
+ // narrow container.
462
+ :deep(.origam-field__input) {
463
+ flex-wrap: nowrap;
464
+
465
+ > input {
466
+ position: absolute;
467
+ flex: 0 0;
468
+ min-width: 0;
469
+ }
420
470
  }
421
471
  }
422
472
  </style>