origam 2.17.0 → 2.17.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.
- package/CHANGELOG.md +54 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +6 -4
- package/dist/src/assets/css/tokens/light.css +3 -2
- package/dist/src/assets/scss/tokens/_dark.scss +3 -2
- package/dist/src/assets/scss/tokens/_light.scss +3 -2
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +13 -13
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +13 -13
- package/dist/src/components/Field/OrigamField.vue +36 -13
- package/dist/src/components/FileField/OrigamFileField.vue +15 -14
- package/dist/src/components/Masonry/OrigamMasonry.vue +1 -1
- package/dist/src/components/NumberField/OrigamNumberField.vue +13 -13
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +13 -13
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +15 -14
- package/dist/src/components/Select/OrigamSelect.vue +13 -13
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +20 -0
- package/dist/src/components/TextField/OrigamTextField.vue +15 -14
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +15 -14
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +1 -1
- package/dist/src/consts/Commons/border.const.cjs +2 -1
- package/dist/src/consts/Commons/border.const.d.ts +19 -0
- package/dist/src/consts/Commons/border.const.js +15 -0
- package/dist/src/interfaces/Field/field.interface.d.ts +21 -1
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BORDER_REGEX = exports.BORDER_POSITION_MAP = exports.BORDER_LOGICAL_AXIS_MAP = exports.BORDER_KEYWORD_WIDTH = void 0;
|
|
6
|
+
exports.BORDER_REGEX = exports.BORDER_PROP_KEYS = exports.BORDER_POSITION_MAP = exports.BORDER_LOGICAL_AXIS_MAP = exports.BORDER_KEYWORD_WIDTH = void 0;
|
|
7
7
|
var _enums = require("../../enums/index.cjs");
|
|
8
8
|
const BORDER_REGEX = exports.BORDER_REGEX = /^(?<width>(?: ?(?:[0-9]+)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?){0,4}) {0,1}(?<style>(?:(?: ?(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset))+){0,4}) ?(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\(--[^)]+\))|(?:(?:rgb|hsl|rgba)a?\(.*\))|(?:[A-Za-z]+))){0,4})$/;
|
|
9
9
|
const BORDER_POSITION_MAP = exports.BORDER_POSITION_MAP = [{
|
|
@@ -30,6 +30,7 @@ const BORDER_LOGICAL_AXIS_MAP = exports.BORDER_LOGICAL_AXIS_MAP = [{
|
|
|
30
30
|
axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
|
|
31
31
|
widthProp: "borderInline"
|
|
32
32
|
}];
|
|
33
|
+
const BORDER_PROP_KEYS = exports.BORDER_PROP_KEYS = ["border", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderBlock", "borderInline", "borderColor", "borderStyle", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor"];
|
|
33
34
|
const BORDER_KEYWORD_WIDTH = exports.BORDER_KEYWORD_WIDTH = {
|
|
34
35
|
none: "var(--origam-border__width---0)",
|
|
35
36
|
thin: "var(--origam-border__width---thin)",
|
|
@@ -63,6 +63,25 @@ export declare const BORDER_LOGICAL_AXIS_MAP: ReadonlyArray<{
|
|
|
63
63
|
axis: TBorderLogicalAxis;
|
|
64
64
|
widthProp: 'borderBlock' | 'borderInline';
|
|
65
65
|
}>;
|
|
66
|
+
/*********************************************************
|
|
67
|
+
* BORDER_PROP_KEYS
|
|
68
|
+
*
|
|
69
|
+
* @description
|
|
70
|
+
* Every key `IBorderProps` declares — the complete prop surface `useBorder`
|
|
71
|
+
* consumes, in one place.
|
|
72
|
+
*
|
|
73
|
+
* @description
|
|
74
|
+
* Issue #726. The four components that wrap an `<origam-field>` inside an
|
|
75
|
+
* `<origam-input>` (TextField, TextareaField, PasswordField, FileField) must
|
|
76
|
+
* hand this surface to the FIELD and withhold it from the INPUT. The input is
|
|
77
|
+
* the outer box and has no notch, so a border painted there crosses the
|
|
78
|
+
* floating label; the field owns the notched outline that opens around it.
|
|
79
|
+
* Both children resolve their bindings through `filterProps(props, excludes)`,
|
|
80
|
+
* so the split is expressed as this exclude list — named once here rather than
|
|
81
|
+
* retyped in four templates, where one forgotten key (`borderBlock`,
|
|
82
|
+
* `borderTopColor`, …) would silently restore the defect for that one value.
|
|
83
|
+
*/
|
|
84
|
+
export declare const BORDER_PROP_KEYS: readonly ["border", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderBlock", "borderInline", "borderColor", "borderStyle", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor"];
|
|
66
85
|
/*********************************************************
|
|
67
86
|
* BORDER_KEYWORD_WIDTH
|
|
68
87
|
*
|
|
@@ -10,6 +10,21 @@ export const BORDER_LOGICAL_AXIS_MAP = [
|
|
|
10
10
|
{ axis: BORDER_LOGICAL_AXIS.BLOCK, widthProp: "borderBlock" },
|
|
11
11
|
{ axis: BORDER_LOGICAL_AXIS.INLINE, widthProp: "borderInline" }
|
|
12
12
|
];
|
|
13
|
+
export const BORDER_PROP_KEYS = [
|
|
14
|
+
"border",
|
|
15
|
+
"borderTop",
|
|
16
|
+
"borderRight",
|
|
17
|
+
"borderBottom",
|
|
18
|
+
"borderLeft",
|
|
19
|
+
"borderBlock",
|
|
20
|
+
"borderInline",
|
|
21
|
+
"borderColor",
|
|
22
|
+
"borderStyle",
|
|
23
|
+
"borderTopColor",
|
|
24
|
+
"borderRightColor",
|
|
25
|
+
"borderBottomColor",
|
|
26
|
+
"borderLeftColor"
|
|
27
|
+
];
|
|
13
28
|
export const BORDER_KEYWORD_WIDTH = {
|
|
14
29
|
none: "var(--origam-border__width---0)",
|
|
15
30
|
thin: "var(--origam-border__width---thin)",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IActiveEmits, IActiveProps } from '../Commons/active.interface';
|
|
2
2
|
import type { IAdjacentInnerEmits, IAdjacentInnerProps, IAdjacentInnerSlots } from '../Commons/adjacent.interface';
|
|
3
|
+
import type { IBorderProps } from '../Commons/border.interface';
|
|
3
4
|
import type { IBgColorProps, IColorProps } from '../Commons/color.interface';
|
|
4
5
|
import type { ICommonsComponentProps } from '../Commons/commons.interface';
|
|
5
6
|
import type { IDensityProps } from '../Commons/density.interface';
|
|
@@ -11,7 +12,26 @@ import type { IRoundedProps } from '../Commons/rounded.interface';
|
|
|
11
12
|
import type { ISizeProps } from '../Commons/size.interface';
|
|
12
13
|
import type { ITypographyProps } from '../Commons/typography.interface';
|
|
13
14
|
import type { IVariantProps } from '../Commons/variant.interface';
|
|
14
|
-
|
|
15
|
+
/*********************************************************
|
|
16
|
+
* IFieldProps
|
|
17
|
+
*
|
|
18
|
+
* @description
|
|
19
|
+
* `IBorderProps` (issue #726) — the field owns the NOTCHED outline
|
|
20
|
+
* (`__outline--start` / `--notch` / `--end`), so the `border` surface has to
|
|
21
|
+
* be declared HERE, not only on `IInputProps`.
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
* Before #726 `border` existed solely on the OUTER `OrigamInput` wrapper,
|
|
25
|
+
* which has no notch: the line it painted ran straight through the floating
|
|
26
|
+
* label (measured: label box `[-7, 11]`, input border band `[0, 2]` — a 2 px
|
|
27
|
+
* strike through an 18 px label).
|
|
28
|
+
*
|
|
29
|
+
* @description
|
|
30
|
+
* `OrigamField` now maps the resolved width / style / colour onto the
|
|
31
|
+
* `--origam-field---border-*` token channel the three outline legs already
|
|
32
|
+
* read, so the notch keeps opening under `--active` / `--focused`.
|
|
33
|
+
********************************************************/
|
|
34
|
+
export interface IFieldProps extends ICommonsComponentProps, ILoaderProps, IColorProps, IBgColorProps, IAdjacentInnerProps, IBorderProps, IFocusProps, IDensityProps, ILabelProps, IActiveProps, IVariantProps, IRoundedProps, IElevationProps, ISizeProps, Pick<ITypographyProps, 'fontSize' | 'fontWeight' | 'lineHeight' | 'letterSpacing'> {
|
|
15
35
|
centerAffix?: boolean;
|
|
16
36
|
dirty?: boolean;
|
|
17
37
|
disabled?: boolean;
|