@skewedaspect/sleekspace-ui 0.9.0 → 0.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.
- package/dist/components/Accordion/context.d.ts +4 -0
- package/dist/components/Autocomplete/SkAutocomplete.vue.d.ts +87 -0
- package/dist/components/Autocomplete/SkAutocompleteEmpty.vue.d.ts +17 -0
- package/dist/components/Autocomplete/SkAutocompleteGroup.vue.d.ts +17 -0
- package/dist/components/Autocomplete/SkAutocompleteGroupLabel.vue.d.ts +17 -0
- package/dist/components/Autocomplete/SkAutocompleteItem.vue.d.ts +39 -0
- package/dist/components/Autocomplete/SkAutocompleteSeparator.vue.d.ts +2 -0
- package/dist/components/Autocomplete/index.d.ts +7 -0
- package/dist/components/Autocomplete/types.d.ts +3 -0
- package/dist/components/Breadcrumbs/context.d.ts +4 -0
- package/dist/components/Button/SkButton.vue.d.ts +8 -1
- package/dist/components/Button/types.d.ts +2 -0
- package/dist/components/Card/SkCard.vue.d.ts +1 -1
- package/dist/components/ContextMenu/context.d.ts +3 -0
- package/dist/components/Dropdown/SkDropdown.vue.d.ts +1 -1
- package/dist/components/Dropdown/context.d.ts +3 -0
- package/dist/components/Field/SkField.vue.d.ts +7 -6
- package/dist/components/Input/SkInput.vue.d.ts +9 -2
- package/dist/components/Input/types.d.ts +2 -0
- package/dist/components/InputGroup/SkInputGroup.vue.d.ts +23 -0
- package/dist/components/InputGroup/SkInputGroupAddon.vue.d.ts +33 -0
- package/dist/components/InputGroup/types.d.ts +13 -0
- package/dist/components/NumberInput/SkNumberInput.vue.d.ts +15 -1
- package/dist/components/NumberInput/types.d.ts +2 -0
- package/dist/components/Pagination/context.d.ts +5 -0
- package/dist/components/Panel/SkPanel.vue.d.ts +1 -1
- package/dist/components/Panel/types.d.ts +2 -1
- package/dist/components/Radio/context.d.ts +4 -0
- package/dist/components/Select/SkSelect.vue.d.ts +7 -1
- package/dist/components/Select/types.d.ts +2 -0
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +1 -1
- package/dist/components/Tabs/context.d.ts +6 -0
- package/dist/components/Textarea/SkTextarea.vue.d.ts +1 -1
- package/dist/components/Tooltip/SkTooltip.vue.d.ts +1 -1
- package/dist/composables/injectionKeys.d.ts +9 -0
- package/dist/global.d.ts +4 -0
- package/dist/index.d.ts +18 -0
- package/dist/sleekspace-ui.css +836 -280
- package/dist/sleekspace-ui.es.js +3759 -2545
- package/dist/sleekspace-ui.umd.js +3765 -2543
- package/dist/static/components/alert.d.ts +2 -1
- package/dist/static/components/avatar.d.ts +2 -1
- package/dist/static/components/breadcrumbs.d.ts +2 -1
- package/dist/static/components/button.d.ts +4 -2
- package/dist/static/components/card.d.ts +2 -1
- package/dist/static/components/checkbox.d.ts +2 -1
- package/dist/static/components/colorPicker.d.ts +2 -1
- package/dist/static/components/divider.d.ts +2 -1
- package/dist/static/components/dropdown.d.ts +2 -1
- package/dist/static/components/field.d.ts +2 -1
- package/dist/static/components/group.d.ts +2 -1
- package/dist/static/components/input.d.ts +4 -2
- package/dist/static/components/inputGroup.d.ts +8 -0
- package/dist/static/components/inputGroupAddon.d.ts +7 -0
- package/dist/static/components/navBar.d.ts +2 -1
- package/dist/static/components/numberInput.d.ts +4 -2
- package/dist/static/components/page.d.ts +2 -1
- package/dist/static/components/pagination.d.ts +2 -1
- package/dist/static/components/panel.d.ts +2 -1
- package/dist/static/components/progress.d.ts +2 -1
- package/dist/static/components/radio.d.ts +2 -1
- package/dist/static/components/select.d.ts +4 -2
- package/dist/static/components/sidebar.d.ts +2 -1
- package/dist/static/components/skeleton.d.ts +2 -1
- package/dist/static/components/slider.d.ts +2 -1
- package/dist/static/components/spinner.d.ts +2 -1
- package/dist/static/components/switchInput.d.ts +2 -1
- package/dist/static/components/table.d.ts +2 -1
- package/dist/static/components/tag.d.ts +2 -1
- package/dist/static/components/tagsInput.d.ts +2 -1
- package/dist/static/components/textarea.d.ts +2 -1
- package/dist/static/components/toolbar.d.ts +2 -1
- package/dist/static/components/tooltip.d.ts +2 -1
- package/dist/static/h.d.ts +2 -0
- package/dist/static/index.cjs.js +1 -1
- package/dist/static/index.d.ts +6 -0
- package/dist/static/index.es.js +366 -216
- package/dist/static/render.d.ts +2 -1
- package/dist/static/stringH.d.ts +2 -0
- package/dist/static/types.d.ts +5 -0
- package/dist/tailwind.css +222 -0
- package/dist/tokens.css +0 -223
- package/dist/types/corners.d.ts +1 -0
- package/dist/utils/slots.d.ts +6 -0
- package/llms-full.txt +17 -9
- package/package.json +9 -3
- package/src/components/Accordion/SkAccordion.vue +5 -2
- package/src/components/Accordion/SkAccordionItem.vue +7 -4
- package/src/components/Accordion/context.ts +23 -0
- package/src/components/Alert/SkAlert.vue +4 -2
- package/src/components/Autocomplete/SkAutocomplete.test.ts +83 -0
- package/src/components/Autocomplete/SkAutocomplete.vue +305 -0
- package/src/components/Autocomplete/SkAutocompleteEmpty.vue +39 -0
- package/src/components/Autocomplete/SkAutocompleteGroup.vue +46 -0
- package/src/components/Autocomplete/SkAutocompleteGroupLabel.vue +39 -0
- package/src/components/Autocomplete/SkAutocompleteItem.vue +85 -0
- package/src/components/Autocomplete/SkAutocompleteSeparator.vue +39 -0
- package/src/components/Autocomplete/index.ts +13 -0
- package/src/components/Autocomplete/types.ts +10 -0
- package/src/components/Breadcrumbs/SkBreadcrumbItem.vue +8 -3
- package/src/components/Breadcrumbs/SkBreadcrumbSeparator.vue +8 -2
- package/src/components/Breadcrumbs/SkBreadcrumbs.vue +11 -14
- package/src/components/Breadcrumbs/context.ts +20 -0
- package/src/components/Button/SkButton.vue +54 -11
- package/src/components/Button/types.ts +6 -0
- package/src/components/Card/SkCard.vue +12 -5
- package/src/components/Checkbox/SkCheckbox.vue +9 -2
- package/src/components/ColorPicker/SkColorPicker.vue +27 -5
- package/src/components/ContextMenu/SkContextMenu.vue +4 -1
- package/src/components/ContextMenu/SkContextMenuSubmenu.vue +5 -2
- package/src/components/ContextMenu/context.ts +17 -0
- package/src/components/Dropdown/SkDropdown.vue +2 -1
- package/src/components/Dropdown/SkDropdownSubmenu.vue +4 -3
- package/src/components/Dropdown/context.ts +16 -0
- package/src/components/Field/SkField.test.ts +88 -0
- package/src/components/Field/SkField.vue +15 -7
- package/src/components/Input/SkInput.test.ts +61 -0
- package/src/components/Input/SkInput.vue +42 -7
- package/src/components/Input/types.ts +2 -0
- package/src/components/InputGroup/SkInputGroup.test.ts +171 -0
- package/src/components/InputGroup/SkInputGroup.vue +131 -0
- package/src/components/InputGroup/SkInputGroupAddon.test.ts +104 -0
- package/src/components/InputGroup/SkInputGroupAddon.vue +107 -0
- package/src/components/InputGroup/types.ts +27 -0
- package/src/components/Listbox/SkListbox.vue +27 -6
- package/src/components/Modal/SkModal.vue +11 -4
- package/src/components/NavBar/SkNavBar.vue +5 -4
- package/src/components/NumberInput/SkNumberInput.vue +49 -8
- package/src/components/NumberInput/types.ts +2 -0
- package/src/components/Page/SkPage.vue +18 -15
- package/src/components/Pagination/SkPagination.vue +6 -3
- package/src/components/Pagination/SkPaginationItem.vue +8 -5
- package/src/components/Pagination/context.ts +19 -0
- package/src/components/Panel/types.ts +3 -2
- package/src/components/Popover/SkPopover.vue +11 -4
- package/src/components/Radio/SkRadio.vue +14 -4
- package/src/components/Radio/SkRadioGroup.vue +4 -2
- package/src/components/Radio/context.ts +17 -0
- package/src/components/Select/SkSelect.vue +39 -7
- package/src/components/Select/types.ts +2 -0
- package/src/components/Switch/SkSwitch.vue +14 -13
- package/src/components/Tabs/SkTab.vue +10 -3
- package/src/components/Tabs/SkTabList.vue +4 -2
- package/src/components/Tabs/SkTabs.vue +5 -3
- package/src/components/Tabs/context.ts +19 -0
- package/src/components/TagsInput/SkTagsInput.vue +28 -7
- package/src/components/Textarea/SkTextarea.vue +27 -6
- package/src/components/TreeView/SkTreeItem.vue +10 -2
- package/src/composables/injectionKeys.ts +52 -0
- package/src/index.ts +28 -0
- package/src/static/__tests__/parity.test.ts +2 -1
- package/src/static/__tests__/parityHarness.ts +5 -2
- package/src/static/components/__tests__/helpers.test.ts +191 -99
- package/src/static/components/alert.ts +12 -11
- package/src/static/components/avatar.ts +15 -16
- package/src/static/components/breadcrumbs.ts +3 -2
- package/src/static/components/button.ts +23 -27
- package/src/static/components/card.ts +3 -2
- package/src/static/components/checkbox.ts +11 -14
- package/src/static/components/colorPicker.ts +7 -9
- package/src/static/components/divider.ts +4 -3
- package/src/static/components/dropdown.ts +15 -6
- package/src/static/components/field.ts +32 -15
- package/src/static/components/group.ts +3 -2
- package/src/static/components/input.ts +20 -15
- package/src/static/components/inputGroup.ts +30 -0
- package/src/static/components/inputGroupAddon.ts +29 -0
- package/src/static/components/navBar.ts +30 -17
- package/src/static/components/numberInput.ts +17 -17
- package/src/static/components/page.ts +3 -2
- package/src/static/components/pagination.ts +3 -2
- package/src/static/components/panel.ts +3 -2
- package/src/static/components/progress.ts +3 -2
- package/src/static/components/radio.ts +14 -20
- package/src/static/components/select.ts +18 -15
- package/src/static/components/sidebar.ts +9 -13
- package/src/static/components/skeleton.ts +7 -10
- package/src/static/components/slider.ts +7 -9
- package/src/static/components/spinner.ts +22 -22
- package/src/static/components/switchInput.ts +12 -14
- package/src/static/components/table.ts +8 -10
- package/src/static/components/tag.ts +17 -11
- package/src/static/components/tagsInput.ts +3 -3
- package/src/static/components/textarea.ts +8 -13
- package/src/static/components/toolbar.ts +7 -10
- package/src/static/components/tooltip.ts +3 -2
- package/src/static/generated/defaults.ts +25 -9
- package/src/static/generated/propTypes.ts +19 -2
- package/src/static/h.ts +16 -0
- package/src/static/index.ts +8 -0
- package/src/static/render.test.ts +14 -10
- package/src/static/render.ts +33 -18
- package/src/static/specs.test.ts +1 -0
- package/src/static/specs.ts +22 -2
- package/src/static/stringH.ts +104 -0
- package/src/static/types.ts +25 -0
- package/src/styles/components/_autocomplete.scss +498 -0
- package/src/styles/components/_button.scss +55 -6
- package/src/styles/components/_index.scss +2 -0
- package/src/styles/components/_input-group.scss +292 -0
- package/src/styles/components/_input.scss +57 -9
- package/src/styles/components/_number-input.scss +88 -14
- package/src/styles/components/_select.scss +56 -9
- package/src/styles/mixins/_cut-border.scss +83 -0
- package/src/styles/tailwind.scss +262 -0
- package/src/styles/tokens.scss +8 -255
- package/src/types/corners.ts +10 -0
- package/src/utils/slots.test.ts +89 -0
- package/src/utils/slots.ts +80 -0
- package/web-types.json +392 -12
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
@use '../mixins/cut-border' as *;
|
|
2
|
+
@use '../mixins/dual-selector' as *;
|
|
3
|
+
@use '../theme/variables' as *;
|
|
4
|
+
|
|
5
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
6
|
+
// InputGroup Component Styles
|
|
7
|
+
//
|
|
8
|
+
// Wraps form components into a unified flex row with:
|
|
9
|
+
// - Border collapsing between adjacent children
|
|
10
|
+
// - Suppression of all interior corner cuts
|
|
11
|
+
// - Application of the group's `corners` prop to whichever child holds that corner of the group
|
|
12
|
+
// - Addon styling that matches surrounding form components
|
|
13
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
.sk-input-group,
|
|
16
|
+
sk-input-group
|
|
17
|
+
{
|
|
18
|
+
// Color tokens (can be overridden by useCustomColors)
|
|
19
|
+
--sk-input-group-color-base: var(--sk-neutral-base);
|
|
20
|
+
--sk-input-group-fg: var(--sk-neutral-text);
|
|
21
|
+
|
|
22
|
+
// Addon-specific cut size (mirrors --sk-input-cut)
|
|
23
|
+
--sk-input-group-addon-cut: 0.625rem;
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: stretch;
|
|
27
|
+
width: 100%;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
position: relative;
|
|
30
|
+
|
|
31
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
32
|
+
// Child layout — form fields fill remaining space; buttons / addons stay at content size
|
|
33
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
34
|
+
|
|
35
|
+
> .sk-input,
|
|
36
|
+
> .sk-select,
|
|
37
|
+
> .sk-number-input-wrapper
|
|
38
|
+
{
|
|
39
|
+
flex: 1 1 0;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
> .sk-button,
|
|
44
|
+
> .sk-input-group-addon
|
|
45
|
+
{
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
50
|
+
// Zero out every child's native default corner cuts. The group's corner-application mixins
|
|
51
|
+
// (below) re-enable only the corners that map to the group's outer edges. Without this reset,
|
|
52
|
+
// a child's own defaults (e.g. SkInput's default top-right cut) would stack with the cuts the
|
|
53
|
+
// group applies, producing extra cut corners.
|
|
54
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
> .sk-input,
|
|
57
|
+
> .sk-button,
|
|
58
|
+
> .sk-select,
|
|
59
|
+
> .sk-number-input-wrapper,
|
|
60
|
+
> .sk-input-group-addon
|
|
61
|
+
{
|
|
62
|
+
--sk-input-cut-tl: 0px;
|
|
63
|
+
--sk-input-cut-tr: 0px;
|
|
64
|
+
--sk-input-cut-br: 0px;
|
|
65
|
+
--sk-input-cut-bl: 0px;
|
|
66
|
+
--sk-button-cut-tl: 0px;
|
|
67
|
+
--sk-button-cut-tr: 0px;
|
|
68
|
+
--sk-button-cut-br: 0px;
|
|
69
|
+
--sk-button-cut-bl: 0px;
|
|
70
|
+
--sk-select-cut-tl: 0px;
|
|
71
|
+
--sk-select-cut-tr: 0px;
|
|
72
|
+
--sk-select-cut-br: 0px;
|
|
73
|
+
--sk-select-cut-bl: 0px;
|
|
74
|
+
--sk-number-input-cut-tl: 0px;
|
|
75
|
+
--sk-number-input-cut-tr: 0px;
|
|
76
|
+
--sk-number-input-cut-br: 0px;
|
|
77
|
+
--sk-number-input-cut-bl: 0px;
|
|
78
|
+
--sk-input-group-addon-cut-tl: 0px;
|
|
79
|
+
--sk-input-group-addon-cut-tr: 0px;
|
|
80
|
+
--sk-input-group-addon-cut-br: 0px;
|
|
81
|
+
--sk-input-group-addon-cut-bl: 0px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
85
|
+
// Collapse the seam between adjacent children — pull the next sibling 1px left so its left
|
|
86
|
+
// border overlaps the previous sibling's right border into a single 1px line. Both siblings
|
|
87
|
+
// keep their full border boxes so the overlap stays opaque (matches in colour); removing one
|
|
88
|
+
// side would let the later sibling's dark background cover the surviving border, dimming the
|
|
89
|
+
// seam.
|
|
90
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
91
|
+
|
|
92
|
+
> .sk-input:not(:first-child),
|
|
93
|
+
> .sk-button:not(:first-child),
|
|
94
|
+
> .sk-select:not(:first-child),
|
|
95
|
+
> .sk-number-input-wrapper:not(:first-child),
|
|
96
|
+
> .sk-input-group-addon:not(:first-child)
|
|
97
|
+
{
|
|
98
|
+
margin-left: -1px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
103
|
+
// Group corner application
|
|
104
|
+
//
|
|
105
|
+
// The group's sk-cut-* classes (or corners=… attribute) drive the corresponding corner on the
|
|
106
|
+
// child that holds that corner of the group:
|
|
107
|
+
// top-left, bottom-left → :first-child
|
|
108
|
+
// top-right, bottom-right → :last-child
|
|
109
|
+
//
|
|
110
|
+
// Each rule sets all five form-component variables for that corner; only the variable matching
|
|
111
|
+
// the actual child type is consumed.
|
|
112
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
113
|
+
|
|
114
|
+
@mixin _ig-tl-on-first
|
|
115
|
+
{
|
|
116
|
+
> :first-child
|
|
117
|
+
{
|
|
118
|
+
--sk-input-cut-tl: var(--sk-input-cut);
|
|
119
|
+
--sk-button-cut-tl: var(--sk-button-current-cut-size);
|
|
120
|
+
--sk-select-cut-tl: var(--sk-select-cut);
|
|
121
|
+
--sk-number-input-cut-tl: var(--sk-number-input-cut);
|
|
122
|
+
--sk-input-group-addon-cut-tl: var(--sk-input-group-addon-cut);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@mixin _ig-bl-on-first
|
|
127
|
+
{
|
|
128
|
+
> :first-child
|
|
129
|
+
{
|
|
130
|
+
--sk-input-cut-bl: var(--sk-input-cut);
|
|
131
|
+
--sk-button-cut-bl: var(--sk-button-current-cut-size);
|
|
132
|
+
--sk-select-cut-bl: var(--sk-select-cut);
|
|
133
|
+
--sk-number-input-cut-bl: var(--sk-number-input-cut);
|
|
134
|
+
--sk-input-group-addon-cut-bl: var(--sk-input-group-addon-cut);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@mixin _ig-tr-on-last
|
|
139
|
+
{
|
|
140
|
+
> :last-child
|
|
141
|
+
{
|
|
142
|
+
--sk-input-cut-tr: var(--sk-input-cut);
|
|
143
|
+
--sk-button-cut-tr: var(--sk-button-current-cut-size);
|
|
144
|
+
--sk-select-cut-tr: var(--sk-select-cut);
|
|
145
|
+
--sk-number-input-cut-tr: var(--sk-number-input-cut);
|
|
146
|
+
--sk-input-group-addon-cut-tr: var(--sk-input-group-addon-cut);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@mixin _ig-br-on-last
|
|
151
|
+
{
|
|
152
|
+
> :last-child
|
|
153
|
+
{
|
|
154
|
+
--sk-input-cut-br: var(--sk-input-cut);
|
|
155
|
+
--sk-button-cut-br: var(--sk-button-current-cut-size);
|
|
156
|
+
--sk-select-cut-br: var(--sk-select-cut);
|
|
157
|
+
--sk-number-input-cut-br: var(--sk-number-input-cut);
|
|
158
|
+
--sk-input-group-addon-cut-br: var(--sk-input-group-addon-cut);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@include list-modifier('input-group', 'cut', 'top-left', 'corners') { @include _ig-tl-on-first; }
|
|
163
|
+
@include list-modifier('input-group', 'cut', 'bottom-left', 'corners') { @include _ig-bl-on-first; }
|
|
164
|
+
@include list-modifier('input-group', 'cut', 'top-right', 'corners') { @include _ig-tr-on-last; }
|
|
165
|
+
@include list-modifier('input-group', 'cut', 'bottom-right', 'corners'){ @include _ig-br-on-last; }
|
|
166
|
+
|
|
167
|
+
@include defaults-when-absent('input-group', 'sk-cut-')
|
|
168
|
+
{
|
|
169
|
+
@include _ig-tl-on-first;
|
|
170
|
+
@include _ig-br-on-last;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@include defaults-when-no-attr('input-group', 'corners')
|
|
174
|
+
{
|
|
175
|
+
@include _ig-tl-on-first;
|
|
176
|
+
@include _ig-br-on-last;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
180
|
+
// Addon base styles
|
|
181
|
+
//
|
|
182
|
+
// Mirrors the surrounding form components: dark background derived from kind base, neon-base
|
|
183
|
+
// border, font sizing matching the size variant.
|
|
184
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
185
|
+
|
|
186
|
+
.sk-input-group-addon,
|
|
187
|
+
sk-input-group-addon
|
|
188
|
+
{
|
|
189
|
+
--sk-input-group-addon-color-base: var(--sk-neutral-base);
|
|
190
|
+
--sk-input-group-addon-fg: var(--sk-neutral-text);
|
|
191
|
+
--sk-input-group-addon-cut: 0.625rem;
|
|
192
|
+
|
|
193
|
+
--sk-input-group-addon-cut-tl: 0px;
|
|
194
|
+
--sk-input-group-addon-cut-tr: 0px;
|
|
195
|
+
--sk-input-group-addon-cut-br: 0px;
|
|
196
|
+
--sk-input-group-addon-cut-bl: 0px;
|
|
197
|
+
|
|
198
|
+
display: inline-flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
box-sizing: border-box;
|
|
202
|
+
position: relative;
|
|
203
|
+
flex-shrink: 0;
|
|
204
|
+
font-family: var(--sk-font-family-base);
|
|
205
|
+
color: var(--sk-input-group-addon-fg);
|
|
206
|
+
background: color-mix(
|
|
207
|
+
in oklch,
|
|
208
|
+
color-mix(in oklch, var(--sk-input-group-addon-color-base) 75%, transparent 25%),
|
|
209
|
+
#000 65%
|
|
210
|
+
);
|
|
211
|
+
user-select: none;
|
|
212
|
+
|
|
213
|
+
@include cut-border-vars(
|
|
214
|
+
$tl: var(--sk-input-group-addon-cut-tl),
|
|
215
|
+
$tr: var(--sk-input-group-addon-cut-tr),
|
|
216
|
+
$br: var(--sk-input-group-addon-cut-br),
|
|
217
|
+
$bl: var(--sk-input-group-addon-cut-bl),
|
|
218
|
+
$border-width: var(--sk-border-width-thin),
|
|
219
|
+
$border-color: var(--sk-input-group-addon-color-base)
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
224
|
+
// Addon size variants — height / padding / font / cut
|
|
225
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
226
|
+
|
|
227
|
+
@include size-variant('input-group-addon', 'sm')
|
|
228
|
+
{
|
|
229
|
+
height: 2rem;
|
|
230
|
+
padding: 0 var(--sk-space-sm);
|
|
231
|
+
font-size: 0.875rem;
|
|
232
|
+
--sk-input-group-addon-cut: 0.5rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@include size-variant('input-group-addon', 'md')
|
|
236
|
+
{
|
|
237
|
+
height: 2.5rem;
|
|
238
|
+
padding: 0 var(--sk-space-md);
|
|
239
|
+
font-size: 1rem;
|
|
240
|
+
--sk-input-group-addon-cut: 0.625rem;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@include size-variant('input-group-addon', 'lg')
|
|
244
|
+
{
|
|
245
|
+
height: 3rem;
|
|
246
|
+
padding: 0 var(--sk-space-md);
|
|
247
|
+
font-size: 1.125rem;
|
|
248
|
+
--sk-input-group-addon-cut: 0.75rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@include size-variant('input-group-addon', 'xl')
|
|
252
|
+
{
|
|
253
|
+
height: 3.5rem;
|
|
254
|
+
padding: 0 var(--sk-space-md);
|
|
255
|
+
font-size: 1.25rem;
|
|
256
|
+
--sk-input-group-addon-cut: 0.875rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
260
|
+
// Addon kind variants — drive the addon's base color tokens
|
|
261
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
262
|
+
|
|
263
|
+
@each $kind in (neutral, primary, accent, info, success, warning, danger)
|
|
264
|
+
{
|
|
265
|
+
@include kind-variant('input-group-addon', $kind)
|
|
266
|
+
{
|
|
267
|
+
--sk-input-group-addon-color-base: var(--sk-#{ $kind }-base);
|
|
268
|
+
--sk-input-group-addon-fg: var(--sk-#{ $kind }-text);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
273
|
+
// Addon defaults-when-absent — standalone default size/kind
|
|
274
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
275
|
+
|
|
276
|
+
@include defaults-when-absent('input-group-addon', 'sk-size-')
|
|
277
|
+
{
|
|
278
|
+
height: 2.5rem;
|
|
279
|
+
padding: 0 var(--sk-space-md);
|
|
280
|
+
font-size: 1rem;
|
|
281
|
+
--sk-input-group-addon-cut: 0.625rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@include defaults-when-no-attr('input-group-addon', 'size')
|
|
285
|
+
{
|
|
286
|
+
height: 2.5rem;
|
|
287
|
+
padding: 0 var(--sk-space-md);
|
|
288
|
+
font-size: 1rem;
|
|
289
|
+
--sk-input-group-addon-cut: 0.625rem;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../mixins/cut-border' as *;
|
|
2
|
+
@use '../mixins/dual-selector' as *;
|
|
2
3
|
@use '../theme/variables' as *;
|
|
3
4
|
|
|
4
5
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -14,15 +15,25 @@
|
|
|
14
15
|
// Corner cut size (scales with size variant)
|
|
15
16
|
--sk-input-cut: 0.5rem;
|
|
16
17
|
|
|
18
|
+
// Per-corner cut sizes (toggled on by .sk-cut-* classes / corners= attribute)
|
|
19
|
+
--sk-input-cut-tl: 0px;
|
|
20
|
+
--sk-input-cut-tr: 0px;
|
|
21
|
+
--sk-input-cut-br: 0px;
|
|
22
|
+
--sk-input-cut-bl: 0px;
|
|
23
|
+
|
|
17
24
|
position: relative;
|
|
18
25
|
display: block;
|
|
19
26
|
width: 100%;
|
|
20
27
|
font-family: var(--sk-font-family-base);
|
|
21
28
|
cursor: text;
|
|
22
29
|
|
|
23
|
-
@include cut-border(
|
|
24
|
-
$
|
|
25
|
-
$
|
|
30
|
+
@include cut-border-vars(
|
|
31
|
+
$tl: var(--sk-input-cut-tl),
|
|
32
|
+
$tr: var(--sk-input-cut-tr),
|
|
33
|
+
$br: var(--sk-input-cut-br),
|
|
34
|
+
$bl: var(--sk-input-cut-bl),
|
|
35
|
+
$border-width: var(--sk-border-width-thin),
|
|
36
|
+
$border-color: var(--sk-input-color-base)
|
|
26
37
|
);
|
|
27
38
|
|
|
28
39
|
// Base styling
|
|
@@ -32,7 +43,6 @@
|
|
|
32
43
|
#000 65%
|
|
33
44
|
);
|
|
34
45
|
color: var(--sk-input-fg);
|
|
35
|
-
border: var(--sk-border-width-thin) solid var(--sk-input-color-base);
|
|
36
46
|
|
|
37
47
|
// Transitions
|
|
38
48
|
transition-property: background, color, border-color, box-shadow;
|
|
@@ -46,7 +56,7 @@
|
|
|
46
56
|
height: 2.5rem;
|
|
47
57
|
padding: 0 var(--sk-space-md);
|
|
48
58
|
font-size: 1rem;
|
|
49
|
-
--sk-input-cut: 0.
|
|
59
|
+
--sk-input-cut: 0.625rem;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
&.sk-sm,
|
|
@@ -55,7 +65,7 @@
|
|
|
55
65
|
height: 2rem;
|
|
56
66
|
padding: 0 var(--sk-space-sm);
|
|
57
67
|
font-size: 0.875rem;
|
|
58
|
-
--sk-input-cut: 0.
|
|
68
|
+
--sk-input-cut: 0.5rem;
|
|
59
69
|
}
|
|
60
70
|
|
|
61
71
|
&.sk-md,
|
|
@@ -64,7 +74,7 @@
|
|
|
64
74
|
height: 2.5rem;
|
|
65
75
|
padding: 0 var(--sk-space-md);
|
|
66
76
|
font-size: 1rem;
|
|
67
|
-
--sk-input-cut: 0.
|
|
77
|
+
--sk-input-cut: 0.625rem;
|
|
68
78
|
}
|
|
69
79
|
|
|
70
80
|
&.sk-lg,
|
|
@@ -73,7 +83,7 @@
|
|
|
73
83
|
height: 3rem;
|
|
74
84
|
padding: 0 var(--sk-space-md);
|
|
75
85
|
font-size: 1.125rem;
|
|
76
|
-
--sk-input-cut: 0.
|
|
86
|
+
--sk-input-cut: 0.75rem;
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
&.sk-xl,
|
|
@@ -82,7 +92,7 @@
|
|
|
82
92
|
height: 3.5rem;
|
|
83
93
|
padding: 0 var(--sk-space-md);
|
|
84
94
|
font-size: 1.25rem;
|
|
85
|
-
--sk-input-cut: 0.
|
|
95
|
+
--sk-input-cut: 0.875rem;
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
// Focus state (brighter background)
|
|
@@ -263,6 +273,44 @@
|
|
|
263
273
|
}
|
|
264
274
|
}
|
|
265
275
|
|
|
276
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
277
|
+
// Default cut: top-right — fires when no sk-cut-* class is present and no corners attribute set.
|
|
278
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
279
|
+
|
|
280
|
+
@include defaults-when-absent('input', 'sk-cut-')
|
|
281
|
+
{
|
|
282
|
+
--sk-input-cut-tr: var(--sk-input-cut);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@include defaults-when-no-attr('input', 'corners')
|
|
286
|
+
{
|
|
287
|
+
--sk-input-cut-tr: var(--sk-input-cut);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
291
|
+
// Per-corner classes (sk-cut-top-left etc.) and corners="..." attribute values.
|
|
292
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
293
|
+
|
|
294
|
+
@include list-modifier('input', 'cut', 'top-left', 'corners')
|
|
295
|
+
{
|
|
296
|
+
--sk-input-cut-tl: var(--sk-input-cut);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@include list-modifier('input', 'cut', 'top-right', 'corners')
|
|
300
|
+
{
|
|
301
|
+
--sk-input-cut-tr: var(--sk-input-cut);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
@include list-modifier('input', 'cut', 'bottom-right', 'corners')
|
|
305
|
+
{
|
|
306
|
+
--sk-input-cut-br: var(--sk-input-cut);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@include list-modifier('input', 'cut', 'bottom-left', 'corners')
|
|
310
|
+
{
|
|
311
|
+
--sk-input-cut-bl: var(--sk-input-cut);
|
|
312
|
+
}
|
|
313
|
+
|
|
266
314
|
//----------------------------------------------------------------------------------------------------------------------
|
|
267
315
|
// Defaults-when-absent: kind — neutral when no explicit kind class is present.
|
|
268
316
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../mixins/cut-border' as *;
|
|
2
|
+
@use '../mixins/dual-selector' as *;
|
|
2
3
|
@use '../theme/variables' as *;
|
|
3
4
|
|
|
4
5
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -23,7 +24,13 @@
|
|
|
23
24
|
--sk-number-input-font-size: 1rem;
|
|
24
25
|
--sk-number-input-stepper-width: 2rem;
|
|
25
26
|
--sk-number-input-stepper-icon: 1rem;
|
|
26
|
-
--sk-number-input-cut: 0.
|
|
27
|
+
--sk-number-input-cut: 0.625rem;
|
|
28
|
+
|
|
29
|
+
// Per-corner cut sizes (toggled on by .sk-cut-* / corners= attribute)
|
|
30
|
+
--sk-number-input-cut-tl: 0px;
|
|
31
|
+
--sk-number-input-cut-tr: 0px;
|
|
32
|
+
--sk-number-input-cut-br: 0px;
|
|
33
|
+
--sk-number-input-cut-bl: 0px;
|
|
27
34
|
|
|
28
35
|
position: relative;
|
|
29
36
|
display: flex;
|
|
@@ -135,7 +142,7 @@
|
|
|
135
142
|
--sk-number-input-font-size: 1rem;
|
|
136
143
|
--sk-number-input-stepper-width: 2rem;
|
|
137
144
|
--sk-number-input-stepper-icon: 1rem;
|
|
138
|
-
--sk-number-input-cut: 0.
|
|
145
|
+
--sk-number-input-cut: 0.625rem;
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
&.sk-sm,
|
|
@@ -146,7 +153,7 @@
|
|
|
146
153
|
--sk-number-input-font-size: 0.875rem;
|
|
147
154
|
--sk-number-input-stepper-width: 1.5rem;
|
|
148
155
|
--sk-number-input-stepper-icon: 0.75rem;
|
|
149
|
-
--sk-number-input-cut: 0.
|
|
156
|
+
--sk-number-input-cut: 0.5rem;
|
|
150
157
|
}
|
|
151
158
|
|
|
152
159
|
&.sk-md,
|
|
@@ -157,7 +164,7 @@
|
|
|
157
164
|
--sk-number-input-font-size: 1rem;
|
|
158
165
|
--sk-number-input-stepper-width: 2rem;
|
|
159
166
|
--sk-number-input-stepper-icon: 1rem;
|
|
160
|
-
--sk-number-input-cut: 0.
|
|
167
|
+
--sk-number-input-cut: 0.625rem;
|
|
161
168
|
}
|
|
162
169
|
|
|
163
170
|
&.sk-lg,
|
|
@@ -168,7 +175,7 @@
|
|
|
168
175
|
--sk-number-input-font-size: 1.125rem;
|
|
169
176
|
--sk-number-input-stepper-width: 2.25rem;
|
|
170
177
|
--sk-number-input-stepper-icon: 1.125rem;
|
|
171
|
-
--sk-number-input-cut: 0.
|
|
178
|
+
--sk-number-input-cut: 0.75rem;
|
|
172
179
|
}
|
|
173
180
|
|
|
174
181
|
&.sk-xl,
|
|
@@ -179,7 +186,7 @@
|
|
|
179
186
|
--sk-number-input-font-size: 1.25rem;
|
|
180
187
|
--sk-number-input-stepper-width: 2.5rem;
|
|
181
188
|
--sk-number-input-stepper-icon: 1.25rem;
|
|
182
|
-
--sk-number-input-cut: 0.
|
|
189
|
+
--sk-number-input-cut: 0.875rem;
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
192
|
|
|
@@ -193,9 +200,13 @@
|
|
|
193
200
|
height: 100%;
|
|
194
201
|
position: relative;
|
|
195
202
|
|
|
196
|
-
@include cut-border(
|
|
197
|
-
$
|
|
198
|
-
$
|
|
203
|
+
@include cut-border-vars(
|
|
204
|
+
$tl: var(--sk-number-input-cut-tl),
|
|
205
|
+
$tr: var(--sk-number-input-cut-tr),
|
|
206
|
+
$br: var(--sk-number-input-cut-br),
|
|
207
|
+
$bl: var(--sk-number-input-cut-bl),
|
|
208
|
+
$border-width: var(--sk-border-width-thin),
|
|
209
|
+
$border-color: var(--sk-number-input-color-base)
|
|
199
210
|
);
|
|
200
211
|
|
|
201
212
|
// Base styling
|
|
@@ -204,7 +215,6 @@
|
|
|
204
215
|
color-mix(in oklch, var(--sk-number-input-color-base) 75%, transparent 25%),
|
|
205
216
|
#000 65%
|
|
206
217
|
);
|
|
207
|
-
border: var(--sk-border-width-thin) solid var(--sk-number-input-color-base);
|
|
208
218
|
|
|
209
219
|
// Transitions
|
|
210
220
|
transition-property: background, color, border-color, box-shadow;
|
|
@@ -330,15 +340,79 @@
|
|
|
330
340
|
.sk-number-input-increment
|
|
331
341
|
{
|
|
332
342
|
position: relative;
|
|
343
|
+
|
|
344
|
+
// Shape-only: mirror the wrapper's top-right bevel so the hover fill doesn't square off the
|
|
345
|
+
// cut corner. Driven by the wrapper's per-corner variable so when the wrapper's top-right is
|
|
346
|
+
// suppressed (e.g. interior child of SkInputGroup) the increment stays square too.
|
|
347
|
+
@include cut-border-vars(
|
|
348
|
+
$tl: 0px,
|
|
349
|
+
$tr: var(--sk-number-input-cut-tr),
|
|
350
|
+
$br: 0px,
|
|
351
|
+
$bl: 0px,
|
|
352
|
+
$border-width: 0,
|
|
353
|
+
$border-color: transparent
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
// Divider between increment and decrement. Must come after the mixin so the `border:`
|
|
357
|
+
// shorthand inside doesn't clobber it.
|
|
333
358
|
border-bottom: var(--sk-border-width-thin) solid var(--sk-number-input-color-base);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
334
362
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
363
|
+
.sk-number-input-decrement
|
|
364
|
+
{
|
|
365
|
+
position: relative;
|
|
366
|
+
|
|
367
|
+
// Mirror the wrapper's bottom-right bevel for the same reason as the increment above.
|
|
368
|
+
@include cut-border-vars(
|
|
369
|
+
$tl: 0px,
|
|
370
|
+
$tr: 0px,
|
|
371
|
+
$br: var(--sk-number-input-cut-br),
|
|
372
|
+
$bl: 0px,
|
|
373
|
+
$border-width: 0,
|
|
374
|
+
$border-color: transparent
|
|
339
375
|
);
|
|
340
376
|
}
|
|
341
377
|
|
|
378
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
379
|
+
// Default cut: top-right — fires when no sk-cut-* class is present and no corners attribute set.
|
|
380
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
381
|
+
|
|
382
|
+
@include defaults-when-absent('number-input-wrapper', 'sk-cut-')
|
|
383
|
+
{
|
|
384
|
+
--sk-number-input-cut-tr: var(--sk-number-input-cut);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@include defaults-when-no-attr('number-input-wrapper', 'corners')
|
|
388
|
+
{
|
|
389
|
+
--sk-number-input-cut-tr: var(--sk-number-input-cut);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
393
|
+
// Per-corner classes / corners="..." values.
|
|
394
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
395
|
+
|
|
396
|
+
@include list-modifier('number-input-wrapper', 'cut', 'top-left', 'corners')
|
|
397
|
+
{
|
|
398
|
+
--sk-number-input-cut-tl: var(--sk-number-input-cut);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
@include list-modifier('number-input-wrapper', 'cut', 'top-right', 'corners')
|
|
402
|
+
{
|
|
403
|
+
--sk-number-input-cut-tr: var(--sk-number-input-cut);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@include list-modifier('number-input-wrapper', 'cut', 'bottom-right', 'corners')
|
|
407
|
+
{
|
|
408
|
+
--sk-number-input-cut-br: var(--sk-number-input-cut);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@include list-modifier('number-input-wrapper', 'cut', 'bottom-left', 'corners')
|
|
412
|
+
{
|
|
413
|
+
--sk-number-input-cut-bl: var(--sk-number-input-cut);
|
|
414
|
+
}
|
|
415
|
+
|
|
342
416
|
//----------------------------------------------------------------------------------------------------------------------
|
|
343
417
|
// Defaults-when-absent: kind — neutral when no explicit kind class is present on the wrapper.
|
|
344
418
|
//----------------------------------------------------------------------------------------------------------------------
|