tamga-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/CHANGELOG.md +23 -0
- package/dist/components/button.d.ts +9 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +2 -2
- package/dist/fonts.css +1 -1
- package/dist/kit.css +16 -5
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ Versions follow [semver](https://semver.org/). Through `0.x`, breaking changes m
|
|
|
5
5
|
|
|
6
6
|
> 🇹🇷 Türkçe için [tamga.org.tr/tr](https://tamga.org.tr/tr).
|
|
7
7
|
|
|
8
|
+
## 0.10.0
|
|
9
|
+
|
|
10
|
+
> The busy spinner picks its shape and sits in the centre; the radio mark stays put when chosen.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`Button` `busyLook`** · the spinner's shape while busy, per button: `bars` (default,
|
|
15
|
+
unchanged) or `Spinner`'s `dots`, `pixels`, `ring`, `square`. No app-wide setting.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`Button` busy spinner sits in the exact centre** of the button in every browser: it was an
|
|
20
|
+
absolutely positioned child with no offsets, so its place depended on the browser's
|
|
21
|
+
static-position rule for flex children. `inset: 0; margin: auto; width: fit-content; height: fit-content` now centres the spinner's own box, whatever its look; the invisible
|
|
22
|
+
label still keeps the width. Measured for sm/base/lg and primary/soft/ghost/danger
|
|
23
|
+
(`pnpm olc:dugme`). The five looks are measured, by their painted parts.
|
|
24
|
+
- **`RadioGroup` mark and selected card** · the mark's top offset is computed from its own size
|
|
25
|
+
(radio 20px, checkbox 22px) instead of a single 18px, so it sits centred on the first line
|
|
26
|
+
and a single-line option no longer looks a pixel or two low. The selected card's wash is
|
|
27
|
+
a lighter mix of `--color-accent-bg` (the selected menu row's) and the shell, with the page ink; `--color-accent-soft` made
|
|
28
|
+
the chosen card read as a heavy button beside its neighbours. The checked radio no longer shifts 2px down and right: the pressed-in look is
|
|
29
|
+
carried by the dropped shadow alone, so the mark stays centred on its line in both states.
|
|
30
|
+
|
|
8
31
|
## 0.9.0
|
|
9
32
|
|
|
10
33
|
> An equal grid for the filter row, and a box-shaped panel for the searchable field. Both opt-in; a bar that gives neither renders as before, locked by test.
|
|
@@ -30,8 +30,16 @@ export type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof b
|
|
|
30
30
|
* ama okunur); adsız bir düğme olmuyor.
|
|
31
31
|
*/
|
|
32
32
|
busyLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The spinner's shape while `busy`: `bars` (default, today's) or `Spinner`'s `dots`,
|
|
35
|
+
* `pixels`, `ring`, `square`. Chosen where the button is used; there is no app-wide
|
|
36
|
+
* setting. TR: `busy` sürerken spinner'ın biçimi: `bars` (varsayılan, bugünkü) ya da
|
|
37
|
+
* `Spinner`ın `dots`, `pixels`, `ring`, `square`ı. Düğmenin kullanıldığı yerde seçilir;
|
|
38
|
+
* uygulama geneli bir ayar yok.
|
|
39
|
+
*/
|
|
40
|
+
busyLook?: "bars" | "dots" | "pixels" | "ring" | "square";
|
|
33
41
|
};
|
|
34
|
-
export declare function Button({ className, variant, size, full, busy, busyLabel, children, disabled, ...props }: ButtonProps): import("react").JSX.Element;
|
|
42
|
+
export declare function Button({ className, variant, size, full, busy, busyLabel, busyLook, children, disabled, ...props }: ButtonProps): import("react").JSX.Element;
|
|
35
43
|
export declare const iconButtonVariants: (props?: ({
|
|
36
44
|
size?: "base" | "lg" | "sm" | null | undefined;
|
|
37
45
|
variant?: "danger" | "ghost" | "primary" | "secondary" | "soft" | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0B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O,kBAAkB,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,+BASnE;AAED,eAAO,MAAM,kBAAkB;;8EAW7B,CAAC;AAEH,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,YAAY,EAAE,KAAK,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,+BASnE"}
|
|
@@ -48,11 +48,11 @@ export const buttonVariants = cva("tamga-btn", {
|
|
|
48
48
|
},
|
|
49
49
|
defaultVariants: { variant: "secondary", size: "base", full: false },
|
|
50
50
|
});
|
|
51
|
-
export function Button({ className, variant, size, full, busy = false, busyLabel, children, disabled, ...props }) {
|
|
51
|
+
export function Button({ className, variant, size, full, busy = false, busyLabel, busyLook = "bars", children, disabled, ...props }) {
|
|
52
52
|
return (_jsx("button", { "data-slot": "button", "data-busy": busy || undefined, "aria-busy": busy || undefined,
|
|
53
53
|
/* Kilit `disabled` ile: sürerken ikinci bir tıklama olayı hiç doğmuyor.
|
|
54
54
|
`pointer-events: none` yetmezdi — klavye Enter'ı yine gönderirdi. */
|
|
55
|
-
disabled: disabled || busy, className: cn(buttonVariants({ variant, size, full }), className), ...props, children: busy ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: 16, label: busyLabel ?? "" }), busyLabel ? null : _jsx("span", { className: "sr-only", children: children }), _jsx("span", { className: "invisible", "aria-hidden": true, children: children })] })) : (children) }));
|
|
55
|
+
disabled: disabled || busy, className: cn(buttonVariants({ variant, size, full }), className), ...props, children: busy ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: 16, look: busyLook, label: busyLabel ?? "" }), busyLabel ? null : _jsx("span", { className: "sr-only", children: children }), _jsx("span", { className: "invisible", "aria-hidden": true, children: children })] })) : (children) }));
|
|
56
56
|
}
|
|
57
57
|
/* --------------------------- icon button -------------------------- */
|
|
58
58
|
export const iconButtonVariants = cva("tamga-icon-btn", {
|
package/dist/fonts.css
CHANGED
package/dist/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tamga-ui 0.
|
|
1
|
+
/*! tamga-ui 0.10.0 · MIT · https://tamga.org.tr */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
--overlay-gap: 8px;
|
|
@@ -615,8 +615,14 @@
|
|
|
615
615
|
box-shadow: 4px 4px 0 var(--color-edge-strong);
|
|
616
616
|
cursor: progress;
|
|
617
617
|
}
|
|
618
|
+
|
|
618
619
|
.tamga-btn[data-busy] > [role="status"] {
|
|
619
620
|
position: absolute;
|
|
621
|
+
inset: 0;
|
|
622
|
+
margin: auto;
|
|
623
|
+
|
|
624
|
+
width: fit-content;
|
|
625
|
+
height: fit-content;
|
|
620
626
|
}
|
|
621
627
|
.tamga-btn[data-busy] {
|
|
622
628
|
position: relative;
|
|
@@ -2785,7 +2791,12 @@
|
|
|
2785
2791
|
|
|
2786
2792
|
.tamga-choice-mark {
|
|
2787
2793
|
align-self: flex-start;
|
|
2788
|
-
|
|
2794
|
+
}
|
|
2795
|
+
.tamga-radio.tamga-choice-mark {
|
|
2796
|
+
margin-top: calc((1lh - 20px) / 2);
|
|
2797
|
+
}
|
|
2798
|
+
.tamga-check.tamga-choice-mark {
|
|
2799
|
+
margin-top: calc((1lh - 22px) / 2);
|
|
2789
2800
|
}
|
|
2790
2801
|
|
|
2791
2802
|
.tamga-choice-chip {
|
|
@@ -2823,8 +2834,8 @@
|
|
|
2823
2834
|
}
|
|
2824
2835
|
|
|
2825
2836
|
.tamga-choice-card[aria-checked="true"] {
|
|
2826
|
-
|
|
2827
|
-
|
|
2837
|
+
|
|
2838
|
+
background: color-mix(in oklab, var(--color-accent-bg) 60%, var(--color-shell));
|
|
2828
2839
|
}
|
|
2829
2840
|
|
|
2830
2841
|
.tamga-choice-chip:not([aria-checked="true"]):active,
|
|
@@ -2888,9 +2899,9 @@
|
|
|
2888
2899
|
transform: translate(2px, 2px);
|
|
2889
2900
|
box-shadow: 0 0 0 var(--color-accent-shadow);
|
|
2890
2901
|
}
|
|
2902
|
+
|
|
2891
2903
|
.tamga-radio[data-checked="true"] {
|
|
2892
2904
|
border-color: var(--color-accent);
|
|
2893
|
-
transform: translate(2px, 2px);
|
|
2894
2905
|
box-shadow: 0 0 0 var(--color-accent);
|
|
2895
2906
|
}
|
|
2896
2907
|
.tamga-radio[data-checked="true"]::before {
|
package/dist/styles.css
CHANGED
package/dist/theme.css
CHANGED