@stamcat/craftsman 0.0.27-alpha.12 → 0.0.27-alpha.13

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/AGENTS.md CHANGED
@@ -750,7 +750,7 @@ Sass usage (framework source):
750
750
  1. Hook calls (`useSomething`)
751
751
  2. State (`useState`)
752
752
  3. Derived state / variables (values computed from state or props)
753
- 4. Action handlers (`const handle*`, `const dispatch*`)
753
+ 4. Action handlers (`const handle*`, `const dispatch*`, `useEffect`)
754
754
 
755
755
  ## Known Limitations (Current Package State)
756
756
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.27-alpha.12",
3
+ "version": "0.0.27-alpha.13",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -23,6 +23,7 @@
23
23
  "prepublishOnly": "node ./scripts/prepublishCheck.js"
24
24
  },
25
25
  "dependencies": {
26
+ "@floating-ui/react-dom": "2.1.9",
26
27
  "clsx": "2.1.1",
27
28
  "dompurify": "3.4.13",
28
29
  "embla-carousel-react": "8.6.0",
@@ -3,6 +3,10 @@ import { LabeledInput } from '../Input/InputWrapper';
3
3
  type PropType = Omit<React.ComponentProps<"input">, "type"> & LabeledInput & {
4
4
  locale?: Intl.LocalesArgument;
5
5
  format?: 24 | 12;
6
+ labels?: {
7
+ hour?: "string";
8
+ minute?: "string";
9
+ };
6
10
  };
7
11
  export declare const TimePicker: (props: PropType) => React.JSX.Element;
8
12
  export {};
@@ -1,32 +1,15 @@
1
1
  @use "../../styles/utilities/functions" as u;
2
2
 
3
3
  @layer craftsman-base {
4
- .timePicker__display {
5
- display: inline-flex;
6
- align-items: center;
7
- gap: 2px;
8
- border: 1px solid #{u.color("gray400")};
9
- border-radius: 4px;
10
- padding: #{u.width("gutter", 0.25)} 30px #{u.width("gutter", 0.25)} #{u.width("gutter", 0.5)};
11
- position: relative;
12
- input, select {
13
- border: none;
14
- padding: #{u.width("gutter", 0.25)};
15
- }
16
- select::picker-icon {
17
- display: none;
18
- }
19
- .input-view-toggle {
20
- position: absolute;
21
- right: #{u.width("gutter", 0.5)};
22
- }
23
- }
24
4
 
25
5
  .timePicker {
26
6
  position: relative;
27
7
  display: inline-flex;
28
8
  height: 160px;
29
-
9
+ background-color: #{u.color("white")};
10
+ border: 1px solid #{u.color("gray400")};
11
+ border-radius: 8px;
12
+ z-index: 1;
30
13
  &:before,
31
14
  &:after {
32
15
  position: absolute;
@@ -58,6 +41,28 @@
58
41
  rgba(var(--background-site-rgb-value), 1) 100%
59
42
  );
60
43
  }
44
+ &__display {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ gap: 2px;
48
+ background-color: white;
49
+ border: 1px solid #{u.color("gray400")};
50
+ border-radius: 4px;
51
+ padding: #{u.width("gutter", 0.25)} 30px #{u.width("gutter", 0.25)} #{u.width("gutter", 0.5)};
52
+ position: relative;
53
+ z-index: 1;
54
+ input, select {
55
+ border: none;
56
+ padding: #{u.width("gutter", 0.25)};
57
+ }
58
+ select::picker-icon {
59
+ display: none;
60
+ }
61
+ .input-view-toggle {
62
+ position: absolute;
63
+ right: #{u.width("gutter", 0.5)};
64
+ }
65
+ }
61
66
 
62
67
  .ios-picker {
63
68
  height: 100%;
@@ -135,4 +140,5 @@
135
140
  pointer-events: none;
136
141
  }
137
142
  }
143
+
138
144
  }
@@ -1,5 +1,5 @@
1
1
  export declare function isEmpty(value: unknown): boolean;
2
2
  export declare function validateEmail(value: string): boolean;
3
- export declare const getUnitLabel: (locale: Intl.LocalesArgument, unit: Intl.NumberFormatOptions["unit"]) => string;
3
+ export declare const getUnitLabel: (locale: Intl.LocalesArgument, unit: Intl.NumberFormatOptions["unit"], override?: string) => string;
4
4
  export declare const is24HourFormat: (locale: Intl.LocalesArgument) => boolean;
5
5
  export declare const getAmPmLabels: (locale: Intl.LocalesArgument) => [string, string];
@@ -5,7 +5,7 @@ function e(e) {
5
5
  function t(e) {
6
6
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
7
7
  }
8
- var n = (e, t) => new Intl.NumberFormat(e, {
8
+ var n = (e, t, n) => n ?? new Intl.NumberFormat(e, {
9
9
  style: "unit",
10
10
  unit: t,
11
11
  unitDisplay: "long"